diff options
author | Lukáš Lalinský <lalinsky@gmail.com> | 2009-08-26 13:01:55 +0200 |
---|---|---|
committer | Lukáš Lalinský <lalinsky@gmail.com> | 2009-08-26 13:01:55 +0200 |
commit | 008346e5fbfe137c5014a40ae73c66449caf39d4 (patch) | |
tree | 236782ca00ddf2e1ca0966682e5a788d0f2ccf43 /src | |
parent | b63c944dbb666d7822ebd57a4a7ea2ced4036656 (diff) | |
download | dbmodel-008346e5fbfe137c5014a40ae73c66449caf39d4.tar.xz |
Force absolute paths in the list of recent files
Diffstat (limited to 'src')
-rw-r--r-- | src/mainwindow.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 7d26984..b7ebbe3 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -707,8 +707,9 @@ MainWindow::addRecentFile(const QString &fileName) { QSettings settings; QStringList files = settings.value("recentFileList").toStringList(); - files.removeAll(fileName); - files.prepend(fileName); + QString absFileName = QFileInfo(fileName).absoluteFilePath(); + files.removeAll(absFileName); + files.prepend(absFileName); while (files.size() > MaxRecentFiles) files.removeLast(); settings.setValue("recentFileList", files); |