OSDN Git Service

libs: remove manual plasmagenericshell test
authorIvailo Monev <xakepa10@gmail.com>
Fri, 7 Jul 2023 16:09:08 +0000 (19:09 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Fri, 7 Jul 2023 16:09:08 +0000 (19:09 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
libs/plasmagenericshell/CMakeLists.txt
libs/plasmagenericshell/tests/CMakeLists.txt [deleted file]
libs/plasmagenericshell/tests/background.cpp [deleted file]
libs/plasmagenericshell/tests/main.cpp [deleted file]

index 054354d..35b40c9 100644 (file)
@@ -4,10 +4,6 @@ include_directories(
     ${CMAKE_BINARY_DIR}/libs/kworkspace
 )
 
-if(ENABLE_TESTING)
-    add_subdirectory(tests)
-endif()
-
 set(appletbrowserdialog_SRCS
     widgetsexplorer/kcategorizeditemsviewmodels.cpp
     widgetsexplorer/plasmaappletitemmodel.cpp
@@ -51,10 +47,7 @@ target_link_libraries(plasmagenericshell PUBLIC
     ${QT_QTUITOOLS_LIBRARY}
     kworkspace
 )
-
-if(Q_WS_X11)
-    target_link_libraries(plasmagenericshell PRIVATE ${X11_LIBRARIES})
-endif(Q_WS_X11)
+target_link_libraries(plasmagenericshell PRIVATE ${X11_LIBRARIES})
 
 set_target_properties(plasmagenericshell PROPERTIES
     VERSION ${GENERIC_LIB_VERSION}
diff --git a/libs/plasmagenericshell/tests/CMakeLists.txt b/libs/plasmagenericshell/tests/CMakeLists.txt
deleted file mode 100644 (file)
index 7777aee..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-include_directories(
-    ${CMAKE_CURRENT_SOURCE_DIR}/..
-    ${CMAKE_CURRENT_SOURCE_DIR}/../widgetsexplorer
-)
-
-add_definitions(-DPLASMAGENERICSHELL_EXPORT=)
-
-set(appletexplorer_SRCS
-    ../widgetsexplorer/kcategorizeditemsviewmodels.cpp
-    ../widgetsexplorer/plasmaappletitemmodel.cpp
-    ../widgetsexplorer/widgetexplorer.cpp
-    main.cpp
-)
-add_executable(plasmaappletexplorer ${appletexplorer_SRCS})
-target_link_libraries(plasmaappletexplorer
-    KDE4::plasma
-    KDE4::kdeui
-    KDE4::kfile
-    ${QT_QTDECLARATIVE_LIBRARY}
-)
-
-set(backgrounddialog_SRCS
-    background.cpp
-    ../backgrounddialog.cpp
-    ../mouseinputbutton.cpp
-    ../mouseplugins.cpp
-    ../mousepluginwidget.cpp
-    ../wallpaperpreview.cpp
-    ../MousePlugins.ui
-    ../MousePlugins.ui
-    ../BackgroundDialog.ui
-)
-
-kde4_add_kcfg_files(backgrounddialog_SRCS ${CMAKE_SOURCE_DIR}/plasma/shells/plasma-desktop/data/plasma-shell-desktop.kcfgc)
-
-add_executable(plasmabackgrounddialog ${backgrounddialog_SRCS})
-target_link_libraries(plasmabackgrounddialog KDE4::plasma ${QT_QTUITOOLS_LIBRARY} KDE4::kfile kworkspace)
-
diff --git a/libs/plasmagenericshell/tests/background.cpp b/libs/plasmagenericshell/tests/background.cpp
deleted file mode 100644 (file)
index 86dae1d..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2009 Aaron J. Seigo
- *
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU Library General Public License as
- *   published by the Free Software Foundation; either version 2 or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details
- *
- *   You should have received a copy of the GNU Library General Public
- *   License along with this program; if not, write to the
- *   Free Software Foundation, Inc.,
- *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-
-#include <QCoreApplication>
-
-#include <KAboutData>
-#include <KApplication>
-#include <KCmdLineArgs>
-#include <KComponentData>
-#include <KConfig>
-#include <KDebug>
-
-#include "../backgrounddialog.h"
-#include "plasma-shell-desktop.h"
-
-static const char description[] = "Background settings dialog";
-static const char version[] = "1.0";
-
-int main(int argc, char *argv[])
-{
-    KAboutData aboutData("plasmbackgrounddialog", 0, ki18n("Plasma"),
-                         version, ki18n( description ), KAboutData::License_GPL,
-                         ki18n("(C) 2008, Aaron Seigo"));
-    KCmdLineArgs::init(argc, argv, &aboutData);
-    KApplication app;
-
-    QSize res(1024, 768);
-    QString id("foo");
-    BackgroundDialog b(res, 0, 0, 0, id, AppSettings::self());
-    b.show();
-
-    return app.exec();
-}
-
diff --git a/libs/plasmagenericshell/tests/main.cpp b/libs/plasmagenericshell/tests/main.cpp
deleted file mode 100644 (file)
index 34ee2c7..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#include <QtGui>
-// #include "customwidgets.h"
-#include <plasma/applet.h>
-#include "widgetsexplorer/widgetexplorer.h"
-#include <plasma/containment.h>
-#include <QDesktopWidget>
-#include <plasma/corona.h>
-#include <plasma/view.h>
-#include <plasma/containment.h>
-
-int main(int argc, char *argv[])
-{
-    QApplication app(argc, argv);
-
-    Plasma::Containment *containment = new Plasma::Containment();
-
-    Plasma::WidgetExplorer *appletBrowser;
-
-    Qt::Orientation orientation = Qt::Vertical;
-//    Qt::Orientation orientation = Qt::Horizontal;
-
-    appletBrowser = new Plasma::WidgetExplorer();
-    appletBrowser->setContainment(containment);
-    appletBrowser->setLocation(Plasma::BottomEdge);
-    appletBrowser->populateWidgetList();
-
-    Plasma::Corona *scene = new Plasma::Corona();
-    scene->addItem(appletBrowser);
-    scene->setSceneRect(QRectF(0, 0, appletBrowser->minimumWidth(), appletBrowser->minimumHeight()));
-
-    Plasma::View *view = new Plasma::View(appletBrowser->containment(), 0);
-    view->setScene(scene);
-    view->setWindowFlags(Qt::FramelessWindowHint);
-    view->setAttribute(Qt::WA_TranslucentBackground, true);
-    view->setStyleSheet("background: transparent");
-
-    QDesktopWidget *screen = new QDesktopWidget();
-
-    view->setMinimumWidth(appletBrowser->minimumWidth());
-    view->setMaximumWidth(appletBrowser->minimumWidth());
-    view->setMinimumHeight(appletBrowser->minimumHeight());
-    view->setMaximumHeight(appletBrowser->minimumHeight());
-
-    if(orientation == Qt::Horizontal) {
-        view->move(0, screen->height() - view->maximumHeight());
-    } else {
-        view->move(0, 0);
-    }
-
-    view->show();
-
-    view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
-    view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
-
-    return app.exec();
-}