aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Funk <[email protected]>2017-06-07 09:06:30 +0200
committerKevin Funk <[email protected]>2017-06-08 14:24:18 +0200
commitd6f63e023788a7d7a3a906ff46d364270f239ea0 (patch)
treeeb489e002f09edadc667228a28863b35f36b90b4
parent9b57233a77a778bea9482f7fc5e3212e449da446 (diff)
katemdi: Fix deprecation warnings
Summary: ``` /home/kfunk/devel/src/kf5/kate/kate/katemdi.cpp:322:5: warning: 'appendTab' is deprecated [-Wdeprecated-declarations] appendTab(icon, newId, text); ^ /home/kfunk/devel/install/kf5/include/KF5/KWidgetsAddons/kmultitabbar.h:138:35: note: 'appendTab' has been explicitly marked deprecated here KWIDGETSADDONS_DEPRECATED int appendTab(const QPixmap &pic, int id = -1, const QString &text = QString()); ``` ^ The alternative appendTab function is part of KF5 5.13, thus we need a version bump. Reviewers: cullmann Reviewed By: cullmann Subscribers: cullmann, kwrite-devel Differential Revision: https://phabricator.kde.org/D6132
-rw-r--r--CMakeLists.txt2
-rw-r--r--kate/katemdi.cpp4
-rw-r--r--kate/katemdi.h8
3 files changed, 7 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3ab9964..f97552d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,7 +4,7 @@ project (kate)
# minimal requirements
cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
set (QT_MIN_VERSION "5.4.0")
-set(KF5_DEP_VERSION "5.10.0")
+set(KF5_DEP_VERSION "5.13.0") # we need KMultiTabBar::appendButton(const QIcon &..., ...)
# KDE Application Version, managed by release script
set (KDE_APPLICATIONS_VERSION_MAJOR "17")
diff --git a/kate/katemdi.cpp b/kate/katemdi.cpp
index 065dfc8..7f227d6 100644
--- a/kate/katemdi.cpp
+++ b/kate/katemdi.cpp
@@ -305,7 +305,7 @@ void Sidebar::setSplitter(QSplitter *sp)
m_ownSplit->hide();
}
-ToolView *Sidebar::addWidget(const QPixmap &icon, const QString &text, ToolView *widget)
+ToolView *Sidebar::addWidget(const QIcon &icon, const QString &text, ToolView *widget)
{
static int id = 0;
@@ -792,7 +792,7 @@ QWidget *MainWindow::centralWidget() const
return m_centralWidget;
}
-ToolView *MainWindow::createToolView(KTextEditor::Plugin *plugin, const QString &identifier, KMultiTabBar::KMultiTabBarPosition pos, const QPixmap &icon, const QString &text)
+ToolView *MainWindow::createToolView(KTextEditor::Plugin *plugin, const QString &identifier, KMultiTabBar::KMultiTabBarPosition pos, const QIcon &icon, const QString &text)
{
if (m_idToWidget[identifier]) {
return 0;
diff --git a/kate/katemdi.h b/kate/katemdi.h
index 55c772c..570cb21 100644
--- a/kate/katemdi.h
+++ b/kate/katemdi.h
@@ -31,7 +31,6 @@
#include <QMap>
#include <QSplitter>
-#include <QPixmap>
#include <QList>
#include <QEvent>
#include <QChildEvent>
@@ -40,6 +39,7 @@
class KActionMenu;
class QAction;
+class QPixmap;
class KConfigBase;
namespace KTextEditor
@@ -174,7 +174,7 @@ private:
*/
bool persistent;
- QPixmap icon;
+ QIcon icon;
QString text;
};
@@ -189,7 +189,7 @@ public:
void setSplitter(QSplitter *sp);
public:
- ToolView *addWidget(const QPixmap &icon, const QString &text, ToolView *widget);
+ ToolView *addWidget(const QIcon &icon, const QString &text, ToolView *widget);
bool removeWidget(ToolView *widget);
bool showWidget(ToolView *widget);
@@ -293,7 +293,7 @@ public:
* @param text text to use in addition to icon
* @return created toolview on success or 0
*/
- ToolView *createToolView(KTextEditor::Plugin *plugin, const QString &identifier, KMultiTabBar::KMultiTabBarPosition pos, const QPixmap &icon, const QString &text);
+ ToolView *createToolView(KTextEditor::Plugin *plugin, const QString &identifier, KMultiTabBar::KMultiTabBarPosition pos, const QIcon &icon, const QString &text);
/**
* give you handle to toolview for the given name, 0 if no toolview around