Ubuntu Pastebin

Paste from zsombi at Fri, 21 Aug 2015 13:10:41 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
    QString runtimeDir = QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation);
    if (runtimeDir.isEmpty()) {
        runtimeDir = qgetenv("XDG_RUNTIME_DIR");
    }
    if (runtimeDir.isEmpty()) {
        qCritical() << "[StateSaver] No XDG_RUNTIME_DIR path set, cannot create appstate file.";
        return;
    }
    m_archive = new QSettings(QString("%1/%2/statesaver.appstate").
                              arg(runtimeDir).
                              arg(applicationName), QSettings::NativeFormat);
Download as text