@@ -93,6 +93,7 @@ void MainWindow::compile() {
9393 texdir = QFileInfo (tmpdir.path ());
9494 }
9595 QFileInfo templateDir = QFileInfo (templateFile.path ());
96+ // TODO: make workdir user-configurable
9697 if (templateDir.absolutePath () == " " ) {
9798 workdir = texdir;
9899 } else {
@@ -109,7 +110,6 @@ void MainWindow::compile() {
109110 std::cout << " Compiler workdir: " << workdir.absolutePath ().toStdString () << std::endl;
110111
111112 renderProcess = new QProcess (this );
112- // ~ renderProcess->setWorkingDirectory(texdir.absolutePath());
113113 renderProcess->setWorkingDirectory (workdir.absolutePath ());
114114 clearLog ();
115115 renderProcess->start (program, arguments);
@@ -438,7 +438,7 @@ void MainWindow::handleTexfileChanged(const QString& filename) {
438438 if (!usersaved) {
439439 std::cout << " Texfile " << filename.toStdString () << " externally changed." << std::endl;
440440 /* Reloading */
441- katePart->openUrl (QUrl ( QUrl::fromUserInput (filename) ));
441+ katePart->openUrl (QUrl::fromLocalFile (filename));
442442 }
443443 /* Always re-watch file */
444444 if (texfileWatcher) {
@@ -453,7 +453,7 @@ void MainWindow::updateTemplate(const QString& filename) {
453453 QUrl oldTemplateFile = QUrl (settings.value (" template" , " " ).toString ());
454454 templateWatcher.removePath (oldTemplateFile.path ());
455455
456- templateFile = QUrl::fromUserInput (filename);
456+ templateFile = QUrl::fromLocalFile (filename);
457457 std::cout << " Loading template " << templateFile.path ().toStdString () << std::endl;
458458 templateWatcher.addPath (templateFile.path ());
459459 settings.setValue (" template" , filename);
0 commit comments