Changeset 31694c8b58 in tspsg for src/globals.cpp
- Timestamp:
- Sep 16, 2012, 10:40:01 PM (12 years ago)
- Branches:
- appveyor, imgbot, master, readme
- Children:
- 1b0d08aa2e
- Parents:
- 0784c85e46
- git-author:
- Oleksii Serdiuk <contacts@…> (09/16/12 22:40:01)
- git-committer:
- Oleksii Serdiuk <contacts@…> (09/16/12 22:41:39)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/globals.cpp
r0784c85e46 r31694c8b58 24 24 #include "globals.h" 25 25 26 #ifdef Q_OS_WINCE_WM 27 # include <shellapi.h> 28 #endif 29 30 QSettings *initSettings(QObject *parent) 31 { 32 #ifdef Q_OS_WINCE_WM 33 /*! 34 * \hack HACK: On Windows Mobile the way Qt tries to get path for saving 35 * settings doesn't always work. This workaround tries to fix it. 36 */ 37 if (!QDesktopServices::storageLocation(QDesktopServices::DataLocation).isEmpty()) { 38 #endif // Q_OS_WINCE_WM 39 return new QSettings(QSettings::IniFormat, QSettings::UserScope, "TSPSG", "tspsg", parent); 40 #ifdef Q_OS_WINCE_WM 41 } else { 42 wchar_t path[MAX_PATH]; 43 SHGetSpecialFolderPath(0, path, 0x001a, FALSE); 44 QString fileName = QString::fromWCharArray(path); 45 fileName.append("\\TSPSG\\tspsg.ini"); 46 return new QSettings(fileName, QSettings::IniFormat, parent); 47 } 48 #endif // Q_OS_WINCE_WM 49 } 50 26 51 #ifndef HANDHELD 27 52 void toggleStyle(QWidget *widget, bool enable)
Note: See TracChangeset
for help on using the changeset viewer.