Hello community,

here is the log from the commit of package kcompletion for openSUSE:Factory 
checked in at 2019-10-14 13:33:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kcompletion (Old)
 and      /work/SRC/openSUSE:Factory/.kcompletion.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kcompletion"

Mon Oct 14 13:33:40 2019 rev:73 rq:738011 version:5.63.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kcompletion/kcompletion.changes  2019-09-23 
12:21:49.601763412 +0200
+++ /work/SRC/openSUSE:Factory/.kcompletion.new.2352/kcompletion.changes        
2019-10-14 13:34:30.174491965 +0200
@@ -1,0 +2,12 @@
+Sun Oct  6 13:26:20 UTC 2019 - Christophe Giboudeaux <[email protected]>
+
+- Update to 5.63.0
+  * New feature release
+  * For more details please see:
+  * https://www.kde.org/announcements/kde-frameworks-5.63.0.php
+- Changes since 5.62.0:
+  * [KComboBox] Properly disable Qt's builtin completer [regression fix]
+  * [KCompletion] Port away from deprecated methods in Qt 5.14
+  * Port from delta(); to angleDelta().y()
+
+-------------------------------------------------------------------

Old:
----
  kcompletion-5.62.0.tar.xz
  kcompletion-5.62.0.tar.xz.sig

New:
----
  kcompletion-5.63.0.tar.xz
  kcompletion-5.63.0.tar.xz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kcompletion.spec ++++++
--- /var/tmp/diff_new_pack.4uGXgi/_old  2019-10-14 13:34:30.730490516 +0200
+++ /var/tmp/diff_new_pack.4uGXgi/_new  2019-10-14 13:34:30.730490516 +0200
@@ -17,14 +17,14 @@
 
 
 %define lname   libKF5Completion5
-%define _tar_path 5.62
+%define _tar_path 5.63
 # Full KF5 version (e.g. 5.33.0)
 %{!?_kf5_version: %global _kf5_version %{version}}
 # Last major and minor KF5 version (e.g. 5.33)
 %{!?_kf5_bugfix_version: %define _kf5_bugfix_version %(echo %{_kf5_version} | 
awk -F. '{print $1"."$2}')}
 %bcond_without lang
 Name:           kcompletion
-Version:        5.62.0
+Version:        5.63.0
 Release:        0
 Summary:        Widgets with advanced completion support
 License:        LGPL-2.1-or-later
@@ -42,10 +42,10 @@
 BuildRequires:  kf5-filesystem
 BuildRequires:  cmake(KF5Config) >= %{_kf5_bugfix_version}
 BuildRequires:  cmake(KF5WidgetsAddons) >= %{_kf5_bugfix_version}
-BuildRequires:  cmake(Qt5UiPlugin) >= 5.6.0
-BuildRequires:  cmake(Qt5Widgets) >= 5.6.0
+BuildRequires:  cmake(Qt5UiPlugin) >= 5.11.0
+BuildRequires:  cmake(Qt5Widgets) >= 5.11.0
 %if %{with lang}
-BuildRequires:  cmake(Qt5LinguistTools) >= 5.6.0
+BuildRequires:  cmake(Qt5LinguistTools) >= 5.11.0
 %endif
 
 %description
@@ -68,7 +68,7 @@
 Group:          Development/Libraries/KDE
 Requires:       %{lname} = %{version}
 Requires:       extra-cmake-modules
-Requires:       cmake(Qt5Widgets) >= 5.6.0
+Requires:       cmake(Qt5Widgets) >= 5.11.0
 
 %description devel
 Development files for KCompletion, a widget collection with advanced


++++++ kcompletion-5.62.0.tar.xz -> kcompletion-5.63.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcompletion-5.62.0/CMakeLists.txt 
new/kcompletion-5.63.0/CMakeLists.txt
--- old/kcompletion-5.62.0/CMakeLists.txt       2019-09-07 15:56:20.000000000 
+0200
+++ new/kcompletion-5.63.0/CMakeLists.txt       2019-10-06 11:43:07.000000000 
+0200
@@ -1,12 +1,12 @@
 cmake_minimum_required(VERSION 3.5)
 
-set(KF5_VERSION "5.62.0") # handled by release scripts
-set(KF5_DEP_VERSION "5.62.0") # handled by release scripts
+set(KF5_VERSION "5.63.0") # handled by release scripts
+set(KF5_DEP_VERSION "5.63.0") # handled by release scripts
 project(KCompletion VERSION ${KF5_VERSION})
 
 # ECM setup
 include(FeatureSummary)
-find_package(ECM 5.62.0  NO_MODULE)
+find_package(ECM 5.63.0  NO_MODULE)
 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake 
Modules." URL 
"https://projects.kde.org/projects/kdesupport/extra-cmake-modules";)
 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
 
@@ -45,6 +45,7 @@
 add_feature_info(DESIGNERPLUGIN ${BUILD_DESIGNERPLUGIN} "Build plugin for Qt 
Designer")
 
 add_definitions(-DQT_NO_FOREACH)
+add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00)
 if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po")
     ecm_install_po_files_as_qm(po)
 endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcompletion-5.62.0/autotests/kcombobox_unittest.cpp 
new/kcompletion-5.63.0/autotests/kcombobox_unittest.cpp
--- old/kcompletion-5.62.0/autotests/kcombobox_unittest.cpp     2019-09-07 
15:56:20.000000000 +0200
+++ new/kcompletion-5.63.0/autotests/kcombobox_unittest.cpp     2019-10-06 
11:43:07.000000000 +0200
@@ -55,7 +55,11 @@
         // KComboBox signals
         QSignalSpy comboReturnPressedSpy(&w, SIGNAL(returnPressed()));
         QSignalSpy comboReturnPressedStringSpy(&w, 
SIGNAL(returnPressed(QString)));
+#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
         QSignalSpy comboActivatedSpy(&w, SIGNAL(activated(QString)));
+#else
+        QSignalSpy comboActivatedSpy(&w, &QComboBox::textActivated);
+#endif
         QTest::keyClick(&w, Qt::Key_Return);
         QCOMPARE(qReturnPressedSpy.count(), 1);
         QCOMPARE(kReturnPressedSpy.count(), 1);
@@ -78,11 +82,17 @@
     {
         KHistoryComboBox w;
         QVERIFY(qobject_cast<KLineEdit *>(w.lineEdit()));
-        connect(&w, SIGNAL(activated(QString)),
-                &w, SLOT(addToHistory(QString)));
         QSignalSpy comboReturnPressedSpy(&w, SIGNAL(returnPressed()));
         QSignalSpy comboReturnPressedStringSpy(&w, 
SIGNAL(returnPressed(QString)));
+#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
+        connect(&w, SIGNAL(activated(QString)),
+                &w, SLOT(addToHistory(QString)));
         QSignalSpy comboActivatedSpy(&w, SIGNAL(activated(QString)));
+#else
+        connect(&w, &KHistoryComboBox::textActivated,
+                &w, &KHistoryComboBox::addToHistory);
+        QSignalSpy comboActivatedSpy(&w, &QComboBox::textActivated);
+#endif
         QTest::keyClicks(&w, QStringLiteral("Hello world"));
         QTest::keyClick(&w, Qt::Key_Return);
         qApp->processEvents(); // QueuedConnection in KHistoryComboBox
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcompletion-5.62.0/po/se/kcompletion5_qt.po 
new/kcompletion-5.63.0/po/se/kcompletion5_qt.po
--- old/kcompletion-5.62.0/po/se/kcompletion5_qt.po     2019-09-07 
15:56:20.000000000 +0200
+++ new/kcompletion-5.63.0/po/se/kcompletion5_qt.po     2019-10-06 
11:43:07.000000000 +0200
@@ -32,62 +32,62 @@
 msgid "1"
 msgstr "1"
 
-#: klineedit.cpp:927
+#: klineedit.cpp:932
 #, fuzzy
 msgctxt "KLineEdit|"
 msgid "C&lear"
 msgstr "&Sálke"
 
-#: klineedit.cpp:941
+#: klineedit.cpp:946
 #, fuzzy
 msgctxt "KLineEdit|@title:menu"
 msgid "Text Completion"
 msgstr "Teavsttaollášuhttin"
 
 # unreviewed-context
-#: klineedit.cpp:948
+#: klineedit.cpp:953
 #, fuzzy
 msgctxt "KLineEdit|@item:inmenu Text Completion"
 msgid "None"
 msgstr "Ii mihkkige"
 
 # unreviewed-context
-#: klineedit.cpp:949
+#: klineedit.cpp:954
 #, fuzzy
 msgctxt "KLineEdit|@item:inmenu Text Completion"
 msgid "Manual"
 msgstr "Manuella"
 
 # unreviewed-context
-#: klineedit.cpp:950
+#: klineedit.cpp:955
 #, fuzzy
 msgctxt "KLineEdit|@item:inmenu Text Completion"
 msgid "Automatic"
 msgstr "Automáhtalaš"
 
 # unreviewed-context
-#: klineedit.cpp:951
+#: klineedit.cpp:956
 #, fuzzy
 msgctxt "KLineEdit|@item:inmenu Text Completion"
 msgid "Dropdown List"
 msgstr "Luoitinlistu"
 
 # unreviewed-context
-#: klineedit.cpp:952
+#: klineedit.cpp:957
 #, fuzzy
 msgctxt "KLineEdit|@item:inmenu Text Completion"
 msgid "Short Automatic"
 msgstr "Oanehis automáhtalaš"
 
 # unreviewed-context
-#: klineedit.cpp:953
+#: klineedit.cpp:958
 #, fuzzy
 msgctxt "KLineEdit|@item:inmenu Text Completion"
 msgid "Dropdown List && Automatic"
 msgstr "Luoitinlistu ja automáhtalaččat"
 
 # unreviewed-context
-#: klineedit.cpp:983
+#: klineedit.cpp:988
 #, fuzzy
 msgctxt "KLineEdit|@item:inmenu Text Completion"
 msgid "Default"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcompletion-5.62.0/src/CMakeLists.txt 
new/kcompletion-5.63.0/src/CMakeLists.txt
--- old/kcompletion-5.62.0/src/CMakeLists.txt   2019-09-07 15:56:20.000000000 
+0200
+++ new/kcompletion-5.63.0/src/CMakeLists.txt   2019-10-06 11:43:07.000000000 
+0200
@@ -96,6 +96,8 @@
             Qt5Core_QCH
             Qt5Gui_QCH
             Qt5Widgets_QCH
+        INCLUDE_DIRS
+            ${CMAKE_CURRENT_BINARY_DIR}
         BLANK_MACROS
             KCOMPLETION_EXPORT
             KCOMPLETION_DEPRECATED
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcompletion-5.62.0/src/kcombobox.cpp 
new/kcompletion-5.63.0/src/kcombobox.cpp
--- old/kcompletion-5.62.0/src/kcombobox.cpp    2019-09-07 15:56:20.000000000 
+0200
+++ new/kcompletion-5.63.0/src/kcombobox.cpp    2019-10-06 11:43:07.000000000 
+0200
@@ -56,12 +56,6 @@
 void KComboBoxPrivate::init()
 {
     Q_Q(KComboBox);
-    q->QComboBox::setAutoCompletion(false); // otherwise setLineEdit will 
create a completer...
-
-    if (q->isEditable()) {
-        q->setCompleter(nullptr);
-        q->lineEdit()->setContextMenuPolicy(Qt::DefaultContextMenu);
-    }
 }
 
 void KComboBoxPrivate::_k_lineEditDeleted()
@@ -316,6 +310,7 @@
     QPointer<KCompletion> completion = compObj();
 
     QComboBox::setLineEdit(edit);
+    edit->setCompleter(nullptr); // remove Qt's builtin completer (set by 
setLineEdit), we have our own
     d->klineEdit = qobject_cast<KLineEdit *>(edit);
     setDelegate(d->klineEdit);
 
@@ -354,8 +349,15 @@
         connect(d->klineEdit, &KLineEdit::aboutToShowContextMenu,
                 this, &KComboBox::aboutToShowContextMenu);
 
+        // match the declaration of the deprecated signal
+#if QT_DEPRECATED_SINCE(5, 15) || QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
         connect(d->klineEdit, &KLineEdit::completionBoxActivated,
                 this, QOverload<const QString&>::of(&QComboBox::activated));
+#endif
+#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
+        connect(d->klineEdit, &KLineEdit::completionBoxActivated,
+                this, QOverload<const 
QString&>::of(&QComboBox::textActivated));
+#endif
 
         d->klineEdit->setTrapReturnKey(d->trapReturnKey);
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcompletion-5.62.0/src/kcompletion.cpp 
new/kcompletion-5.63.0/src/kcompletion.cpp
--- old/kcompletion-5.62.0/src/kcompletion.cpp  2019-09-07 15:56:20.000000000 
+0200
+++ new/kcompletion-5.63.0/src/kcompletion.cpp  2019-10-06 11:43:07.000000000 
+0200
@@ -639,7 +639,7 @@
     } else if (m_compOrder == KCompletion::Sorted) {
         QCollator c;
         c.setCaseSensitivity(Qt::CaseSensitive);
-        qStableSort(m_stringList.begin(), m_stringList.end(), c);
+        std::stable_sort(m_stringList.begin(), m_stringList.end(), c);
     }
 
     return m_stringList;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcompletion-5.62.0/src/kcompletionbox.cpp 
new/kcompletion-5.63.0/src/kcompletionbox.cpp
--- old/kcompletion-5.62.0/src/kcompletionbox.cpp       2019-09-07 
15:56:20.000000000 +0200
+++ new/kcompletion-5.63.0/src/kcompletionbox.cpp       2019-10-06 
11:43:07.000000000 +0200
@@ -25,8 +25,9 @@
 
 #include <QApplication>
 #include <QDesktopWidget>
-#include <QScrollBar>
 #include <QKeyEvent>
+#include <QScrollBar>
+#include <QScreen>
 
 class KCompletionBoxPrivate
 {
@@ -305,18 +306,21 @@
     int x = currentPos.x(), y = currentPos.y();
     if (d->m_parent) {
         if (!isVisible()) {
-            QPoint orig = globalPositionHint();
-            QRect screenSize = QApplication::desktop()->screenGeometry(orig);
+            const QPoint orig = globalPositionHint();
+            QScreen *screen = QGuiApplication::screenAt(orig);
+            if (screen) {
+                const QRect screenSize = screen->geometry();
 
-            x = orig.x() + geom.x();
-            y = orig.y() + geom.y();
+                x = orig.x() + geom.x();
+                y = orig.y() + geom.y();
 
-            if (x + width() > screenSize.right()) {
-                x = screenSize.right() - width();
-            }
-            if (y + height() > screenSize.bottom()) {
-                y = y - height() - d->m_parent->height();
-                d->upwardBox = true;
+                if (x + width() > screenSize.right()) {
+                    x = screenSize.right() - width();
+                }
+                if (y + height() > screenSize.bottom()) {
+                    y = y - height() - d->m_parent->height();
+                    d->upwardBox = true;
+                }
             }
         } else {
             // Are we above our parent? If so we must keep bottom edge 
anchored.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcompletion-5.62.0/src/khistorycombobox.cpp 
new/kcompletion-5.63.0/src/khistorycombobox.cpp
--- old/kcompletion-5.62.0/src/khistorycombobox.cpp     2019-09-07 
15:56:20.000000000 +0200
+++ new/kcompletion-5.63.0/src/khistorycombobox.cpp     2019-10-06 
11:43:07.000000000 +0200
@@ -400,7 +400,7 @@
         return;
     }
     // Otherwise make it change the text without emitting activated
-    if (ev->delta() > 0) {
+    if (ev->angleDelta().y() > 0) {
         d->rotateUp();
     } else {
         d->rotateDown();
@@ -463,7 +463,12 @@
        which is perhaps reasonable. Generate the signal ourselves if that's 
the case.
     */
     if ((q->insertPolicy() == q->NoInsert && q->findText(text, 
Qt::MatchFixedString | Qt::MatchCaseSensitive) == -1)) {
+#if QT_DEPRECATED_SINCE(5, 15) || QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
         emit q->activated(text);
+#endif
+#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
+        emit q->textActivated(text);
+#endif
     }
 
     /*
@@ -471,7 +476,12 @@
        InsertAtCurrent
     */
     else if (q->insertPolicy() != q->InsertAtCurrent && q->count() >= 
q->maxCount()) {
+#if QT_DEPRECATED_SINCE(5, 15) || QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
         emit q->activated(text);
+#endif
+#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
+        emit q->textActivated(text);
+#endif
     }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcompletion-5.62.0/src/klineedit.cpp 
new/kcompletion-5.63.0/src/klineedit.cpp
--- old/kcompletion-5.62.0/src/klineedit.cpp    2019-09-07 15:56:20.000000000 
+0200
+++ new/kcompletion-5.63.0/src/klineedit.cpp    2019-10-06 11:43:07.000000000 
+0200
@@ -385,7 +385,7 @@
     const int fullLength = fullText.length();
     const QFontMetrics fm(q->fontMetrics());
     const int labelWidth = q->size().width() - 2 * 
q->style()->pixelMetric(QStyle::PM_DefaultFrameWidth) - 2;
-    const int textWidth = fm.width(fullText);
+    const int textWidth = fm.boundingRect(fullText).width();
 
     // TODO: investigate use of QFontMetrics::elidedText for this
     if (textWidth > labelWidth) {
@@ -395,12 +395,12 @@
         const QString ellipsisText = QStringLiteral("...");
         // start with the dots only
         QString squeezedText = ellipsisText;
-        int squeezedWidth = fm.width(squeezedText);
+        int squeezedWidth = fm.boundingRect(squeezedText).width();
 
         // estimate how many letters we can add to the dots on both sides
         int letters = fullText.length() * (labelWidth - squeezedWidth) / 
textWidth / 2;
         squeezedText = fullText.leftRef(letters) + ellipsisText + 
fullText.rightRef(letters);
-        squeezedWidth = fm.width(squeezedText);
+        squeezedWidth = fm.boundingRect(squeezedText).width();
 
         if (squeezedWidth < labelWidth) {
             // we estimated too short
@@ -408,7 +408,7 @@
             do {
                 letters++;
                 squeezedText = fullText.leftRef(letters) + ellipsisText + 
fullText.rightRef(letters);
-                squeezedWidth = fm.width(squeezedText);
+                squeezedWidth = fm.boundingRect(squeezedText).width();
             } while (squeezedWidth < labelWidth && letters <= fullLength / 2);
             letters--;
             squeezedText = fullText.leftRef(letters) + ellipsisText + 
fullText.rightRef(letters);
@@ -418,7 +418,7 @@
             do {
                 letters--;
                 squeezedText = fullText.leftRef(letters) + ellipsisText + 
fullText.rightRef(letters);
-                squeezedWidth = fm.width(squeezedText);
+                squeezedWidth = fm.boundingRect(squeezedText).width();
             } while (squeezedWidth > labelWidth && letters >= 5);
         }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcompletion-5.62.0/src/ksortablelist.h 
new/kcompletion-5.63.0/src/ksortablelist.h
--- old/kcompletion-5.62.0/src/ksortablelist.h  2019-09-07 15:56:20.000000000 
+0200
+++ new/kcompletion-5.63.0/src/ksortablelist.h  2019-10-06 11:43:07.000000000 
+0200
@@ -24,6 +24,7 @@
 
 #include <QPair>
 #include <QList>
+#include <algorithm>
 
 /**
  * \class KSortableItem ksortablelist.h <KSortableItem>
@@ -196,7 +197,7 @@
      */
     void sort()
     {
-        qSort(*this);
+        std::sort(this->begin(), this->end());
     }
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcompletion-5.62.0/tests/kcompletionuitest.cpp 
new/kcompletion-5.63.0/tests/kcompletionuitest.cpp
--- old/kcompletion-5.62.0/tests/kcompletionuitest.cpp  2019-09-07 
15:56:20.000000000 +0200
+++ new/kcompletion-5.63.0/tests/kcompletionuitest.cpp  2019-10-06 
11:43:07.000000000 +0200
@@ -10,15 +10,10 @@
 #include <klineedit.h>
 #include <khistorycombobox.h>
 
-/*
- *  Constructs a Form1 which is a child of 'parent', with the
- *  widget flags set to 'f'
- */
 Form1::Form1(QWidget *parent)
     : QWidget(parent)
 {
     setAttribute(Qt::WA_DeleteOnClose);
-    setObjectName(QStringLiteral("Form1"));
     resize(559, 465);
     setWindowTitle(QStringLiteral("Form1"));
     Form1Layout = new QVBoxLayout(this);
@@ -30,8 +25,6 @@
     GroupBox1->layout()->setContentsMargins(0, 0, 0, 0);
     GroupBox1Layout = new QVBoxLayout;
     GroupBox1Layout->setAlignment(Qt::AlignTop);
-    GroupBox1Layout->setSpacing(6);
-    GroupBox1Layout->setMargin(11);
     GroupBox1->layout()->addItem(GroupBox1Layout);
     GroupBox1Layout->setParent(GroupBox1->layout());
 


Reply via email to