Skip to content

Instantly share code, notes, and snippets.

@MKleusberg
Created June 11, 2014 19:27
Show Gist options
  • Save MKleusberg/4b9e38a331755f6649ca to your computer and use it in GitHub Desktop.
Save MKleusberg/4b9e38a331755f6649ca to your computer and use it in GitHub Desktop.
Patch for relative path project file debugging
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