diff --git a/CMakeLists.txt b/CMakeLists.txt
index 29265562..805f3e72 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,92 +1,92 @@
cmake_minimum_required(VERSION 3.0)
project(drkonqi)
set(PROJECT_VERSION "5.16.90")
set(PROJECT_VERSION_MAJOR 5)
set(QT_MIN_VERSION "5.12.0")
-set(KF5_MIN_VERSION "5.58.0")
+set(KF5_MIN_VERSION "5.61.0")
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(ECMQtDeclareLoggingCategory)
include(ECMAddTests)
include(ECMMarkAsTest)
include(CheckFunctionExists)
include(FeatureSummary)
kde_enable_exceptions()
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Widgets Test DBus Concurrent)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS I18n CoreAddons Service
ConfigWidgets JobWidgets KIO Crash Completion WidgetsAddons Wallet
Notifications IdleTime)
if(APPLE)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS WindowSystem)
endif()
find_package(Qt5X11Extras ${QT_MIN_VERSION} CONFIG)
set_package_properties(Qt5X11Extras PROPERTIES TYPE RECOMMENDED PURPOSE "Recommended for better integration on X11.")
if (MINGW)
find_package(ZLIB REQUIRED)
find_library(INTL_LIBRARY NAMES intl)
find_library(IBERTY_LIBRARY NAMES iberty)
find_library(BFD_LIBRARY NAMES bfd)
if (IBERTY_LIBRARY)
set(iberty_FOUND 1)
else()
set(msg "iberty")
endif()
if (BFD_LIBRARY)
set(bfd_FOUND 1)
else()
set(msg "${msg} bfd")
endif()
if (INTL_LIBRARY)
set(intl_FOUND 1)
else()
set(msg "${msg} intl")
endif()
if (msg)
message(FATAL_ERROR "could not find ${msg}")
endif()
add_library(intl SHARED IMPORTED)
set_target_properties(intl PROPERTIES
IMPORTED_IMPLIB ${INTL_LIBRARY}
)
add_library(iberty STATIC IMPORTED)
set_target_properties(iberty PROPERTIES
IMPORTED_LOCATION ${IBERTY_LIBRARY}
)
add_library(bfd STATIC IMPORTED)
set_target_properties(bfd PROPERTIES
IMPORTED_LOCATION ${BFD_LIBRARY}
# bfd header requires this to be defined
INTERFACE_COMPILE_DEFINITIONS "PACKAGE;PACKAGE_VERSION"
)
find_path(BFD_INCLUDE_DIR bfd.h)
include_directories(${BFD_INCLUDE_DIR})
endif()
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT)
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
endif()
add_subdirectory(src)
if (${ECM_VERSION} STRGREATER "5.58.0")
install(FILES drkonqi.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
else()
install(FILES drkonqi.categories DESTINATION ${KDE_INSTALL_CONFDIR})
endif()
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
diff --git a/src/bugzillaintegration/ui/assistantpage_bugzilla_version.ui b/src/bugzillaintegration/ui/assistantpage_bugzilla_version.ui
index 9b14cf33..8d6eef67 100644
--- a/src/bugzillaintegration/ui/assistantpage_bugzilla_version.ui
+++ b/src/bugzillaintegration/ui/assistantpage_bugzilla_version.ui
@@ -1,155 +1,159 @@
BugzillaVersionPage
0
0
409
319
-
-
Qt::Vertical
20
40
-
-
-
- 0
-
-
- 0
-
-
- -1
+
+
+
+ 64
+ 64
+
-
Trying to contact bugs.kde.org...
Qt::AlignCenter
-
Qt::Vertical
20
40
-
-
Qt::Vertical
20
40
-
//icon//
Qt::AlignCenter
-
0
0
//Error//
Qt::AlignCenter
true
-
-
0
0
Retry
..
-
Qt::Vertical
20
40
+
+
+ KBusyIndicatorWidget
+ QWidget
+
+
+
diff --git a/src/statuswidget.cpp b/src/statuswidget.cpp
index 36134da5..a7dc7f0a 100644
--- a/src/statuswidget.cpp
+++ b/src/statuswidget.cpp
@@ -1,124 +1,122 @@
/*******************************************************************
* statuswidget.cpp
* Copyright 2009,2010 Dario Andres Rodriguez
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*
******************************************************************/
#include "statuswidget.h"
#include
#include
#include
-#include
-#include
+#include
StatusWidget::StatusWidget(QWidget * parent) :
QStackedWidget(parent),
m_cursorStackCount(0),
m_busy(false)
{
setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed));
//Main layout
m_statusPage = new QWidget(this);
m_busyPage = new QWidget(this);
addWidget(m_statusPage);
addWidget(m_busyPage);
//Status widget
m_statusLabel = new WrapLabel();
m_statusLabel->setOpenExternalLinks(true);
m_statusLabel->setTextFormat(Qt::RichText);
//m_statusLabel->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum));
QHBoxLayout * statusLayout = new QHBoxLayout();
statusLayout->setContentsMargins(0,0,0,0);
m_statusPage->setLayout(statusLayout);
statusLayout->addWidget(m_statusLabel);
//Busy widget
- m_throbberWidget = new KPixmapSequenceWidget();
- m_throbberWidget->setSequence(KPixmapSequence(QStringLiteral("process-working"), 22));
+ m_throbberWidget = new KBusyIndicatorWidget(this);
m_throbberWidget->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
m_busyLabel = new WrapLabel();
//m_busyLabel->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum));
QHBoxLayout * busyLayout = new QHBoxLayout();
busyLayout->setContentsMargins(0,0,0,0);
m_busyPage->setLayout(busyLayout);
busyLayout->addWidget(m_busyLabel);
busyLayout->addWidget(m_throbberWidget);
busyLayout->setAlignment(m_throbberWidget,Qt::AlignVCenter);
}
void StatusWidget::setBusy(const QString& busyMessage)
{
m_statusLabel->clear();
m_busyLabel->setText(busyMessage);
setCurrentWidget(m_busyPage);
setBusyCursor();
m_busy = true;
}
void StatusWidget::setIdle(const QString& idleMessage)
{
m_busyLabel->clear();
m_statusLabel->setText(idleMessage);
setCurrentWidget(m_statusPage);
setIdleCursor();
m_busy = false;
}
void StatusWidget::addCustomStatusWidget(QWidget * widget)
{
QHBoxLayout * statusLayout = static_cast(m_statusPage->layout());
statusLayout->addWidget(widget);
statusLayout->setAlignment(widget,Qt::AlignVCenter);
widget->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed));
}
void StatusWidget::setBusyCursor()
{
QApplication::setOverrideCursor(Qt::WaitCursor);
m_cursorStackCount++;
}
void StatusWidget::setIdleCursor()
{
while (m_cursorStackCount!=0) {
QApplication::restoreOverrideCursor();
m_cursorStackCount--;
}
}
void StatusWidget::hideEvent(QHideEvent *)
{
if (m_busy) {
setIdleCursor();
}
}
void StatusWidget::showEvent(QShowEvent *)
{
if (m_busy) {
setBusyCursor();
}
}
diff --git a/src/statuswidget.h b/src/statuswidget.h
index 876d5742..9ecf1842 100644
--- a/src/statuswidget.h
+++ b/src/statuswidget.h
@@ -1,91 +1,91 @@
/*******************************************************************
* statuswidget.h
* Copyright 2009,2010 Dario Andres Rodriguez
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*
******************************************************************/
#ifndef STATUSWIDGET__H
#define STATUSWIDGET__H
#include
#include
#include
#include
class WrapLabel;
-class KPixmapSequenceWidget;
+class KBusyIndicatorWidget;
class QHideEvent;
class StatusWidget: public QStackedWidget
{
Q_OBJECT
public:
explicit StatusWidget(QWidget * parent = nullptr);
void setBusy(const QString&);
void setIdle(const QString&);
void addCustomStatusWidget(QWidget *);
private:
void showEvent(QShowEvent *) override;
void hideEvent(QHideEvent *) override;
void setBusyCursor();
void setIdleCursor();
WrapLabel * m_statusLabel;
- KPixmapSequenceWidget * m_throbberWidget;
+ KBusyIndicatorWidget *m_throbberWidget;
WrapLabel * m_busyLabel;
QWidget * m_statusPage;
QWidget * m_busyPage;
int m_cursorStackCount;
bool m_busy;
};
//Dummy class to avoid a QLabel+wordWrap height bug
class WrapLabel: public QLabel
{
Q_OBJECT
public:
explicit WrapLabel(QWidget * parent = nullptr) : QLabel(parent){
setWordWrap(true);
}
void setText(const QString & text) {
QLabel::setText(text);
adjustHeight();
}
bool event(QEvent * e) override {
if (e->type() == QEvent::ApplicationFontChange || e->type() == QEvent::Resize) {
adjustHeight();
}
return QLabel::event(e);
}
private:
void adjustHeight() {
QTextDocument document(text());
document.setTextWidth(width());
setMaximumHeight(document.size().height());
}
};
#endif