Accepting request 323367 from KDE:Qt5

Update to 5.5.0

OBS-URL: https://build.opensuse.org/request/show/323367
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qttools?expand=0&rev=24
This commit is contained in:
Stephan Kulow 2015-09-27 06:37:28 +00:00 committed by Git OBS Bridge
parent e572e97685
commit 0a220ec8a9
6 changed files with 22 additions and 256 deletions

View File

@ -1,36 +0,0 @@
From: Sune Vuorela <sune@vuorela.dk>
Date: Sun, 15 Feb 2015 21:51:44 +0000
Subject: Change creation date to a fixed date
X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqttools.git&a=commitdiff&h=d1e639a800a105f4611c87f024664559c7d33aaa
---
Change creation date to a fixed date
Encoding the dates makes reproducing the output impossible, and doesn't
really have much gain. It most of the time not relevant when something
was built, but more 'what was built' and 'with what tools was it built'
In this case, the creation date isn't read by any thing, so it is likely
just filler data.
Keep the key anyways to not break any third party readers of the file
and set a fixed date, in this case the same date as used for a fixed
date in QtCore's QLibraryInfo::buildDate function at noon.
Change-Id: I560e43dfce538e2f25c3cf51482b946a7cfa179e
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
---
--- a/src/assistant/help/qhelpgenerator.cpp
+++ b/src/assistant/help/qhelpgenerator.cpp
@@ -369,9 +369,7 @@
d->query->exec(QLatin1String("INSERT INTO MetaDataTable VALUES('qchVersion', '1.0')"));
- d->query->prepare(QLatin1String("INSERT INTO MetaDataTable VALUES('CreationDate', ?)"));
- d->query->bindValue(0, QDateTime::currentDateTime().toString(Qt::ISODate));
- d->query->exec();
+ d->query->exec(QLatin1String("INSERT INTO MetaDataTable VALUES('CreationDate', '2012-12-20T12:00:00')"));
return true;
}

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Sun Aug 16 08:32:07 UTC 2015 - hrvoje.senjan@gmail.com
- Update to 5.5.0
* For more details please see:
http://blog.qt.io/blog/2015/07/01/qt-5-5-released/
and https://wiki.qt.io/New_Features_in_Qt_5.5
- Drop qdbusviewer-restore-the-window-size-and-state-on-startup.patch
and change-creation-date-to-a-fixed-date.patch, merged upstream
-------------------------------------------------------------------
Wed Jun 3 22:56:32 UTC 2015 - hrvoje.senjan@gmail.com

View File

@ -1,7 +1,7 @@
#
# spec file for package libqt5-qttools
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -19,15 +19,15 @@
%define qt5_snapshot 0
Name: libqt5-qttools
Version: 5.4.2
Version: 5.5.0
Release: 0
Summary: Qt 5 QtTools Module
License: SUSE-LGPL-2.1-with-digia-exception-1.1 or GPL-3.0
Group: Development/Libraries/X11
Url: http://qt.digia.com
%define base_name libqt5
%define real_version 5.4.2
%define so_version 5.4.2
%define real_version 5.5.0
%define so_version 5.5.0
%define tar_version qttools-opensource-src-%{real_version}
Source: %{tar_version}.tar.xz
Source1: baselibs.conf
@ -38,10 +38,6 @@ Source14: qdbusviewer5.desktop
Source99: libqt5-qttools-rpmlintrc
# PATCH-FIX-OPENSUSE fix-for-opensuse-qmake-qt5.patch [rh#1009893] liujianfeng1994@gmail.com
Patch0: fix-for-opensuse-qmake-qt5.patch
# PATCH-FIX-UPSTREAM qdbusviewer-restore-the-window-size-and-state-on-startup.patch -- qdbusviewer: Restore the window size and state on startup
Patch1: qdbusviewer-restore-the-window-size-and-state-on-startup.patch
# PATCH-FIX-UPSTREAM change-creation-date-to-a-fixed-date.patch
Patch2: change-creation-date-to-a-fixed-date.patch
BuildRequires: fdupes
BuildRequires: libQt5WebKitWidgets-devel >= %{version}
BuildRequires: libqt5-qtbase-devel >= %{version}
@ -70,8 +66,6 @@ This package contains base tools, like string, xml, and network handling.
%prep
%setup -q -n qttools-opensource-src-%{real_version}
%patch0 -p0
%patch1 -p1
%patch2 -p1
%package devel
Summary: Qt Development Kit
@ -83,6 +77,7 @@ Requires: libQt5DesignerComponents5 = %{version}
Requires: libQt5Help5 = %{version}
Requires: libqt5-linguist-devel = %{version}
Requires: libxslt-devel
Requires: pkgconfig(Qt5Xml) >= %{so_version}
%description devel
You need this package, if you want to compile programs with qttools.
@ -243,6 +238,7 @@ install -D -m644 src/qdbus/qdbusviewer/images/qdbusviewer-128.png %{buildroot}%{
%{_bindir}/qhelpgenerator*
%{_bindir}/qtdiag*
%{_bindir}/qtpaths*
%{_bindir}/qtplugininfo*
%{_libqt5_bindir}/assistant*
%{_libqt5_bindir}/designer*
%{_libqt5_bindir}/pixeltool*
@ -253,6 +249,7 @@ install -D -m644 src/qdbus/qdbusviewer/images/qdbusviewer-128.png %{buildroot}%{
%{_libqt5_bindir}/qhelpgenerator*
%{_libqt5_bindir}/qtdiag*
%{_libqt5_bindir}/qtpaths*
%{_libqt5_bindir}/qtplugininfo*
%{_datadir}/applications/assistant5.desktop
%{_datadir}/applications/designer5.desktop
%{_datadir}/applications/qdbusviewer5.desktop
@ -329,9 +326,11 @@ install -D -m644 src/qdbus/qdbusviewer/images/qdbusviewer-128.png %{buildroot}%{
%{_libqt5_includedir}/QtHelp
%exclude %{_libqt5_includedir}/QtUiTools/%{so_version}
%{_libqt5_includedir}/QtUiTools
%{_libqt5_includedir}/QtUiPlugin
%{_libqt5_libdir}/cmake/Qt5Designer/
%{_libqt5_libdir}/cmake/Qt5Help/
%{_libqt5_libdir}/cmake/Qt5UiTools/
%{_libqt5_libdir}/cmake/Qt5UiPlugin/
%{_libqt5_libdir}/libQt5*.prl
%{_libqt5_libdir}/libQt5*.so
%{_libqt5_libdir}/libQt5*.a

View File

@ -1,207 +0,0 @@
From: Alexander Volkov <a.volkov@rusbitech.ru>
Date: Mon, 22 Sep 2014 12:12:45 +0000
Subject: qdbusviewer: Restore the window size and state on startup
---
qdbusviewer: Restore the window size and state on startup
Save the window size, maximization state and state of splitters
on exit and restore these settings on startup.
Change-Id: Ibe26b09cc97ffc2fef17e6e8e2b804324dae7002
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
---
--- a/src/qdbus/qdbusviewer/main.cpp
+++ b/src/qdbus/qdbusviewer/main.cpp
@@ -40,6 +40,10 @@
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
+
+ QCoreApplication::setOrganizationName(QStringLiteral("QtProject"));
+ QCoreApplication::setApplicationName(QStringLiteral("QDBusViewer"));
+
MainWindow mw;
#ifndef Q_OS_MAC
app.setWindowIcon(QIcon(QLatin1String(":/qt-project.org/qdbusviewer/images/qdbusviewer.png")));
--- a/src/qdbus/qdbusviewer/mainwindow.cpp
+++ b/src/qdbus/qdbusviewer/mainwindow.cpp
@@ -51,6 +51,7 @@
#include <QtWidgets/QMessageBox>
#include <QtDBus/QDBusConnection>
+#include <QtCore/QSettings>
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
@@ -72,10 +73,17 @@ MainWindow::MainWindow(QWidget *parent)
tabWidget = new QTabWidget;
setCentralWidget(tabWidget);
- QDBusViewer *sessionBusViewer = new QDBusViewer(QDBusConnection::sessionBus());
- QDBusViewer *systemBusViewer = new QDBusViewer(QDBusConnection::systemBus());
+ sessionBusViewer = new QDBusViewer(QDBusConnection::sessionBus());
+ systemBusViewer = new QDBusViewer(QDBusConnection::systemBus());
tabWidget->addTab(sessionBusViewer, tr("Session Bus"));
tabWidget->addTab(systemBusViewer, tr("System Bus"));
+
+ restoreSettings();
+}
+
+MainWindow::~MainWindow()
+{
+ saveSettings();
}
void MainWindow::addCustomBusTab(const QString &busAddress)
@@ -99,3 +107,37 @@ void MainWindow::about()
box.setWindowTitle(tr("D-Bus Viewer"));
box.exec();
}
+
+static inline QString windowGeometryKey() { return QStringLiteral("WindowGeometry"); }
+static inline QString sessionTabGroup() { return QStringLiteral("SessionTab"); }
+static inline QString systemTabGroup() { return QStringLiteral("SystemTab"); }
+
+void MainWindow::saveSettings()
+{
+ QSettings settings;
+
+ settings.setValue(windowGeometryKey(), saveGeometry());
+
+ settings.beginGroup(sessionTabGroup());
+ sessionBusViewer->saveState(&settings);
+ settings.endGroup();
+
+ settings.beginGroup(systemTabGroup());
+ systemBusViewer->saveState(&settings);
+ settings.endGroup();
+}
+
+void MainWindow::restoreSettings()
+{
+ QSettings settings;
+
+ restoreGeometry(settings.value(windowGeometryKey()).toByteArray());
+
+ settings.beginGroup(sessionTabGroup());
+ sessionBusViewer->restoreState(&settings);
+ settings.endGroup();
+
+ settings.beginGroup(systemTabGroup());
+ systemBusViewer->restoreState(&settings);
+ settings.endGroup();
+}
--- a/src/qdbus/qdbusviewer/mainwindow.h
+++ b/src/qdbus/qdbusviewer/mainwindow.h
@@ -46,11 +46,14 @@
QT_FORWARD_DECLARE_CLASS(QTabWidget)
+class QDBusViewer;
+
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
+ ~MainWindow();
void addCustomBusTab(const QString &bus);
@@ -58,7 +61,12 @@
void about();
private:
+ void saveSettings();
+ void restoreSettings();
+
QTabWidget *tabWidget;
+ QDBusViewer *sessionBusViewer;
+ QDBusViewer *systemBusViewer;
};
#endif // MAINWINDOW_H
--- a/src/qdbus/qdbusviewer/qdbusviewer.cpp
+++ b/src/qdbus/qdbusviewer/qdbusviewer.cpp
@@ -40,6 +40,7 @@
#include <QtCore/QStringListModel>
#include <QtCore/QSortFilterProxyModel>
#include <QtCore/QMetaProperty>
+#include <QtCore/QSettings>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QListView>
#include <QtWidgets/QAction>
@@ -103,13 +104,13 @@
connect(refreshShortcut, SIGNAL(activated()), this, SLOT(refreshChildren()));
QVBoxLayout *layout = new QVBoxLayout(this);
- QSplitter *topSplitter = new QSplitter(Qt::Vertical, this);
+ topSplitter = new QSplitter(Qt::Vertical, this);
layout->addWidget(topSplitter);
log = new LogViewer;
connect(log, SIGNAL(anchorClicked(QUrl)), this, SLOT(anchorClicked(QUrl)));
- QSplitter *splitter = new QSplitter(topSplitter);
+ splitter = new QSplitter(topSplitter);
splitter->addWidget(servicesView);
QWidget *servicesWidget = new QWidget;
@@ -144,6 +145,21 @@
objectPathRegExp.setMinimal(true);
+}
+
+static inline QString topSplitterStateKey() { return QStringLiteral("topSplitterState"); }
+static inline QString splitterStateKey() { return QStringLiteral("splitterState"); }
+
+void QDBusViewer::saveState(QSettings *settings) const
+{
+ settings->setValue(topSplitterStateKey(), topSplitter->saveState());
+ settings->setValue(splitterStateKey(), splitter->saveState());
+}
+
+void QDBusViewer::restoreState(const QSettings *settings)
+{
+ topSplitter->restoreState(settings->value(topSplitterStateKey()).toByteArray());
+ splitter->restoreState(settings->value(splitterStateKey()).toByteArray());
}
void QDBusViewer::logMessage(const QString &msg)
--- a/src/qdbus/qdbusviewer/qdbusviewer.h
+++ b/src/qdbus/qdbusviewer/qdbusviewer.h
@@ -46,6 +46,8 @@
QT_FORWARD_DECLARE_CLASS(QTextBrowser)
QT_FORWARD_DECLARE_CLASS(QDomDocument)
QT_FORWARD_DECLARE_CLASS(QDomElement)
+QT_FORWARD_DECLARE_CLASS(QSplitter)
+QT_FORWARD_DECLARE_CLASS(QSettings)
struct BusSignature
{
@@ -58,6 +60,9 @@
Q_OBJECT
public:
QDBusViewer(const QDBusConnection &connection, QWidget *parent = 0);
+
+ void saveState(QSettings *settings) const;
+ void restoreState(const QSettings *settings);
public slots:
void refresh();
@@ -94,6 +99,8 @@
QLineEdit *serviceFilterLine;
QListView *servicesView;
QTextBrowser *log;
+ QSplitter *topSplitter;
+ QSplitter *splitter;
QRegExp objectPathRegExp;
};

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:edf3d7e00227f9989101da84b2fdf8eaf1a5b7863dc5e0d26bb0f39303e8b6b4
size 9333100

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5b65147187fb7f4456c20ef263f1093709d728f737d6d871a9a5888132fac07d
size 9316392