on xenial help sign in
Remove dead code from Utils plugin

They are not being used anywhere. Approved by PS Jenkins bot, Albert Astals Cid.

commit4d4c90e809ed90345f19d937768e58565a64ba4a authorDaniel d'Andrada <daniel.dandrada@canonical.com> dateTue 26 Nov 2013, 14:30 (13 years ago) parenta886c6b03b2b1b
5 files changed−128
plugins/Utils/CMakeLists.txt−2 plugins/Utils/applicationpaths.h−38 plugins/Utils/plugin.cpp−10 plugins/Utils/ubuntuwindow.cpp−36 plugins/Utils/ubuntuwindow.h−42
plugins/Utils/CMakeLists.txt−2
@@ -12,12 +12,10 @@ include_directories(
1212
1313set(QMLPLUGIN_SRC
1414 albumartprovider.cpp
15− applicationpaths.h
1615 bottombarvisibilitycommunicatorshell.cpp
1716 mediaartcache.cpp
1817 qlimitproxymodelqml.cpp
1918 qsortfilterproxymodelqml.cpp
20− ubuntuwindow.cpp
2119 unitymenumodelpaths.cpp
2220 plugin.cpp
2321 )
plugins/Utils/applicationpaths.hdeleted−38
@@ -1,38 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− *
16− * Authored by: Nick Dedekind <nick.dedekind@canonical.com>
17− */
18−
19−
20−#ifndef APPLICATION_PATHS_H
21−#define APPLICATION_PATHS_H
22−
23−#include <QObject>
24−#include "paths.h"
25−
26−class ApplicationPaths : public QObject
27−{
28− Q_OBJECT
29−public:
30− Q_INVOKABLE bool isRunningInstalled() const { return ::isRunningInstalled(); }
31− Q_INVOKABLE QString shellAppDirectory() const { return ::shellAppDirectory(); }
32− Q_INVOKABLE QStringList overrideImportPaths() const { return ::overrideImportPaths(); }
33− Q_INVOKABLE QStringList fallbackImportPaths() const { return ::fallbackImportPaths(); }
34− Q_INVOKABLE QStringList shellDataDirs() const { return ::shellDataDirs(); }
35− Q_INVOKABLE QString sourceDirectory() const { return ::sourceDirectory(); }
36−};
37−
38−#endif // APPLICATION_PATHS_H
plugins/Utils/plugin.cpp−10
@@ -27,22 +27,14 @@
2727
2828// local
2929#include "albumartprovider.h"
30−#include "applicationpaths.h"
3130#include "bottombarvisibilitycommunicatorshell.h"
3231#include "qlimitproxymodelqml.h"
3332#include "qsortfilterproxymodelqml.h"
34−#include "ubuntuwindow.h"
3533#include "unitymenumodelpaths.h"
3634
3735static const char* BOTTOM_BAR_VISIBILITY_COMMUNICATOR_DBUS_PATH = "/BottomBarVisibilityCommunicator";
3836static const char* DBUS_SERVICE = "com.canonical.Shell.BottomBarVisibilityCommunicator";
3937
40−static QObject* applicationsPathsSingleton(QQmlEngine* engine, QJSEngine* scriptEngine) {
41− Q_UNUSED(engine);
42− Q_UNUSED(scriptEngine);
43− return new ApplicationPaths;
44−}
45−
4638void UtilsPlugin::registerTypes(const char *uri)
4739{
4840 Q_ASSERT(uri == QLatin1String("Utils"));
@@ -50,8 +42,6 @@ void UtilsPlugin::registerTypes(const char *uri)
5042 qmlRegisterType<QLimitProxyModelQML>(uri, 0, 1, "LimitProxyModel");
5143 qmlRegisterType<QSortFilterProxyModelQML>(uri, 0, 1, "SortFilterProxyModel");
5244 qmlRegisterType<UnityMenuModelPaths>(uri, 0, 1, "UnityMenuModelPaths");
53− qmlRegisterExtendedType<QQuickWindow, UbuntuWindow>(uri, 0, 1, "Window");
54− qmlRegisterSingletonType<ApplicationPaths>(uri, 0, 1, "ApplicationPaths", applicationsPathsSingleton);
5545 qmlRegisterUncreatableType<BottomBarVisibilityCommunicatorShell>(uri, 0, 1, "BottomBarVisibilityCommunicatorShell", "Can't create BottomBarVisibilityCommunicatorShell");
5646}
5747
plugins/Utils/ubuntuwindow.cppdeleted−36
@@ -1,36 +0,0 @@
1−/*
2− * Copyright (C) 2012 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−#include "ubuntuwindow.h"
18−#include <QDebug>
19−
20−
21−UbuntuWindow::UbuntuWindow(QObject *parent)
22− : QObject(parent),
23− m_window(static_cast<QQuickWindow*>(parent))
24−{
25−}
26−
27−int UbuntuWindow::ubuntuSurfaceRole() const
28−{
29− return m_window->property("UbuntuSurfaceRole").toInt();
30−}
31−
32−void UbuntuWindow::setUbuntuSurfaceRole(int ubuntuSurfaceRole)
33−{
34− qDebug() << "setUbuntuSurfaceRole" << ubuntuSurfaceRole;
35− m_window->setProperty("UbuntuSurfaceRole", ubuntuSurfaceRole);
36−}
plugins/Utils/ubuntuwindow.hdeleted−42
@@ -1,42 +0,0 @@
1−/*
2− * Copyright (C) 2012 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−#ifndef UBUNTUWINDOW_H
18−#define UBUNTUWINDOW_H
19−
20−#include <QtCore/QObject>
21−#include <QtQuick/QQuickWindow>
22−
23−class UbuntuWindow : public QObject
24−{
25− Q_OBJECT
26−
27− Q_PROPERTY(int ubuntuSurfaceRole READ ubuntuSurfaceRole WRITE setUbuntuSurfaceRole NOTIFY ubuntuSurfaceRoleChanged)
28−
29−public:
30− explicit UbuntuWindow(QObject *parent = 0);
31−
32− int ubuntuSurfaceRole() const;
33− void setUbuntuSurfaceRole(int ubuntuSurfaceRole);
34−
35−Q_SIGNALS:
36− void ubuntuSurfaceRoleChanged(int);
37−
38−private:
39− QQuickWindow* m_window;
40−};
41−
42−#endif // UBUNTUWINDOW_H