summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeemu Rytilahti <[email protected]>2014-11-23 22:05:23 +0100
committerTeemu Rytilahti <[email protected]>2014-11-23 22:05:23 +0100
commit7ae1f73dc56132fb8ac1f06c14be4d803583264c (patch)
tree19a182a950b735bcffcbb659ac67a83bcb50e3b1
parentf903ee2433b47caf8db2909ec75a7a6336ae7c8d (diff)
remove kdelibs4support requirement, needs still to port casting
-rw-r--r--CMakeLists.txt5
-rw-r--r--src/CMakeLists.txt6
-rw-r--r--src/altlangstredit.cpp9
-rw-r--r--src/subjectwidget.cpp14
-rw-r--r--tests/erasetag.cpp2
-rw-r--r--tests/loadfromba.cpp4
-rw-r--r--tests/readimagewritexmpsidecar.cpp2
-rw-r--r--tests/setiptcpreview.cpp2
8 files changed, 22 insertions, 22 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f17cd5d..265769d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -88,7 +88,8 @@ find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE COMPONENTS
)
find_package(KF5 ${KF5_VERSION} REQUIRED COMPONENTS
- KDELibs4Support
+ TextWidgets
+ Completion
)
find_package(Exiv2 ${EXIV2_MIN_VERSION} REQUIRED)
@@ -108,6 +109,8 @@ ecm_setup_version(${LIBKEXIV2_LIB_VERSION}
############## Targets #########################
+remove_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII) # TODO just for porting, remove
+
add_definitions(-DTRANSLATION_DOMAIN=\"libkexiv2\")
add_subdirectory(src)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4d3d9f2..5d74206 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -13,8 +13,6 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_BINARY_DIR})
add_definitions(${EXIV2_DEFINITIONS})
-remove_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII)
-
if( WIN32 )
add_definitions( -DEXV_HAVE_DLL )
endif()
@@ -93,7 +91,9 @@ target_link_libraries(KF5KExiv2
PRIVATE
${EXIV2_LIBRARIES}
PUBLIC
- KF5::KDELibs4Support
+ KF5::TextWidgets
+ KF5::Completion
+ KF5::CoreAddons
Qt5::Xml
)
diff --git a/src/altlangstredit.cpp b/src/altlangstredit.cpp
index f464d12..db5d30c 100644
--- a/src/altlangstredit.cpp
+++ b/src/altlangstredit.cpp
@@ -38,8 +38,7 @@
#include <klocalizedstring.h>
#include <kcombobox.h>
-#include <kdialog.h>
-#include <kiconloader.h>
+#include <QDialog>
#include <ktextedit.h>
// Local includes
@@ -276,7 +275,7 @@ AltLangStrEdit::AltLangStrEdit(QWidget* const parent)
QGridLayout* const grid = new QGridLayout(this);
d->titleLabel = new QLabel(this);
d->delValueButton = new QToolButton(this);
- d->delValueButton->setIcon(SmallIcon("edit-clear"));
+ d->delValueButton->setIcon(QIcon::fromTheme("edit-clear"));
d->delValueButton->setToolTip(i18n("Remove entry for this language"));
d->delValueButton->setEnabled(false);
@@ -296,7 +295,7 @@ AltLangStrEdit::AltLangStrEdit(QWidget* const parent)
grid->addWidget(d->valueEdit, 1, 0, 1,-1);
grid->setColumnStretch(1, 10);
grid->setMargin(0);
- grid->setSpacing(KDialog::spacingHint());
+//TODO PORT QT5 grid->setSpacing(QDialog::spacingHint());
loadLangAltListEntries();
@@ -419,7 +418,7 @@ void AltLangStrEdit::loadLangAltListEntries()
foreach(const QString& item, list)
{
d->languageCB->addItem(item);
- d->languageCB->setItemIcon(d->languageCB->count()-1, SmallIcon("dialog-ok"));
+ d->languageCB->setItemIcon(d->languageCB->count()-1, QIcon::fromTheme("dialog-ok"));
}
d->languageCB->insertSeparator(d->languageCB->count());
diff --git a/src/subjectwidget.cpp b/src/subjectwidget.cpp
index 0d02142..3c3e990 100644
--- a/src/subjectwidget.cpp
+++ b/src/subjectwidget.cpp
@@ -45,10 +45,8 @@
// KDE includes
#include <kcombobox.h>
-#include <kdialog.h>
-#include <kiconloader.h>
+#include <QDialog>
#include <klocalizedstring.h>
-#include <kstandarddirs.h>
// Local includes
@@ -210,9 +208,9 @@ SubjectWidget::SubjectWidget(QWidget* const parent)
d->addSubjectButton = new QPushButton(i18n("&Add"));
d->delSubjectButton = new QPushButton(i18n("&Delete"));
d->repSubjectButton = new QPushButton(i18n("&Replace"));
- d->addSubjectButton->setIcon(SmallIcon("list-add"));
- d->delSubjectButton->setIcon(SmallIcon("edit-delete"));
- d->repSubjectButton->setIcon(SmallIcon("view-refresh"));
+ d->addSubjectButton->setIcon(QIcon::fromTheme("list-add"));
+ d->delSubjectButton->setIcon(QIcon::fromTheme("edit-delete"));
+ d->repSubjectButton->setIcon(QIcon::fromTheme("view-refresh"));
d->delSubjectButton->setEnabled(false);
d->repSubjectButton->setEnabled(false);
@@ -244,7 +242,7 @@ SubjectWidget::SubjectWidget(QWidget* const parent)
optionsBoxLayout->addWidget(m_detailEdit, 6, 1, 1, 4);
optionsBoxLayout->setColumnStretch(4, 10);
optionsBoxLayout->setMargin(0);
- optionsBoxLayout->setSpacing(KDialog::spacingHint());
+//TODO PORT QT5 optionsBoxLayout->setSpacing(QDialog::spacingHint());
d->optionsBox->setLayout(optionsBoxLayout);
// --------------------------------------------------------
@@ -261,7 +259,7 @@ SubjectWidget::SubjectWidget(QWidget* const parent)
mainLayout->setRowStretch(6, 10);
mainLayout->setColumnStretch(2, 1);
mainLayout->setMargin(0);
- mainLayout->setSpacing(KDialog::spacingHint());
+//TODO PORT QT5 mainLayout->setSpacing(QDialog::spacingHint());
setLayout(mainLayout);
// --------------------------------------------------------
diff --git a/tests/erasetag.cpp b/tests/erasetag.cpp
index fd02b12..4349a36 100644
--- a/tests/erasetag.cpp
+++ b/tests/erasetag.cpp
@@ -46,7 +46,7 @@ int main (int argc, char **argv)
return -1;
}
- QString filePath(argv[1]);
+ QString filePath = QString::fromLocal8Bit(argv[1]);
KExiv2 meta;
meta.load(filePath);
diff --git a/tests/loadfromba.cpp b/tests/loadfromba.cpp
index 06bdcfc..7907121 100644
--- a/tests/loadfromba.cpp
+++ b/tests/loadfromba.cpp
@@ -49,8 +49,8 @@ int main (int argc, char **argv)
return -1;
}
- QString filePath(argv[1]);
- QString baFile("ba.dat");
+ QString filePath = QString::fromLocal8Bit(argv[1]);
+ QString baFile(QStringLiteral("ba.dat"));
QImage image(filePath);
image.save(baFile, "PNG");
diff --git a/tests/readimagewritexmpsidecar.cpp b/tests/readimagewritexmpsidecar.cpp
index 4eecf94..5f044d9 100644
--- a/tests/readimagewritexmpsidecar.cpp
+++ b/tests/readimagewritexmpsidecar.cpp
@@ -46,7 +46,7 @@ int main (int argc, char **argv)
return -1;
}
- QString filePath(argv[1]);
+ QString filePath = QString::fromLocal8Bit(argv[1]);
KExiv2 meta;
diff --git a/tests/setiptcpreview.cpp b/tests/setiptcpreview.cpp
index 924a4c6..714253d 100644
--- a/tests/setiptcpreview.cpp
+++ b/tests/setiptcpreview.cpp
@@ -51,7 +51,7 @@ int main (int argc, char **argv)
}
QImage preview;
- QString filePath(argv[1]);
+ QString filePath = QString::fromLocal8Bit(argv[1]);
KExiv2 meta(filePath);
QImage image(filePath);