[konversation] 1.6-beta1

Rex Dieter rdieter at fedoraproject.org
Sun Mar 1 23:32:49 UTC 2015


commit 20fdc3932040bcd2c1f14c729e6d152f86e0208a
Author: Rex Dieter <rdieter at gmail.com>
Date:   Sun Mar 1 17:32:41 2015 -0600

    1.6-beta1

 .gitignore                                         |  1 +
 0001-Bump-for-post-release.patch                   | 79 ++++++++++++++++++
 0004-Fix-typo-in-version-string.patch              | 25 ++++++
 0007-Fix-build-of-DCC-code-in-MSVC.patch           | 36 +++++++++
 0008-Fix-build-of-UPnP-code-on-Windows.patch       | 55 +++++++++++++
 ...-Fix-includes-of-dcccommon.cpp-on-Windows.patch | 38 +++++++++
 ...and-size-hint-calc-for-topic-label-to-tak.patch | 35 ++++++++
 0012-Raise-the-main-window-when-re-running.patch   | 27 +++++++
 0013-Fix-color-mixing-on-abase.patch               | 25 ++++++
 0017-use-co-installable-qca-qt5-version.patch      | 69 ++++++++++++++++
 0018-Use-KCharsets.patch                           | 38 +++++++++
 ...indow-also-when-it-is-minimized-or-hidden.patch | 79 ++++++++++++++++++
 ...s-for-auto-connect-otherwise-they-might-n.patch | 46 +++++++++++
 0023-Simplify-Server-resetNickSelection.patch      | 51 ++++++++++++
 konversation.spec                                  | 93 ++++++++++++++++------
 sources                                            |  2 +-
 16 files changed, 672 insertions(+), 27 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 85c45ba..84bae3a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /konversation-1.5.1.tar.xz
+/konversation-1.6-beta1.tar.xz
diff --git a/0001-Bump-for-post-release.patch b/0001-Bump-for-post-release.patch
new file mode 100644
index 0000000..3d60073
--- /dev/null
+++ b/0001-Bump-for-post-release.patch
@@ -0,0 +1,79 @@
+From 59bd8c9ad6f4ba90174fa56a09a49adcb07097b1 Mon Sep 17 00:00:00 2001
+From: Eike Hein <hein at kde.org>
+Date: Sun, 30 Nov 2014 17:48:50 +0100
+Subject: [PATCH 01/24] Bump for post-release.
+
+---
+ src/commit.h            | 2 +-
+ src/irc/inputfilter.cpp | 6 ++++--
+ src/main.cpp            | 3 ++-
+ src/version.h           | 2 +-
+ 4 files changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/src/commit.h b/src/commit.h
+index 1372a4e..6f62ad9 100644
+--- a/src/commit.h
++++ b/src/commit.h
+@@ -1,4 +1,4 @@
+ // This COMMIT number is added to version string to be used as "patch level"
+ #ifndef COMMIT
+-#define COMMIT 4903
++#define COMMIT 4904
+ #endif
+diff --git a/src/irc/inputfilter.cpp b/src/irc/inputfilter.cpp
+index a32fa26..281ea33 100644
+--- a/src/irc/inputfilter.cpp
++++ b/src/irc/inputfilter.cpp
+@@ -16,6 +16,7 @@
+ #include "replycodes.h"
+ #include "application.h"
+ #include "version.h"
++#include "commit.h"
+ #include "query.h"
+ #include "channel.h"
+ #include "statuspanel.h"
+@@ -308,8 +309,9 @@ void InputFilter::parseClientCommand(const QString &prefix, const QString &comma
+                     else
+                     {
+                         // Do not internationalize the below version string
+-                        reply = QString(QStringLiteral("Konversation %1 (C) 2002-2014 by the Konversation team"))
+-                            .arg(QStringLiteral(KONVI_VERSION));
++                        reply = QString(QStringLiteral("Konversation %1 Build #2 (C) 2002-2014 by the Konversation team"))
++                            .arg(QStringLiteral(KONVI_VERSION))
++                            .arg(QString::number(COMMIT));
+ 
+                     }
+ 
+diff --git a/src/main.cpp b/src/main.cpp
+index f492301..66d709d 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -15,6 +15,7 @@
+ 
+ #include "application.h"
+ #include "version.h"
++#include "commit.h"
+ 
+ #include <QMutex>
+ #include <QWaitCondition>
+@@ -46,7 +47,7 @@ int main(int argc, char* argv[])
+ 
+     KAboutData aboutData("konversation",
+         i18n("Konversation"),
+-        KONVI_VERSION,
++        KONVI_VERSION " #" STRHACK(COMMIT),
+         i18n("A user-friendly IRC client"),
+         KAboutLicense::GPL,
+         i18n("(C) 2002-2014 by the Konversation team"),
+diff --git a/src/version.h b/src/version.h
+index 4e208d4..f29e244 100644
+--- a/src/version.h
++++ b/src/version.h
+@@ -1,3 +1,3 @@
+ #ifndef KONVI_VERSION
+-#define KONVI_VERSION "1.6-beta1"
++#define KONVI_VERSION "1.6-branch"
+ #endif
+-- 
+2.1.0
+
diff --git a/0004-Fix-typo-in-version-string.patch b/0004-Fix-typo-in-version-string.patch
new file mode 100644
index 0000000..4f8515b
--- /dev/null
+++ b/0004-Fix-typo-in-version-string.patch
@@ -0,0 +1,25 @@
+From 26d8821f8bebe8bb919306f67954167e7d616d94 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nicol=C3=A1s=20Alvarez?= <nicolas.alvarez at gmail.com>
+Date: Wed, 3 Dec 2014 23:37:09 -0300
+Subject: [PATCH 04/24] Fix typo in version string.
+
+---
+ src/irc/inputfilter.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/irc/inputfilter.cpp b/src/irc/inputfilter.cpp
+index 281ea33..6e1a2ab 100644
+--- a/src/irc/inputfilter.cpp
++++ b/src/irc/inputfilter.cpp
+@@ -309,7 +309,7 @@ void InputFilter::parseClientCommand(const QString &prefix, const QString &comma
+                     else
+                     {
+                         // Do not internationalize the below version string
+-                        reply = QString(QStringLiteral("Konversation %1 Build #2 (C) 2002-2014 by the Konversation team"))
++                        reply = QString(QStringLiteral("Konversation %1 Build %2 (C) 2002-2014 by the Konversation team"))
+                             .arg(QStringLiteral(KONVI_VERSION))
+                             .arg(QString::number(COMMIT));
+ 
+-- 
+2.1.0
+
diff --git a/0007-Fix-build-of-DCC-code-in-MSVC.patch b/0007-Fix-build-of-DCC-code-in-MSVC.patch
new file mode 100644
index 0000000..2308fdd
--- /dev/null
+++ b/0007-Fix-build-of-DCC-code-in-MSVC.patch
@@ -0,0 +1,36 @@
+From fcdcbbcab46c57be1814e6a7fa0dddde7495d371 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nicol=C3=A1s=20Alvarez?= <nicolas.alvarez at gmail.com>
+Date: Fri, 5 Dec 2014 15:34:28 -0300
+Subject: [PATCH 07/24] Fix build of DCC code in MSVC.
+
+Replaced QDialogButtonBox::QDialogButtonBox::Retry with
+QDialogButtonBox::Retry. I don't know why the former works in gcc though.
+---
+ src/dcc/resumedialog.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/dcc/resumedialog.cpp b/src/dcc/resumedialog.cpp
+index aae884e..cc9ce19 100644
+--- a/src/dcc/resumedialog.cpp
++++ b/src/dcc/resumedialog.cpp
+@@ -164,7 +164,7 @@ namespace Konversation
+                 m_buttonBox->button(QDialogButtonBox::Ok)->setText(i18n("&Overwrite"));
+                 m_buttonBox->button(QDialogButtonBox::Ok)->setEnabled(m_enabledActions & RA_Overwrite);
+ 
+-                m_buttonBox->button(QDialogButtonBox::QDialogButtonBox::Retry)->setEnabled(true);
++                m_buttonBox->button(QDialogButtonBox::Retry)->setEnabled(true);
+                 if (m_enabledActions & RA_OverwriteDefaultPath)
+                     m_overwriteDefaultPathCheckBox->setEnabled(false);
+             }
+@@ -173,7 +173,7 @@ namespace Konversation
+                 m_buttonBox->button(QDialogButtonBox::Ok)->setText(i18n("R&ename"));
+                 m_buttonBox->button(QDialogButtonBox::Ok)->setEnabled(m_enabledActions & RA_Rename);
+ 
+-                m_buttonBox->button(QDialogButtonBox::QDialogButtonBox::Retry)->setEnabled(false);
++                m_buttonBox->button(QDialogButtonBox::Retry)->setEnabled(false);
+                 if (m_enabledActions & RA_OverwriteDefaultPath)
+                     m_overwriteDefaultPathCheckBox->setEnabled(true);
+             }
+-- 
+2.1.0
+
diff --git a/0008-Fix-build-of-UPnP-code-on-Windows.patch b/0008-Fix-build-of-UPnP-code-on-Windows.patch
new file mode 100644
index 0000000..8d81416
--- /dev/null
+++ b/0008-Fix-build-of-UPnP-code-on-Windows.patch
@@ -0,0 +1,55 @@
+From 1e329a8098fe1abaa0baa408f3b757131f58a470 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nicol=C3=A1s=20Alvarez?= <nicolas.alvarez at gmail.com>
+Date: Fri, 5 Dec 2014 15:35:51 -0300
+Subject: [PATCH 08/24] Fix build of UPnP code on Windows.
+
+Windows doesn't have inet_aton, replace with inet_addr. inet_aton is
+preferred because it has better reporting for parse errors, but this is
+a hardcoded string literal, not user input, so there shouldn't be any
+errors anyway.
+---
+ src/upnp/upnpmcastsocket.cpp | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/src/upnp/upnpmcastsocket.cpp b/src/upnp/upnpmcastsocket.cpp
+index 61877a1..37eef42 100644
+--- a/src/upnp/upnpmcastsocket.cpp
++++ b/src/upnp/upnpmcastsocket.cpp
+@@ -17,12 +17,15 @@
+ #include <QUrl>
+ #include <QDebug>
+ 
++
++#ifdef Q_OS_WIN
++#include <winsock.h>
++#else
+ #include <unistd.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ 
+-#ifndef Q_OS_WIN
+ #include <netinet/in_systm.h>
+ #include <netinet/ip.h>
+ #endif
+@@ -199,7 +202,7 @@ namespace Konversation
+ 
+             memset(&mreq,0,sizeof(struct ip_mreq));
+ 
+-            inet_aton("239.255.255.250",&mreq.imr_multiaddr);
++            mreq.imr_multiaddr.s_addr = inet_addr("239.255.255.250");
+             mreq.imr_interface.s_addr = htonl(INADDR_ANY);
+ 
+     #ifndef Q_OS_WIN
+@@ -219,7 +222,7 @@ namespace Konversation
+ 
+             memset(&mreq,0,sizeof(struct ip_mreq));
+ 
+-            inet_aton("239.255.255.250",&mreq.imr_multiaddr);
++            mreq.imr_multiaddr.s_addr = inet_addr("239.255.255.250");
+             mreq.imr_interface.s_addr = htonl(INADDR_ANY);
+ 
+     #ifndef Q_OS_WIN
+-- 
+2.1.0
+
diff --git a/0009-Fix-includes-of-dcccommon.cpp-on-Windows.patch b/0009-Fix-includes-of-dcccommon.cpp-on-Windows.patch
new file mode 100644
index 0000000..0cf5c1a
--- /dev/null
+++ b/0009-Fix-includes-of-dcccommon.cpp-on-Windows.patch
@@ -0,0 +1,38 @@
+From a8170a1061324ccff25ceda64b8a6a1d5fd2eaa5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nicol=C3=A1s=20Alvarez?= <nicolas.alvarez at gmail.com>
+Date: Fri, 5 Dec 2014 15:36:44 -0300
+Subject: [PATCH 09/24] Fix includes of dcccommon.cpp on Windows.
+
+We shouldn't include BSD sockets headers on Windows.
+I haven't tested this on MinGW yet though.
+---
+ src/dcc/dcccommon.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/dcc/dcccommon.cpp b/src/dcc/dcccommon.cpp
+index 6f1c572..a9908b2 100644
+--- a/src/dcc/dcccommon.cpp
++++ b/src/dcc/dcccommon.cpp
+@@ -18,16 +18,16 @@
+ 
+ #include <cstdlib>
+ #include <sys/types.h>
+-#include <netinet/in.h>
+-#include <sys/socket.h>
+ #ifndef Q_CC_MSVC
++#   include <netinet/in.h>
++#   include <sys/socket.h>
+ #   include <net/if.h>
+ #   include <sys/ioctl.h>
+ #   ifdef HAVE_STROPTS_H
+ #       include <stropts.h>
+ #   endif
++#   include <arpa/inet.h>
+ #endif
+-#include <arpa/inet.h>
+ 
+ #include <QHostAddress>
+ #include <QTcpServer>
+-- 
+2.1.0
+
diff --git a/0011-Fix-layout-and-size-hint-calc-for-topic-label-to-tak.patch b/0011-Fix-layout-and-size-hint-calc-for-topic-label-to-tak.patch
new file mode 100644
index 0000000..d405e9f
--- /dev/null
+++ b/0011-Fix-layout-and-size-hint-calc-for-topic-label-to-tak.patch
@@ -0,0 +1,35 @@
+From 312e4e22251aa2f040f1385f970b5b28a73bb598 Mon Sep 17 00:00:00 2001
+From: Eike Hein <hein at kde.org>
+Date: Sat, 13 Dec 2014 16:58:15 +0100
+Subject: [PATCH 11/24] Fix layout and size hint calc for topic label to take
+ descenders into account.
+
+---
+ src/viewer/topiclabel.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/viewer/topiclabel.cpp b/src/viewer/topiclabel.cpp
+index 88a513d..6a8b433 100644
+--- a/src/viewer/topiclabel.cpp
++++ b/src/viewer/topiclabel.cpp
+@@ -48,7 +48,7 @@ namespace Konversation
+ 
+     QSize TopicLabel::minimumSizeHint() const
+     {
+-        int minHeight = fontMetrics().lineSpacing() + fontMetrics().descent();
++        int minHeight = fontMetrics().ascent() + fontMetrics().descent();
+         return QSize(0, minHeight);
+     }
+ 
+@@ -219,7 +219,7 @@ namespace Konversation
+ 
+         text = tagUrls(text, m_channelName);
+ 
+-        if(height() < (fontMetrics().lineSpacing() * 2))
++        if(height() < ((fontMetrics().ascent() + fontMetrics().descent()) * 2))
+         {
+             text = rPixelSqueeze(text, width() - 10);
+             setWordWrap(false);
+-- 
+2.1.0
+
diff --git a/0012-Raise-the-main-window-when-re-running.patch b/0012-Raise-the-main-window-when-re-running.patch
new file mode 100644
index 0000000..710db29
--- /dev/null
+++ b/0012-Raise-the-main-window-when-re-running.patch
@@ -0,0 +1,27 @@
+From eba273a4cef682fafd418f6d18b9ee9d12ece9cc Mon Sep 17 00:00:00 2001
+From: Eike Hein <hein at kde.org>
+Date: Sat, 13 Dec 2014 17:46:43 +0100
+Subject: [PATCH 12/24] Raise the main window when re-running.
+
+BUG:341705
+---
+ src/main.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/main.cpp b/src/main.cpp
+index 66d709d..538f4e3 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -152,5 +152,9 @@ int main(int argc, char* argv[])
+     aboutData.processCommandLine(&cmdLineParser);
+     app.newInstance(&cmdLineParser);
+ 
++    QObject::connect(&dbusService, &KDBusService::activateRequested,
++        app.instance()->getMainWindow(), &MainWindow::activateWindow,
++        Qt::DirectConnection);
++
+     return app.exec();
+ }
+-- 
+2.1.0
+
diff --git a/0013-Fix-color-mixing-on-abase.patch b/0013-Fix-color-mixing-on-abase.patch
new file mode 100644
index 0000000..76c0faa
--- /dev/null
+++ b/0013-Fix-color-mixing-on-abase.patch
@@ -0,0 +1,25 @@
+From 45503fca7f33836cd57bb5fe8f5926d9717d2746 Mon Sep 17 00:00:00 2001
+From: Eike Hein <hein at kde.org>
+Date: Sat, 13 Dec 2014 17:52:27 +0100
+Subject: [PATCH 13/24] Fix color mixing on abase.
+
+---
+ src/viewer/viewtree.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/viewer/viewtree.cpp b/src/viewer/viewtree.cpp
+index b50b24e..453c833 100644
+--- a/src/viewer/viewtree.cpp
++++ b/src/viewer/viewtree.cpp
+@@ -75,7 +75,7 @@ void ViewTreeDelegate::paint(QPainter* painter, const QStyleOptionViewItem& opti
+          background = selected ? selColor : m_view->palette().color(QPalette::Base);
+     }
+ 
+-    QColor midColor = mixColor(bgColor, selColor);
++    QColor midColor = mixColor(bgColor, background);
+ 
+     int y = option.rect.y();
+     int height = option.rect.y() + option.rect.height();
+-- 
+2.1.0
+
diff --git a/0017-use-co-installable-qca-qt5-version.patch b/0017-use-co-installable-qca-qt5-version.patch
new file mode 100644
index 0000000..b8bac09
--- /dev/null
+++ b/0017-use-co-installable-qca-qt5-version.patch
@@ -0,0 +1,69 @@
+From 3aa918b5e3ac0f90a76d55c2bab12fafcbb1279b Mon Sep 17 00:00:00 2001
+From: Harald Sitter <sitter at kde.org>
+Date: Tue, 13 Jan 2015 13:45:02 +0100
+Subject: [PATCH 17/24] use co-installable qca-qt5 version
+
+REVIEW: 122031
+---
+ CMakeLists.txt     |  8 ++++----
+ src/CMakeLists.txt | 10 +++++-----
+ 2 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 567e997..17d8e7c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -44,9 +44,9 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
+ find_package(Phonon4Qt5 4.6.60 REQUIRED)
+ include_directories(${PHONON_INCLUDES})
+ 
+-find_package(Qca 2.1.0)
+-set_package_properties(Qca PROPERTIES DESCRIPTION "Support for encryption"
+-                       URL "http://delta.affinix.com/qca"
++find_package(Qca-qt5 2.1.0)
++set_package_properties(Qca-qt5 PROPERTIES DESCRIPTION "Support for encryption"
++                       URL "http://download.kde.org/stable/qca-qt5/"
+                        TYPE OPTIONAL)
+ check_include_file("stropts.h" HAVE_STROPTS_H)
+ check_include_file("byteswap.h" HAVE_BYTESWAP_H)
+@@ -55,7 +55,7 @@ check_include_file("sys/endian.h" HAVE_SYS_ENDIAN_H)
+ configure_file(config-konversation.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-konversation.h )
+ include_directories(${CMAKE_CURRENT_BINARY_DIR})
+ 
+-set(HAVE_QCA2 ${Qca_FOUND})
++set(HAVE_QCA2 ${Qca-qt5_FOUND})
+ 
+ add_definitions(
+   -DQT_USE_QSTRINGBUILDER
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index d8a44af..bbf7619 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -185,10 +185,10 @@ ki18n_wrap_ui(dcc_SRCS
+      dcc/whiteboardfontchooserui.ui
+ )
+ 
+-if (Qca_FOUND)
++if (Qca-qt5_FOUND)
+     set(cipher_SRCS
+         cipher.cpp)
+-endif (Qca_FOUND)
++endif (Qca-qt5_FOUND)
+ 
+ set(upnp_SRCS
+     upnp/soap.cpp
+@@ -235,8 +235,8 @@ target_link_libraries(konversation
+     KF5::ItemViews
+     Phonon::phonon4qt5)
+ 
+-if (Qca_FOUND)
+-    target_link_libraries(konversation qca)
+-endif (Qca_FOUND)
++if (Qca-qt5_FOUND)
++    target_link_libraries(konversation qca-qt5)
++endif ()
+ 
+ install(TARGETS konversation ${INSTALL_TARGETS_DEFAULT_ARGS})
+-- 
+2.1.0
+
diff --git a/0018-Use-KCharsets.patch b/0018-Use-KCharsets.patch
new file mode 100644
index 0000000..5ad98b2
--- /dev/null
+++ b/0018-Use-KCharsets.patch
@@ -0,0 +1,38 @@
+From 5484057eac2c00f6736bf98ca5ee90c201fbede6 Mon Sep 17 00:00:00 2001
+From: Eike Hein <hein at kde.org>
+Date: Sun, 18 Jan 2015 00:12:34 +0100
+Subject: [PATCH 18/24] Use KCharsets.
+
+Cf. bug 243513.
+---
+ ChangeLog               | 3 +++
+ src/irc/irccharsets.cpp | 2 +-
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index f995f37..20cde43 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,6 @@
++Changes since 1.6-beta1:
++* Improved support for character set aliases via KCharsets.
++
+ Changes from Konversation 1.5.1 to 1.6-beta1:
+ Konversation 1.6-beta1 is the first release of Konversation built on the new
+ KDE Frameworks 5 and Qt 5 library sets, and intended to allow you to help us
+diff --git a/src/irc/irccharsets.cpp b/src/irc/irccharsets.cpp
+index bb66eb2..e708162 100644
+--- a/src/irc/irccharsets.cpp
++++ b/src/irc/irccharsets.cpp
+@@ -114,7 +114,7 @@ namespace Konversation
+         if(shortName == QStringLiteral("ISO 2022-JP"))
+             return QTextCodec::codecForName( "jis7" );
+         else
+-            return QTextCodec::codecForName( shortName.toLatin1() );
++            return KCharsets::charsets()->codecForName( shortName.toLatin1() );
+     }
+ 
+     IRCCharsets::IRCCharsets()
+-- 
+2.1.0
+
diff --git a/0020-Raise-the-window-also-when-it-is-minimized-or-hidden.patch b/0020-Raise-the-window-also-when-it-is-minimized-or-hidden.patch
new file mode 100644
index 0000000..17542fd
--- /dev/null
+++ b/0020-Raise-the-window-also-when-it-is-minimized-or-hidden.patch
@@ -0,0 +1,79 @@
+From 8b3369e0cfce7487215fb920ef13ee94f6bd43a7 Mon Sep 17 00:00:00 2001
+From: Jan Grulich <jgrulich at redhat.com>
+Date: Wed, 11 Feb 2015 14:14:17 +0100
+Subject: [PATCH 20/24] Raise the window also when it is minimized or hidden in
+ system tray
+
+REVIEW:122520
+---
+ src/main.cpp       |  2 +-
+ src/mainwindow.cpp | 19 ++++++++++++-------
+ src/mainwindow.h   |  2 ++
+ 3 files changed, 15 insertions(+), 8 deletions(-)
+
+diff --git a/src/main.cpp b/src/main.cpp
+index 538f4e3..1f51b6a 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -153,7 +153,7 @@ int main(int argc, char* argv[])
+     app.newInstance(&cmdLineParser);
+ 
+     QObject::connect(&dbusService, &KDBusService::activateRequested,
+-        app.instance()->getMainWindow(), &MainWindow::activateWindow,
++        app.instance()->getMainWindow(), &MainWindow::activateAndRaiseWindow,
+         Qt::DirectConnection);
+ 
+     return app.exec();
+diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
+index 47101fd..9e98877 100644
+--- a/src/mainwindow.cpp
++++ b/src/mainwindow.cpp
+@@ -588,6 +588,17 @@ int MainWindow::confirmQuit()
+     return result;
+ }
+ 
++void MainWindow::activateAndRaiseWindow()
++{
++    if (isMinimized())
++        KWindowSystem::unminimizeWindow(winId());
++    else if (Preferences::self()->showTrayIcon() && !isVisible())
++        m_trayIcon->restore();
++
++    KWindowSystem::setOnDesktop(winId(), KWindowSystem::currentDesktop());
++    KWindowSystem::activateWindow(winId());
++}
++
+ void MainWindow::quitProgram()
+ {
+     if (Preferences::self()->showTrayIcon() &&
+@@ -885,13 +896,7 @@ void MainWindow::toggleVisibility()
+     }
+     else
+     {
+-        if (isMinimized())
+-            KWindowSystem::unminimizeWindow(winId());
+-        else if (Preferences::self()->showTrayIcon() && !isVisible())
+-            m_trayIcon->restore();
+-
+-        KWindowSystem::setOnDesktop(winId(), KWindowSystem::currentDesktop());
+-        KWindowSystem::activateWindow(winId());
++        activateAndRaiseWindow();
+     }
+ }
+ 
+diff --git a/src/mainwindow.h b/src/mainwindow.h
+index 2ed99ef..2c41666 100644
+--- a/src/mainwindow.h
++++ b/src/mainwindow.h
+@@ -64,6 +64,8 @@ class MainWindow : public KXmlGuiWindow
+         void insertMarkerLine();
+ 
+     public Q_SLOTS:
++        void activateAndRaiseWindow();
++
+         void quitProgram();
+ 
+         void updateTrayIcon();
+-- 
+2.1.0
+
diff --git a/0021-Sort-servers-for-auto-connect-otherwise-they-might-n.patch b/0021-Sort-servers-for-auto-connect-otherwise-they-might-n.patch
new file mode 100644
index 0000000..67ec2a0
--- /dev/null
+++ b/0021-Sort-servers-for-auto-connect-otherwise-they-might-n.patch
@@ -0,0 +1,46 @@
+From a4642dedbc81caadde1f0e75157344cb545c7e4a Mon Sep 17 00:00:00 2001
+From: Jan Grulich <jgrulich at redhat.com>
+Date: Wed, 11 Feb 2015 15:43:58 +0100
+Subject: [PATCH 21/24] Sort servers for auto-connect, otherwise they might not
+ be in order as they were saved
+
+---
+ src/application.cpp | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/src/application.cpp b/src/application.cpp
+index 4081d5e..f66ab8c 100644
+--- a/src/application.cpp
++++ b/src/application.cpp
+@@ -226,6 +226,7 @@ void Application::newInstance(QCommandLineParser *args)
+ 
+         if (!args->isSet(QStringLiteral("noautoconnect")) && url.isEmpty() && !args->isSet(QStringLiteral("server")))
+         {
++            QList<ServerGroupSettingsPtr> serversToAutoconnect;
+             QHashIterator<int, Konversation::ServerGroupSettingsPtr> it(serverGroups);
+             while(it.hasNext())
+             {
+@@ -233,9 +234,19 @@ void Application::newInstance(QCommandLineParser *args)
+                 if (it.value()->autoConnectEnabled())
+                 {
+                     openServerList = false;
+-                    m_connectionManager->connectTo(Konversation::CreateNewConnection, it.key());
++                    serversToAutoconnect << it.value();
+                 }
+             }
++
++            std::sort(serversToAutoconnect.begin(), serversToAutoconnect.end(), [] (const ServerGroupSettingsPtr &left, const ServerGroupSettingsPtr &right)
++            {
++                return left->sortIndex() < right->sortIndex();
++            });
++
++            for (QList<ServerGroupSettingsPtr>::iterator it = serversToAutoconnect.begin(); it != serversToAutoconnect.end(); ++it)
++            {
++                m_connectionManager->connectTo(Konversation::CreateNewConnection, (*it)->id());
++            }
+         }
+ 
+         if (openServerList) mainWindow->openServerList();
+-- 
+2.1.0
+
diff --git a/0023-Simplify-Server-resetNickSelection.patch b/0023-Simplify-Server-resetNickSelection.patch
new file mode 100644
index 0000000..a54439e
--- /dev/null
+++ b/0023-Simplify-Server-resetNickSelection.patch
@@ -0,0 +1,51 @@
+From b1dfa32c5c4122fafdd52a95225ff54de5ab4385 Mon Sep 17 00:00:00 2001
+From: Eike Hein <hein at kde.org>
+Date: Fri, 20 Feb 2015 22:08:04 +0100
+Subject: [PATCH 23/24] Simplify Server::resetNickSelection().
+
+Just skip over the current nick, don't try to make it the
+invisible list head. This way we try harder to revert to
+nicks early in the config-backed list.
+
+BUG:344225
+---
+ src/irc/server.cpp | 22 +++++++++-------------
+ 1 file changed, 9 insertions(+), 13 deletions(-)
+
+diff --git a/src/irc/server.cpp b/src/irc/server.cpp
+index ebfd8bd..1fb21ae 100644
+--- a/src/irc/server.cpp
++++ b/src/irc/server.cpp
+@@ -1178,20 +1178,16 @@ void Server::autoCommandsAndChannels()
+ void Server::resetNickSelection()
+ {
+     m_nickIndices.clear();
+-    //for equivalence testing in case the identity gets changed underneath us
++
++    // For equivalence testing in case the identity gets changed underneath us.
+     m_referenceNicklist = getIdentity()->getNicknameList();
+-    //where in this identities nicklist will we have started?
+-    int start = m_referenceNicklist.indexOf(getNickname());
+-    int len = m_referenceNicklist.count();
+-
+-    //we first use this list of indices *after* we've already tried the current nick, which we don't want
+-    //to retry if we wrapped, so exclude its index here
+-    //if it wasn't in the list, we get -1 back, so then we *want* to include 0
+-    for (int i=start+1; i<len; i++)
+-        m_nickIndices.append(i);
+-    //now, from the beginning of the list, to the item before start
+-    for (int i=0; i<start; i++)
+-        m_nickIndices.append(i);
++
++    for (int i = 0; i < m_referenceNicklist.length(); ++i) {
++        // Pointless to include the nick we're already going to use.
++        if (m_referenceNicklist.at(i) != getNickname()) {
++            m_nickIndices.append(i);
++        }
++    }
+ }
+ 
+ QString Server::getNextNickname()
+-- 
+2.1.0
+
diff --git a/konversation.spec b/konversation.spec
index e91773d..d3e995f 100644
--- a/konversation.spec
+++ b/konversation.spec
@@ -1,7 +1,9 @@
 
+%define pre beta1
+
 Name:           konversation
-Version:        1.5.1
-Release:        1%{?dist}
+Version:        1.6
+Release:        0.1.%{pre}%{?dist}
 Summary:        A user friendly IRC client
 
 License:        GPLv2+
@@ -14,18 +16,50 @@ Source0:        http://download.kde.org/%{?pre:un}stable/konversation/%{version}
 %endif
 
 ## upstream patches
-
-BuildRequires:  desktop-file-utils
-BuildRequires:  gettext
-BuildRequires:  kdelibs4-devel >= 4.9
-BuildRequires:  kdepimlibs-devel
-BuildRequires:  pkgconfig(xscrnsaver) 
-BuildRequires:  pkgconfig(phonon)
-BuildRequires:  pkgconfig(qca2)
-
-Requires: kde-runtime%{?_kde4_version: >= %{_kde4_version}}
-%{?_qt4:Requires: qt4%{?_isa} >= %{_qt4_version}}
-Requires:       qca-ossl%{?_isa}
+Patch1: 0001-Bump-for-post-release.patch
+Patch4: 0004-Fix-typo-in-version-string.patch
+Patch7: 0007-Fix-build-of-DCC-code-in-MSVC.patch
+Patch8: 0008-Fix-build-of-UPnP-code-on-Windows.patch
+Patch9: 0009-Fix-includes-of-dcccommon.cpp-on-Windows.patch
+Patch11: 0011-Fix-layout-and-size-hint-calc-for-topic-label-to-tak.patch
+Patch12: 0012-Raise-the-main-window-when-re-running.patch
+Patch13: 0013-Fix-color-mixing-on-abase.patch
+Patch17: 0017-use-co-installable-qca-qt5-version.patch
+Patch18: 0018-Use-KCharsets.patch
+Patch20: 0020-Raise-the-window-also-when-it-is-minimized-or-hidden.patch
+Patch21: 0021-Sort-servers-for-auto-connect-otherwise-they-might-n.patch
+Patch23: 0023-Simplify-Server-resetNickSelection.patch
+
+BuildRequires: cmake
+BuildRequires: desktop-file-utils
+BuildRequires: extra-cmake-modules
+BuildRequires: gettext
+BuildRequires: kf5-rpm-macros
+BuildRequires: kf5-karchive-devel
+BuildRequires: kf5-kbookmarks-devel
+BuildRequires: kf5-kconfig-devel
+BuildRequires: kf5-kconfigwidgets-devel
+BuildRequires: kf5-kdbusaddons-devel
+BuildRequires: kf5-kdoctools-devel
+BuildRequires: kf5-kemoticons-devel
+BuildRequires: kf5-kglobalaccel-devel
+BuildRequires: kf5-ki18n-devel
+BuildRequires: kf5-kiconthemes-devel
+BuildRequires: kf5-kidletime-devel
+BuildRequires: kf5-kio-devel
+BuildRequires: kf5-knotifications-devel
+BuildRequires: kf5-knotifyconfig-devel
+BuildRequires: kf5-kparts-devel
+BuildRequires: kf5-solid-devel
+BuildRequires: kf5-sonnet-devel
+BuildRequires: kf5-kwallet-devel
+BuildRequires: kf5-kwidgetsaddons-devel
+BuildRequires: kf5-kwindowsystem-devel
+BuildRequires: pkgconfig(phonon4qt5)
+BuildRequires: pkgconfig(qca2-qt5)
+BuildRequires: pkgconfig(Qt5Widgets)
+
+Requires: qca-qt5-ossl%{?_isa}
 
 %description
 A simple and easy to use IRC client with support for
@@ -36,13 +70,13 @@ to chat windows; configurable background colors and much more
 
 
 %prep
-%setup -n %{name}-%{version}%{?pre:-%{pre}}
+%autosetup -n %{name}-%{version}%{?pre:-%{pre}} -p1
 
 
 %build
-mkdir -p %{_target_platform}
+mkdir %{_target_platform}
 pushd %{_target_platform}
-%{cmake_kde4} ..
+%{cmake_kf5} ..
 popd
 
 make %{?_smp_mflags} -C %{_target_platform}
@@ -51,11 +85,11 @@ make %{?_smp_mflags} -C %{_target_platform}
 %install
 make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
 
-%find_lang konversation --with-kde
+%find_lang konversation
 
 
 %check
-desktop-file-validate %{buildroot}%{_kde4_datadir}/applications/kde4/konversation.desktop
+desktop-file-validate %{buildroot}%{_kf5_datadir}/applications/org.kde.konversation.desktop
 
 
 %post
@@ -73,16 +107,23 @@ if [ $1 -eq 0 ] ; then
 fi
 
 %files  -f konversation.lang
-%doc ChangeLog COPYING README TODO 
-%{_kde4_bindir}/konversation
-%{_kde4_datadir}/applications/kde4/konversation.desktop
-%{_kde4_datadir}/kde4/services/*.protocol
-%{_kde4_appsdir}/konversation/
-%{_kde4_appsdir}/kconf_update/konversation*
-%{_kde4_iconsdir}/hicolor/*/*/*
+%doc ChangeLog COPYING README
+%{_kf5_bindir}/konversation
+%{_kf5_datadir}/applications/org.kde.konversation.desktop
+%{_kf5_datadir}/konversation/
+%{_kf5_datadir}/kconf_update/konversation*
+%{_kf5_datadir}/knotifications5/konversation.notifyrc
+%{_kf5_datadir}/kservices5/konvi*.protocol
+%{_kf5_datadir}/kxmlgui5/konversation/
+%{_kf5_datadir}/icons/hicolor/*/*/*
+# until %%find_lang --with-kde is fixed for kf5
+%{_kf5_docdir}/HTML/*/konversation/
 
 
 %changelog
+* Sun Mar 01 2015 Rex Dieter <rdieter at fedoraproject.org> 1.6-0.1.beta1
+- 1.6-beta1
+
 * Tue Nov 04 2014 Rex Dieter <rdieter at fedoraproject.org> 1.5.1-1
 - 1.5.1
 
diff --git a/sources b/sources
index 04aa411..db4f695 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-66731bbfa34e36bd3f7b723c63a492e7  konversation-1.5.1.tar.xz
+5e5ccb0a17ba58bd4cac72ab8ac0f907  konversation-1.6-beta1.tar.xz


More information about the scm-commits mailing list