From 7cda04dccdbba66f9b76268f2146e1b11127108b Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Tue, 9 Jul 2013 16:45:06 +0200 Subject: Add Win32Settings stub Change-Id: I2e0a9cb1224ad1e621bac0bfb12eff254492df83 Reviewed-by: J-P Nurmi --- backend/backend.pri | 3 +- backend/win32/win32.pri | 8 ++++ backend/win32/win32settings.cpp | 89 +++++++++++++++++++++++++++++++++++++++++ backend/win32/win32settings.h | 67 +++++++++++++++++++++++++++++++ 4 files changed, 166 insertions(+), 1 deletion(-) create mode 100644 backend/win32/win32.pri create mode 100644 backend/win32/win32settings.cpp create mode 100644 backend/win32/win32settings.h (limited to 'backend') 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 -- cgit v1.2.3