Commit d6f63e02 authored by Kevin Funk's avatar Kevin Funk

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
parent 9b57233a
......@@ -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")
......
......@@ -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;
......
......@@ -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
......
Markdown is supported
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