OSDN Git Service

gwenview: purge manual tests
authorIvailo Monev <xakepa10@gmail.com>
Mon, 3 Jul 2023 04:17:35 +0000 (07:17 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Mon, 3 Jul 2023 04:17:35 +0000 (07:17 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
gwenview/tests/CMakeLists.txt
gwenview/tests/manual/CMakeLists.txt [deleted file]
gwenview/tests/manual/browse.txt [deleted file]
gwenview/tests/manual/compare.txt [deleted file]
gwenview/tests/manual/imageloadbench.cpp [deleted file]
gwenview/tests/manual/slidecontainertest.cpp [deleted file]

index 7e7fa88..f405492 100644 (file)
@@ -1,3 +1,2 @@
 add_subdirectory(auto)
-add_subdirectory(manual)
 
diff --git a/gwenview/tests/manual/CMakeLists.txt b/gwenview/tests/manual/CMakeLists.txt
deleted file mode 100644 (file)
index 6dcb6b6..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-include_directories(
-    ${gwenview_SOURCE_DIR}
-    )
-# SlideContainer
-set(slidecontainertest_SRCS
-    slidecontainertest.cpp
-    )
-
-kde4_add_manual_test(slidecontainertest ${slidecontainertest_SRCS})
-
-target_link_libraries(slidecontainertest ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} gwenviewlib)
-
-# imageloadbench
-set(imageloadbench_SRCS
-    imageloadbench.cpp
-    )
-
-kde4_add_manual_test(imageloadbench ${imageloadbench_SRCS})
-
-target_link_libraries(imageloadbench ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} gwenviewlib)
diff --git a/gwenview/tests/manual/browse.txt b/gwenview/tests/manual/browse.txt
deleted file mode 100644 (file)
index 8f0355b..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-name: browse/startup_down_sampled
-description:
- 1. Start Gwenview in a folder with raster images large enough to make use of down-sampling
-    => thumbnails show
- 2. Click one image
-    => Gwenview switches to View mode and show the image, zoomed-to-fit
- 3. Ctrl + left click
-    => Image zooms in
-
-name: browse/startup_svg
-description:
- 1. Start Gwenview in a folder with an svg
-    => thumbnails show
- 2. Click the svg
-    => Gwenview switches to View mode and show the image, zoomed-to-fit
- 3. Ctrl + left click
-    => Image zooms in
\ No newline at end of file
diff --git a/gwenview/tests/manual/compare.txt b/gwenview/tests/manual/compare.txt
deleted file mode 100644 (file)
index d8e6eb7..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-name: compare/resize
-description:
- 1. Select two images => images are shown next to each others
- 2. Go to fullscreen => images resize to fit the new screen size
-
-name: compare/view-mode
-description:
- 1. Select one image in view mode
- 2. Show the thumbnail bar
- 3. Select another image => images are shown next to each others
diff --git a/gwenview/tests/manual/imageloadbench.cpp b/gwenview/tests/manual/imageloadbench.cpp
deleted file mode 100644 (file)
index 542352b..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#include <QBuffer>
-#include <QCoreApplication>
-#include <QDebug>
-#include <QFile>
-#include <QImage>
-#include <QImageReader>
-#include <QElapsedTimer>
-
-const int ITERATIONS = 2;
-const QSize SCALED_SIZE(1280, 800);
-
-static void bench(QIODevice* device, const QString& outputName)
-{
-    QElapsedTimer chrono;
-    chrono.start();
-    for (int iteration = 0; iteration < ITERATIONS; ++iteration) {
-        qDebug() << "Iteration:" << iteration;
-
-        device->open(QIODevice::ReadOnly);
-        QImageReader reader(device);
-        QSize size = reader.size();
-        size.scale(SCALED_SIZE, Qt::KeepAspectRatio);
-        reader.setScaledSize(size);
-        QImage img = reader.read();
-        device->close();
-
-        if (iteration == ITERATIONS - 1) {
-            qDebug() << "time:" << chrono.elapsed();
-            img.save(outputName, "png");
-        }
-    }
-}
-
-int main(int argc, char** argv)
-{
-    QCoreApplication app(argc, argv);
-    if (argc != 2) {
-        qDebug() << "Usage: imageloadbench <file.jpg>";
-        return 1;
-    }
-
-    QString fileName = QString::fromUtf8(argv[1]);
-
-    QFile file(fileName);
-    if (!file.open(QIODevice::ReadOnly)) {
-        qDebug() << QString("Could not open '%1'").arg(fileName);
-        return 2;
-    }
-    QByteArray data = file.readAll();
-    QBuffer buffer(&data);
-
-    qDebug() << "Using Qt loader";
-    bench(&buffer, "qt.png");
-    qDebug() << "Using Gwenview loader";
-    bench(&buffer, "gv.png");
-
-    return 0;
-}
diff --git a/gwenview/tests/manual/slidecontainertest.cpp b/gwenview/tests/manual/slidecontainertest.cpp
deleted file mode 100644 (file)
index 190b1ef..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-// vim: set tabstop=4 shiftwidth=4 expandtab:
-/*
-Gwenview: an image viewer
-Copyright 2007 Aurélien Gâteau <agateau@kde.org>
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, 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 General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA.
-
-*/
-// Qt
-#include <QApplication>
-#include <QLineEdit>
-#include <QPushButton>
-#include <QVBoxLayout>
-
-// Local
-#include <lib/slidecontainer.h>
-
-using namespace Gwenview;
-
-class Window : public QWidget
-{
-public:
-    Window()
-        : QWidget()
-        {
-        SlideContainer* container = new SlideContainer(this);
-
-        QPushButton* inButton = new QPushButton(this);
-        inButton->setText("Slide &In");
-        connect(inButton, SIGNAL(clicked()), container, SLOT(slideIn()));
-
-        QPushButton* outButton = new QPushButton(this);
-        outButton->setText("Slide &Out");
-        connect(outButton, SIGNAL(clicked()), container, SLOT(slideOut()));
-
-        QVBoxLayout* layout = new QVBoxLayout(this);
-        layout->addWidget(inButton);
-        layout->addWidget(outButton);
-        layout->addWidget(container);
-
-        QLineEdit* content = new QLineEdit(container);
-        content->setText("Some long text. Some long text. Some long text. Some long text.");
-        container->setContent(content);
-    }
-};
-
-int main(int argc, char* argv[])
-{
-    QApplication app(argc, argv);
-    Window window;
-
-    window.show();
-    return app.exec();
-}