summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-08-09 19:08:17 (GMT)
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-08-09 19:29:06 (GMT)
commit4ce837a7ac50f97654990f13a028d18cecd44b33 (patch)
tree178938eee8edaa47bbc8acc0cd753f6276128054
parent4851e8a792c413ddd526974afba5a527d76e8f4b (diff)
Qt5 porting
-rw-r--r--conf/widgetannottools.cpp14
-rw-r--r--generators/comicbook/CMakeLists.txt5
-rw-r--r--generators/comicbook/unrar.cpp4
-rw-r--r--generators/plucker/unpluck/qunpluck.cpp2
-rw-r--r--generators/txt/generator_txt.cpp15
-rw-r--r--part.cpp5
-rw-r--r--part.h1
-rw-r--r--ui/annotationpopup.cpp1
-rw-r--r--ui/annotationproxymodels.cpp4
-rw-r--r--ui/annotationproxymodels.h2
-rw-r--r--ui/fileprinterpreview.cpp3
-rw-r--r--ui/ktreeviewsearchline.cpp12
-rw-r--r--ui/minibar.cpp2
-rw-r--r--ui/side_reviews.cpp10
-rw-r--r--ui/side_reviews.h2
15 files changed, 43 insertions, 39 deletions
diff --git a/conf/widgetannottools.cpp b/conf/widgetannottools.cpp
index d87c9ae..309245b 100644
--- a/conf/widgetannottools.cpp
+++ b/conf/widgetannottools.cpp
@@ -18,14 +18,14 @@
#include <knuminput.h>
#include <kpushbutton.h>
-#include <QtGui/QApplication>
-#include <QtGui/QHBoxLayout>
-#include <QtGui/QVBoxLayout>
-#include <QtGui/QGroupBox>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QHBoxLayout>
+#include <QtWidgets/QVBoxLayout>
+#include <QtWidgets/QGroupBox>
#include <QtWidgets/QLabel>
-#include <QtGui/QListWidget>
-#include <QtGui/QListWidgetItem>
-#include <QtGui/QStackedWidget>
+#include <QtWidgets/QListWidget>
+#include <QtWidgets/QListWidgetItem>
+#include <QtWidgets/QStackedWidget>
#include <QtXml/QDomDocument>
#include <QtXml/QDomElement>
diff --git a/generators/comicbook/CMakeLists.txt b/generators/comicbook/CMakeLists.txt
index 4df23a6..ad97b8d 100644
--- a/generators/comicbook/CMakeLists.txt
+++ b/generators/comicbook/CMakeLists.txt
@@ -16,9 +16,10 @@ set( okularGenerator_comicbook_PART_SRCS
kde4_add_plugin(okularGenerator_comicbook ${okularGenerator_comicbook_PART_SRCS})
-target_link_libraries(okularGenerator_comicbook okularcore ${KDE4_KIO_LIBS} )
+target_link_libraries(okularGenerator_comicbook okularcore KF5::KIOCore)
if (UNIX)
- target_link_libraries(okularGenerator_comicbook ${KDE4_KPTY_LIBRARY})
+ find_package(KF5 REQUIRED Pty)
+ target_link_libraries(okularGenerator_comicbook KF5::Pty )
endif (UNIX)
install(TARGETS okularGenerator_comicbook DESTINATION ${PLUGIN_INSTALL_DIR})
diff --git a/generators/comicbook/unrar.cpp b/generators/comicbook/unrar.cpp
index b7a60a3..5f65656 100644
--- a/generators/comicbook/unrar.cpp
+++ b/generators/comicbook/unrar.cpp
@@ -20,8 +20,8 @@
#include <kstandarddirs.h>
#include <ktempdir.h>
#if !defined(Q_OS_WIN)
-#include <kptyprocess.h>
-#include <kptydevice.h>
+#include <KPty/kptyprocess.h>
+#include <KPty/kptydevice.h>
#endif
#include "unrarflavours.h"
diff --git a/generators/plucker/unpluck/qunpluck.cpp b/generators/plucker/unpluck/qunpluck.cpp
index 8363dd3..a3ce1b8 100644
--- a/generators/plucker/unpluck/qunpluck.cpp
+++ b/generators/plucker/unpluck/qunpluck.cpp
@@ -24,7 +24,7 @@
#include <QtGui/QTextDocument>
#include <QtGui/QTextFrame>
-#include <QtGui/QLabel>
+#include <QtWidgets/QLabel>
#include <core/action.h>
#include <core/document.h>
diff --git a/generators/txt/generator_txt.cpp b/generators/txt/generator_txt.cpp
index 8c3d2f6..e9b21b9 100644
--- a/generators/txt/generator_txt.cpp
+++ b/generators/txt/generator_txt.cpp
@@ -17,15 +17,14 @@
static KAboutData createAboutData()
{
KAboutData aboutData(
- "okular_txt",
- "okular_txt",
- ki18n( "Txt Backend" ),
- "0.1",
- ki18n( "Txt backend." ),
- KAboutData::License_GPL,
- ki18n( "© 2013 Azat Khuzhin" )
+ QStringLiteral("okular_txt"),
+ i18n( "Txt Backend" ),
+ QStringLiteral("0.1"),
+ i18n( "Txt backend." ),
+ KAboutLicense::GPL,
+ i18n( "© 2013 Azat Khuzhin" )
);
- aboutData.addAuthor( ki18n( "Azat Khuzhin" ), KLocalizedString(), "a3at.mail@gmail.com" );
+ aboutData.addAuthor( QStringLiteral( "Azat Khuzhin" ), QString(), QStringLiteral("a3at.mail@gmail.com") );
return aboutData;
}
diff --git a/part.cpp b/part.cpp
index d1f8fa8..13b55df 100644
--- a/part.cpp
+++ b/part.cpp
@@ -30,7 +30,7 @@
#include <qlabel.h>
#include <qtimer.h>
#include <QtPrintSupport/QPrinter>
-#include <QtGui/QPrintDialog>
+#include <QtPrintSupport/QPrintDialog>
#include <QScrollBar>
#include <kvbox.h>
@@ -66,6 +66,7 @@
#include <kbookmarkmenu.h>
#include <kpassworddialog.h>
#include <kwallet.h>
+#include <kdeversion.h>
// local includes
#include "aboutdata.h"
@@ -155,7 +156,7 @@ class FileKeeper
};
Okular::PartFactory::PartFactory()
-: KPluginFactory(okularAboutData( "okular", I18N_NOOP( "Okular" ) ))
+: KPluginFactory(okularAboutData())
{
}
diff --git a/part.h b/part.h
index 19c0d3e..094d836 100644
--- a/part.h
+++ b/part.h
@@ -23,6 +23,7 @@
#include <qlist.h>
#include <qpointer.h>
#include <qprocess.h>
+#include <kurl.h>
#include "core/observer.h"
#include "core/document.h"
#include "kdocumentviewer.h"
diff --git a/ui/annotationpopup.cpp b/ui/annotationpopup.cpp
index 96b6244..153599d 100644
--- a/ui/annotationpopup.cpp
+++ b/ui/annotationpopup.cpp
@@ -11,6 +11,7 @@
#include <klocale.h>
#include <kmenu.h>
+#include <kicon.h>
#include "annotationpropertiesdialog.h"
diff --git a/ui/annotationproxymodels.cpp b/ui/annotationproxymodels.cpp
index 27e747c..b2c70b6 100644
--- a/ui/annotationproxymodels.cpp
+++ b/ui/annotationproxymodels.cpp
@@ -10,7 +10,7 @@
#include "annotationproxymodels.h"
#include <QtCore/QList>
-#include <QtGui/QItemSelection>
+#include <QtCore/QItemSelection>
#include <kicon.h>
@@ -127,7 +127,7 @@ QModelIndex PageGroupProxyModel::index( int row, int column, const QModelIndex &
return QModelIndex();
} else {
if ( row < mTreeIndexes.count() )
- return createIndex( row, column, 0 );
+ return createIndex( row, column );
else
return QModelIndex();
}
diff --git a/ui/annotationproxymodels.h b/ui/annotationproxymodels.h
index e29da0d..ed7bd4b 100644
--- a/ui/annotationproxymodels.h
+++ b/ui/annotationproxymodels.h
@@ -10,7 +10,7 @@
#ifndef ANNOTATIONPROXYMODEL_H
#define ANNOTATIONPROXYMODEL_H
-#include <QtGui/QSortFilterProxyModel>
+#include <QtCore/QSortFilterProxyModel>
#include <QtCore/QPair>
/**
diff --git a/ui/fileprinterpreview.cpp b/ui/fileprinterpreview.cpp
index f97b7a0..f595ec0 100644
--- a/ui/fileprinterpreview.cpp
+++ b/ui/fileprinterpreview.cpp
@@ -19,11 +19,12 @@
#include <QtGui/QShowEvent>
#include <kmimetypetrader.h>
-#include <kparts/part.h>
+#include <kparts/readonlypart.h>
#include <kpluginfactory.h>
#include <kpluginloader.h>
#include <kpushbutton.h>
#include <kservice.h>
+#include <ksharedconfig.h>
#include <kdebug.h>
using namespace Okular;
diff --git a/ui/ktreeviewsearchline.cpp b/ui/ktreeviewsearchline.cpp
index 6e436bd..377de48 100644
--- a/ui/ktreeviewsearchline.cpp
+++ b/ui/ktreeviewsearchline.cpp
@@ -24,14 +24,14 @@
#include <QtCore/QList>
#include <QtCore/QTimer>
#include <QtCore/QRegExp>
-#include <QtGui/QApplication>
+#include <QtWidgets/QApplication>
#include <QtGui/QContextMenuEvent>
-#include <QtGui/QHBoxLayout>
-#include <QtGui/QHeaderView>
+#include <QtWidgets/QHBoxLayout>
+#include <QtWidgets/QHeaderView>
#include <QtWidgets/QLabel>
-#include <QtGui/QMenu>
-#include <QtGui/QToolButton>
-#include <QtGui/QTreeView>
+#include <QtWidgets/QMenu>
+#include <QtWidgets/QToolButton>
+#include <QtWidgets/QTreeView>
#include <kdebug.h>
#include <kiconloader.h>
diff --git a/ui/minibar.cpp b/ui/minibar.cpp
index 56b18d4..48b95f8 100644
--- a/ui/minibar.cpp
+++ b/ui/minibar.cpp
@@ -19,7 +19,7 @@
#include <qlayout.h>
#include <QStyleOptionButton>
#include <QStylePainter>
-#include <QtGui/QToolButton>
+#include <QtWidgets/QToolButton>
#include <qvalidator.h>
#include <qpainter.h>
#include <kicon.h>
diff --git a/ui/side_reviews.cpp b/ui/side_reviews.cpp
index 48c9d98..6eff74c 100644
--- a/ui/side_reviews.cpp
+++ b/ui/side_reviews.cpp
@@ -11,14 +11,14 @@
// qt/kde includes
#include <QtCore/QStringList>
-#include <QtGui/QHeaderView>
-#include <QtGui/QLayout>
+#include <QtWidgets/QHeaderView>
+#include <QtWidgets/QLayout>
#include <QtGui/QPaintEvent>
#include <QtGui/QPainter>
-#include <QtGui/QSizePolicy>
+#include <QtWidgets/QSizePolicy>
#include <QtGui/QTextDocument>
-#include <QtGui/QToolBar>
-#include <QtGui/QTreeView>
+#include <QtWidgets/QToolBar>
+#include <QtWidgets/QTreeView>
#include <kaction.h>
#include <klocale.h>
diff --git a/ui/side_reviews.h b/ui/side_reviews.h
index 0b0befc..49c02e7 100644
--- a/ui/side_reviews.h
+++ b/ui/side_reviews.h
@@ -12,7 +12,7 @@
#include <QtCore/QModelIndexList>
#include <QtCore/QVector>
-#include <QtGui/QWidget>
+#include <QtWidgets/QWidget>
#include "core/observer.h"