[SCM] qtbase packaging branch, ubuntu-lts, updated. ubuntu/5.6.1+dfsg-3ubuntu7-11-ga82064d

Timo Jyrinki timo at moszumanska.debian.org
Wed Mar 15 10:39:12 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/qt/qtbase.git;a=commitdiff;h=a82064d

The following commit has been merged in the ubuntu-lts branch:
commit a82064d56598a12b9d252ac2af925f5813eaa546
Author: Timo Jyrinki <timo.jyrinki at canonical.com>
Date:   Wed Mar 15 10:39:04 2017 +0000

    Add-qAsConst.patch QPlatformTheme-added-EditorFont.patch:
    
    * Add-qAsConst.patch
      QPlatformTheme-added-EditorFont.patch:
      - Backport two small features from Qt 5.7. Required for backporting
        for example Qt Quick Controls 2 from 5.7.
    * Use -std=c++11 for qmake building.
---
 debian/changelog                                   | 10 ++++
 debian/patches/Add-qAsConst.patch                  | 65 ++++++++++++++++++++++
 .../patches/QPlatformTheme-added-EditorFont.patch  | 29 ++++++++++
 debian/patches/enable_c++11.patch                  | 13 +++++
 debian/patches/series                              |  3 +
 5 files changed, 120 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index e833f86..a628aba 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+qtbase-opensource-src (5.6.2+dfsg-0ubuntu1~~xenialoverlay5~2) xenial; urgency=medium
+
+  * Add-qAsConst.patch
+    QPlatformTheme-added-EditorFont.patch:
+    - Backport two small features from Qt 5.7. Required for backporting 
+      for example Qt Quick Controls 2 from 5.7.
+  * Use -std=c++11 for qmake building.
+
+ -- Timo Jyrinki <timo-jyrinki at ubuntu.com>  Wed, 08 Mar 2017 07:17:30 +0000
+
 qtbase-opensource-src (5.6.2+dfsg-0ubuntu1~~xenialoverlay4~1) xenial; urgency=medium
 
   [ Marco Trevisan (Treviño) ]
diff --git a/debian/patches/Add-qAsConst.patch b/debian/patches/Add-qAsConst.patch
new file mode 100644
index 0000000..8cda22b
--- /dev/null
+++ b/debian/patches/Add-qAsConst.patch
@@ -0,0 +1,65 @@
+From 264c72837d6ff717a248dd180c2dfb45391c6aab Mon Sep 17 00:00:00 2001
+From: Marc Mutz <marc.mutz at kdab.com>
+Date: Wed, 17 Jun 2015 15:59:23 +0200
+Subject: [PATCH] Add qAsConst
+
+...to turn mutable lvalues into const lvalues.
+
+Like the proposed std::as_const, it should not apply to
+rvalues to avoid lifetime issues in code like
+
+     for (auto x : qAsConst(someFunc()))
+         // dangling
+
+At a more basic level, qAsConst isn't useful for rvalues,
+because one can always store them in an lvalue first, with
+no loss in performance (the object is created by the
+compiler silently anyway). So the correct way to write the
+above is:
+
+    const auto funcResult = someFunc();
+    for (auto e : funcResult)
+
+To fail compilation when passing rvalues, I used the
+const-&& pattern also employed by std::cref(), and the
+proposed std::as_const.
+
+Intended as internal API, but not put into the QtPrivate
+namespace to make it simpler to use.
+
+We could wait for std::as_const, but that is far, far
+away (just entered the current C++17 draft as of this
+writing), and the Qt containers with their tendency to
+detach are a problem _now_.
+
+Change-Id: I8824a59d2274de5c5cd642f117212322e4648025
+Reviewed-by: Lars Knoll <lars.knoll at theqtcompany.com>
+---
+ src/corelib/global/qglobal.h | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
+index 128d8ab..c84a6b5 100644
+--- a/src/corelib/global/qglobal.h
++++ b/src/corelib/global/qglobal.h
+@@ -1046,8 +1046,17 @@ template <typename T> struct QEnableIf<true, T> { typedef T Type; };
+ 
+ template <bool B, typename T, typename F> struct QConditional { typedef T Type; };
+ template <typename T, typename F> struct QConditional<false, T, F> { typedef F Type; };
++
++template <typename T> struct QAddConst { typedef const T Type; };
+ }
+ 
++// this adds const to non-const objects (like std::as_const)
++template <typename T>
++Q_DECL_CONSTEXPR typename QtPrivate::QAddConst<T>::Type &qAsConst(T &t) Q_DECL_NOTHROW { return t; }
++// prevent rvalue arguments:
++template <typename T>
++void qAsConst(const T &&) Q_DECL_EQ_DELETE;
++
+ QT_END_NAMESPACE
+ 
+ // We need to keep QTypeInfo, QSysInfo, QFlags, qDebug & family in qglobal.h for compatibility with Qt 4.
+-- 
+2.9.3
+
diff --git a/debian/patches/QPlatformTheme-added-EditorFont.patch b/debian/patches/QPlatformTheme-added-EditorFont.patch
new file mode 100644
index 0000000..41418e8
--- /dev/null
+++ b/debian/patches/QPlatformTheme-added-EditorFont.patch
@@ -0,0 +1,29 @@
+From d1f803af60ce4aec9669aaee775647ff1101cc40 Mon Sep 17 00:00:00 2001
+From: Nikita Krupenko <krnekit at gmail.com>
+Date: Sat, 5 Mar 2016 22:53:47 +0200
+Subject: [PATCH] QPlatformTheme: added EditorFont
+
+Which is needed by Qt Labs Controls.
+
+Task-number: QTBUG-51203
+Change-Id: If5f39d59c5c88de37c9b034b784c38b976759439
+Reviewed-by: J-P Nurmi <jpnurmi at theqtcompany.com>
+---
+ src/gui/kernel/qplatformtheme.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/gui/kernel/qplatformtheme.h b/src/gui/kernel/qplatformtheme.h
+index 77e063f..c4c7482 100644
+--- a/src/gui/kernel/qplatformtheme.h
++++ b/src/gui/kernel/qplatformtheme.h
+@@ -172,6 +172,7 @@ public:
+         FixedFont,
+         GroupBoxTitleFont,
+         TabButtonFont,
++        EditorFont,
+         NFonts
+     };
+ 
+-- 
+2.9.3
+
diff --git a/debian/patches/enable_c++11.patch b/debian/patches/enable_c++11.patch
new file mode 100644
index 0000000..9ade1de
--- /dev/null
+++ b/debian/patches/enable_c++11.patch
@@ -0,0 +1,13 @@
+=== modified file 'qmake/Makefile.unix'
+--- a/qmake/Makefile.unix	2017-03-09 07:54:38 +0000
++++ b/qmake/Makefile.unix	2017-03-09 08:14:37 +0000
+@@ -94,7 +94,7 @@
+ 	   $(SOURCE_PATH)/src/corelib/json/qjsonvalue.cpp \
+ 	   $(QTSRCS)
+ 
+-CPPFLAGS = -g $(EXTRA_CPPFLAGS) \
++CPPFLAGS = -g $(EXTRA_CPPFLAGS) -std=c++11 \
+ 	   -I$(QMKSRC) -I$(QMKLIBSRC) -I$(QMKSRC)/generators -I$(QMKSRC)/generators/unix -I$(QMKSRC)/generators/win32 \
+ 	   -I$(QMKSRC)/generators/mac -I$(QMKSRC)/generators/integrity \
+ 	   -I$(INC_PATH) -I$(INC_PATH)/QtCore \
+
diff --git a/debian/patches/series b/debian/patches/series
index a668522..12a2eb3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -21,6 +21,8 @@ QSettings-Avoid-unneeded-sync-on-destruction.patch
 Add-support-for-selecting-the-printer-plugin-via-the.patch
 qdbus-tray-icon-always-save-icon-in-unity.patch
 qdbus-tray-icon-use-runtimedir.patch
+Add-qAsConst.patch
+QPlatformTheme-added-EditorFont.patch
 
 # Debian specific.
 gnukfreebsd.diff
@@ -36,3 +38,4 @@ enable-tests.patch
 skip-largefile-test-s390x.patch
 qnam-ubuntu-fix6.patch
 disable_overlay_scrollbars.diff
+enable_c++11.patch

-- 
qtbase packaging



More information about the pkg-kde-commits mailing list