gwenview: purge manual tests

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-07-03 07:17:35 +03:00
parent 44a349b97d
commit 81f2228487
6 changed files with 0 additions and 172 deletions

View file

@ -1,3 +1,2 @@
add_subdirectory(auto)
add_subdirectory(manual)

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -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;
}

View file

@ -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();
}