Commit 7b525193 authored by Davide Gianforte's avatar Davide Gianforte

replace deprecated QButtonGroup::buttonClicked

parent ae854c6e
......@@ -27,6 +27,7 @@
#include "viewactions.h"
#include "../defaults.h"
#include "../icon.h"
#include "../compat.h"
#include "../Dialogs/krsqueezedtextlabel.h"
#include "../FileSystem/fileitem.h"
#include "../FileSystem/filesystem.h"
......@@ -62,7 +63,7 @@ Sidebar::Sidebar(QWidget *parent) : QWidget(parent), stack(nullptr), imageFilePr
btns = new QButtonGroup(this);
btns->setExclusive(true);
connect(btns, QOverload<int>::of(&QButtonGroup::buttonClicked), this, &Sidebar::tabSelected);
connect(btns, QOverload<int>::of(&QButtonGroup::QBUTTONGROUP_BUTTONCLICKED), this, &Sidebar::tabSelected);
treeBtn = new QToolButton(this);
treeBtn->setToolTip(i18n("Tree Panel: a tree view of the local file system"));
......
......@@ -28,6 +28,20 @@
#define UDS_ENTRY_INSERT(A, B) UDSEntry::insert((A), (B));
#endif
/**
* QButtonGroup::buttonClicked(int id) was made obsoleted in QT 5.15 in
* favor of QButtonGroup::idClicked(int id)
*
* https://doc.qt.io/qt-5.15/qbuttongroup-obsolete.html#buttonClicked-1
*
* This can be removed when the qt minimum version required will be >= 5.15
*/
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
#define QBUTTONGROUP_BUTTONCLICKED idClicked
#else
#define QBUTTONGROUP_BUTTONCLICKED buttonClicked
#endif
/**
* QResource::isCompressed() was made obsoleted in QT 5.15 in
* favor of QResource::Compression QResource::compressionAlgorithm()
......
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