Hello community,
here is the log from the commit of package kcompletion for openSUSE:Factory checked in at 2017-03-03 15:14:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kcompletion (Old)
and /work/SRC/openSUSE:Factory/.kcompletion.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kcompletion"
Fri Mar 3 15:14:39 2017 rev:39 rq:461404 version:5.31.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/kcompletion/kcompletion.changes 2017-02-03 17:44:01.678970493 +0100
+++ /work/SRC/openSUSE:Factory/.kcompletion.new/kcompletion.changes 2017-03-03 15:14:40.353529289 +0100
@@ -1,0 +2,7 @@
+Thu Feb 9 09:24:30 UTC 2017 - hrvoje.senjan@gmail.com
+
+- Update to 5.31.0
+ * For more details please see:
+ https://www.kde.org/announcements/kde-frameworks-5.31.0.php
+
+-------------------------------------------------------------------
Old:
----
kcompletion-5.30.0.tar.xz
New:
----
kcompletion-5.31.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kcompletion.spec ++++++
--- /var/tmp/diff_new_pack.YYEeCo/_old 2017-03-03 15:14:40.881454544 +0100
+++ /var/tmp/diff_new_pack.YYEeCo/_new 2017-03-03 15:14:40.881454544 +0100
@@ -18,9 +18,9 @@
%bcond_without lang
%define lname libKF5Completion5
-%define _tar_path 5.30
+%define _tar_path 5.31
Name: kcompletion
-Version: 5.30.0
+Version: 5.31.0
Release: 0
%define kf5_version %{version}
BuildRequires: cmake >= 3.0
@@ -30,9 +30,9 @@
BuildRequires: kf5-filesystem
BuildRequires: kwidgetsaddons-devel >= %{_tar_path}
%if %{with lang}
-BuildRequires: cmake(Qt5LinguistTools) >= 5.5.0
+BuildRequires: cmake(Qt5LinguistTools) >= 5.6.0
%endif
-BuildRequires: cmake(Qt5Widgets) >= 5.5.0
+BuildRequires: cmake(Qt5Widgets) >= 5.6.0
Summary: Provides widgets with advanced completion support
License: LGPL-2.1+
Group: System/GUI/KDE
@@ -61,7 +61,7 @@
Group: Development/Libraries/KDE
Requires: %lname = %{version}
Requires: extra-cmake-modules
-Requires: cmake(Qt5Widgets) >= 5.5.0
+Requires: cmake(Qt5Widgets) >= 5.6.0
%description devel
KCompletion provides widgets with advanced completion support as well as a
++++++ kcompletion-5.30.0.tar.xz -> kcompletion-5.31.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/CMakeLists.txt new/kcompletion-5.31.0/CMakeLists.txt
--- old/kcompletion-5.30.0/CMakeLists.txt 2017-01-08 21:46:42.000000000 +0100
+++ new/kcompletion-5.31.0/CMakeLists.txt 2017-02-05 11:49:26.000000000 +0100
@@ -1,12 +1,12 @@
cmake_minimum_required(VERSION 3.0)
-set(KF5_VERSION "5.30.0") # handled by release scripts
-set(KF5_DEP_VERSION "5.30.0") # handled by release scripts
+set(KF5_VERSION "5.31.0") # handled by release scripts
+set(KF5_DEP_VERSION "5.31.0") # handled by release scripts
project(KCompletion VERSION ${KF5_VERSION})
# ECM setup
include(FeatureSummary)
-find_package(ECM 5.30.0 NO_MODULE)
+find_package(ECM 5.31.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)
@@ -29,7 +29,7 @@
SOVERSION 5)
# Dependencies
-set(REQUIRED_QT_VERSION 5.5.0)
+set(REQUIRED_QT_VERSION 5.6.0)
find_package(Qt5 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Widgets)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/autotests/kcombobox_unittest.cpp new/kcompletion-5.31.0/autotests/kcombobox_unittest.cpp
--- old/kcompletion-5.30.0/autotests/kcombobox_unittest.cpp 2017-01-08 21:46:42.000000000 +0100
+++ new/kcompletion-5.31.0/autotests/kcombobox_unittest.cpp 2017-02-05 11:49:26.000000000 +0100
@@ -25,7 +25,7 @@
class KTestComboBox : public KComboBox
{
public:
- KTestComboBox(bool rw, QWidget *parent = 0) : KComboBox(rw, parent) {}
+ KTestComboBox(bool rw, QWidget *parent = nullptr) : KComboBox(rw, parent) {}
KCompletionBase *delegate() const
{
return KCompletionBase::delegate();
@@ -125,17 +125,17 @@
void testDeleteLineEdit()
{
// Test for KCombo's KLineEdit destruction
- KTestComboBox *testCombo = new KTestComboBox(true, 0); // rw, with KLineEdit
+ KTestComboBox *testCombo = new KTestComboBox(true, nullptr); // rw, with KLineEdit
testCombo->setEditable(false); // destroys our KLineEdit, with deleteLater
- qApp->sendPostedEvents(NULL, QEvent::DeferredDelete);
- QVERIFY(testCombo->KTestComboBox::delegate() == 0L);
+ qApp->sendPostedEvents(nullptr, QEvent::DeferredDelete);
+ QVERIFY(testCombo->KTestComboBox::delegate() == nullptr);
delete testCombo; // not needed anymore
}
void testSelectionResetOnReturn()
{
// void QComboBoxPrivate::_q_returnPressed() calls lineEdit->deselect()
- KHistoryComboBox *testCombo = new KHistoryComboBox(true, 0);
+ KHistoryComboBox *testCombo = new KHistoryComboBox(true, nullptr);
QCOMPARE(testCombo->insertPolicy(), QComboBox::NoInsert); // not the Qt default; KHistoryComboBox changes that
QTest::keyClicks(testCombo, "Hello world");
testCombo->lineEdit()->setSelection(5, 3);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/autotests/pythontest.py new/kcompletion-5.31.0/autotests/pythontest.py
--- old/kcompletion-5.30.0/autotests/pythontest.py 1970-01-01 01:00:00.000000000 +0100
+++ new/kcompletion-5.31.0/autotests/pythontest.py 2017-02-05 11:49:26.000000000 +0100
@@ -0,0 +1,27 @@
+#!/usr/bin/env python
+#-*- coding: utf-8 -*-
+
+import sys
+
+sys.path.append(sys.argv[1])
+
+from PyQt5 import QtWidgets
+
+from PyKF5 import KCompletion
+
+def main():
+ app = QtWidgets.QApplication(sys.argv)
+
+ kc = KCompletion.KCompletion()
+ kc.insertItems(["Monday", "Tuesday", "Wednesday",
+ "Thursday", "Friday", "Saturday", "Sunday"])
+
+ kl = KCompletion.KLineEdit()
+ kl.setCompletionObject(kc)
+ kl.setCompletionMode(KCompletion.KCompletion.CompletionAuto)
+
+ kl.makeCompletion("M")
+ assert(kl.text() == "Monday")
+
+if __name__ == '__main__':
+ sys.exit(main())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/cmake/rules_PyKF5.py new/kcompletion-5.31.0/cmake/rules_PyKF5.py
--- old/kcompletion-5.30.0/cmake/rules_PyKF5.py 1970-01-01 01:00:00.000000000 +0100
+++ new/kcompletion-5.31.0/cmake/rules_PyKF5.py 2017-02-05 11:49:26.000000000 +0100
@@ -0,0 +1,53 @@
+#
+# Copyright 2016 Stephen Kelly
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import os, sys
+
+import rules_engine
+sys.path.append(os.path.dirname(os.path.dirname(rules_engine.__file__)))
+import Qt5Ruleset
+
+def _container_discard_base(container, sip, matcher):
+ sip["base_specifiers"] = ""
+
+def local_container_rules():
+ return [
+ [".*", "KCompletionMatches", ".*", ".*", ".*", _container_discard_base],
+ ]
+
+def local_function_rules():
+ return [
+ ["KCompletionBase", "keyBindingMap", ".*", ".*", ".*", rules_engine.function_discard],
+ ["KCompletionBase", "getKeyBindings", ".*", ".*", ".*", rules_engine.function_discard],
+ ["KCompletionBase", "setKeyBindingMap", ".*", ".*", ".*", rules_engine.function_discard],
+ ["KCompletionMatches", "KCompletionMatches", ".*", ".*", ".*KCompletionMatchesWrapper.*", rules_engine.function_discard],
+ ]
+
+class RuleSet(Qt5Ruleset.RuleSet):
+ def __init__(self):
+ Qt5Ruleset.RuleSet.__init__(self)
+ self._fn_db = rules_engine.FunctionRuleDb(lambda: local_function_rules() + Qt5Ruleset.function_rules())
+ self._container_db = rules_engine.ContainerRuleDb(lambda: local_container_rules() + Qt5Ruleset.container_rules())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/po/ar/kcompletion5_qt.po new/kcompletion-5.31.0/po/ar/kcompletion5_qt.po
--- old/kcompletion-5.30.0/po/ar/kcompletion5_qt.po 2017-01-08 21:46:42.000000000 +0100
+++ new/kcompletion-5.31.0/po/ar/kcompletion5_qt.po 2017-02-05 11:49:26.000000000 +0100
@@ -1,45 +1,45 @@
-# Safa Alfulaij , 2014.
+# Safa Alfulaij , 2014, 2017.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-28 15:38+0300\n"
-"PO-Revision-Date: 2014-06-17 19:49+0300\n"
+"PO-Revision-Date: 2017-01-25 21:42+0300\n"
"Last-Translator: Safa Alfulaij \n"
-"Language-Team: Arabic \n"
+"Language-Team: Arabic \n"
"Language: ar\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n"
-"X-Generator: Lokalize 1.5\n"
+"X-Generator: Lokalize 2.0\n"
"X-Qt-Contexts: true\n"
#: khistorycombobox.cpp:203
msgctxt "KHistoryComboBox|"
msgid "Clear &History"
-msgstr "امحُ ال&تأريخ"
+msgstr "امحِ ال&تّأريخ"
#: klineedit.cpp:154
msgctxt "KLineEdit|Italic placeholder text in line edits: 0 no, 1 yes"
msgid "1"
-msgstr "1"
+msgstr "١"
#: klineedit.cpp:224
msgctxt "KLineEdit|@action:button Clear current text in the line edit"
msgid "Clear text"
-msgstr "امحُ النصّ"
+msgstr "امحِ النّصّ"
#: klineedit.cpp:1103
msgctxt "KLineEdit|"
msgid "C&lear"
-msgstr "ام&حُ"
+msgstr "ام&حِ"
#: klineedit.cpp:1117
msgctxt "KLineEdit|@title:menu"
msgid "Text Completion"
-msgstr "إكمال النصّ"
+msgstr "إكمال النّصّ"
#: klineedit.cpp:1124
msgctxt "KLineEdit|@item:inmenu Text Completion"
@@ -49,29 +49,29 @@
#: klineedit.cpp:1125
msgctxt "KLineEdit|@item:inmenu Text Completion"
msgid "Manual"
-msgstr "يدويًا"
+msgstr "يدويًّا"
#: klineedit.cpp:1126
msgctxt "KLineEdit|@item:inmenu Text Completion"
msgid "Automatic"
-msgstr "آليًا"
+msgstr "آليًّا"
#: klineedit.cpp:1127
msgctxt "KLineEdit|@item:inmenu Text Completion"
msgid "Dropdown List"
-msgstr ""
+msgstr "قائمة منسدلة"
#: klineedit.cpp:1128
msgctxt "KLineEdit|@item:inmenu Text Completion"
msgid "Short Automatic"
-msgstr ""
+msgstr "آليًّا قصيرًا"
#: klineedit.cpp:1129
msgctxt "KLineEdit|@item:inmenu Text Completion"
msgid "Dropdown List && Automatic"
-msgstr ""
+msgstr "قائمة منسدلة وآليًّا"
#: klineedit.cpp:1159
msgctxt "KLineEdit|@item:inmenu Text Completion"
msgid "Default"
-msgstr ""
+msgstr "الافتراضيّ"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/src/CMakeLists.txt new/kcompletion-5.31.0/src/CMakeLists.txt
--- old/kcompletion-5.30.0/src/CMakeLists.txt 2017-01-08 21:46:42.000000000 +0100
+++ new/kcompletion-5.31.0/src/CMakeLists.txt 2017-02-05 11:49:26.000000000 +0100
@@ -46,6 +46,30 @@
REQUIRED_HEADERS KCompletion_HEADERS
)
+find_package(PythonModuleGeneration)
+
+if (PythonModuleGeneration_FOUND)
+ ecm_generate_python_binding(
+ TARGET KF5::Completion
+ PYTHONNAMESPACE PyKF5
+ MODULENAME KCompletion
+ RULES_FILE "${CMAKE_SOURCE_DIR}/cmake/rules_PyKF5.py"
+ INSTALL_DIR_SUFFIX ${KDE_INSTALL_PYTHONBINDINGSDIR}
+ SIP_DEPENDS
+ QtWidgets/QtWidgetsmod.sip
+ HEADERS
+ kcombobox.h
+ kcompletion.h
+ kcompletionbase.h
+ kcompletionbox.h
+ klineedit.h
+ khistorycombobox.h
+ kpixmapprovider.h
+ ksortablelist.h
+ kcompletionmatches.h
+ )
+endif()
+
install(TARGETS KF5Completion EXPORT KF5CompletionTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/src/kcombobox.cpp new/kcompletion-5.31.0/src/kcombobox.cpp
--- old/kcompletion-5.30.0/src/kcombobox.cpp 2017-01-08 21:46:42.000000000 +0100
+++ new/kcompletion-5.31.0/src/kcombobox.cpp 2017-02-05 11:49:26.000000000 +0100
@@ -31,7 +31,7 @@
{
public:
KComboBoxPrivate(KComboBox *parent)
- : klineEdit(0L),
+ : klineEdit(nullptr),
trapReturnKey(false),
q_ptr(parent)
{
@@ -56,7 +56,7 @@
void KComboBoxPrivate::init()
{
Q_Q(KComboBox);
- q->setCompleter(0);
+ q->setCompleter(nullptr);
q->QComboBox::setAutoCompletion(false); // otherwise setLineEdit will create a completer...
if (q->isEditable()) {
@@ -74,7 +74,7 @@
// is it our delegate, that is destroyed?
if (base == q->delegate()) {
- q->setDelegate(0L);
+ q->setDelegate(nullptr);
}
}
@@ -271,7 +271,7 @@
if (d->klineEdit) {
return d->klineEdit->completionBox(create);
}
- return 0;
+ return nullptr;
}
QSize KComboBox::minimumSizeHint() const
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/src/kcombobox.h new/kcompletion-5.31.0/src/kcombobox.h
--- old/kcompletion-5.30.0/src/kcombobox.h 2017-01-08 21:46:42.000000000 +0100
+++ new/kcompletion-5.31.0/src/kcombobox.h 2017-02-05 11:49:26.000000000 +0100
@@ -157,7 +157,7 @@
*
* @param parent The parent object of this widget
*/
- explicit KComboBox(QWidget *parent = 0);
+ explicit KComboBox(QWidget *parent = nullptr);
/**
* Constructs an editable or read-only combo box.
@@ -165,7 +165,7 @@
* @param rw When @p true, widget will be editable.
* @param parent The parent object of this widget.
*/
- explicit KComboBox(bool rw, QWidget *parent = 0);
+ explicit KComboBox(bool rw, QWidget *parent = nullptr);
/**
* Destructor.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/src/kcompletion.cpp new/kcompletion-5.31.0/src/kcompletion.cpp
--- old/kcompletion-5.30.0/src/kcompletion.cpp 2017-01-08 21:46:42.000000000 +0100
+++ new/kcompletion-5.31.0/src/kcompletion.cpp 2017-02-05 11:49:26.000000000 +0100
@@ -109,7 +109,7 @@
// don't just find the "first" match, but the one with the
// highest priority
- const KCompTreeNode *temp_node = 0L;
+ const KCompTreeNode *temp_node = nullptr;
while (1) {
int count = node->childrenCount();
temp_node = node->firstChild();
@@ -562,7 +562,7 @@
// FIXME, first (slow) sorted insertion implementation
if (sorted) {
- KCompTreeNode *prev = 0;
+ KCompTreeNode *prev = nullptr;
KCompTreeNode *cur = m_children.begin();
while (cur) {
if (ch > *cur) {
@@ -600,7 +600,7 @@
QVector deletables(string.length() + 1);
- KCompTreeNode *child = 0L;
+ KCompTreeNode *child = nullptr;
KCompTreeNode *parent = this;
deletables.replace(0, parent);
@@ -781,12 +781,12 @@
m_count++;
if (!m_last) {
m_last = item;
- m_last->m_next = 0;
+ m_last->m_next = nullptr;
m_first = item;
return;
}
m_last->m_next = item;
- item->m_next = 0;
+ item->m_next = nullptr;
m_last = item;
}
@@ -795,7 +795,7 @@
m_count++;
if (!m_last) {
m_last = item;
- m_last->m_next = 0;
+ m_last->m_next = nullptr;
m_first = item;
return;
}
@@ -823,9 +823,9 @@
KCompTreeNode *KCompTreeNodeList::remove(KCompTreeNode *item)
{
if (!m_first || !item) {
- return 0;
+ return nullptr;
}
- KCompTreeNode *cur = 0;
+ KCompTreeNode *cur = nullptr;
if (item == m_first) {
m_first = m_first->m_next;
@@ -835,7 +835,7 @@
cur = cur->m_next;
}
if (!cur) {
- return 0;
+ return nullptr;
}
cur->m_next = item->m_next;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/src/kcompletion.h new/kcompletion-5.31.0/src/kcompletion.h
--- old/kcompletion-5.30.0/src/kcompletion.h 2017-01-08 21:46:42.000000000 +0100
+++ new/kcompletion-5.31.0/src/kcompletion.h 2017-02-05 11:49:26.000000000 +0100
@@ -124,7 +124,6 @@
*/
class KCOMPLETION_EXPORT KCompletion : public QObject
{
- Q_ENUMS(CompOrder)
Q_PROPERTY(CompOrder order READ order WRITE setOrder)
Q_PROPERTY(bool ignoreCase READ ignoreCase WRITE setIgnoreCase)
Q_PROPERTY(QStringList items READ items WRITE setItems)
@@ -175,6 +174,7 @@
Insertion, ///< Use order of insertion
Weighted ///< Use weighted order
};
+ Q_ENUM(CompOrder)
/**
* Constructor, nothing special here :)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/src/kcompletion_p.h new/kcompletion-5.31.0/src/kcompletion_p.h
--- old/kcompletion-5.30.0/src/kcompletion_p.h 2017-01-08 21:46:42.000000000 +0100
+++ new/kcompletion-5.31.0/src/kcompletion_p.h 2017-02-05 11:49:26.000000000 +0100
@@ -34,7 +34,7 @@
class KCOMPLETION_EXPORT KCompTreeNodeList
{
public:
- KCompTreeNodeList() : m_first(0), m_last(0), m_count(0) {}
+ KCompTreeNodeList() : m_first(nullptr), m_last(nullptr), m_count(0) {}
KCompTreeNode *begin() const
{
@@ -99,12 +99,12 @@
public:
KCompTreeNode()
: QChar(),
- m_next(0),
+ m_next(nullptr),
m_weight(0) {}
explicit KCompTreeNode(const QChar &ch, uint weight = 0)
: QChar(ch),
- m_next(0),
+ m_next(nullptr),
m_weight(weight) {}
~KCompTreeNode();
@@ -206,7 +206,7 @@
{
public:
KCompletionMatchesWrapper(KCompletion::CompOrder compOrder = KCompletion::Insertion)
- : m_sortedList(compOrder == KCompletion::Weighted ? new KCompletionMatchesList : 0L),
+ : m_sortedList(compOrder == KCompletion::Weighted ? new KCompletionMatchesList : nullptr),
m_dirty(false),
m_compOrder(compOrder) {}
@@ -221,7 +221,7 @@
m_sortedList = new KCompletionMatchesList;
} else if (compOrder != KCompletion::Weighted) {
delete m_sortedList;
- m_sortedList = 0L;
+ m_sortedList = nullptr;
}
m_compOrder = compOrder;
m_stringList.clear();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/src/kcompletionbase.cpp new/kcompletion-5.31.0/src/kcompletionbase.cpp
--- old/kcompletion-5.30.0/src/kcompletionbase.cpp 2017-01-08 21:46:42.000000000 +0100
+++ new/kcompletion-5.31.0/src/kcompletionbase.cpp 2017-02-05 11:49:26.000000000 +0100
@@ -54,7 +54,7 @@
{
Q_Q(KCompletionBase);
completionMode = KCompletion::CompletionPopup;
- delegate = 0;
+ delegate = nullptr;
// Initialize all key-bindings to 0 by default so that
// the event filter will use the global settings.
q->useGlobalKeyBindings();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/src/kcompletionbox.cpp new/kcompletion-5.31.0/src/kcompletionbox.cpp
--- old/kcompletion-5.30.0/src/kcompletionbox.cpp 2017-01-08 21:46:42.000000000 +0100
+++ new/kcompletion-5.31.0/src/kcompletionbox.cpp 2017-02-05 11:49:26.000000000 +0100
@@ -83,7 +83,7 @@
KCompletionBox::~KCompletionBox()
{
Q_D(KCompletionBox);
- d->m_parent = 0L;
+ d->m_parent = nullptr;
}
QStringList KCompletionBox::items() const
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/src/kcompletionbox.h new/kcompletion-5.31.0/src/kcompletionbox.h
--- old/kcompletion-5.30.0/src/kcompletionbox.h 2017-01-08 21:46:42.000000000 +0100
+++ new/kcompletion-5.31.0/src/kcompletionbox.h 2017-02-05 11:49:26.000000000 +0100
@@ -57,7 +57,7 @@
* The parent widget is used to give the focus back when pressing the
* up-button on the very first item.
*/
- explicit KCompletionBox(QWidget *parent = 0);
+ explicit KCompletionBox(QWidget *parent = nullptr);
/**
* Destroys the box
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/src/kcompletionmatches.cpp new/kcompletion-5.31.0/src/kcompletionmatches.cpp
--- old/kcompletion-5.30.0/src/kcompletionmatches.cpp 2017-01-08 21:46:42.000000000 +0100
+++ new/kcompletion-5.31.0/src/kcompletionmatches.cpp 2017-02-05 11:49:26.000000000 +0100
@@ -62,7 +62,7 @@
KCompletionMatches::KCompletionMatches(const KCompletionMatchesWrapper &matches)
: d_ptr(new KCompletionMatchesPrivate(matches.sorting(), this))
{
- if (matches.m_sortedList != 0L) {
+ if (matches.m_sortedList != nullptr) {
KCompletionMatchesList::operator=(*matches.m_sortedList);
} else {
const QStringList l = matches.list();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/src/khistorycombobox.cpp new/kcompletion-5.31.0/src/khistorycombobox.cpp
--- old/kcompletion-5.30.0/src/khistorycombobox.cpp 2017-01-08 21:46:42.000000000 +0100
+++ new/kcompletion-5.31.0/src/khistorycombobox.cpp 2017-02-05 11:49:26.000000000 +0100
@@ -92,7 +92,7 @@
q->setInsertPolicy(KHistoryComboBox::NoInsert);
currentIndex = -1;
rotated = false;
- pixmapProvider = 0L;
+ pixmapProvider = nullptr;
// obey HISTCONTROL setting
QByteArray histControl = qgetenv("HISTCONTROL");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/src/khistorycombobox.h new/kcompletion-5.31.0/src/khistorycombobox.h
--- old/kcompletion-5.30.0/src/khistorycombobox.h 2017-01-08 21:46:42.000000000 +0100
+++ new/kcompletion-5.31.0/src/khistorycombobox.h 2017-02-05 11:49:26.000000000 +0100
@@ -74,7 +74,7 @@
*
* @p parent the parent object of this widget.
*/
- explicit KHistoryComboBox(QWidget *parent = 0);
+ explicit KHistoryComboBox(QWidget *parent = nullptr);
/**
* Same as the previous constructor, but additionally has the option
@@ -82,7 +82,7 @@
* or not. If set to @p true, KHistoryComboBox will sync the completion to the
* contents of the combobox.
*/
- explicit KHistoryComboBox(bool useCompletion, QWidget *parent = 0);
+ explicit KHistoryComboBox(bool useCompletion, QWidget *parent = nullptr);
/**
* Destructs the combo, the completion-object and the pixmap-provider
@@ -167,7 +167,7 @@
* own custom pixmaps, or use the KUrlPixmapProvider from KIO,
* which uses KMimeType::pixmapForUrl to resolve icons.
*
- * Set @p provider to Q_NULLPTR if you want to disable pixmaps. Default no pixmaps.
+ * Set @p provider to nullptr if you want to disable pixmaps. Default no pixmaps.
*
* @see pixmapProvider
*/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/src/klineedit.cpp new/kcompletion-5.31.0/src/klineedit.cpp
--- old/kcompletion-5.30.0/src/klineedit.cpp 2017-01-08 21:46:42.000000000 +0100
+++ new/kcompletion-5.31.0/src/klineedit.cpp 2017-02-05 11:49:26.000000000 +0100
@@ -124,7 +124,7 @@
{
Q_Q(KLineEdit);
//---
- completionBox = 0L;
+ completionBox = nullptr;
handleURLDrops = true;
trapReturnKeyEvents = false;
@@ -140,7 +140,7 @@
s_initialized = true;
}
- clearButton = 0;
+ clearButton = nullptr;
clickInClear = false;
wideEnoughForClear = true;
@@ -229,7 +229,7 @@
} else {
disconnect(this, SIGNAL(textChanged(QString)), this, SLOT(_k_updateClearButtonIcon(QString)));
delete d->clearButton;
- d->clearButton = 0;
+ d->clearButton = nullptr;
d->clickInClear = false;
if (d->style) {
d->style.data()->m_overlap = 0;
@@ -240,7 +240,7 @@
bool KLineEdit::isClearButtonShown() const
{
Q_D(const KLineEdit);
- return d->clearButton != 0;
+ return d->clearButton != nullptr;
}
QSize KLineEdit::clearButtonUsedSize() const
@@ -248,7 +248,7 @@
Q_D(const KLineEdit);
QSize s;
if (d->clearButton) {
- const int frameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth, 0, this);
+ const int frameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth, nullptr, this);
s = d->clearButton->sizeHint();
s.rwidth() += frameWidth;
}
@@ -271,7 +271,7 @@
if (clearButton->pixmap().isNull()) {
QString iconName = q->layoutDirection() == Qt::LeftToRight ? "edit-clear-locationbar-rtl" : "edit-clear-locationbar-ltr";
- int size = clearButton->style()->pixelMetric(QStyle::PM_SmallIconSize, 0, q);
+ int size = clearButton->style()->pixelMetric(QStyle::PM_SmallIconSize, nullptr, q);
clearButton->setPixmap(QIcon::fromTheme(iconName).pixmap(size, size));
}
@@ -296,7 +296,7 @@
}
const QSize geom = q->size();
- const int frameWidth = q->style()->pixelMetric(QStyle::PM_DefaultFrameWidth, 0, q);
+ const int frameWidth = q->style()->pixelMetric(QStyle::PM_DefaultFrameWidth, nullptr, q);
const int buttonWidth = clearButton->sizeHint().width();
const QSize newButtonSize(buttonWidth, geom.height());
const QFontMetrics fm(q->font());
@@ -616,7 +616,7 @@
}
QString t = squeezedText;
t = t.mid(start, end - start);
- q->disconnect(QApplication::clipboard(), SIGNAL(selectionChanged()), q, 0);
+ q->disconnect(QApplication::clipboard(), SIGNAL(selectionChanged()), q, nullptr);
QApplication::clipboard()->setText(t, copy ? QClipboard::Clipboard : QClipboard::Selection);
q->connect(QApplication::clipboard(), SIGNAL(selectionChanged()), q,
SLOT(_q_clipboardChanged()));
@@ -1093,7 +1093,7 @@
enum { UndoAct, RedoAct, Separator1, CutAct, CopyAct, PasteAct, DeleteAct, ClearAct,
Separator2, SelectAllAct, NCountActs
};
- QAction *separatorAction = 0L;
+ QAction *separatorAction = nullptr;
// separator we want is right after Delete right now.
const int idx = actionList.indexOf(actionList[DeleteAct]) + 1;
if (idx < actionList.count()) {
@@ -1454,14 +1454,14 @@
QListWidgetItem *currentItem = d->completionBox->currentItem();
QString currentSelection;
- if (currentItem != 0) {
+ if (currentItem != nullptr) {
currentSelection = currentItem->text();
}
d->completionBox->setItems(items);
const QList matchedItems = d->completionBox->findItems(currentSelection, Qt::MatchExactly);
- QListWidgetItem *matchedItem = matchedItems.isEmpty() ? 0 : matchedItems.first();
+ QListWidgetItem *matchedItem = matchedItems.isEmpty() ? nullptr : matchedItems.first();
if (matchedItem) {
const bool blocked = d->completionBox->blockSignals(true);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/src/klineedit.h new/kcompletion-5.31.0/src/klineedit.h
--- old/kcompletion-5.30.0/src/klineedit.h 2017-01-08 21:46:42.000000000 +0100
+++ new/kcompletion-5.31.0/src/klineedit.h 2017-02-05 11:49:26.000000000 +0100
@@ -178,13 +178,13 @@
* @param string Text to be shown in the edit widget.
* @param parent The parent widget of the line edit.
*/
- explicit KLineEdit(const QString &string, QWidget *parent = 0);
+ explicit KLineEdit(const QString &string, QWidget *parent = nullptr);
/**
* Constructs a line edit
* @param parent The parent widget of the line edit.
*/
- explicit KLineEdit(QWidget *parent = 0);
+ explicit KLineEdit(QWidget *parent = nullptr);
/**
* Destructor.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/src/klineedit_p.h new/kcompletion-5.31.0/src/klineedit_p.h
--- old/kcompletion-5.30.0/src/klineedit_p.h 2017-01-08 21:46:42.000000000 +0100
+++ new/kcompletion-5.31.0/src/klineedit_p.h 2017-02-05 11:49:26.000000000 +0100
@@ -73,7 +73,7 @@
m_animation->setDuration(250);
}
- if (style()->styleHint(QStyle::SH_Widget_Animate, 0, this)) {
+ if (style()->styleHint(QStyle::SH_Widget_Animate, nullptr, this)) {
if (m_animation->state() != QPropertyAnimation::Running) {
m_animation->start();
}
@@ -127,7 +127,7 @@
}
const QSize pmSize(m_pixmap.size() / m_pixmap.devicePixelRatio());
- if (style()->styleHint(QStyle::SH_Widget_Animate, 0, this)) {
+ if (style()->styleHint(QStyle::SH_Widget_Animate, nullptr, this)) {
if (m_opacity == 0) {
if (m_animation->direction() == QPropertyAnimation::Backward) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/src/kzoneallocator.cpp new/kcompletion-5.31.0/src/kzoneallocator.cpp
--- old/kcompletion-5.30.0/src/kzoneallocator.cpp 2017-01-08 21:46:42.000000000 +0100
+++ new/kcompletion-5.31.0/src/kzoneallocator.cpp 2017-02-05 11:49:26.000000000 +0100
@@ -36,7 +36,7 @@
class KZoneAllocator::MemBlock
{
public:
- MemBlock(size_t s) : size(s), ref(0), older(0), newer(0)
+ MemBlock(size_t s) : size(s), ref(0), older(nullptr), newer(nullptr)
{
begin = new char[s];
}
@@ -60,9 +60,9 @@
{
public:
Private()
- : currentBlock(0), blockSize(1),
+ : currentBlock(nullptr), blockSize(1),
blockOffset(0), log2(0), num_blocks(0),
- hashList(0), hashSize(0), hashDirty(true)
+ hashList(nullptr), hashSize(0), hashDirty(true)
{
}
@@ -107,7 +107,7 @@
delete d->hashList[i];
}
delete [] d->hashList;
- d->hashList = 0;
+ d->hashList = nullptr;
}
MemBlock *next;
for (; d->currentBlock; d->currentBlock = next) {
@@ -146,7 +146,7 @@
*/
void KZoneAllocator::addBlock(MemBlock *b)
{
- b->newer = 0;
+ b->newer = nullptr;
b->older = d->currentBlock;
if (d->currentBlock) {
b->older->newer = b;
@@ -174,7 +174,7 @@
delete d->hashList[i];
}
delete [] d->hashList;
- d->hashList = 0;
+ d->hashList = nullptr;
}
d->hashSize = 1;
while (d->hashSize < d->num_blocks) {
@@ -228,7 +228,7 @@
b->newer->older = b->older;
}
if (b == d->currentBlock) {
- d->currentBlock = 0;
+ d->currentBlock = nullptr;
d->blockOffset = d->blockSize;
}
delete b;
@@ -245,7 +245,7 @@
if ((unsigned long) _size + d->blockOffset > d->blockSize) {
if (_size > d->blockSize) {
qDebug("KZoneAllocator: allocating more than %zu bytes", (size_t)d->blockSize);
- return 0;
+ return nullptr;
}
addBlock(new MemBlock(d->blockSize));
d->blockOffset = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/tests/kcomboboxtest.cpp new/kcompletion-5.31.0/tests/kcomboboxtest.cpp
--- old/kcompletion-5.30.0/tests/kcomboboxtest.cpp 2017-01-08 21:46:42.000000000 +0100
+++ new/kcompletion-5.31.0/tests/kcomboboxtest.cpp 2017-02-05 11:49:26.000000000 +0100
@@ -151,7 +151,7 @@
KComboBoxTest::~KComboBoxTest()
{
delete m_timer;
- m_timer = 0;
+ m_timer = nullptr;
}
void KComboBoxTest::connectComboSignals(QComboBox *combo)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/tests/kcomboboxtest.h new/kcompletion-5.31.0/tests/kcomboboxtest.h
--- old/kcompletion-5.30.0/tests/kcomboboxtest.h 2017-01-08 21:46:42.000000000 +0100
+++ new/kcompletion-5.31.0/tests/kcomboboxtest.h 2017-02-05 11:49:26.000000000 +0100
@@ -14,7 +14,7 @@
Q_OBJECT
public:
- KComboBoxTest(QWidget *parent = 0);
+ KComboBoxTest(QWidget *parent = nullptr);
~KComboBoxTest();
private Q_SLOTS:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/tests/kcompletionuitest.cpp new/kcompletion-5.31.0/tests/kcompletionuitest.cpp
--- old/kcompletion-5.30.0/tests/kcompletionuitest.cpp 2017-01-08 21:46:42.000000000 +0100
+++ new/kcompletion-5.31.0/tests/kcompletionuitest.cpp 2017-02-05 11:49:26.000000000 +0100
@@ -167,7 +167,7 @@
}
QListWidgetItem *i = ListBox1->item(row);
- Q_ASSERT(i != 0);
+ Q_ASSERT(i != nullptr);
QString text = i->text();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/tests/kcompletionuitest.h new/kcompletion-5.31.0/tests/kcompletionuitest.h
--- old/kcompletion-5.30.0/tests/kcompletionuitest.h 2017-01-08 21:46:42.000000000 +0100
+++ new/kcompletion-5.31.0/tests/kcompletionuitest.h 2017-02-05 11:49:26.000000000 +0100
@@ -19,7 +19,7 @@
Q_OBJECT
public:
- Form1(QWidget *parent = 0);
+ Form1(QWidget *parent = nullptr);
~Form1();
QGroupBox *GroupBox1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcompletion-5.30.0/tests/klineedittest.h new/kcompletion-5.31.0/tests/klineedittest.h
--- old/kcompletion-5.30.0/tests/klineedittest.h 2017-01-08 21:46:42.000000000 +0100
+++ new/kcompletion-5.31.0/tests/klineedittest.h 2017-02-05 11:49:26.000000000 +0100
@@ -16,7 +16,7 @@
Q_OBJECT
public:
- KLineEditTest(QWidget *parent = 0);
+ KLineEditTest(QWidget *parent = nullptr);
~KLineEditTest();
KLineEdit *lineEdit() const
{