Commit 4b624990 authored by Alexander Stippich's avatar Alexander Stippich
Browse files

various cleanups

parent 92e10366
......@@ -30,9 +30,6 @@ include(KDECMakeSettings)
include(GenerateExportHeader)
include(ECMQtDeclareLoggingCategory)
# be not so strict with the poor developer who just wants to use strings
remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY)
ecm_setup_version(
${SKANLITE_VERSION_STRING}
VARIABLE_PREFIX SKANLITE
......
......@@ -8,8 +8,6 @@ ecm_qt_declare_logging_category(skanlite_SRCS
CATEGORY_NAME org.kde.skanlite
)
#kde4_add_app_icon(skanlite_SRCS "${KDE4_INSTALL_DIR}/share/icons/oxygen/*/devices/scanner.png")
add_executable(skanlite ${skanlite_SRCS})
target_link_libraries(skanlite
......
......@@ -41,11 +41,7 @@ SaveLocation::SaveLocation(QWidget *parent)
m_ui->u_urlRequester->setMode(KFile::Directory);
connect(m_ui->u_urlRequester, &KUrlRequester::textChanged, this, &SaveLocation::updateGui);
connect(m_ui->u_imgPrefix, &QLineEdit::textChanged, this, &SaveLocation::updateGui);
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
connect(m_ui->u_imgFormat, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::activated), this, &SaveLocation::updateGui);
#else
connect(m_ui->u_imgFormat, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::textActivated), this, &SaveLocation::updateGui);
#endif
connect(m_ui->u_numStartFrom, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &SaveLocation::updateGui);
}
......
......@@ -37,11 +37,7 @@ struct SkanliteImageSaver::Private {
QUrl m_url;
QString m_name;
QImage m_image;
int m_width;
int m_height;
int m_bpl;
int m_dpi;
int m_format;
QString m_fileFormat;
int m_quality;
......
......@@ -16,14 +16,6 @@ Questions
---------
* Difference between "skanlite -d test" and one of the SANE test scanners test:0 or test:1?
Minor issues
------------
* Main dialog: Help button does not show help (is this a KF5 issue?)
* Main dialog: Help and Close button do not have icons but they had before (is this a KF5 theme issue?)
* Settings dialog: Ok, Cancel button has no icons (is this a KF5 theme issue?)
* Show image dialog: Save button has no image (is this a KF5 theme issue?)
* see FIXME KF5
before 2014
===========
Wishlist
......@@ -31,4 +23,4 @@ Wishlist
-Make the final image dialog image zoomable
-Add scan profiles (settings/options)
-Start the file number scanning from a specified number or previously saved.
-Add a copy/print mode.
\ No newline at end of file
-Add a copy/print mode.
......@@ -27,7 +27,6 @@
#include <KAboutData>
#include <KLocalizedString>
#include <Kdelibs4ConfigMigrator>
#include "skanlite.h"
......@@ -39,10 +38,6 @@ int main(int argc, char *argv[])
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QApplication app(argc, argv);
Kdelibs4ConfigMigrator migrate(QStringLiteral("Skanlite"));
migrate.setConfigFiles(QStringList() << QStringLiteral("Skanliterc"));
migrate.migrate();
KLocalizedString::setApplicationDomain("skanlite");
KAboutData aboutData(QStringLiteral("skanlite"), // componentName, k4: appName
......
......@@ -78,7 +78,6 @@ Skanlite::Skanlite(const QString &device, QWidget *parent)
m_ksanew = new KSaneIface::KSaneWidget(this);
connect(m_ksanew, &KSaneWidget::scannedImageReady, this, &Skanlite::imageReady);
connect(m_ksanew, &KSaneWidget::availableDevices, this, &Skanlite::availableDevices);
connect(m_ksanew, &KSaneWidget::userMessage, this, &Skanlite::alertUser);
connect(m_ksanew, &KSaneWidget::buttonPressed, this, &Skanlite::buttonPressed);
connect(m_ksanew, &KSaneWidget::scanDone, this, [this](){
......@@ -664,13 +663,6 @@ void Skanlite::loadScannerOptions()
applyScannerOptions(opts);
}
void Skanlite::availableDevices(const QList<KSaneWidget::DeviceInfo> &deviceList)
{
for (const KSaneWidget::DeviceInfo &device : deviceList) {
qCDebug(SKANLITE_LOG) << device.name;
}
}
void Skanlite::alertUser(int type, const QString &strStatus)
{
switch (type) {
......
......@@ -71,8 +71,6 @@ private Q_SLOTS:
void defaultScannerOptions();
void applyScannerOptions(const QMap<QString, QString> &opts);
void availableDevices(const QList<KSaneWidget::DeviceInfo> &deviceList);
void alertUser(int type, const QString &strStatus);
void buttonPressed(const QString &optionName, const QString &optionLabel, bool pressed);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment