Skip to content

Commit

Permalink
Use a platform-agnostic way to determine whether a path is an absolut…
Browse files Browse the repository at this point in the history
…e or relative one.

Bug 325086
Please test the automatically generated build (in a few minutes) at https://github.com/Kst-plot/kst-build and close the report
if it works.
  • Loading branch information
brisset committed Oct 1, 2013
1 parent 78e90bb commit e978b57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libkstapp/mainwindow.cpp
Expand Up @@ -353,7 +353,7 @@ void MainWindow::updateRecentFiles(const QString& key, QMenu* menu, QList<QActio
{
// Always add absolute paths to the recent file lists, otherwise they are not very reusable
QString absoluteFilePath = newfilename;
if (!newfilename.isEmpty() && !newfilename.startsWith("/")) { // If it's not empty and not absolute either, add the dir
if (!newfilename.isEmpty() && !QDir::isAbsolutePath(newfilename)) { // If it's not empty and not absolute either, add the dir
absoluteFilePath = QDir::currentPath() + "/" + newfilename;
}
foreach(QAction* it, actions) {
Expand Down

0 comments on commit e978b57

Please sign in to comment.