Skip to content

Commit b6eb849

Browse files
author
Samuel Weiser
committed
minor
1 parent 8899534 commit b6eb849

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,5 @@ Makefile*
3737
# QtCtreator CMake
3838
CMakeLists.txt.user*
3939

40+
# build files
41+
build/

mainwindow.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)