summaryrefslogtreecommitdiffstats
path: root/backend
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2013-07-09 16:45:06 +0200
committerJ-P Nurmi <jpnurmi@digia.com>2013-07-09 16:46:16 +0200
commit7cda04dccdbba66f9b76268f2146e1b11127108b (patch)
tree303d7c27625f8652dee1cd3b8f00ee1b7ec69376 /backend
parent8744c34f09ffab9513f704088c42ed0f7c092970 (diff)
Add Win32Settings stubHEADmaster
Change-Id: I2e0a9cb1224ad1e621bac0bfb12eff254492df83 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'backend')
-rw-r--r--backend/backend.pri3
-rw-r--r--backend/win32/win32.pri8
-rw-r--r--backend/win32/win32settings.cpp89
-rw-r--r--backend/win32/win32settings.h67
4 files changed, 166 insertions, 1 deletions
diff --git a/backend/backend.pri b/backend/backend.pri
index 324981c..14aa4db 100644
--- a/backend/backend.pri
+++ b/backend/backend.pri
@@ -1,3 +1,4 @@
-mac:include(cocoa/cocoa.pri)
+win32:include(win32/win32.pri)
+else:mac:include(cocoa/cocoa.pri)
else:unix:include(dconf/dconf.pri)
else:error(Not implemented for $$first(QMAKE_PLATFORM))
diff --git a/backend/win32/win32.pri b/backend/win32/win32.pri
new file mode 100644
index 0000000..0c1301b
--- /dev/null
+++ b/backend/win32/win32.pri
@@ -0,0 +1,8 @@
+INCLUDEPATH += $$PWD
+DEPENDPATH += $$PWD
+
+SOURCES += \
+ $$PWD/win32settings.cpp
+
+HEADERS += \
+ $$PWD/win32settings.h
diff --git a/backend/win32/win32settings.cpp b/backend/win32/win32settings.cpp
new file mode 100644
index 0000000..882ab1c
--- /dev/null
+++ b/backend/win32/win32settings.cpp
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is prototype code for the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "win32settings.h"
+
+Win32Settings::Win32Settings(QObject *parent) : Settings(parent)
+{
+}
+
+Win32Settings::~Win32Settings()
+{
+}
+
+void Win32Settings::remove(const QString &key)
+{
+}
+
+void Win32Settings::set(const QString &key, const QVariant &value)
+{
+}
+
+bool Win32Settings::get(const QString &key, QVariant *value) const
+{
+ return false;
+}
+
+QStringList Win32Settings::children(const QString &prefix, ChildSpec spec) const
+{
+ return QStringList();
+}
+
+void Win32Settings::clear()
+{
+}
+
+void Win32Settings::sync()
+{
+}
+
+void Win32Settings::flush()
+{
+}
+
+bool Win32Settings::isWritable() const
+{
+ return false;
+}
+
+QString Win32Settings::fileName() const
+{
+ return QString();
+}
diff --git a/backend/win32/win32settings.h b/backend/win32/win32settings.h
new file mode 100644
index 0000000..2da4066
--- /dev/null
+++ b/backend/win32/win32settings.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is prototype code for the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef WIN32SETTINGS_H
+#define WIN32SETTINGS_H
+
+#include "settings.h"
+
+class Win32Settings : public Settings
+{
+ Q_OBJECT
+
+public:
+ explicit Win32Settings(QObject *parent = 0);
+ ~Win32Settings();
+
+ void remove(const QString &key);
+ void set(const QString &key, const QVariant &value);
+ bool get(const QString &key, QVariant *value) const;
+
+ QStringList children(const QString &prefix, ChildSpec spec) const;
+
+ void clear();
+ void sync();
+ void flush();
+ bool isWritable() const;
+ QString fileName() const;
+};
+
+#endif // WIN32SETTINGS_H