Created
June 11, 2014 19:27
-
-
Save MKleusberg/4b9e38a331755f6649ca to your computer and use it in GitHub Desktop.
Patch for relative path project file debugging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp | |
index e60b367..c83df9f 100644 | |
--- a/src/MainWindow.cpp | |
+++ b/src/MainWindow.cpp | |
@@ -1721,8 +1721,13 @@ bool MainWindow::loadProject(QString filename) | |
{ | |
// DB file | |
QString dbfilename = xml.attributes().value("path").toString(); | |
+ qDebug() << "before: " << dbfilename; | |
if(!QFile::exists(dbfilename)) | |
+ { | |
+ qDebug() << "relative path!"; | |
dbfilename = QFileInfo(filename).absolutePath() + QDir::separator() + dbfilename; | |
+ } | |
+ qDebug() << "after: " << dbfilename; | |
fileOpen(dbfilename); | |
ui->dbTreeWidget->collapseAll(); | |
} else if(xml.name() == "window") { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment