Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 531108
Collapse All | Expand All

(-)QtWeb-b108.orig/src/browserapplication.cpp (-13 / +3 lines)
Lines 240-251 Link Here
240
            if (!tested_ok || !is_writable)
240
            if (!tested_ok || !is_writable)
241
            {
241
            {
242
                // Copy settings from base template to temporary storage
242
                // Copy settings from base template to temporary storage
243
                QDir temp_dir(QDir::temp());
243
                QDir temp_dir(dataLocation());
244
                bool res = temp_dir.mkdir(settings.organizationName());
244
                bool res = temp_dir.mkdir(settings.organizationName());
245
                res = temp_dir.cd(settings.organizationName());
245
                res = temp_dir.cd(settings.organizationName());
246
                res = QFile::copy(  settings.fileName(), temp_dir.absolutePath() + QDir::separator() + settings.applicationName() + ".ini" );
246
                res = QFile::copy(  settings.fileName(), temp_dir.absolutePath() + QDir::separator() + settings.applicationName() + ".ini" );
247
                // Change path to settings to the temp storage
247
                // Change path to settings to the temp storage
248
                QSettings::setPath(QSettings::IniFormat, QSettings::UserScope, QDir::temp().tempPath());
248
                QSettings::setPath(QSettings::IniFormat, QSettings::UserScope, dataLocation());
249
            }
249
            }
250
250
251
        }
251
        }
Lines 932-948 Link Here
932
932
933
QString BrowserApplication::dataLocation()
933
QString BrowserApplication::dataLocation()
934
{
934
{
935
    if (s_portableRunMode)
935
     return QDesktopServices::storageLocation(QDesktopServices::DataLocation);
936
    {
937
        QDir dir(QCoreApplication::applicationDirPath());
938
        if (!dir.exists("QtWebCache"))
939
            if (!dir.mkdir("QtWebCache"))
940
                return "";
941
942
        return QCoreApplication::applicationDirPath()+ "/QtWebCache";
943
    }
944
    else
945
        return QDesktopServices::storageLocation(QDesktopServices::DataLocation);
946
}
936
}
947
937
948
QString BrowserApplication::downloadsLocation(bool create_dir)
938
QString BrowserApplication::downloadsLocation(bool create_dir)

Return to bug 531108