diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-03-10 16:11:07 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-19 11:14:02 +0100 |
commit | f8d1105adde03a52806e0f19cc652f2dca6bb78f (patch) | |
tree | 1279d82ae58cd2f570ff2f861bb32f90cefbb83c /examples/quick | |
parent | 177be5dc8c34f840e07e4ac33e182b012420893b (diff) |
Remove the widgetsnanobrowser example
This example hasn't been touched since we imported QtWebKit examples.
If we need to have a more test-purpose widgets browser in the future,
we can dig it back from the history.
Change-Id: Icee9bd7f09827a97b33c6783b87311e331d963b1
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Diffstat (limited to 'examples/quick')
-rw-r--r-- | examples/quick/quicknanobrowser/icons/go-next.png | bin | 0 -> 930 bytes | |||
-rw-r--r-- | examples/quick/quicknanobrowser/icons/go-previous.png | bin | 0 -> 955 bytes | |||
-rw-r--r-- | examples/quick/quicknanobrowser/icons/process-stop.png | bin | 0 -> 1272 bytes | |||
-rw-r--r-- | examples/quick/quicknanobrowser/icons/view-refresh.png | bin | 0 -> 1364 bytes | |||
-rw-r--r-- | examples/quick/quicknanobrowser/quicknanobrowser.pro | 4 | ||||
-rw-r--r-- | examples/quick/quicknanobrowser/quickwindow.cpp | 2 | ||||
-rw-r--r-- | examples/quick/quicknanobrowser/resources.qrc | 6 | ||||
-rw-r--r-- | examples/quick/quicknanobrowser/util.h | 73 |
8 files changed, 82 insertions, 3 deletions
diff --git a/examples/quick/quicknanobrowser/icons/go-next.png b/examples/quick/quicknanobrowser/icons/go-next.png Binary files differnew file mode 100644 index 000000000..6f3f65d33 --- /dev/null +++ b/examples/quick/quicknanobrowser/icons/go-next.png diff --git a/examples/quick/quicknanobrowser/icons/go-previous.png b/examples/quick/quicknanobrowser/icons/go-previous.png Binary files differnew file mode 100644 index 000000000..93be3d1ee --- /dev/null +++ b/examples/quick/quicknanobrowser/icons/go-previous.png diff --git a/examples/quick/quicknanobrowser/icons/process-stop.png b/examples/quick/quicknanobrowser/icons/process-stop.png Binary files differnew file mode 100644 index 000000000..b68290bf1 --- /dev/null +++ b/examples/quick/quicknanobrowser/icons/process-stop.png diff --git a/examples/quick/quicknanobrowser/icons/view-refresh.png b/examples/quick/quicknanobrowser/icons/view-refresh.png Binary files differnew file mode 100644 index 000000000..cab4d02c7 --- /dev/null +++ b/examples/quick/quicknanobrowser/icons/view-refresh.png diff --git a/examples/quick/quicknanobrowser/quicknanobrowser.pro b/examples/quick/quicknanobrowser/quicknanobrowser.pro index 3455f02e0..b07bd4e51 100644 --- a/examples/quick/quicknanobrowser/quicknanobrowser.pro +++ b/examples/quick/quicknanobrowser/quicknanobrowser.pro @@ -3,7 +3,8 @@ TARGET = quicknanobrowser macx: CONFIG -= app_bundle -HEADERS = quickwindow.h +HEADERS = quickwindow.h \ + util.h SOURCES = quickwindow.cpp \ main.cpp @@ -11,7 +12,6 @@ OTHER_FILES += ContextMenuExtras.qml \ quickwindow.qml RESOURCES += resources.qrc -RESOURCES += ../../common/common_resources.qrc QT += qml quick QT_PRIVATE += quick-private gui-private core-private diff --git a/examples/quick/quicknanobrowser/quickwindow.cpp b/examples/quick/quicknanobrowser/quickwindow.cpp index df93cd218..ec7b6f94a 100644 --- a/examples/quick/quicknanobrowser/quickwindow.cpp +++ b/examples/quick/quicknanobrowser/quickwindow.cpp @@ -41,7 +41,7 @@ #include "quickwindow.h" -#include "../../common/util.h" +#include "util.h" #include <QFileInfo> #include <QObject> diff --git a/examples/quick/quicknanobrowser/resources.qrc b/examples/quick/quicknanobrowser/resources.qrc index 5294b7ff6..1befb4fd1 100644 --- a/examples/quick/quicknanobrowser/resources.qrc +++ b/examples/quick/quicknanobrowser/resources.qrc @@ -3,4 +3,10 @@ <file>quickwindow.qml</file> <file>ContextMenuExtras.qml</file> </qresource> + <qresource prefix="icons"> + <file alias="go-next.png">icons/go-next.png</file> + <file alias="go-previous.png">icons/go-previous.png</file> + <file alias="process-stop.png">icons/process-stop.png</file> + <file alias="view-refresh.png">icons/view-refresh.png</file> + </qresource> </RCC> diff --git a/examples/quick/quicknanobrowser/util.h b/examples/quick/quicknanobrowser/util.h new file mode 100644 index 000000000..ea0ae8b2e --- /dev/null +++ b/examples/quick/quicknanobrowser/util.h @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtWebEngine module of 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 UTIL_H +#define UTIL_H + +#include <QtCore/QCoreApplication> +#include <QtCore/QFileInfo> +#include <QtCore/QUrl> +#include <QtCore/QStringList> + +QUrl urlFromUserInput(const QString& userInput) +{ + QFileInfo fileInfo(userInput); + if (fileInfo.exists()) + return QUrl(fileInfo.absoluteFilePath()); + return QUrl::fromUserInput(userInput); +} + +QUrl startupUrl() +{ + QUrl ret; + QStringList args(qApp->arguments()); + args.takeFirst(); + Q_FOREACH(const QString& arg, args) { + if (arg.startsWith(QLatin1Char('-'))) + continue; + ret = urlFromUserInput(arg); + if (ret.isValid()) + return ret; + } + return QUrl(QStringLiteral("http://qt-project.org/")); +} + + +#endif // UTIL_H |