Changeset 13c9d2a in subsurface


Ignore:
Timestamp:
Dec 9, 2013, 10:29:06 PM (4 years ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
Mtest, android_test, dcDownload, foratdotde, gitMerge, gitdebug, gitpictures, ios, master, mergeKirigamiPort, pictimeshift, resolutionIndependence, spinner, testTomaz, testing, v4.0-branch, v4.0.3-branch, v4.2-branch, v4.4-branch, v4.5-branch
Children:
0d4fb44
Parents:
5e1cfd9
Message:

Don't rely on current path when searching for support files

The notion of current path changes as we open files in the file system.
What we really want is the directory from where Subsurface was started.
That covers both the case of Windows and running Subsurface from the
install directory.

This worked before because all support files were opened before the first
user interaction. But opening the manual showed the flaw in the previous
logic.

Fixes #348

Signed-off-by: Dirk Hohndel <dirk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • qt-gui.cpp

    re015eff r13c9d2a  
    395395        QDir folder;
    396396
    397         // first check if we are running in the build dir, so this
    398         // is just subdirectory of the current directory
    399         execdir = QDir::currentPath();
     397        // first check if we are running in the build dir, so the path that we
     398        // are looking for is just a  subdirectory of the execution path;
     399        // this also works on Windows as there we install the dirs
     400        // under the application path
     401        execdir = QCoreApplication::applicationDirPath();
    400402        folder = QDir(execdir.append(QDir::separator()).append(folderToFind));
    401403        if (folder.exists())
Note: See TracChangeset for help on using the changeset viewer.