summaryrefslogtreecommitdiff
path: root/src/gui/util
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2010-06-07 23:08:07 -0700
committerJesse Barnes <jbarnes@virtuousgeek.org>2010-06-08 19:32:32 -0700
commit3a005cdf983881612a70836dcd3ab816b0ea7698 (patch)
tree615de8a3f796bde47174c6fcb9a2be6a825f3588 /src/gui/util
parentf68bab66aacded35be3d222e703e74e9db0bada3 (diff)
Add Wayland build & stub support
Add a new platform target, called wayland, to support building a Wayland-aware Qt library. Enabled by passing "-wayland" to configure. Defines a new window system type, Q_WS_WAYLAND, which can be used to pull in the right implementations or declare methods in various support classes.
Diffstat (limited to 'src/gui/util')
-rw-r--r--src/gui/util/qdesktopservices.cpp2
-rw-r--r--src/gui/util/qdesktopservices_wayland.cpp75
-rw-r--r--src/gui/util/qsystemtrayicon_wayland.cpp91
-rw-r--r--src/gui/util/util.pri5
4 files changed, 173 insertions, 0 deletions
diff --git a/src/gui/util/qdesktopservices.cpp b/src/gui/util/qdesktopservices.cpp
index 8b36b32476..52bac8c8bf 100644
--- a/src/gui/util/qdesktopservices.cpp
+++ b/src/gui/util/qdesktopservices.cpp
@@ -55,6 +55,8 @@
#include "qdesktopservices_mac.cpp"
#elif defined(Q_OS_SYMBIAN)
#include "qdesktopservices_s60.cpp"
+#elif defined(Q_WS_WAYLAND)
+#include "qdesktopservices_wayland.cpp"
#endif
#include <qhash.h>
diff --git a/src/gui/util/qdesktopservices_wayland.cpp b/src/gui/util/qdesktopservices_wayland.cpp
new file mode 100644
index 0000000000..777dc05862
--- /dev/null
+++ b/src/gui/util/qdesktopservices_wayland.cpp
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qcoreapplication.h>
+#include <qdir.h>
+
+QT_BEGIN_NAMESPACE
+
+static bool launchWebBrowser(const QUrl &url)
+{
+ Q_UNUSED(url);
+ qWarning("QDesktopServices::launchWebBrowser not implemented");
+ return false;
+}
+
+static bool openDocument(const QUrl &file)
+{
+ Q_UNUSED(file);
+ qWarning("QDesktopServices::openDocument not implemented");
+ return false;
+}
+
+
+QString QDesktopServices::storageLocation(StandardLocation type)
+{
+ qWarning("QDesktopServices::storageLocation %d not implemented", type);
+ return QString();
+}
+
+QString QDesktopServices::displayName(StandardLocation type)
+{
+ Q_UNUSED(type);
+ qWarning("QDesktopServices::displayName not implemented");
+ return QString();
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/util/qsystemtrayicon_wayland.cpp b/src/gui/util/qsystemtrayicon_wayland.cpp
new file mode 100644
index 0000000000..b1b895ba8c
--- /dev/null
+++ b/src/gui/util/qsystemtrayicon_wayland.cpp
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qsystemtrayicon_p.h"
+
+#ifndef QT_NO_SYSTEMTRAYICON
+
+QT_BEGIN_NAMESPACE
+
+void QSystemTrayIconPrivate::install_sys()
+{
+}
+
+void QSystemTrayIconPrivate::remove_sys()
+{
+}
+
+QRect QSystemTrayIconPrivate::geometry_sys() const
+{
+ return QRect();
+}
+
+void QSystemTrayIconPrivate::updateIcon_sys()
+{
+}
+
+void QSystemTrayIconPrivate::updateMenu_sys()
+{
+}
+
+void QSystemTrayIconPrivate::updateToolTip_sys()
+{
+}
+
+bool QSystemTrayIconPrivate::isSystemTrayAvailable_sys()
+{
+ return false;
+}
+
+void QSystemTrayIconPrivate::showMessage_sys(const QString &message,
+ const QString &title,
+ QSystemTrayIcon::MessageIcon icon,
+ int msecs)
+{
+ Q_UNUSED(message);
+ Q_UNUSED(title);
+ Q_UNUSED(icon);
+ Q_UNUSED(msecs);
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_SYSTEMTRAYICON
diff --git a/src/gui/util/util.pri b/src/gui/util/util.pri
index be8db93d39..f3ce448ee5 100644
--- a/src/gui/util/util.pri
+++ b/src/gui/util/util.pri
@@ -33,6 +33,11 @@ unix:x11 {
util/qsystemtrayicon_x11.cpp
}
+wayland {
+ SOURCHES += \
+ util/qsystemtrayicon_wayland.cpp
+}
+
embedded {
SOURCES += \
util/qsystemtrayicon_qws.cpp