Changeset 351:49b95a9e06c9 in SMSSender


Ignore:
Timestamp:
Mar 31, 2014 1:04:20 PM (5 years ago)
Author:
Sämy Zehnder <saemy.zehnder@…>
Branch:
separation-frontend-backend
Message:
  • Fixes bug in library load path selection.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • frontend/gui/bootstrap.cpp

    r340 r351  
    5858
    5959void Bootstrap::loadLibraries() {
     60    bool found = false;
     61
    6062    QDir libraryPath(qApp->applicationDirPath());
    6163#ifdef Q_OS_WIN
     
    6769    }
    6870#endif
    69 
    70     if (!libraryPath.cd("gateways")) {
    71         return;
    72     }
     71    found &= libraryPath.cd("gateways");
    7372
    7473#ifdef Q_OS_UNIX
    7574#ifndef QT_DEBUG
    76     libraryPath = QDir("/usr/lib/smssender/gateways");
    77     if (!libraryPath.exists()) {
    78         return;
     75    if (!found) {
     76        libraryPath = QDir("/usr/lib/smssender/gateways");
     77        found |= libraryPath.exists();
    7978    }
    8079#endif
    8180#endif
     81
     82    if (!found) {
     83        return;
     84    }
    8285
    8386    m_libraryLoader->loadLibraries(libraryPath);
Note: See TracChangeset for help on using the changeset viewer.