Commit 748f0121 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Build without Qt deprecations

parent 8dc896f7
......@@ -22,6 +22,7 @@ include(FeatureSummary)
include(KDEClangFormat)
include(KDEGitCommitHooks)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055200)
### Security concerns about sendText and runCommand dbus methods being public
......
......@@ -549,9 +549,9 @@ void TabBar::mousePressEvent(QMouseEvent *event)
if (index == -1)
return;
if (event->button() == Qt::LeftButton || event->button() == Qt::MidButton) {
if (event->button() == Qt::LeftButton || event->button() == Qt::MiddleButton) {
m_startPos = event->pos();
if (index != m_tabs.indexOf(m_selectedSessionId) || event->button() == Qt::MidButton) {
if (index != m_tabs.indexOf(m_selectedSessionId) || event->button() == Qt::MiddleButton) {
m_mousePressed = true;
m_mousePressedIndex = index;
}
......@@ -575,7 +575,7 @@ void TabBar::mouseReleaseEvent(QMouseEvent *event)
if (event->button() == Qt::LeftButton && index != m_tabs.indexOf(m_selectedSessionId))
Q_EMIT tabSelected(m_tabs.at(index));
if (event->button() == Qt::MidButton)
if (event->button() == Qt::MiddleButton)
Q_EMIT tabClosed(m_tabs.at(index));
}
......@@ -589,7 +589,7 @@ void TabBar::mouseReleaseEvent(QMouseEvent *event)
void TabBar::mouseMoveEvent(QMouseEvent *event)
{
if (!m_startPos.isNull() && ((event->buttons() & Qt::LeftButton) || (event->buttons() & Qt::MidButton))) {
if (!m_startPos.isNull() && ((event->buttons() & Qt::LeftButton) || (event->buttons() & Qt::MiddleButton))) {
int distance = (event->pos() - m_startPos).manhattanLength();
if (distance >= QApplication::startDragDistance()) {
......
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