Merge commit 'c722cef9155548172f231a7f5029519d60955fad' into f23

This commit is contained in:
Rex Dieter 2016-03-18 09:34:03 -05:00
commit e49be6fa4d
25 changed files with 1182 additions and 1026 deletions

7
.gitignore vendored
View File

@ -1,4 +1,5 @@
/qtbase-opensource-src-5.4.2.tar.xz
/qtbase-opensource-src-5.5.0.tar.xz
/qtbase-opensource-src-5.5.1-rc1.tar.xz
/qtbase-opensource-src-5.5.1.tar.xz
/qtbase-opensource-src-5.6.0-beta.tar.gz
/qtbase-opensource-src-5.6.0-rc.tar.xz
/sources
/qtbase-opensource-src-5.6.0.tar.xz

View File

@ -0,0 +1,78 @@
From a3b8e355fc17783a5d4badfb9ad50247655000cd Mon Sep 17 00:00:00 2001
From: Anton Kudryavtsev <a.kudryavtsev@netris.ru>
Date: Fri, 12 Feb 2016 15:31:07 +0300
Subject: [PATCH 076/122] QListView: fix skipping indexes in selectedIndexes().
Remove spurious increment of i.
Task-number: QTBUG-51086
Change-Id: I4307a6728de1e7f25c8afa31fe2066f92373f3fc
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
---
src/widgets/itemviews/qlistview.cpp | 2 +-
.../widgets/itemviews/qlistview/tst_qlistview.cpp | 28 ++++++++++++++++++++++
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/src/widgets/itemviews/qlistview.cpp b/src/widgets/itemviews/qlistview.cpp
index 9c79509..a17d89e 100644
--- a/src/widgets/itemviews/qlistview.cpp
+++ b/src/widgets/itemviews/qlistview.cpp
@@ -1437,7 +1437,7 @@ QModelIndexList QListView::selectedIndexes() const
return QModelIndexList();
QModelIndexList viewSelected = d->selectionModel->selectedIndexes();
- for (int i = 0; i < viewSelected.count(); ++i) {
+ for (int i = 0; i < viewSelected.count();) {
const QModelIndex &index = viewSelected.at(i);
if (!isIndexHidden(index) && index.parent() == d->root && index.column() == d->column)
++i;
diff --git a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
index 5b206af..3cf9f7f 100644
--- a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
+++ b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
@@ -152,6 +152,7 @@ private slots:
void taskQTBUG_39902_mutualScrollBars_data();
void taskQTBUG_39902_mutualScrollBars();
void horizontalScrollingByVerticalWheelEvents();
+ void taskQTBUG_51086_skippingIndexesInSelectedIndexes();
};
// Testing get/set functions
@@ -2493,5 +2494,32 @@ void tst_QListView::horizontalScrollingByVerticalWheelEvents()
QVERIFY(lv.verticalScrollBar()->value() > vValue);
}
+void tst_QListView::taskQTBUG_51086_skippingIndexesInSelectedIndexes()
+{
+ // simple way to get access to selectedIndexes()
+ class QListViewWithPublicSelectedIndexes : public QListView
+ {
+ public:
+ using QListView::selectedIndexes;
+ };
+
+ QStandardItemModel data(10, 1);
+ QItemSelectionModel selections(&data);
+ QListViewWithPublicSelectedIndexes list;
+ list.setModel(&data);
+ list.setSelectionModel(&selections);
+
+ list.setRowHidden(7, true);
+ list.setRowHidden(8, true);
+
+ for (int i = 0, count = data.rowCount(); i < count; ++i)
+ selections.select(data.index(i, 0), QItemSelectionModel::Select);
+
+ const QModelIndexList indexes = list.selectedIndexes();
+
+ QVERIFY(!indexes.contains(data.index(7, 0)));
+ QVERIFY(!indexes.contains(data.index(8, 0)));
+}
+
QTEST_MAIN(tst_QListView)
#include "tst_qlistview.moc"
--
2.5.0

View File

@ -1,56 +0,0 @@
From ae51e360f986698eaf41fdb38f8a878a50f69be1 Mon Sep 17 00:00:00 2001
From: Alexander Volkov <a.volkov@rusbitech.ru>
Date: Fri, 19 Jun 2015 13:34:11 +0300
Subject: [PATCH 197/412] xcb: Ignore disabling of outputs in the middle of the
mode switch
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X server may send RROutputChangeNotify event with null crtc and mode,
when it switches an output mode. Request RROutputInfo to distinguish
this case from the case when the output is explicitly disabled.
Change-Id: I4c2356ec71dbcc8013009ea8a6f46dd11f19d6bb
Task-number: QTBUG-44158
Task-number: QTBUG-46786
Task-number: QTBUG-46822
Reviewed-by: Daniel Vrátil <dvratil@redhat.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
---
src/plugins/platforms/xcb/qxcbconnection.cpp | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index 0867615..29e1fd1 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -265,11 +265,19 @@ void QXcbConnection::updateScreens(const xcb_randr_notify_event_t *event)
} else if (screen) {
// Screen has been disabled -> remove
if (output.crtc == XCB_NONE && output.mode == XCB_NONE) {
- qCDebug(lcQpaScreen) << "output" << screen->name() << "has been disabled";
- m_screens.removeOne(screen);
- foreach (QXcbScreen *otherScreen, m_screens)
- otherScreen->removeVirtualSibling((QPlatformScreen *) screen);
- QXcbIntegration::instance()->destroyScreen(screen);
+ xcb_randr_get_output_info_cookie_t outputInfoCookie =
+ xcb_randr_get_output_info(xcb_connection(), output.output, output.config_timestamp);
+ QScopedPointer<xcb_randr_get_output_info_reply_t, QScopedPointerPodDeleter> outputInfo(
+ xcb_randr_get_output_info_reply(xcb_connection(), outputInfoCookie, NULL));
+ if (outputInfo->crtc == XCB_NONE) {
+ qCDebug(lcQpaScreen) << "output" << screen->name() << "has been disabled";
+ m_screens.removeOne(screen);
+ foreach (QXcbScreen *otherScreen, m_screens)
+ otherScreen->removeVirtualSibling((QPlatformScreen *) screen);
+ QXcbIntegration::instance()->destroyScreen(screen);
+ } else {
+ qCDebug(lcQpaScreen) << "output" << screen->name() << "has been temporarily disabled for the mode switch";
+ }
} else {
// Just update existing screen
screen->updateGeometry(output.config_timestamp);
--
2.5.0

View File

@ -1,386 +0,0 @@
diff -rupN qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbconnection.cpp qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbconnection.cpp
--- qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbconnection.cpp 2015-10-13 06:35:27.000000000 +0200
+++ qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbconnection.cpp 2015-10-21 21:02:53.056198256 +0200
@@ -229,7 +229,6 @@ void QXcbConnection::updateScreens(const
if (screen->mode() != crtc.mode)
screen->updateRefreshRate(crtc.mode);
}
-
} else if (event->subCode == XCB_RANDR_NOTIFY_OUTPUT_CHANGE) {
xcb_randr_output_change_t output = event->u.oc;
QXcbVirtualDesktop *virtualDesktop = virtualDesktopForRootWindow(output.window);
@@ -242,20 +241,18 @@ void QXcbConnection::updateScreens(const
if (screen && output.connection == XCB_RANDR_CONNECTION_DISCONNECTED) {
qCDebug(lcQpaScreen) << "screen" << screen->name() << "has been disconnected";
-
- // Known screen removed -> delete it
- m_screens.removeOne(screen);
- foreach (QXcbScreen *otherScreen, m_screens)
- otherScreen->removeVirtualSibling((QPlatformScreen *) screen);
-
- QXcbIntegration::instance()->destroyScreen(screen);
-
- // QTBUG-40174, QTBUG-42985: If all screens are removed, wait
- // and start rendering again later if a screen becomes available.
-
+ destroyScreen(screen, true);
} else if (!screen && output.connection == XCB_RANDR_CONNECTION_CONNECTED) {
// New XRandR output is available and it's enabled
if (output.crtc != XCB_NONE && output.mode != XCB_NONE) {
+ // QTBUG-40174, QTBUG-42985: If virtual screen exists,
+ // remove it and next add a physical screen.
+ if (m_onlyVirtualScreen) {
+ qCDebug(lcQpaScreen) << "default screen" << screen->name() << "has been removed";
+ destroyScreen(m_screens.at(0), false);
+ m_onlyVirtualScreen = false;
+ }
+
xcb_randr_get_output_info_cookie_t outputInfoCookie =
xcb_randr_get_output_info(xcb_connection(), output.output, output.config_timestamp);
QScopedPointer<xcb_randr_get_output_info_reply_t, QScopedPointerPodDeleter> outputInfo(
@@ -270,34 +267,25 @@ void QXcbConnection::updateScreens(const
otherScreen->addVirtualSibling(screen);
m_screens << screen;
QXcbIntegration::instance()->screenAdded(screen, screen->isPrimary());
-
- // Windows which had null screens have already had expose events by now.
- // They need to be told the screen is back, it's OK to render.
- foreach (QWindow *window, QGuiApplication::topLevelWindows()) {
- QXcbWindow *xcbWin = static_cast<QXcbWindow*>(window->handle());
- if (xcbWin)
- xcbWin->maybeSetScreen(screen);
- }
+ maybeSetScreenForTopLevelWindows(screen);
}
- // else ignore disabled screens
} else if (screen) {
- // Screen has been disabled -> remove
if (output.crtc == XCB_NONE && output.mode == XCB_NONE) {
+ // Screen has been disabled
xcb_randr_get_output_info_cookie_t outputInfoCookie =
xcb_randr_get_output_info(xcb_connection(), output.output, output.config_timestamp);
QScopedPointer<xcb_randr_get_output_info_reply_t, QScopedPointerPodDeleter> outputInfo(
xcb_randr_get_output_info_reply(xcb_connection(), outputInfoCookie, NULL));
if (outputInfo->crtc == XCB_NONE) {
qCDebug(lcQpaScreen) << "output" << screen->name() << "has been disabled";
- m_screens.removeOne(screen);
- foreach (QXcbScreen *otherScreen, m_screens)
- otherScreen->removeVirtualSibling((QPlatformScreen *) screen);
- QXcbIntegration::instance()->destroyScreen(screen);
+ destroyScreen(screen, true);
} else {
qCDebug(lcQpaScreen) << "output" << screen->name() << "has been temporarily disabled for the mode switch";
+ screen->setCrtc(XCB_NONE); //Invalidate crtc
}
} else {
// Just update existing screen
+ screen->setCrtc(output.crtc); //Set the new crtc, because it may be invalidated
screen->updateGeometry(output.config_timestamp);
const bool wasPrimary = screen->isPrimary();
screen->setPrimary(checkOutputIsPrimary(output.window, output.output));
@@ -316,19 +304,61 @@ void QXcbConnection::updateScreens(const
qCDebug(lcQpaScreen) << "output has changed" << screen;
}
}
+
if (!m_screens.isEmpty())
qCDebug(lcQpaScreen) << "primary output is" << m_screens.first()->name();
else
qCDebug(lcQpaScreen) << "no outputs";
}
}
+void QXcbConnection::destroyScreen(QXcbScreen *screen, bool canCreateVirtualScreen)
+{
+ // Known screen removed -> delete it
+ m_screens.removeOne(screen);
+ foreach (QXcbScreen *otherScreen, m_screens)
+ otherScreen->removeVirtualSibling((QPlatformScreen *)screen);
+ QXcbIntegration::instance()->destroyScreen(screen);
+
+ // QTBUG-40174, QTBUG-42985: If all screens are removed, add a virtual
+ // screen and remove it later if a physical screen becomes available.
+ if (canCreateVirtualScreen && m_screens.isEmpty())
+ createVirtualScreen();
+}
+void QXcbConnection::createVirtualScreen()
+{
+ QXcbVirtualDesktop *virtualDesktop = m_virtualDesktops.value(0);
+ if (virtualDesktop && !virtualDesktop->size().isEmpty()) {
+ Q_ASSERT(m_screens.isEmpty());
+ QXcbScreen *screen = createScreen(virtualDesktop, 0, Q_NULLPTR);
+ screen->setVirtualSiblings(QList<QPlatformScreen *>() << screen);
+ screen->setPrimary(true);
+ m_onlyVirtualScreen = true;
+ m_screens << screen;
+ QXcbIntegration::instance()->screenAdded(screen, screen->isPrimary());
+ maybeSetScreenForTopLevelWindows(screen);
+ qCDebug(lcQpaScreen) << "virtual screen was created" << screen;
+ }
+}
+void QXcbConnection::maybeSetScreenForTopLevelWindows(QXcbScreen *screen)
+{
+ // Windows which had null screens have already had expose events by now.
+ // They need to be told the screen is back, it's OK to render.
+ bool doFlush = false;
+ foreach (QWindow *window, QGuiApplication::topLevelWindows()) {
+ QXcbWindow *xcbWin = static_cast<QXcbWindow*>(window->handle());
+ if (xcbWin)
+ doFlush |= xcbWin->maybeSetScreen(screen);
+ }
+ // Flush Window System Events to prevent disappearing windows
+ if (doFlush)
+ QWindowSystemInterface::flushWindowSystemEvents();
+}
void QXcbConnection::initializeScreens()
{
xcb_screen_iterator_t it = xcb_setup_roots_iterator(m_setup);
int xcbScreenNumber = 0; // screen number in the xcb sense
QXcbScreen* primaryScreen = Q_NULLPTR;
- bool hasOutputs = false;
while (it.rem) {
// Each "screen" in xcb terminology is a virtual desktop,
// potentially a collection of separate juxtaposed monitors.
@@ -407,7 +437,6 @@ void QXcbConnection::initializeScreens()
QXcbScreen *screen = createScreen(virtualDesktop, outputs[i], output.data());
siblings << screen;
- hasOutputs = true;
m_screens << screen;
// There can be multiple outputs per screen, use either
@@ -434,39 +463,23 @@ void QXcbConnection::initializeScreens()
++xcbScreenNumber;
} // for each xcb screen
- // If there's no randr extension, or there was some error above, or we found a
- // screen which doesn't have outputs for some other reason (e.g. on VNC or ssh -X),
- // but the dimensions are known anyway, and we don't already have any lingering
- // (possibly disconnected) screens, then showing windows should be possible,
- // so create one screen. (QTBUG-31389)
- QXcbVirtualDesktop *virtualDesktop = m_virtualDesktops.value(0);
- if (virtualDesktop && !hasOutputs && !virtualDesktop->size().isEmpty() && m_screens.isEmpty()) {
- QXcbScreen *screen = createScreen(virtualDesktop, 0, Q_NULLPTR);
- screen->setVirtualSiblings(QList<QPlatformScreen *>() << screen);
- m_screens << screen;
- primaryScreen = screen;
- primaryScreen->setPrimary(true);
- qCDebug(lcQpaScreen) << "found a screen with zero outputs" << screen;
- }
-
- // Ensure the primary screen is first in the list
- if (primaryScreen) {
- Q_ASSERT(!m_screens.isEmpty());
- if (m_screens.first() != primaryScreen) {
- m_screens.removeOne(primaryScreen);
- m_screens.prepend(primaryScreen);
+ if (m_screens.isEmpty()) {
+ createVirtualScreen();
+ } else {
+ // Ensure the primary screen is first in the list
+ if (primaryScreen) {
+ if (m_screens.first() != primaryScreen) {
+ m_screens.removeOne(primaryScreen);
+ m_screens.prepend(primaryScreen);
+ }
}
- }
- // Push the screens to QApplication
- QXcbIntegration *integration = QXcbIntegration::instance();
- foreach (QXcbScreen* screen, m_screens) {
- qCDebug(lcQpaScreen) << "adding" << screen << "(Primary:" << screen->isPrimary() << ")";
- integration->screenAdded(screen, screen->isPrimary());
- }
-
- if (!m_screens.isEmpty())
- qCDebug(lcQpaScreen) << "primary output is" << m_screens.first()->name();
+ // Push the screens to QGuiApplication
+ foreach (QXcbScreen *screen, m_screens) {
+ qCDebug(lcQpaScreen) << "adding" << screen << "(Primary:" << screen->isPrimary() << ")";
+ QXcbIntegration::instance()->screenAdded(screen, screen->isPrimary());
+ }
+ }
}
QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGrabServer, xcb_visualid_t defaultVisualId, const char *displayName)
@@ -474,6 +487,7 @@ QXcbConnection::QXcbConnection(QXcbNativ
, m_canGrabServer(canGrabServer)
, m_defaultVisualId(defaultVisualId)
, m_primaryScreenNumber(0)
+ , m_onlyVirtualScreen(false)
, m_displayName(displayName ? QByteArray(displayName) : qgetenv("DISPLAY"))
, m_nativeInterface(nativeInterface)
#ifdef XCB_USE_XLIB
@@ -1110,8 +1124,19 @@ void QXcbConnection::handleXcbEvent(xcb_
handled = false;
break;
case XCB_PROPERTY_NOTIFY:
- HANDLE_PLATFORM_WINDOW_EVENT(xcb_property_notify_event_t, window, handlePropertyNotifyEvent);
+ {
+ // Update geometry for all screens, because availableGeometry must be changed
+ const xcb_property_notify_event_t *propertyNotifyEvent = (const xcb_property_notify_event_t *)event;
+ if (propertyNotifyEvent->atom == atom(QXcbAtom::_NET_WORKAREA)) {
+ foreach (QXcbScreen *screen, m_screens) {
+ if (propertyNotifyEvent->window == screen->root())
+ screen->updateGeometry(propertyNotifyEvent->time);
+ }
+ } else {
+ HANDLE_PLATFORM_WINDOW_EVENT(xcb_property_notify_event_t, window, handlePropertyNotifyEvent);
+ }
break;
+ }
#if defined(XCB_USE_XINPUT2)
case XCB_GE_GENERIC:
// Here the windowEventListener is invoked from xi2HandleEvent()
diff -rupN qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbconnection.h qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbconnection.h
--- qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbconnection.h 2015-10-13 06:35:27.000000000 +0200
+++ qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbconnection.h 2015-10-21 21:00:21.767613360 +0200
@@ -519,6 +519,9 @@ private:
QXcbVirtualDesktop* virtualDesktopForRootWindow(xcb_window_t rootWindow);
bool checkOutputIsPrimary(xcb_window_t rootWindow, xcb_randr_output_t output);
void initializeScreens();
+ void destroyScreen(QXcbScreen *screen, bool canCreateVirtualScreen);
+ void createVirtualScreen();
+ void maybeSetScreenForTopLevelWindows(QXcbScreen *screen);
void updateScreens(const xcb_randr_notify_event_t *event);
bool m_xi2Enabled;
@@ -583,6 +586,7 @@ private:
QList<QXcbVirtualDesktop *> m_virtualDesktops;
QList<QXcbScreen *> m_screens;
int m_primaryScreenNumber;
+ bool m_onlyVirtualScreen;
xcb_atom_t m_allAtoms[QXcbAtom::NAtoms];
diff -rupN qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbscreen.cpp qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbscreen.cpp
--- qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbscreen.cpp 2015-10-13 06:35:27.000000000 +0200
+++ qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbscreen.cpp 2015-10-21 21:00:21.768613377 +0200
@@ -438,14 +438,6 @@ void QXcbScreen::handleScreenChange(xcb_
QDpi ldpi = logicalDpi();
QWindowSystemInterface::handleScreenLogicalDotsPerInchChange(QPlatformScreen::screen(), ldpi.first, ldpi.second);
-
- // Windows which had null screens have already had expose events by now.
- // They need to be told the screen is back, it's OK to render.
- foreach (QWindow *window, QGuiApplication::topLevelWindows()) {
- QXcbWindow *xcbWin = static_cast<QXcbWindow*>(window->handle());
- if (xcbWin)
- xcbWin->maybeSetScreen(this);
- }
}
void QXcbScreen::updateGeometry(xcb_timestamp_t timestamp)
diff -rupN qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbscreen.h qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbscreen.h
--- qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbscreen.h 2015-10-13 06:35:27.000000000 +0200
+++ qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbscreen.h 2015-10-21 21:00:21.768613377 +0200
@@ -116,6 +116,8 @@ public:
xcb_randr_crtc_t crtc() const { return m_crtc; }
xcb_randr_mode_t mode() const { return m_mode; }
+ void setCrtc(xcb_randr_crtc_t crtc) { m_crtc = crtc; }
+
void windowShown(QXcbWindow *window);
QString windowManagerName() const { return m_windowManagerName; }
bool syncRequestSupported() const { return m_syncRequestSupported; }
diff -rupN qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbwindow.cpp qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbwindow.cpp
--- qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbwindow.cpp 2015-10-13 06:35:27.000000000 +0200
+++ qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbwindow.cpp 2015-10-21 21:01:17.324562601 +0200
@@ -694,12 +694,17 @@ void QXcbWindow::destroy()
m_pendingSyncRequest->invalidate();
}
-void QXcbWindow::maybeSetScreen(QXcbScreen *screen)
+bool QXcbWindow::maybeSetScreen(QXcbScreen *screen)
{
- if (!window()->screen() && screen->geometry().contains(geometry().topLeft())) {
+ // Every window must have a screen. Otherwise application can
+ // crash and the window contents are invisible e.g. in x11vnc.
+ if (!window()->screen()) {
QWindowSystemInterface::handleWindowScreenChanged(window(), static_cast<QPlatformScreen *>(screen)->screen());
- QWindowSystemInterface::handleExposeEvent(window(), QRegion(QRect(QPoint(0, 0), window()->size())));
+ if (screen->geometry().contains(geometry().topLeft()))
+ QWindowSystemInterface::handleExposeEvent(window(), QRegion(QRect(QPoint(0, 0), window()->size())));
+ return true;
}
+ return false;
}
void QXcbWindow::setGeometry(const QRect &rect)
@@ -1243,8 +1248,6 @@ void QXcbWindow::changeNetWmState(bool s
event.data.data32[3] = 0;
event.data.data32[4] = 0;
- if (!xcbScreen())
- return;
Q_XCB_CALL(xcb_send_event(xcb_connection(), 0, xcbScreen()->root(), XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *)&event));
}
@@ -1493,8 +1496,6 @@ void QXcbWindow::setParent(const QPlatfo
xcb_parent_id = qXcbParent->xcb_window();
m_embedded = qXcbParent->window()->type() == Qt::ForeignWindow;
} else {
- if (!xcbScreen())
- return;
xcb_parent_id = xcbScreen()->root();
m_embedded = false;
}
@@ -2323,8 +2324,6 @@ void QXcbWindow::handleEnterNotifyEvent(
const int dpr = int(devicePixelRatio());
const QPoint local(event->event_x/dpr, event->event_y/dpr);
- if (!xcbScreen())
- return;
QPoint global = xcbScreen()->mapFromNative(QPoint(event->root_x, event->root_y));
QWindowSystemInterface::handleEnterEvent(window(), local, global);
}
@@ -2343,8 +2342,6 @@ void QXcbWindow::handleLeaveNotifyEvent(
if (enterWindow) {
const int dpr = int(devicePixelRatio());
QPoint local(enter->event_x/dpr, enter->event_y/dpr);
- if (!xcbScreen())
- return;
QPoint global = xcbScreen()->mapFromNative(QPoint(event->root_x, event->root_y));
QWindowSystemInterface::handleEnterLeaveEvent(enterWindow->window(), window(), local, global);
@@ -2360,8 +2357,6 @@ void QXcbWindow::handlePropertyNotifyEve
connection()->setTime(event->time);
const bool propertyDeleted = event->state == XCB_PROPERTY_DELETE;
- if (!xcbScreen())
- return;
if (event->atom == atom(QXcbAtom::_NET_WM_STATE) || event->atom == atom(QXcbAtom::WM_STATE)) {
if (propertyDeleted)
@@ -2403,8 +2398,6 @@ void QXcbWindow::handlePropertyNotifyEve
return;
} else if (event->atom == atom(QXcbAtom::_NET_FRAME_EXTENTS)) {
m_dirtyFrameMargins = true;
- } else if (event->atom == atom(QXcbAtom::_NET_WORKAREA) && xcbScreen() && event->window == xcbScreen()->root()) {
- xcbScreen()->updateGeometry(event->time);
}
}
@@ -2682,8 +2675,6 @@ bool QXcbWindow::needsSync() const
void QXcbWindow::postSyncWindowRequest()
{
- if (!xcbScreen())
- return;
if (!m_pendingSyncRequest) {
QXcbSyncWindowRequest *e = new QXcbSyncWindowRequest(this);
m_pendingSyncRequest = e;
diff -rupN qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbwindow.h qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbwindow.h
--- qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbwindow.h 2015-10-13 06:35:27.000000000 +0200
+++ qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbwindow.h 2015-10-21 21:00:21.769613394 +0200
@@ -158,7 +158,7 @@ public:
virtual void create();
virtual void destroy();
- void maybeSetScreen(QXcbScreen *screen);
+ bool maybeSetScreen(QXcbScreen *screen);
QXcbScreen *screenForNativeGeometry(const QRect &newGeometry) const;
public Q_SLOTS:

View File

@ -0,0 +1,88 @@
From b024fbe83863fc57364a52c717d5b43d654bdb5d Mon Sep 17 00:00:00 2001
From: Weng Xuetian <wengxt@gmail.com>
Date: Sat, 5 Mar 2016 12:23:21 -0800
Subject: [PATCH] QtDBus: clean up signal hooks and object tree in
closeConnection
If a QObject is added or passed as receiver to QDBusConnection::connect()
and it is managed by Q_GLOBAL_STATIC or similar mechanism, it is
possible that when that its destructor is called after the dbus daemon
thread ends. In that case, QObject::destroyed connected via
Qt::BlockingQueuedConnection to QDBusConnectionPrivate will cause dead
lock since the thread is no longer processing events.
Task-number: QTBUG-51648
Change-Id: I1a1810a6d6d0234af0269d5f3fc1f54101bf1547
---
src/dbus/qdbusconnection_p.h | 1 +
src/dbus/qdbusintegrator.cpp | 28 +++++++++++++++++++++++++++-
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h
index c77daf7..565eb83 100644
--- a/src/dbus/qdbusconnection_p.h
+++ b/src/dbus/qdbusconnection_p.h
@@ -254,6 +254,7 @@ private:
const QVector<int> &metaTypes, int slotIdx);
SignalHookHash::Iterator removeSignalHookNoLock(SignalHookHash::Iterator it);
+ void disconnectObjectTree(ObjectTreeNode &node);
bool isServiceRegisteredByThread(const QString &serviceName);
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index cd44861..a3cd47b 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -1030,7 +1030,6 @@ QDBusConnectionPrivate::~QDBusConnectionPrivate()
qPrintable(name));
closeConnection();
- rootNode.children.clear(); // free resources
qDeleteAll(cachedMetaObjects);
if (mode == ClientMode || mode == PeerMode) {
@@ -1052,6 +1051,20 @@ QDBusConnectionPrivate::~QDBusConnectionPrivate()
}
}
+void QDBusConnectionPrivate::disconnectObjectTree(QDBusConnectionPrivate::ObjectTreeNode &haystack)
+{
+ QDBusConnectionPrivate::ObjectTreeNode::DataList::Iterator it = haystack.children.begin();
+
+ while (it != haystack.children.end()) {
+ disconnectObjectTree(*it);
+ it++;
+ }
+
+ if (haystack.obj) {
+ haystack.obj->disconnect(this);
+ }
+}
+
void QDBusConnectionPrivate::closeConnection()
{
QDBusWriteLocker locker(CloseConnectionAction, this);
@@ -1075,6 +1088,19 @@ void QDBusConnectionPrivate::closeConnection()
}
qDeleteAll(pendingCalls);
+
+ // clean up all signal hook and object tree, to avoid QObject::destroyed
+ // being activated to dbus daemon thread which already quits.
+ // dbus connection is already closed, so there is nothing we could do be clean
+ // up everything here.
+ SignalHookHash::iterator sit = signalHooks.begin();
+ while (sit != signalHooks.end()) {
+ sit.value().obj->disconnect(this);
+ sit++;
+ }
+
+ disconnectObjectTree(rootNode);
+ rootNode.children.clear(); // free resources
}
void QDBusConnectionPrivate::checkThread()
--
2.5.0

View File

@ -0,0 +1,156 @@
From 136eeec876ed5b995e7c27bcdcefe0199f5f183d Mon Sep 17 00:00:00 2001
From: Weng Xuetian <wengxt@gmail.com>
Date: Thu, 3 Mar 2016 21:56:53 -0800
Subject: [PATCH] QtDBus: finish all pending call with error if disconnected
libdbus will send a local signal if connection gets disconnected. When
this happens, end all pending calls with QDBusError::Disconnected.
Task-number: QTBUG-51649
Change-Id: I5c7d2a468bb5da746d0c0e53e458c1e376f186a9
---
src/dbus/qdbusintegrator.cpp | 26 +++++++++++++++++-----
src/dbus/qdbusutil_p.h | 6 +++++
.../dbus/qdbusconnection/tst_qdbusconnection.cpp | 22 ++++++++++++++++++
.../dbus/qdbusconnection/tst_qdbusconnection.h | 1 +
4 files changed, 49 insertions(+), 6 deletions(-)
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index cd44861..320419f 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -519,6 +519,14 @@ bool QDBusConnectionPrivate::handleMessage(const QDBusMessage &amsg)
switch (amsg.type()) {
case QDBusMessage::SignalMessage:
handleSignal(amsg);
+ // Check local disconnected signal from libdbus
+ if (amsg.interface() == QDBusUtil::dbusInterfaceLocal()
+ && amsg.path() == QDBusUtil::dbusPathLocal()
+ && amsg.member() == QDBusUtil::disconnected()
+ && !QDBusMessagePrivate::isLocal(amsg)) {
+ while (!pendingCalls.isEmpty())
+ processFinishedCall(pendingCalls.first());
+ }
// if there are any other filters in this DBusConnection,
// let them see the signal too
return false;
@@ -1767,10 +1775,16 @@ void QDBusConnectionPrivate::processFinishedCall(QDBusPendingCallPrivate *call)
QDBusMessage &msg = call->replyMessage;
if (call->pending) {
- // decode the message
- DBusMessage *reply = q_dbus_pending_call_steal_reply(call->pending);
- msg = QDBusMessagePrivate::fromDBusMessage(reply, connection->capabilities);
- q_dbus_message_unref(reply);
+ // when processFinishedCall is called and pending call is not completed,
+ // it means we received disconnected signal from libdbus
+ if (q_dbus_pending_call_get_completed(call->pending)) {
+ // decode the message
+ DBusMessage *reply = q_dbus_pending_call_steal_reply(call->pending);
+ msg = QDBusMessagePrivate::fromDBusMessage(reply, connection->capabilities);
+ q_dbus_message_unref(reply);
+ } else {
+ msg = QDBusMessage::createError(QDBusError::Disconnected, QDBusUtil::disconnectedErrorMessage());
+ }
}
qDBusDebug() << connection << "got message reply:" << msg;
@@ -2070,8 +2084,8 @@ void QDBusConnectionPrivate::sendInternal(QDBusPendingCallPrivate *pcall, void *
pcall->pending = pending;
q_dbus_pending_call_set_notify(pending, qDBusResultReceived, pcall, 0);
- // DBus won't notify us when a peer disconnects so we need to track these ourselves
- if (mode == QDBusConnectionPrivate::PeerMode)
+ // DBus won't notify us when a peer disconnects or server terminates so we need to track these ourselves
+ if (mode == QDBusConnectionPrivate::PeerMode || mode == QDBusConnectionPrivate::ClientMode)
pendingCalls.append(pcall);
return;
diff --git a/src/dbus/qdbusutil_p.h b/src/dbus/qdbusutil_p.h
index 8f5ae92..ca70ff9 100644
--- a/src/dbus/qdbusutil_p.h
+++ b/src/dbus/qdbusutil_p.h
@@ -155,6 +155,8 @@ namespace QDBusUtil
{ return QStringLiteral(DBUS_SERVICE_DBUS); }
inline QString dbusPath()
{ return QStringLiteral(DBUS_PATH_DBUS); }
+ inline QString dbusPathLocal()
+ { return QStringLiteral(DBUS_PATH_LOCAL); }
inline QString dbusInterface()
{
// it's the same string, but just be sure
@@ -165,8 +167,12 @@ namespace QDBusUtil
{ return QStringLiteral(DBUS_INTERFACE_PROPERTIES); }
inline QString dbusInterfaceIntrospectable()
{ return QStringLiteral(DBUS_INTERFACE_INTROSPECTABLE); }
+ inline QString dbusInterfaceLocal()
+ { return QStringLiteral(DBUS_INTERFACE_LOCAL); }
inline QString nameOwnerChanged()
{ return QStringLiteral("NameOwnerChanged"); }
+ inline QString disconnected()
+ { return QStringLiteral("Disconnected"); }
inline QString disconnectedErrorMessage()
{ return QStringLiteral("Not connected to D-Bus server"); }
}
diff --git a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
index e91f87d..6c7e6b1 100644
--- a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
+++ b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
@@ -1218,6 +1218,28 @@ void tst_QDBusConnection::callVirtualObjectLocal()
QCOMPARE(obj.replyArguments, subPathReply.arguments());
}
+void tst_QDBusConnection::pendingCallWhenDisconnected()
+{
+ QDBusServer *server = new QDBusServer;
+ QDBusConnection con = QDBusConnection::connectToPeer(server->address(), "disconnect");
+ QTestEventLoop::instance().enterLoop(2);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+ QVERIFY(con.isConnected());
+
+ delete server;
+
+ // Make sure we call the method before we know it is disconnected.
+ QVERIFY(con.isConnected());
+ QDBusMessage message = QDBusMessage::createMethodCall("", "/", QString(), "method");
+ QDBusPendingCall reply = con.asyncCall(message);
+
+ QTestEventLoop::instance().enterLoop(2);
+ QVERIFY(!con.isConnected());
+ QVERIFY(reply.isFinished());
+ QVERIFY(reply.isError());
+ QVERIFY(reply.error().type() == QDBusError::Disconnected);
+}
+
QString MyObject::path;
QString MyObjectWithoutInterface::path;
QString MyObjectWithoutInterface::interface;
diff --git a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h
index a53ba32..720e484 100644
--- a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h
+++ b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h
@@ -121,6 +121,7 @@ private slots:
void registerVirtualObject();
void callVirtualObject();
void callVirtualObjectLocal();
+ void pendingCallWhenDisconnected();
public:
QString serviceName() const { return "org.qtproject.Qt.Autotests.QDBusConnection"; }
--
2.5.0
diff -up qtbase-opensource-src-5.6.0-rc/src/dbus/dbus_minimal_p.h.QTBUG-51649 qtbase-opensource-src-5.6.0-rc/src/dbus/dbus_minimal_p.h
--- qtbase-opensource-src-5.6.0-rc/src/dbus/dbus_minimal_p.h.QTBUG-51649 2016-02-18 01:24:38.000000000 -0600
+++ qtbase-opensource-src-5.6.0-rc/src/dbus/dbus_minimal_p.h 2016-03-11 11:40:11.176244645 -0600
@@ -99,8 +99,10 @@ typedef dbus_uint32_t dbus_bool_t;
/* dbus-shared.h */
#define DBUS_SERVICE_DBUS "org.freedesktop.DBus"
#define DBUS_PATH_DBUS "/org/freedesktop/DBus"
+#define DBUS_PATH_LOCAL "/org/freedesktop/DBus/Local"
#define DBUS_INTERFACE_DBUS "org.freedesktop.DBus"
#define DBUS_INTERFACE_INTROSPECTABLE "org.freedesktop.DBus.Introspectable"
+#define DBUS_INTERFACE_LOCAL "org.freedesktop.DBus.Local"
#define DBUS_INTERFACE_PROPERTIES "org.freedesktop.DBus.Properties"
#define DBUS_NAME_FLAG_ALLOW_REPLACEMENT 0x1 /**< Allow another service to become the primary owner if requested */

View File

@ -0,0 +1,81 @@
From 42e14c187f7b2eedb5be7b7a49efb4031f12a02e Mon Sep 17 00:00:00 2001
From: Thiago Macieira <thiago.macieira@intel.com>
Date: Tue, 15 Mar 2016 11:00:20 -0700
Subject: [PATCH] Fix QtDBus deadlock inside kded/kiod
Whenever a message spy was installed, we failed to actually process
looped-back messages by queueing them for processing by the spy. That
had as a consequence that the caller got an error reply and the message,
later, we attempted to deliver the message. Since that message still was
isLocal==true, bad things happened inside the manager thread.
The correct solution is not to queue the message for the filter. We could
have filtered the message directly, but instead this commit opts not to
filter looped-back messages. That implies kded/kiod must not attempt to
load its modules by way of a looped-back message.
Task-number: QTBUG-51676
Change-Id: I1dc112894cde7121e8ce302ae51b438ade1ff612
---
src/dbus/qdbusintegrator.cpp | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index cd44861..6052766 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -509,7 +509,12 @@ bool QDBusConnectionPrivate::handleMessage(const QDBusMessage &amsg)
{
if (!ref.load())
return false;
- if (!dispatchEnabled && !QDBusMessagePrivate::isLocal(amsg)) {
+
+ // local message are always delivered, regardless of filtering
+ // or whether the dispatcher is enabled
+ bool isLocal = QDBusMessagePrivate::isLocal(amsg);
+
+ if (!dispatchEnabled && !isLocal) {
// queue messages only, we'll handle them later
qDBusDebug() << this << "delivery is suspended";
pendingMessages << amsg;
@@ -524,7 +529,7 @@ bool QDBusConnectionPrivate::handleMessage(const QDBusMessage &amsg)
return false;
case QDBusMessage::MethodCallMessage:
// run it through the spy filters (if any) before the regular processing
- if (Q_UNLIKELY(qDBusSpyHookList.exists()) && qApp) {
+ if (Q_UNLIKELY(qDBusSpyHookList.exists()) && !isLocal && qApp) {
const QDBusSpyHookList &list = *qDBusSpyHookList;
qDBusDebug() << this << "invoking message spies";
QCoreApplication::postEvent(qApp, new QDBusSpyCallEvent(this, QDBusConnection(this),
@@ -1451,9 +1456,9 @@ void QDBusConnectionPrivate::handleObjectCall(const QDBusMessage &msg)
// that means the dispatchLock mutex is locked
// must not call out to user code in that case
//
- // however, if the message is internal, handleMessage was called
- // directly and no lock is in place. We can therefore call out to
- // user code, if necessary
+ // however, if the message is internal, handleMessage was called directly
+ // (user's thread) and no lock is in place. We can therefore call out to
+ // user code, if necessary.
ObjectTreeNode result;
int usedLength;
QThread *objThread = 0;
@@ -1492,12 +1497,14 @@ void QDBusConnectionPrivate::handleObjectCall(const QDBusMessage &msg)
usedLength, msg));
return;
} else if (objThread != QThread::currentThread()) {
- // synchronize with other thread
+ // looped-back message, targeting another thread:
+ // synchronize with it
postEventToThread(HandleObjectCallPostEventAction, result.obj,
new QDBusActivateObjectEvent(QDBusConnection(this), this, result,
usedLength, msg, &sem));
semWait = true;
} else {
+ // looped-back message, targeting current thread
semWait = false;
}
} // release the lock
--
2.5.0

View File

@ -18,13 +18,16 @@
%_qt5_sysconfdir %{_qt5_settingsdir}
%_qt5_translationdir %{_datadir}/qt5/translations
%qmake_qt5 \
%{_qt5_qmake} \\\
QMAKE_CFLAGS_DEBUG="${CFLAGS:-%optflags}" \\\
QMAKE_CFLAGS_RELEASE="${CFLAGS:-%optflags}" \\\
QMAKE_CXXFLAGS_DEBUG="${CXXFLAGS:-%optflags}" \\\
QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS:-%optflags}" \\\
QMAKE_LFLAGS_DEBUG="${LDFLAGS:-%{?__global_ldflags}}" \\\
QMAKE_LFLAGS_RELEASE="${LDFLAGS:-%{?__global_ldflags}}" \\\
%_qt5_ldflags %{?__global_ldflags} @@QT5_RPM_LD_FLAGS@@
%_qt5_optflags %{optflags} @@QT5_RPM_OPT_FLAGS@@
%_qt5_qmake_flags \\\
QMAKE_CFLAGS_DEBUG="${CFLAGS:-%{_qt5_optflags}}" \\\
QMAKE_CFLAGS_RELEASE="${CFLAGS:-%{_qt5_optflags}}" \\\
QMAKE_CXXFLAGS_DEBUG="${CXXFLAGS:-%{_qt5_optflags}}" \\\
QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS:-%{_qt5_optflags}}" \\\
QMAKE_LFLAGS_DEBUG="${LDFLAGS:-%{_qt5_ldflags}}" \\\
QMAKE_LFLAGS_RELEASE="${LDFLAGS:-%{_qt5_ldflags}}" \\\
QMAKE_STRIP=
%qmake_qt5 %{_qt5_qmake} %{?_qt5_qmake_flags}

View File

@ -0,0 +1,368 @@
From fa0d02eedcacc22db1026b902801b29176755362 Mon Sep 17 00:00:00 2001
From: Thiago Macieira <thiago.macieira@intel.com>
Date: Fri, 21 Aug 2015 17:08:19 -0700
Subject: [PATCH] moc: get the system #defines from the compiler itself
In order for moc to properly parse #ifdefs and family, we've had
QMAKE_COMPILER_DEFINES as a list of pre-defined macros from the
compiler. That list is woefully incomplete.
Instead, let's simply ask the compiler for the list. With GCC and
family, we use the -dM flag while preprocessing. With ICC on Windows,
the flag gains an extra "Q" but is otherwise the same. For MSVC, it
requires using some undocumented switches and parsing environment
variables (I've tested MSVC 2012, 2013 and 2015).
The new moc option is called --include to be similar to GCC's -include
option. It does more than just parse a list of pre-defined macros and
can be used to insert any sort of code that moc needs to parse prior to
the main file.
Change-Id: I7de033f80b0e4431b7f1ffff13fca02dbb60a0a6
---
mkspecs/features/moc.prf | 31 +++++++++++++--
qmake/main.cpp | 38 +++++++++++++++++++
src/tools/moc/main.cpp | 16 +++++++-
src/tools/moc/preprocessor.cpp | 60 +++++++++++++++++-------------
src/tools/moc/preprocessor.h | 1 +
tests/auto/tools/moc/subdir/extradefines.h | 1 +
tests/auto/tools/moc/tst_moc.cpp | 42 +++++++++++++++++++++
7 files changed, 158 insertions(+), 31 deletions(-)
create mode 100644 tests/auto/tools/moc/subdir/extradefines.h
diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf
index c0b5682..af885c3 100644
--- a/mkspecs/features/moc.prf
+++ b/mkspecs/features/moc.prf
@@ -24,8 +24,25 @@ win32:count(MOC_INCLUDEPATH, 40, >) {
write_file($$absolute_path($$WIN_INCLUDETEMP, $$OUT_PWD), WIN_INCLUDETEMP_CONT)|error("Aborting.")
}
+# QNX's compiler sets "gcc" config, but does not support the -dM option;
+# iOS builds are multi-arch, so this feature cannot possibly work.
+if(gcc|intel_icl|msvc):!rim_qcc:!ios {
+ moc_predefs.CONFIG = no_link
+ gcc: moc_predefs.commands = $$QMAKE_CXX $$QMAKE_CXXFLAGS -dM -E -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
+ else:intel_icl: moc_predefs.commands = $$QMAKE_CXX $$QMAKE_CXXFLAGS -QdM -P -Fi${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
+ else:msvc {
+ # make sure that our bin dir is first in path, so qmake is found
+ moc_predefs.commands = PATH $$shell_path($$[QT_INSTALL_BINS/src]);%PATH%&
+ moc_predefs.commands += $$QMAKE_CXX -Bxqmake $$QMAKE_CXXFLAGS -E ${QMAKE_FILE_IN} 2>NUL >${QMAKE_FILE_OUT}
+ } else: error("Oops, I messed up")
+ moc_predefs.output = $$MOC_DIR/moc_predefs.h
+ moc_predefs.input = MOC_PREDEF_FILE
+ silent: moc_predefs.commands = @echo generating $$moc_predefs.output$$escape_expand(\n\t)@$$moc_predefs.commands
+ QMAKE_EXTRA_COMPILERS += moc_predefs
+ MOC_PREDEF_FILE = $$[QT_HOST_DATA/src]/mkspecs/features/data/dummy.cpp
+}
+
defineReplace(mocCmdBase) {
- RET =
!isEmpty(WIN_INCLUDETEMP) {
incvar = @$$WIN_INCLUDETEMP
} else {
@@ -34,7 +51,13 @@ defineReplace(mocCmdBase) {
incvar += -I$$shell_quote($$inc)
incvar += $$QMAKE_FRAMEWORKPATH_FLAGS
}
- RET += $$QMAKE_MOC $(DEFINES) $$join(QMAKE_COMPILER_DEFINES, " -D", -D) $$incvar $$QMAKE_MOC_OPTIONS
+
+ RET = $$QMAKE_MOC $(DEFINES)
+
+ isEmpty(MOC_PREDEF_FILE): RET += $$join(QMAKE_COMPILER_DEFINES, " -D", -D)
+ else: RET += --include $$moc_predefs.output
+
+ RET += $$incvar $$QMAKE_MOC_OPTIONS
return($$RET)
}
@@ -46,7 +69,7 @@ moc_header.output = $$MOC_DIR/$${QMAKE_H_MOD_MOC}${QMAKE_FILE_BASE}$${first(QMAK
moc_header.input = HEADERS
moc_header.variable_out = SOURCES
moc_header.name = MOC ${QMAKE_FILE_IN}
-moc_header.depends += $$WIN_INCLUDETEMP
+moc_header.depends += $$WIN_INCLUDETEMP $$moc_predefs.output
silent:moc_header.commands = @echo moc ${QMAKE_FILE_IN} && $$moc_header.commands
QMAKE_EXTRA_COMPILERS += moc_header
INCREDIBUILD_XGE += moc_header
@@ -58,7 +81,7 @@ moc_source.commands = ${QMAKE_FUNC_mocCmdBase} ${QMAKE_FILE_IN} -o ${QMAKE_FILE_
moc_source.output = $$MOC_DIR/$${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_EXT_CPP_MOC}
moc_source.input = SOURCES OBJECTIVE_SOURCES
moc_source.name = MOC ${QMAKE_FILE_IN}
-moc_source.depends += $$WIN_INCLUDETEMP
+moc_source.depends += $$WIN_INCLUDETEMP $$moc_predefs.output
silent:moc_source.commands = @echo moc ${QMAKE_FILE_IN} && $$moc_source.commands
QMAKE_EXTRA_COMPILERS += moc_source
INCREDIBUILD_XGE += moc_source
diff --git a/qmake/main.cpp b/qmake/main.cpp
index bde537d..e9b8bde 100644
--- a/qmake/main.cpp
+++ b/qmake/main.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2015 Intel Corporation.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the qmake application of the Qt Toolkit.
@@ -47,6 +48,10 @@
#include <sys/types.h>
#include <sys/stat.h>
+#ifdef Q_OS_WIN
+# include <qt_windows.h>
+#endif
+
QT_BEGIN_NAMESPACE
#ifdef Q_OS_WIN
@@ -246,6 +251,30 @@ static int doInstall(int argc, char **argv)
return 3;
}
+static int dumpMacros(const wchar_t *cmdline)
+{
+ // from http://stackoverflow.com/questions/3665537/how-to-find-out-cl-exes-built-in-macros
+ int argc;
+ wchar_t **argv = CommandLineToArgvW(cmdline, &argc);
+ if (!argv)
+ return 2;
+ for (int i = 0; i < argc; ++i) {
+ if (argv[i][0] != L'-' || argv[i][1] != 'D')
+ continue;
+
+ wchar_t *value = wcschr(argv[i], L'=');
+ if (value) {
+ *value = 0;
+ ++value;
+ } else {
+ // point to the NUL at the end, so we don't print anything
+ value = argv[i] + wcslen(argv[i]);
+ }
+ wprintf(L"#define %Ls %Ls\n", argv[i] + 2, value);
+ }
+ return 0;
+}
+
#endif // Q_OS_WIN
/* This is to work around lame implementation on Darwin. It has been noted that the getpwd(3) function
@@ -280,6 +309,15 @@ int runQMake(int argc, char **argv)
// Workaround for inferior/missing command line tools on Windows: make our own!
if (argc >= 2 && !strcmp(argv[1], "-install"))
return doInstall(argc - 2, argv + 2);
+
+ {
+ // Support running as Visual C++'s compiler
+ const wchar_t *cmdline = _wgetenv(L"MSC_CMD_FLAGS");
+ if (!cmdline || !*cmdline)
+ cmdline = _wgetenv(L"MSC_IDE_FLAGS");
+ if (cmdline && *cmdline)
+ return dumpMacros(cmdline);
+ }
#endif
QMakeVfs vfs;
diff --git a/src/tools/moc/main.cpp b/src/tools/moc/main.cpp
index a5cbad7..d06335d 100644
--- a/src/tools/moc/main.cpp
+++ b/src/tools/moc/main.cpp
@@ -259,6 +259,11 @@ int runMoc(int argc, char **argv)
prependIncludeOption.setValueName(QStringLiteral("file"));
parser.addOption(prependIncludeOption);
+ QCommandLineOption includeOption(QStringLiteral("include"));
+ includeOption.setDescription(QStringLiteral("Parse <file> as an #include before the main source(s)."));
+ includeOption.setValueName(QStringLiteral("file"));
+ parser.addOption(includeOption);
+
QCommandLineOption noNotesWarningsCompatOption(QStringLiteral("n"));
noNotesWarningsCompatOption.setDescription(QStringLiteral("Do not display notes (-nn) or warnings (-nw). Compatibility option."));
noNotesWarningsCompatOption.setValueName(QStringLiteral("which"));
@@ -406,7 +411,16 @@ int runMoc(int argc, char **argv)
moc.includes = pp.includes;
// 1. preprocess
- moc.symbols = pp.preprocessed(moc.filename, &in);
+ foreach (const QString &includeName, parser.values(includeOption)) {
+ QByteArray rawName = pp.resolveInclude(QFile::encodeName(includeName), moc.filename);
+ QFile f(QFile::decodeName(rawName));
+ if (f.open(QIODevice::ReadOnly)) {
+ moc.symbols += Symbol(0, MOC_INCLUDE_BEGIN, rawName);
+ moc.symbols += pp.preprocessed(rawName, &f);
+ moc.symbols += Symbol(0, MOC_INCLUDE_END, rawName);
+ }
+ }
+ moc.symbols += pp.preprocessed(moc.filename, &in);
if (!pp.preprocessOnly) {
// 2. parse
diff --git a/src/tools/moc/preprocessor.cpp b/src/tools/moc/preprocessor.cpp
index d036c40..70cf14a 100644
--- a/src/tools/moc/preprocessor.cpp
+++ b/src/tools/moc/preprocessor.cpp
@@ -1001,6 +1001,37 @@ static void mergeStringLiterals(Symbols *_symbols)
}
}
+QByteArray Preprocessor::resolveInclude(const QByteArray &include, const QByteArray &relativeTo)
+{
+ // #### stringery
+ QFileInfo fi;
+ if (!relativeTo.isEmpty())
+ fi.setFile(QFileInfo(QString::fromLocal8Bit(relativeTo.constData())).dir(), QString::fromLocal8Bit(include.constData()));
+ for (int j = 0; j < Preprocessor::includes.size() && !fi.exists(); ++j) {
+ const IncludePath &p = Preprocessor::includes.at(j);
+ if (p.isFrameworkPath) {
+ const int slashPos = include.indexOf('/');
+ if (slashPos == -1)
+ continue;
+ QByteArray frameworkCandidate = include.left(slashPos);
+ frameworkCandidate.append(".framework/Headers/");
+ fi.setFile(QString::fromLocal8Bit(QByteArray(p.path + '/' + frameworkCandidate).constData()), QString::fromLocal8Bit(include.mid(slashPos + 1).constData()));
+ } else {
+ fi.setFile(QString::fromLocal8Bit(p.path.constData()), QString::fromLocal8Bit(include.constData()));
+ }
+ // try again, maybe there's a file later in the include paths with the same name
+ // (186067)
+ if (fi.isDir()) {
+ fi = QFileInfo();
+ continue;
+ }
+ }
+
+ if (!fi.exists() || fi.isDir())
+ return QByteArray();
+ return fi.canonicalFilePath().toLocal8Bit();
+}
+
void Preprocessor::preprocess(const QByteArray &filename, Symbols &preprocessed)
{
currentFilenames.push(filename);
@@ -1021,33 +1052,9 @@ void Preprocessor::preprocess(const QByteArray &filename, Symbols &preprocessed)
continue;
until(PP_NEWLINE);
- // #### stringery
- QFileInfo fi;
- if (local)
- fi.setFile(QFileInfo(QString::fromLocal8Bit(filename.constData())).dir(), QString::fromLocal8Bit(include.constData()));
- for (int j = 0; j < Preprocessor::includes.size() && !fi.exists(); ++j) {
- const IncludePath &p = Preprocessor::includes.at(j);
- if (p.isFrameworkPath) {
- const int slashPos = include.indexOf('/');
- if (slashPos == -1)
- continue;
- QByteArray frameworkCandidate = include.left(slashPos);
- frameworkCandidate.append(".framework/Headers/");
- fi.setFile(QString::fromLocal8Bit(QByteArray(p.path + '/' + frameworkCandidate).constData()), QString::fromLocal8Bit(include.mid(slashPos + 1).constData()));
- } else {
- fi.setFile(QString::fromLocal8Bit(p.path.constData()), QString::fromLocal8Bit(include.constData()));
- }
- // try again, maybe there's a file later in the include paths with the same name
- // (186067)
- if (fi.isDir()) {
- fi = QFileInfo();
- continue;
- }
- }
-
- if (!fi.exists() || fi.isDir())
+ include = resolveInclude(include, local ? filename : QByteArray());
+ if (include.isNull())
continue;
- include = fi.canonicalFilePath().toLocal8Bit();
if (Preprocessor::preprocessedIncludes.contains(include))
continue;
@@ -1202,6 +1209,7 @@ Symbols Preprocessor::preprocessed(const QByteArray &filename, QFile *file)
input = cleaned(input);
// phase 2: tokenize for the preprocessor
+ index = 0;
symbols = tokenize(input);
#if 0
diff --git a/src/tools/moc/preprocessor.h b/src/tools/moc/preprocessor.h
index 9c81f86..d876caf 100644
--- a/src/tools/moc/preprocessor.h
+++ b/src/tools/moc/preprocessor.h
@@ -67,6 +67,7 @@ public:
QList<QByteArray> frameworks;
QSet<QByteArray> preprocessedIncludes;
Macros macros;
+ QByteArray resolveInclude(const QByteArray &filename, const QByteArray &relativeTo);
Symbols preprocessed(const QByteArray &filename, QFile *device);
void parseDefineArguments(Macro *m);
diff --git a/tests/auto/tools/moc/subdir/extradefines.h b/tests/auto/tools/moc/subdir/extradefines.h
new file mode 100644
index 0000000..e7888ce
--- /dev/null
+++ b/tests/auto/tools/moc/subdir/extradefines.h
@@ -0,0 +1 @@
+#define FOO 1
diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp
index fa1b68b..1d6a911 100644
--- a/tests/auto/tools/moc/tst_moc.cpp
+++ b/tests/auto/tools/moc/tst_moc.cpp
@@ -552,6 +552,8 @@ private slots:
void frameworkSearchPath();
void cstyleEnums();
void defineMacroViaCmdline();
+ void defineMacroViaForcedInclude();
+ void defineMacroViaForcedIncludeRelative();
void specifyMetaTagsFromCmdline();
void invokable();
void singleFunctionKeywordSignalAndSlot();
@@ -1219,6 +1221,46 @@ void tst_Moc::defineMacroViaCmdline()
#endif
}
+void tst_Moc::defineMacroViaForcedInclude()
+{
+#if defined(Q_OS_LINUX) && defined(Q_CC_GNU) && !defined(QT_NO_PROCESS)
+ QProcess proc;
+
+ QStringList args;
+ args << "--include" << m_sourceDirectory + QLatin1String("/subdir/extradefines.h");
+ args << m_sourceDirectory + QStringLiteral("/macro-on-cmdline.h");
+
+ proc.start(m_moc, args);
+ QVERIFY(proc.waitForFinished());
+ QCOMPARE(proc.exitCode(), 0);
+ QCOMPARE(proc.readAllStandardError(), QByteArray());
+ QByteArray mocOut = proc.readAllStandardOutput();
+ QVERIFY(!mocOut.isEmpty());
+#else
+ QSKIP("Only tested on linux/gcc");
+#endif
+}
+
+void tst_Moc::defineMacroViaForcedIncludeRelative()
+{
+#if defined(Q_OS_LINUX) && defined(Q_CC_GNU) && !defined(QT_NO_PROCESS)
+ QProcess proc;
+
+ QStringList args;
+ args << "--include" << QStringLiteral("extradefines.h") << "-I" + m_sourceDirectory + "/subdir";
+ args << m_sourceDirectory + QStringLiteral("/macro-on-cmdline.h");
+
+ proc.start(m_moc, args);
+ QVERIFY(proc.waitForFinished());
+ QCOMPARE(proc.exitCode(), 0);
+ QCOMPARE(proc.readAllStandardError(), QByteArray());
+ QByteArray mocOut = proc.readAllStandardOutput();
+ QVERIFY(!mocOut.isEmpty());
+#else
+ QSKIP("Only tested on linux/gcc");
+#endif
+}
+
// tst_Moc::specifyMetaTagsFromCmdline()
// plugin_metadata.h contains a plugin which we register here. Since we're not building this
// application as a plugin, we need top copy some of the initializer code found in qplugin.h:
--
1.9.3

View File

@ -6,7 +6,10 @@
#ifndef QCONFIG_MULTILIB_H
#define QCONFIG_MULTILIB_H
#ifndef __WORDSIZE
#include <bits/wordsize.h>
#endif
#if __WORDSIZE == 32
#include "QtCore/qconfig-32.h"

View File

@ -1,7 +0,0 @@
#!/bin/bash
# run process through valgrind instead
DIRNAME=$(dirname $0)
set -x
valgrind ${DIRNAME}/qdoc.orig $@

View File

@ -0,0 +1,10 @@
--- qtbase-opensource-src-5.6.0-rc/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp.orig 2016-02-15 11:27:10.714918086 +0100
+++ qtbase-opensource-src-5.6.0-rc/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp 2016-02-15 11:52:11.843978315 +0100
@@ -38,6 +38,7 @@
#include "qtouchdevice.h"
#include <qpa/qwindowsysteminterface.h>
#include <QDebug>
+#include <cmath>
#ifdef XCB_USE_XINPUT2

View File

@ -1,45 +0,0 @@
From b0b08cc0e4e38504d6b833702f7477aee4e2a192 Mon Sep 17 00:00:00 2001
From: Ralf Jung <post@ralfj.de>
Date: Sun, 5 Jul 2015 12:15:29 +0200
Subject: [PATCH] When a screen comes back online, the windows need to be told
about it
On my system, this fixes the misbehavior of Qt applications when the (only) active screen is
switched, e.g. from an external screen to the laptop.
This behavior is caused by the screen() of widgets to be set to NULL when their screen goes away.
When a new screen comes online, the widgets *should* be told about it, but they are not. The only
place that "maybeSetScreen" is called is when an existing screen changes its geometry, but not
when a screen gets enabled without its geometry being affected in any way (e.g. because it was
just disabled via xrandr, but has been connected all along). This makes sure that "maybeSetScreen"
is also called when a screen gets enabled.
Task-number: QTBUG-47041
Change-Id: Ic72d6beaa544bf9a4efdbea0830b1bc0d6ce5362
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
---
src/plugins/platforms/xcb/qxcbconnection.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index 74f48b0..0867615 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -252,6 +252,14 @@ void QXcbConnection::updateScreens(const xcb_randr_notify_event_t *event)
otherScreen->addVirtualSibling(screen);
m_screens << screen;
QXcbIntegration::instance()->screenAdded(screen, screen->isPrimary());
+
+ // Windows which had null screens have already had expose events by now.
+ // They need to be told the screen is back, it's OK to render.
+ foreach (QWindow *window, QGuiApplication::topLevelWindows()) {
+ QXcbWindow *xcbWin = static_cast<QXcbWindow*>(window->handle());
+ if (xcbWin)
+ xcbWin->maybeSetScreen(screen);
+ }
}
// else ignore disabled screens
} else if (screen) {
--
2.3.5

View File

@ -1,11 +1,6 @@
# See http://bugzilla.redhat.com/223663
%define multilib_archs x86_64 %{ix86} ppc64 ppc s390x s390 sparc64 sparcv9 ppc64le
%define multilib_basearchs x86_64 ppc64 s390x sparc64 ppc64le
# use valgrind to debug qdoc HTML generation
%ifarch %{ix86} x86_64 ppc ppc64 ppc64le s390x armv7hl aarch64
%global valgrind 1
%endif
%define multilib_archs x86_64 %{ix86} ppc64 ppc s390x s390 sparc64 sparcv9
%define multilib_basearchs x86_64 ppc64 s390x sparc64
# support qtchooser (adds qtchooser .conf file)
%define qtchooser 1
@ -21,37 +16,47 @@
%global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
## set to 1 to enable bootstrap
#global bootstrap 1
%global bootstrap 0
%if 0%{?fedora} > 21
# use external qt_settings pkg
%global qt_settings 1
%endif
# See http://bugzilla.redhat.com/1279265
%if 0%{?fedora} < 24
%global inject_optflags 1
%endif
%if 0%{?fedora} > 23
%global journald -journald
%endif
# define to build docs, need to undef this for bootstrapping
# where qt5-qttools builds are not yet available
# only primary archs (for now), allow secondary to bootstrap
%if ! 0%{?bootstrap}
%ifarch %{arm} %{ix86} x86_64
%ifarch %{arm} %{ix86} x86_64 %{power64} s390 s390x aarch64
%define docs 1
%endif
%endif
%define examples 1
## define prerelease rc1
#define prerelease rc
Summary: Qt5 - QtBase components
Name: qt5-qtbase
Version: 5.5.1
Release: 8%{?dist}
Version: 5.6.0
Release: 2%{?prerelease:.%{prerelease}}%{?dist}
# See LGPL_EXCEPTIONS.txt, for exception details
License: LGPLv2 with exceptions or GPLv3 with exceptions
Url: http://qt-project.org/
Source0: http://download.qt.io/official_releases/qt/5.5/%{version}%{?prerelease:-%{prerelease}}/submodules/%{qt_module}-opensource-src-%{version}%{?prerelease:-%{prerelease}}.tar.xz
Source0: http://download.qt.io/official_releases/qt/5.6/%{version}%{?prerelease:-%{prerelease}}/submodules/%{qt_module}-opensource-src-%{version}%{?prerelease:-%{prerelease}}.tar.xz
Source2: qdoc.valgrind
# https://bugzilla.redhat.com/show_bug.cgi?id=1227295
Source1: qtlogging.ini
# header file to workaround multilib issue
# https://bugzilla.redhat.com/show_bug.cgi?id=1036956
@ -61,12 +66,6 @@ Source5: qconfig-multilib.h
# QT_XCB_FORCE_SOFTWARE_OPENGL for them
Source6: 10-qt5-check-opengl2.sh
# support the old version of libxcb and the resulting lack of libxkbcommon-x11
# in F19 and F20
Patch0: qtbase-opensource-src-5.4.0-rc-old_xcb.patch
# support the old version of libxkbcommon in F19
Patch1: qtbase-opensource-src-5.4.0-rc-old_xkbcommon.patch
# support multilib optflags
Patch2: qtbase-multilib_optflags.patch
@ -76,29 +75,45 @@ Patch4: qtbase-opensource-src-5.3.2-QTBUG-35459.patch
# unconditionally enable freetype lcdfilter support
Patch12: qtbase-opensource-src-5.2.0-enable_ft_lcdfilter.patch
# hack out largely useless (to users) warnings about qdbusconnection
# (often in kde apps), keep an eye on https://git.reviewboard.kde.org/r/103699/
Patch25: qtbase-opensource-src-5.5.1-qdbusconnection_no_debug.patch
# upstreamable patches
# support poll
# https://bugreports.qt-project.org/browse/QTBUG-27195
# NEEDS REBASE
Patch50: qt5-poll.patch
# Qt5 application crashes when connecting/disconnecting displays
# https://bugzilla.redhat.com/show_bug.cgi?id=1083664
Patch51: qtbase-opensource-src-5.5-disconnect_displays.patch
# Followup https://codereview.qt-project.org/#/c/138201/ adapted for 5.5
Patch52: https://smani.fedorapeople.org/138201.patch
# Workaround moc/multilib issues
# https://bugzilla.redhat.com/show_bug.cgi?id=1290020
# https://bugreports.qt.io/browse/QTBUG-49972
Patch52: qtbase-opensource-src-5.6.0-moc_WORDSIZE.patch
## upstream patches
# workaround https://bugreports.qt-project.org/browse/QTBUG-43057
# 'make docs' crash on el6, use qSort instead of std::sort
Patch100: qtbase-opensource-src-5.4.0-QTBUG-43057.patch
# correct check for alsa-1.1
Patch53: qtbase-opensource-src-5.6.0-alsa-1.1.patch
# arm patch
Patch54: qtbase-opensource-src-5.6.0-arm.patch
# https://codereview.qt-project.org/#/c/151496/
Patch55: QTBUG-51648-QtDBus-clean-up-signal-hooks-and-object-tree-in-clos.patch
# https://codereview.qt-project.org/#/c/151340/
Patch56: QTBUG-51649-QtDBus-finish-all-pending-call-with-error-if-disconn.patch
# https://codereview.qt-project.org/#/c/151459/
Patch57: QTBUG-51676-Fix-QtDBus-deadlock-inside-kded-kiod.patch
# Epel patches
Patch100: qt5-qtbase-5.6.0-el6-sqrt.patch
# recently passed code review, not integrated yet
# https://codereview.qt-project.org/126102/
Patch150: moc-get-the-system-defines-from-the-compiler-itself.patch
# Item views, https://bugreports.qt.io/browse/QTBUG-48870
Patch176: 0076-QListView-fix-skipping-indexes-in-selectedIndexes.patch
# macros, be mindful to keep sync'd with macros.qt5
Source1: macros.qt5
Source10: macros.qt5
%define _qt5 %{name}
%define _qt5_prefix %{_libdir}/qt5
%define _qt5_archdatadir %{_libdir}/qt5
@ -125,10 +140,6 @@ Source1: macros.qt5
# RPM drag in gtk2 as a dependency for the GTK+ 2 dialog support.
%global __requires_exclude_from ^%{_qt5_plugindir}/platformthemes/.*$
# for doc hacks
%if 0%{?valgrind}
BuildRequires: valgrind
%endif
# for %%check
BuildRequires: cmake
BuildRequires: cups-devel
@ -148,55 +159,37 @@ BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gtk+-2.0)
BuildRequires: pkgconfig(libproxy-1.0)
# xcb-sm
BuildRequires: pkgconfig(ice) pkgconfig(sm)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(NetworkManager)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(libpulse) pkgconfig(libpulse-mainloop-glib)
%if 0%{?fedora}
%global xkbcommon -system-xkbcommon
%if 0%{?fedora} > 20
# libinput is currently f21+ only
%global libinput 1
BuildRequires: pkgconfig(libinput)
BuildRequires: pkgconfig(xcb-xkb) >= 1.10
BuildRequires: pkgconfig(xkbcommon) >= 0.4.1
BuildRequires: pkgconfig(xkbcommon-x11) >= 0.4.1
%else
# apply patch to support older version of xcb, resulting lack of xkbcommon-x11
%global old_xcb 1
%if 0%{?fedora} > 19
# Fedora 20
BuildRequires: pkgconfig(xkbcommon) >= 0.4.1
%global xkbcommon_version %(pkg-config --modversion xkbcommon 2> /dev/null || echo '0.4.1')
Requires: libxkbcommon%{?_isa} >= %{xkbcommon_version}
%else
# Fedora 19 and older
BuildRequires: pkgconfig(xkbcommon)
# apply patch to support older version of xkbcommon
%global old_xkbcommon 1
%endif
%endif
%else
# not Fedora
%if 0%{?rhel} == 6
%global xcb -qt-xcb
%endif
%global xkbcommon -qt-xkbcommon
Provides: bundled(libxkbcommon) = 0.4.1
%endif
BuildRequires: pkgconfig(xkeyboard-config)
%if 0%{?fedora} || 0%{?rhel} > 6
%define egl 1
BuildRequires: pkgconfig(atspi-2)
BuildRequires: pkgconfig(egl)
BuildRequires: pkgconfig(gbm)
BuildRequires: pkgconfig(glesv2)
%global sqlite -system-sqlite
BuildRequires: pkgconfig(sqlite3) >= 3.7
%define sqlite -system-sqlite
%if 0%{?fedora} > 20
BuildRequires: pkgconfig(harfbuzz) >= 0.9.31
%define harfbuzz -system-harfbuzz
%endif
%global harfbuzz -system-harfbuzz
BuildRequires: pkgconfig(harfbuzz) >= 1.0.6
BuildRequires: pkgconfig(icu-i18n)
BuildRequires: pkgconfig(libpcre) >= 8.30
%define pcre -system-pcre
@ -207,7 +200,11 @@ BuildRequires: libicu-devel
%endif
BuildRequires: pkgconfig(xcb) pkgconfig(xcb-glx) pkgconfig(xcb-icccm) pkgconfig(xcb-image) pkgconfig(xcb-keysyms) pkgconfig(xcb-renderutil)
BuildRequires: pkgconfig(zlib)
BuildRequires: sed
# For the very first bootstrap of 5.6 we need valgring for now, as qt5-qdoc brand new
# splitted package script still using it
%ifnarch s390
BuildRequires: valgrind
%endif
%if 0%{?qtchooser}
%if 0%{?fedora}
@ -227,13 +224,6 @@ Requires: %{name}-common = %{version}-%{release}
%define tds -no-sql-tds
%endif
# workaround gold linker bug by not using it
# https://bugzilla.redhat.com/show_bug.cgi?id=1193044
#https://sourceware.org/bugzilla/show_bug.cgi?id=16992
%if 0%{?fedora} > 21
%define use_gold_linker -no-use-gold-linker
%endif
%description
Qt is a software toolkit for developing applications.
@ -251,11 +241,11 @@ BuildArch: noarch
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}-gui%{?_isa}
Requires: qt5-qdoc
%if 0%{?egl}
Requires: pkgconfig(egl)
%endif
Requires: pkgconfig(gl)
Requires: qt5-rpm-macros
%description devel
%{summary}.
@ -265,6 +255,7 @@ Summary: API documentation for %{name}
License: GFDL
Requires: %{name} = %{version}-%{release}
BuildRequires: qt5-qhelpgenerator
BuildRequires: qt5-qdoc
BuildArch: noarch
%description doc
%{summary}.
@ -281,6 +272,10 @@ Summary: Static library files for %{name}
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
Requires: pkgconfig(fontconfig)
Requires: pkgconfig(glib-2.0)
%if 0%{?fedora}
Requires: pkgconfig(libinput)
Requires: pkgconfig(xkbcommon)
%endif
Requires: pkgconfig(zlib)
%description static
%{summary}.
@ -339,43 +334,57 @@ Requires: glx-utils
%description gui
Qt5 libraries used for drawing widgets and OpenGL items.
%package -n qt5-qdoc
Summary: Qt5 documentation generator
Requires: %{name}%{?_isa} >= %{version}-%{release}
%description -n qt5-qdoc
%{summary}.
%package -n qt5-rpm-macros
Summary: RPM macros for Qt5
%if 0%{?fedora} > 22 && 0%{?inject_optflags}
# https://bugzilla.redhat.com/show_bug.cgi?id=1248174
Requires: redhat-rpm-config
%endif
# when qt5-rpm-macros was split out
Conflicts: qt5-qtbase-devel < 5.6.0-0.23
BuildArch: noarch
%description -n qt5-rpm-macros
RPM macros for building Qt5 packages.
%prep
%setup -q -n %{qt_module}-opensource-src-%{version}%{?prerelease:-%{prerelease}}
%if 0%{?old_xcb}
%patch0 -p1 -b .old_xcb
%if 0%{?old_xkbcommon}
%patch1 -p1 -b .old_xkbcommon
%patch4 -p1 -b .QTBUG-35459
%patch12 -p1 -b .enable_ft_lcdfilter
%patch52 -p1 -b .moc_WORDSIZE
%patch53 -p1 -b .alsa1.1
%patch54 -p1 -b .arm
%patch55 -p1 -b .QTBUG-51648
## FTBFS, omit for now
%patch56 -p1 -b .QTBUG-51649
%patch57 -p1 -b .QTBUG-51676
%patch100 -p1 -b .sqrt
%patch150 -p1 -b .moc_system_defines
%patch176 -p1 -b .0076
## adjust $RPM_OPT_FLAGS
# remove -fexceptions
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'`
# add -fno-delete-null-pointer-checks for f24/gcc6
%if 0%{?fedora} > 23
QT5_RPM_OPT_FLAGS="-fno-delete-null-pointer-checks -Wno-deprecated-declaration"
RPM_OPT_FLAGS="$RPM_OPT_FLAGS $QT5_RPM_OPT_FLAGS"
%ifarch armv7hl
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -mfpu=neon"
%endif
%endif
%define platform linux-g++
%if 0%{?inject_optflags}
%patch2 -p1 -b .multilib_optflags
# drop backup file(s), else they get installed too, http://bugzilla.redhat.com/639463
rm -fv mkspecs/linux-g++*/qmake.conf.multilib-optflags
%patch4 -p1 -b .QTBUG-35459
%patch12 -p1 -b .enable_ft_lcdfilter
%patch25 -p1 -b .qdbusconnection_no_debug
#patch50 -p1 -b .poll
%patch51 -p1 -b .disconnect_displays
%patch52 -p1 -b .138201
%if 0%{?rhel} == 6
%patch100 -p1 -b .QTBUG-43057
%endif
# drop -fexceptions from $RPM_OPT_FLAGS
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'`
%define platform linux-g++
sed -i -e "s|-O2|$RPM_OPT_FLAGS|g" \
mkspecs/%{platform}/qmake.conf
@ -384,14 +393,22 @@ sed -i -e "s|^\(QMAKE_LFLAGS_RELEASE.*\)|\1 $RPM_LD_FLAGS|" \
# undefine QMAKE_STRIP (and friends), so we get useful -debuginfo pkgs (#1065636)
sed -i -e 's|^\(QMAKE_STRIP.*=\).*$|\1|g' mkspecs/common/linux.conf
%endif
%if 0%{?prerelease}
bin/syncqt.pl -version %{version}
%endif
# move some bundled libs to ensure they're not accidentally used
pushd src/3rdparty
mkdir UNUSED
mv freetype libjpeg libpng zlib xcb UNUSED/
mv freetype libjpeg libpng zlib UNUSED/
%if "%{?sqlite}" == "-system-sqlite"
mv sqlite UNUSED/
%endif
%if "%{?xcb}" != "-qt-xcb"
mv xcb UNUSED/
%endif
popd
# builds failing mysteriously on f20
@ -401,7 +418,23 @@ test -x configure || chmod +x configure
%build
# limit -reduce-relocations to %%ix86 x86_64 archs, https://bugreports.qt-project.org/browse/QTBUG-36129
## adjust $RPM_OPT_FLAGS
# remove -fexceptions
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'`
# add -fno-delete-null-pointer-checks for f24/gcc6
%if 0%{?fedora} > 23
QT5_RPM_OPT_FLAGS="-fno-delete-null-pointer-checks -Wno-deprecated-declaration"
RPM_OPT_FLAGS="$RPM_OPT_FLAGS $QT5_RPM_OPT_FLAGS"
%ifarch armv7hl
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -mfpu=neon"
%endif
%endif
export CFLAGS="$CFLAGS $RPM_OPT_FLAGS"
export CXXFLAGS="$CXXFLAGS $RPM_OPT_FLAGS"
export LDFLAGS="$LDFLAGS $RPM_LD_FLAGS"
export MAKEFLAGS="%{?_smp_mflags}"
./configure -v \
-confirm-license \
-opensource \
@ -422,13 +455,14 @@ test -x configure || chmod +x configure
-release \
-shared \
-accessibility \
%{?dbus}%{!?dbus:-dbus} \
%{?dbus}%{!?dbus:-dbus-runtime} \
-fontconfig \
-glib \
-gtkstyle \
%{?ibase} \
-iconv \
-icu \
%{?journald} \
-openssl-linked \
-optimized-qmake \
%{!?examples:-nomake examples} \
@ -440,40 +474,35 @@ test -x configure || chmod +x configure
-no-sse2 \
%endif
-no-strip \
%ifarch %{ix86} x86_64
-reduce-relocations \
%endif
%{?harfbuzz} \
-system-libjpeg \
-system-libpng \
%{?harfbuzz} \
%{?pcre} \
%{?sqlite} \
%{?tds} \
%{?xcb} \
%{?xkbcommon} \
-system-zlib \
%{?use_gold_linker} \
-no-directfb
%if ! 0%{?inject_optflags}
# ensure qmake build using optflags (which can happen if not munging qmake.conf defaults)
make clean -C qmake
make %{?_smp_mflags} -C qmake \
QMAKE_CFLAGS_RELEASE="${CFLAGS:-$RPM_OPT_FLAGS}" \
QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS:-$RPM_OPT_FLAGS}" \
QMAKE_LFLAGS_RELEASE="${LDFLAGS:-$RPM_LD_FLAGS}" \
QMAKE_STRIP=
%endif
make %{?_smp_mflags}
%if 0%{?docs}
# qdoc
# wierd but necessary, to force use of just-built qdoc
rm -fv qmake/Makefile.qmake-docs src/corelib/Makefile
pushd src; ../bin/qmake; make sub-qdoc; popd
pushd src/corelib; ../../bin/qmake; popd
pushd src/xml; ../../bin/qmake; popd
# HACK to avoid multilib conflicts in noarch content
# see also https://bugreports.qt-project.org/browse/QTBUG-42071
QT_HASH_SEED=0; export QT_HASH_SEED
%if 0%{?valgrind}
make html_docs || (\
mv bin/qdoc bin/qdoc.orig && install %{SOURCE2} bin/qdoc && \
make html_docs)
[ -e bin/qdoc/orig ] && mv bin/qdoc.orig bin/qdoc -f
%else
make html_docs
%endif
make qch_docs
%endif
@ -485,6 +514,8 @@ make install INSTALL_ROOT=%{buildroot}
make install_docs INSTALL_ROOT=%{buildroot}
%endif
install -m644 -p -D %{SOURCE1} %{buildroot}%{_qt5_datadir}/qtlogging.ini
# Qt5.pc
cat >%{buildroot}%{_libdir}/pkgconfig/Qt5.pc<<EOF
prefix=%{_qt5_prefix}
@ -507,17 +538,19 @@ translationdir=%{_qt5_translationdir}
Name: Qt5
Description: Qt5 Configuration
Version: 5.5.1
Version: 5.6.0
EOF
# rpm macros
install -p -m644 -D %{SOURCE1} \
install -p -m644 -D %{SOURCE10} \
%{buildroot}%{rpm_macros_dir}/macros.qt5
sed -i \
-e "s|@@NAME@@|%{name}|g" \
-e "s|@@EPOCH@@|%{?epoch}%{!?epoch:0}|g" \
-e "s|@@VERSION@@|%{version}|g" \
-e "s|@@EVR@@|%{?epoch:%{epoch:}}%{version}-%{release}|g" \
-e "s|@@QT5_RPM_LD_FLAGS@@|$QT5_RPM_LD_FLAGS|g" \
-e "s|@@QT5_RPM_OPT_FLAGS@@|$QT5_RPM_OPT_FLAGS|g" \
%{buildroot}%{rpm_macros_dir}/macros.qt5
# create/own dirs
@ -538,10 +571,6 @@ for i in * ; do
;;
esac
done
# purge use of /usr/bin/env
sed -i \
-e "s|^#!/usr/bin/env perl|#!/usr/bin/perl|g" \
*.pl ||:
popd
%ifarch %{multilib_archs}
@ -632,7 +661,8 @@ fi
%endif
%files
%doc LICENSE.LGPL* LGPL_EXCEPTION.txt LICENSE.FDL
%{!?_licensedir:%global license %%doc}
%license LICENSE.LGPL* LGPL_EXCEPTION.txt LICENSE.FDL
%if 0%{?qtchooser}
%dir %{_sysconfdir}/xdg/qtchooser
# not editable config files, so not using %%config here
@ -667,6 +697,7 @@ fi
%{_qt5_translationdir}/
%dir %{_qt5_prefix}/
%dir %{_qt5_datadir}/
%{_qt5_datadir}/qtlogging.ini
%dir %{_qt5_libexecdir}/
%dir %{_qt5_plugindir}/
%dir %{_qt5_plugindir}/bearer/
@ -695,13 +726,14 @@ fi
%if 0%{?docs}
%files doc
%doc LICENSE.FDL
%license LICENSE.FDL
%doc dist/README dist/changes-5.*
%{_qt5_docdir}/*.qch
%{_qt5_docdir}/qdoc/
%if 0%{?examples}
%if 0%{!?bootstrap}
# included in -examples instead, see bug #1212750
%exclude %{_qt5_docdir}/qdoc/examples-manifest.xml
%exclude %{_qt5_docdir}/*/examples-manifest.xml
%endif
%endif
%{_qt5_docdir}/qmake/
%{_qt5_docdir}/qtconcurrent/
@ -719,7 +751,6 @@ fi
%endif
%files devel
%{rpm_macros_dir}/macros.qt5
%if "%{_qt5_bindir}" != "%{_bindir}"
%dir %{_qt5_bindir}
%endif
@ -731,6 +762,7 @@ fi
%{_bindir}/syncqt*
%{_bindir}/uic*
%{_bindir}/qlalr
%{_bindir}/fixqt4headers.pl
%{_qt5_bindir}/moc*
%{_qt5_bindir}/qdbuscpp2xml*
%{_qt5_bindir}/qdbusxml2cpp*
@ -739,6 +771,7 @@ fi
%{_qt5_bindir}/syncqt*
%{_qt5_bindir}/uic*
%{_qt5_bindir}/qlalr
%{_qt5_bindir}/fixqt4headers.pl
%if "%{_qt5_headerdir}" != "%{_includedir}"
%dir %{_qt5_headerdir}
%endif
@ -806,19 +839,16 @@ fi
%{_qt5_libdir}/pkgconfig/Qt5Sql.pc
%{_qt5_libdir}/pkgconfig/Qt5Test.pc
%{_qt5_libdir}/pkgconfig/Qt5Widgets.pc
%{_qt5_libdir}/pkgconfig/Qt5XcbQpa.pc
%{_qt5_libdir}/pkgconfig/Qt5Xml.pc
%if 0%{?egl}
%{_qt5_libdir}/libQt5EglDeviceIntegration.prl
%{_qt5_libdir}/libQt5EglDeviceIntegration.so
%{_qt5_libdir}/pkgconfig/Qt5EglDeviceIntegration.pc
%endif
%files static
%{_qt5_libdir}/libQt5Bootstrap.*a
%{_qt5_libdir}/libQt5Bootstrap.prl
%{_qt5_libdir}/pkgconfig/Qt5Bootstrap.pc
%{_qt5_headerdir}/QtOpenGLExtensions/
%{_qt5_libdir}/libQt5OpenGLExtensions.*a
%{_qt5_libdir}/libQt5OpenGLExtensions.prl
@ -827,13 +857,11 @@ fi
%{_qt5_headerdir}/QtPlatformSupport/
%{_qt5_libdir}/libQt5PlatformSupport.*a
%{_qt5_libdir}/libQt5PlatformSupport.prl
%{_qt5_libdir}/pkgconfig/Qt5PlatformSupport.pc
%if 0%{?examples}
%files examples
%if 0%{?docs}
%dir %{_qt5_docdir}/qdoc/
%{_qt5_docdir}/qdoc/examples-manifest.xml
%if 0%{!?bootstrap}
%{_qt5_docdir}/*/examples-manifest.xml
%endif
%{_qt5_examplesdir}/
%endif
@ -878,7 +906,7 @@ fi
%{_qt5_plugindir}/generic/libqevdevmouseplugin.so
%{_qt5_plugindir}/generic/libqevdevtabletplugin.so
%{_qt5_plugindir}/generic/libqevdevtouchplugin.so
%if 0%{?libinput}
%if 0%{?fedora}
%{_qt5_plugindir}/generic/libqlibinputplugin.so
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QLibInputPlugin.cmake
%endif
@ -926,30 +954,169 @@ fi
%{_qt5_plugindir}/printsupport/libcupsprintersupport.so
%{_qt5_libdir}/cmake/Qt5PrintSupport/Qt5PrintSupport_QCupsPrinterSupportPlugin.cmake
%files -n qt5-qdoc
%{_bindir}/qdoc*
%{_qt5_bindir}/qdoc*
%files -n qt5-rpm-macros
%{rpm_macros_dir}/macros.qt5
%changelog
* Tue Mar 15 2016 Rex Dieter <rdieter@fedoraproject.org> 5.6.0-2
- respin QTBUG-51767 patch
* Mon Mar 14 2016 Helio Chissini de Castro <helio@kde.org> - 5.6.0-1
- 5.6.0 release
* Sat Mar 12 2016 Rex Dieter <rdieter@fedoraproject.org> 5.6.0-0.41.rc
- %%build: restore -dbus-linked
* Fri Mar 11 2016 Rex Dieter <rdieter@fedoraproject.org> 5.6.0-0.40.rc
- respin QTBUG-51649 patch
- %%build: use -dbus-runtime unconditionally
- drop (unused) build deps: atspi, dbus, networkmanager
* Thu Mar 10 2016 Rex Dieter <rdieter@fedoraproject.org> 5.6.0-0.39.rc
- candidate fixes for various QtDBus deadlocks (QTBUG-51648,QTBUG-51676)
* Mon Mar 07 2016 Rex Dieter <rdieter@fedoraproject.org> 5.6.0-0.38.rc
- backport "crash on start if system bus is not available" (QTBUG-51299)
* Sat Mar 05 2016 Rex Dieter <rdieter@fedoraproject.org> 5.6.0-0.37.rc
- %build: ./configure -journal (f24+)
* Wed Mar 02 2016 Daniel Vrátil <dvratil@fedoraproject.org> 5.6.0-0.36.rc
- Non-bootstrapped build
* Tue Mar 01 2016 Daniel Vrátil <dvratil@fedoraproject.org> 5.6.0-0.35.rc
- Rebuild against new openssl
* Fri Feb 26 2016 Rex Dieter <rdieter@fedoraproject.org> 5.6.0-0.34.rc
- qtlogging.ini: remove comments
* Thu Feb 25 2016 Rex Dieter <rdieter@fedoraproject.org> 5.6.0-0.33.rc
- ship $$[QT_INSTALL_DATA]/qtlogging.ini for packaged logging defaults (#1227295)
* Thu Feb 25 2016 Rex Dieter <rdieter@fedoraproject.org> 5.6.0-0.32.rc
- qt5-qtbase-static missing dependencies (#1311311)
* Wed Feb 24 2016 Rex Dieter <rdieter@fedoraproject.org> 5.6.0-0.31.rc
- Item views don't handle insert/remove of rows robustly (QTBUG-48870)
* Tue Feb 23 2016 Helio Chissini de Castro <helio@kde.org> - 5.6.0-0.30.rc
- Update to final RC
* Mon Feb 22 2016 Helio Chissini de Castro <helio@kde.org> - 5.6.0-0.29.rc
- Update tarball with https://bugreports.qt.io/browse/QTBUG-50703 fix
* Wed Feb 17 2016 Than Ngo <than@redhat.com> - 5.6.0-0.28.rc
- fix build issue with gcc6
* Mon Feb 15 2016 Helio Chissini de Castro <helio@kde.org> - 5.6.0-0.27.rc
- Update proper tarball. Need avoid the fix branch
* Mon Feb 15 2016 Helio Chissini de Castro <helio@kde.org> - 5.6.0-0.26.rc
- Integrate rc releases now.
* Sat Feb 13 2016 Rex Dieter <rdieter@fedoraproject.org> 5.6.0-0.25.beta
- macros.qt5: fix %%qt5_ldflags macro
* Thu Feb 11 2016 Than Ngo <than@redhat.com> - 5.6.0-0.24.beta
- fix build issue with gcc6
- fix check for alsa 1.1.x
* Wed Feb 03 2016 Rex Dieter <rdieter@fedoraproject.org> 5.6.0-0.23.beta
- qt5-rpm-macros pkg
* Tue Feb 02 2016 Rex Dieter <rdieter@fedoraproject.org> 5.6.0-0.22.beta
- don't inject $RPM_OPT_FLAGS/$RPM_LD_FLAGS into qmake defaults f24+ (#1279265)
* Tue Feb 02 2016 Rex Dieter <rdieter@fedoraproject.org> 5.6.0-0.21.beta
- build with and add to macros.qt5 flags: -fno-delete-null-pointer-checks
* Fri Jan 15 2016 Than Ngo <than@redhat.com> - 5.6.0-0.20.beta
- enable -qt-xcb to fix non-US keys under VNC (#1295713)
* Mon Jan 04 2016 Rex Dieter <rdieter@fedoraproject.org> 5.6.0-0.19.beta
- Crash in QXcbWindow::setParent() due to NULL xcbScreen (QTBUG-50081, #1291003)
* Mon Dec 21 2015 Rex Dieter <rdieter@fedoraproject.org> 5.6.0-0.17.beta
- fix/update Release: tag
* Fri Dec 18 2015 Rex Dieter <rdieter@fedoraproject.org> 5.6.0-0.16
- 5.6.0-beta (final)
* Wed Dec 16 2015 Rex Dieter <rdieter@fedoraproject.org> - 5.6.0-0.15
- pull in another upstream moc fix/improvement (#1290020,QTBUG-49972)
- fix bootstrap/docs
* Wed Dec 16 2015 Rex Dieter <rdieter@fedoraproject.org> 5.6.0-0.13
- workaround moc/qconfig-multilib issues (#1290020,QTBUG-49972)
* Wed Dec 16 2015 Peter Robinson <pbrobinson@fedoraproject.org> 5.6.0-0.12
- aarch64 is secondary arch too
- ppc64le is NOT multilib
- Fix Power 64 macro use
* Mon Dec 14 2015 Than Ngo <than@redhat.com> - 5.6.0-0.11
- fix build failure on secondary arch
* Sun Dec 13 2015 Helio Chissini de Castro <helio@kde.org> - 5.6.0-0.10
- We're back to gold linker
- Remove reduce relocations
* Sat Dec 12 2015 Rex Dieter <rdieter@fedoraproject.org> 5.6.0-0.9
- drop disconnect_displays.patch so we can better test latest xcb/display work
* Fri Dec 11 2015 Rex Dieter <rdieter@fedoraproject.org> 5.6.0-0.8
- sync latest xcb/screen/display related upstream commits
* Thu Dec 10 2015 Helio Chissini de Castro <helio@kde.org> - 5.6.0-0.7
- Official beta release
* Thu Dec 10 2015 Helio Chissini de Castro <helio@kde.org> - 5.6.0-0.6
- Official beta release
* Wed Dec 09 2015 Daniel Vratil <dvratil@fedoraproject.org> - 5.6.0-0.5
- try reverting from -optimized-tools to -optimized-qmake
* Sun Dec 06 2015 Rex Dieter <rdieter@fedoraproject.org> - 5.6.0-0.4
- re-introduce bootstrap/examples macros
- put examples-manifest.xml in -examples
- restore -doc multilib hack (to be on the safe side, can't hurt)
- %%build: s/-optimized-qmake/-optimized-tools/
* Sat Dec 05 2015 Helio Chissini de Castro <helio@kde.org> - 5.6.0-0.3
- Beta 3
- Reintroduce xcb patch from https://codereview.qt-project.org/#/c/138201/
* Fri Nov 27 2015 Helio Chissini de Castro <helio@kde.org> - 5.6.0-0.2
- Valgrind still needed as buildreq due recent split qdoc package, but we can get rid of
specific arch set.
- Added missing libproxy buildreq
- Epel and RHEL doesn't have libinput, so a plugin need to be excluded for this distros
* Wed Nov 25 2015 Rex Dieter <rdieter@fedoraproject.org> 5.5.1-10
- -devel: Requires: redhat-rpm-config (#1248174)
* Wed Nov 18 2015 Helio Chissini de Castro <helio@kde.org> - 5.5.1-9
- Get rid of valgrind hack. It sort out that we don't need it anymore (#1211203)
* Mon Nov 09 2015 Helio Chissini de Castro <helio@kde.org> - 5.5.1-8
- qt5-qdoc need requires >= current version, otherwise will prevent the usage further when moved to qttools
* Mon Nov 09 2015 Rex Dieter <rdieter@fedoraproject.org> 5.5.1-7
- qt5-qdoc subpkg
* Tue Nov 03 2015 Helio Chissini de Castro <helio@kde.org> - 5.6.0-0.1
- Start to implement 5.6.0 beta
* Tue Nov 03 2015 Helio Chissini de Castro <helio@kde.org> - 5.6.0-0.1
- Start to implement 5.6.0 beta
* Wed Oct 28 2015 David Tardon <dtardon@redhat.com> - 5.5.1-6
- full build
* Wed Oct 28 2015 David Tardon <dtardon@redhat.com> - 5.5.1-5
- rebuild for ICU 56.1
* Wed Oct 28 2015 Rex Dieter <rdieter@fedoraproject.org> 5.5.1-4
- purge use of /usr/bin/env
* Sat Oct 24 2015 Rex Dieter <rdieter@fedoraproject.org> 5.5.1-3
- pull in more screen connect/disconnect fixes (code review 138201)
* Thu Oct 15 2015 Helio Chissini de Castro <helio@kde.org> - 5.5.1-2
- Update to final release 5.5.1

View File

@ -1,39 +1,33 @@
diff --git a/mkspecs/linux-g++-32/qmake.conf b/mkspecs/linux-g++-32/qmake.conf
index 340aa85..571a559 100644
--- a/mkspecs/linux-g++-32/qmake.conf
+++ b/mkspecs/linux-g++-32/qmake.conf
@@ -9,6 +9,8 @@ QMAKE_INCREMENTAL_STYLE = sublib
QMAKE_CFLAGS = -m32
QMAKE_LFLAGS = -m32
+QMAKE_CFLAGS_RELEASE += -O2
+
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
diff --git a/mkspecs/linux-g++-64/qmake.conf b/mkspecs/linux-g++-64/qmake.conf
index 36fb6a8..9a07595 100644
--- a/mkspecs/linux-g++-64/qmake.conf
+++ b/mkspecs/linux-g++-64/qmake.conf
@@ -12,6 +12,8 @@ QMAKE_INCREMENTAL_STYLE = sublib
QMAKE_CFLAGS = -m64
QMAKE_LFLAGS = -m64
+QMAKE_CFLAGS_RELEASE += -O2
+
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
diff --git a/mkspecs/linux-g++/qmake.conf b/mkspecs/linux-g++/qmake.conf
index 35bce8f..5186f98 100644
--- a/mkspecs/linux-g++/qmake.conf
+++ b/mkspecs/linux-g++/qmake.conf
@@ -6,6 +6,8 @@ MAKEFILE_GENERATOR = UNIX
diff -r -u a/mkspecs/linux-g++/qmake.conf b/mkspecs/linux-g++/qmake.conf
--- a/mkspecs/linux-g++/qmake.conf 2015-10-30 06:20:01.000000000 -0200
+++ b/mkspecs/linux-g++/qmake.conf 2015-11-05 11:23:23.230741601 -0200
@@ -5,6 +5,7 @@
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
+QMAKE_CFLAGS_RELEASE += -O2
+
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
diff -r -u a/mkspecs/linux-g++-32/qmake.conf b/mkspecs/linux-g++-32/qmake.conf
--- a/mkspecs/linux-g++-32/qmake.conf 2015-10-30 06:20:01.000000000 -0200
+++ b/mkspecs/linux-g++-32/qmake.conf 2015-11-05 11:22:19.761494470 -0200
@@ -10,6 +10,7 @@
QMAKE_CFLAGS = -m32
QMAKE_LFLAGS = -m32
+QMAKE_CFLAGS_RELEASE += -O2
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
diff -r -u a/mkspecs/linux-g++-64/qmake.conf b/mkspecs/linux-g++-64/qmake.conf
--- a/mkspecs/linux-g++-64/qmake.conf 2015-10-30 06:20:01.000000000 -0200
+++ b/mkspecs/linux-g++-64/qmake.conf 2015-11-05 11:22:49.497610248 -0200
@@ -13,6 +13,7 @@
QMAKE_CFLAGS = -m64
QMAKE_LFLAGS = -m64
+QMAKE_CFLAGS_RELEASE += -O2
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)

View File

@ -1,12 +0,0 @@
diff -up qtbase-opensource-src-5.4.0/src/tools/qdoc/qdocindexfiles.cpp.QTBUG-43057 qtbase-opensource-src-5.4.0/src/tools/qdoc/qdocindexfiles.cpp
--- qtbase-opensource-src-5.4.0/src/tools/qdoc/qdocindexfiles.cpp.QTBUG-43057 2014-12-05 10:24:31.000000000 -0600
+++ qtbase-opensource-src-5.4.0/src/tools/qdoc/qdocindexfiles.cpp 2014-12-17 14:47:19.393037164 -0600
@@ -1327,7 +1327,7 @@ void QDocIndexFiles::generateIndexSectio
const InnerNode* inner = static_cast<const InnerNode*>(node);
NodeList cnodes = inner->childNodes();
- std::sort(cnodes.begin(), cnodes.end(), compareNodes);
+ qSort(cnodes.begin(), cnodes.end(), compareNodes);
foreach (Node* child, cnodes) {
generateIndexSections(writer, child, generateInternalNodes);

View File

@ -1,196 +0,0 @@
diff --git a/configure b/configure
index 5ad29bb..7ff0df1 100644
--- a/configure
+++ b/configure
@@ -5060,10 +5060,8 @@ if [ "$CFG_XCB" != "no" ]; then
QMAKE_LIBS_XCB="`$PKG_CONFIG --libs $XCB_PACKAGES 2>/dev/null`"
fi
- # libxcb version 1.10 was the first version that enables xcb-xkb by default,
- # therefore the minimal xcb-xkb version we support is 1.10
CFG_XKB=no
- if $PKG_CONFIG --exists "xcb-xkb >= 1.10" 2>/dev/null; then
+ if $PKG_CONFIG --exists "xcb-xkb" 2>/dev/null; then
QMAKE_CFLAGS_XKB="`$PKG_CONFIG --cflags xcb xcb-xkb 2>/dev/null`"
QMAKE_LIBS_XKB="`$PKG_CONFIG --libs xcb xcb-xkb 2>/dev/null`"
if compileTest qpa/xcb-xkb "xcb-xkb" $QMAKE_CFLAGS_XKB $QMAKE_LIBS_XKB; then
@@ -5172,16 +5170,16 @@ MIN_REQ_XKBCOMMON="0.4.1"
if [ "$CFG_XCB" != "no" ]; then
if [ "$CFG_XKBCOMMON" != "no" ] && [ "$CFG_XKBCOMMON" != "qt" ]; then
# Check if there is a suitable system-wide xkbcommon
- if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xkbcommon xkbcommon-x11 >= $MIN_REQ_XKBCOMMON" 2>/dev/null; then
- QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon xkbcommon-x11 2>/dev/null`"
- QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon xkbcommon-x11 2>/dev/null`"
+ if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xkbcommon >= $MIN_REQ_XKBCOMMON" 2>/dev/null; then
+ QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
+ QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
QMakeVar set QMAKE_CFLAGS_XKBCOMMON "$QMAKE_CFLAGS_XKBCOMMON"
QMakeVar set QMAKE_LIBS_XKBCOMMON "$QMAKE_LIBS_XKBCOMMON"
CFG_XKBCOMMON=system
elif [ "$CFG_XKBCOMMON" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo " xkbcommon support cannot be enabled because either xkbcommon or "
- echo " xkbcommon-x11 >= $MIN_REQ_XKBCOMMON was not found via pkg-config!"
+ echo " xkbcommon support cannot be enabled because xkbcommon"
+ echo " >= $MIN_REQ_XKBCOMMON was not found via pkg-config!"
[ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -force-pkg-config?"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index 5510c3b..4762977 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -1761,7 +1761,7 @@ void QXcbConnection::initializeXKB()
xcb_xkb_use_extension_cookie_t xkb_query_cookie;
xcb_xkb_use_extension_reply_t *xkb_query;
- xkb_query_cookie = xcb_xkb_use_extension(c, XKB_X11_MIN_MAJOR_XKB_VERSION, XKB_X11_MIN_MINOR_XKB_VERSION);
+ xkb_query_cookie = xcb_xkb_use_extension(c, XCB_XKB_MAJOR_VERSION, XCB_XKB_MINOR_VERSION);
xkb_query = xcb_xkb_use_extension_reply(c, xkb_query_cookie, 0);
if (!xkb_query) {
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
index 5fb7457..487c3ba 100644
--- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
@@ -693,50 +693,65 @@ void QXcbKeyboard::updateKeymap()
// log only critical errors, we do our own error logging from printKeymapError()
xkb_context_set_log_level(xkb_context, (xkb_log_level)XKB_LOG_LEVEL_CRITICAL);
}
- // update xkb keymap object
- xkb_keymap_unref(xkb_keymap);
- xkb_keymap = 0;
- struct xkb_state *new_state = 0;
-#ifndef QT_NO_XKB
- if (connection()->hasXKB()) {
- xkb_keymap = xkb_x11_keymap_new_from_device(xkb_context, xcb_connection(), core_device_id, (xkb_keymap_compile_flags)0);
- if (xkb_keymap) {
- // Create a new keyboard state object for a keymap
- new_state = xkb_x11_state_new_from_device(xkb_keymap, xcb_connection(), core_device_id);
- }
- }
-#endif
+ readXKBConfig();
+ // Compile a keymap from RMLVO (rules, models, layouts, variants and options) names
+ if (xkb_keymap)
+ xkb_keymap_unref(xkb_keymap);
+
+ xkb_keymap = xkb_keymap_new_from_names(xkb_context, &xkb_names, (xkb_keymap_compile_flags)0);
if (!xkb_keymap) {
- // Compile a keymap from RMLVO (rules, models, layouts, variants and options) names
- readXKBConfig();
+ // last fallback is to used hard-coded keymap name, see DEFAULT_XKB_* in xkbcommon.pri
+ qWarning() << "Qt: Could not determine keyboard configuration data"
+ " from X server, will use hard-coded keymap configuration.";
+ clearXKBConfig();
xkb_keymap = xkb_keymap_new_from_names(xkb_context, &xkb_names, (xkb_keymap_compile_flags)0);
- if (!xkb_keymap) {
- // last fallback is to used hard-coded keymap name, see DEFAULT_XKB_* in xkbcommon.pri
- qWarning() << "Qt: Could not determine keyboard configuration data"
- " from X server, will use hard-coded keymap configuration.";
- clearXKBConfig();
- xkb_keymap = xkb_keymap_new_from_names(xkb_context, &xkb_names, (xkb_keymap_compile_flags)0);
- }
- if (xkb_keymap) {
- new_state = xkb_state_new(xkb_keymap);
- } else {
- printKeymapError("Qt: Failed to compile a keymap!");
- m_config = false;
- return;
- }
-
}
+ if (!xkb_keymap) {
+ printKeymapError("Qt: Failed to compile a keymap!");
+ m_config = false;
+ return;
+ }
+
+ struct xkb_state *new_state = xkb_state_new(xkb_keymap);
if (!new_state) {
qWarning("Qt: Failed to create xkb state!");
m_config = false;
return;
}
- // update xkb state object
- xkb_state_unref(xkb_state);
- xkb_state = new_state;
- if (!connection()->hasXKB())
- updateXKBMods();
+
+ if (xkb_state) {
+ xkb_state_unref(xkb_state);
+ xkb_state = new_state;
+ } else {
+ xkb_state = new_state;
+#ifndef QT_NO_XKB
+ if (connection()->hasXKB()) {
+ // get initial state from the X server (and keep it up-to-date at all times)
+ xcb_xkb_get_state_cookie_t state;
+ xcb_xkb_get_state_reply_t *init_state;
+
+ xcb_connection_t *c = xcb_connection();
+ state = xcb_xkb_get_state(c, XCB_XKB_ID_USE_CORE_KBD);
+ init_state = xcb_xkb_get_state_reply(c, state, 0);
+ if (!init_state) {
+ qWarning("Qt: couldn't retrieve an initial keyboard state");
+ return;
+ }
+ /* The xkb keyboard state is comprised of the state of all keyboard modifiers,
+ the keyboard group, and the state of the pointer buttons */
+ xkb_state_update_mask(xkb_state,
+ init_state->baseMods,
+ init_state->latchedMods,
+ init_state->lockedMods,
+ init_state->baseGroup,
+ init_state->latchedGroup,
+ init_state->lockedGroup);
+ free(init_state);
+ } else
+#endif
+ updateXKBMods();
+ }
checkForLatinLayout();
}
@@ -1097,11 +1112,23 @@ QXcbKeyboard::QXcbKeyboard(QXcbConnection *connection)
if (connection->hasXKB()) {
updateVModMapping();
updateVModToRModMapping();
- core_device_id = xkb_x11_get_core_keyboard_device_id(xcb_connection());
- if (core_device_id == -1) {
+
+ // get the core keyboard id
+ xcb_xkb_get_device_info_cookie_t device_id_cookie;
+ xcb_xkb_get_device_info_reply_t *device_id;
+
+ device_id_cookie = xcb_xkb_get_device_info(xcb_connection(),
+ XCB_XKB_ID_USE_CORE_KBD,
+ 0, 0, 0, 0, 0, 0);
+
+ device_id = xcb_xkb_get_device_info_reply(xcb_connection(), device_id_cookie, 0);
+ if (!device_id) {
qWarning("Qt: couldn't get core keyboard device info");
return;
}
+
+ core_device_id = device_id->deviceID;
+ free(device_id);
} else {
#endif
m_key_symbols = xcb_key_symbols_alloc(xcb_connection());
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.h b/src/plugins/platforms/xcb/qxcbkeyboard.h
index 9f1cf16..3beee7b 100644
--- a/src/plugins/platforms/xcb/qxcbkeyboard.h
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.h
@@ -39,9 +39,6 @@
#include <xcb/xcb_keysyms.h>
#include <xkbcommon/xkbcommon.h>
-#ifndef QT_NO_XKB
-#include <xkbcommon/xkbcommon-x11.h>
-#endif
#include <QEvent>

View File

@ -1,77 +0,0 @@
diff -ur qtbase-opensource-src-5.4.0-rc-old_xcb/configure qtbase-opensource-src-5.4.0-rc-old_xkbcommon/configure
--- qtbase-opensource-src-5.4.0-rc-old_xcb/configure 2014-11-29 03:07:40.000000000 +0100
+++ qtbase-opensource-src-5.4.0-rc-old_xkbcommon/configure 2014-11-29 03:32:16.000000000 +0100
@@ -5144,7 +5144,7 @@
fi
# Detect libxkbcommon
-MIN_REQ_XKBCOMMON="0.4.1"
+MIN_REQ_XKBCOMMON="0.3.0"
# currently only xcb platform plugin supports building xkbcommon
if [ "$CFG_XCB" != "no" ]; then
if [ "$CFG_XKBCOMMON" != "no" ] && [ "$CFG_XKBCOMMON" != "qt" ]; then
diff -ur qtbase-opensource-src-5.4.0-rc-old_xcb/src/plugins/platforms/xcb/qxcbkeyboard.cpp qtbase-opensource-src-5.4.0-rc-old_xkbcommon/src/plugins/platforms/xcb/qxcbkeyboard.cpp
--- qtbase-opensource-src-5.4.0-rc-old_xcb/src/plugins/platforms/xcb/qxcbkeyboard.cpp 2014-11-29 03:29:53.000000000 +0100
+++ qtbase-opensource-src-5.4.0-rc-old_xkbcommon/src/plugins/platforms/xcb/qxcbkeyboard.cpp 2014-11-29 03:35:36.000000000 +0100
@@ -971,7 +971,7 @@
}
QList<int> result;
- int baseQtKey = keysymToQtKey(sym, modifiers, lookupString(kb_state, keycode));
+ int baseQtKey = keysymToQtKey(sym, modifiers, keysymToUnicode(sym));
result += (baseQtKey + modifiers); // The base key is _always_ valid, of course
xkb_mod_index_t shiftMod = xkb_keymap_mod_get_index(xkb_keymap, "Shift");
@@ -1008,7 +1008,7 @@
continue;
Qt::KeyboardModifiers mods = modifiers & ~neededMods;
- qtKey = keysymToQtKey(sym, mods, lookupString(kb_state, keycode));
+ qtKey = keysymToQtKey(sym, mods, keysymToUnicode(sym));
if (!qtKey || qtKey == baseQtKey)
continue;
@@ -1462,7 +1462,7 @@
return;
}
- QString string = lookupString(xkb_state, code);
+ QString string = keysymToUnicode(sym);
int count = string.size();
string.truncate(count);
@@ -1535,12 +1535,18 @@
}
}
-QString QXcbKeyboard::lookupString(struct xkb_state *state, xcb_keycode_t code) const
+QString QXcbKeyboard::keysymToUnicode(xcb_keysym_t sym) const
{
QByteArray chars;
- chars.resize(1 + xkb_state_key_get_utf8(state, code, 0, 0));
- // equivalent of XLookupString
- xkb_state_key_get_utf8(state, code, chars.data(), chars.size());
+ int bytes;
+ chars.resize(7);
+
+ bytes = xkb_keysym_to_utf8(sym, chars.data(), chars.size());
+
+ if (bytes == -1)
+ qWarning("QXcbKeyboard::handleKeyEvent - buffer too small");
+ chars.resize(bytes-1);
+
return QString::fromUtf8(chars);
}
diff -ur qtbase-opensource-src-5.4.0-rc-old_xcb/src/plugins/platforms/xcb/qxcbkeyboard.h qtbase-opensource-src-5.4.0-rc-old_xkbcommon/src/plugins/platforms/xcb/qxcbkeyboard.h
--- qtbase-opensource-src-5.4.0-rc-old_xcb/src/plugins/platforms/xcb/qxcbkeyboard.h 2014-11-29 03:07:40.000000000 +0100
+++ qtbase-opensource-src-5.4.0-rc-old_xkbcommon/src/plugins/platforms/xcb/qxcbkeyboard.h 2014-11-29 03:32:16.000000000 +0100
@@ -75,7 +75,7 @@
void handleKeyEvent(xcb_window_t sourceWindow, QEvent::Type type, xcb_keycode_t code, quint16 state, xcb_timestamp_t time);
void resolveMaskConflicts();
- QString lookupString(struct xkb_state *state, xcb_keycode_t code) const;
+ QString keysymToUnicode(xcb_keysym_t sym) const;
int keysymToQtKey(xcb_keysym_t keysym) const;
int keysymToQtKey(xcb_keysym_t keysym, Qt::KeyboardModifiers &modifiers, QString text) const;
void printKeymapError(const char *error) const;

View File

@ -1,41 +0,0 @@
diff -rupN qtbase-opensource-src-5.5.0/src/gui/kernel/qplatformintegration.cpp qtbase-opensource-src-5.5.0-new/src/gui/kernel/qplatformintegration.cpp
--- qtbase-opensource-src-5.5.0/src/gui/kernel/qplatformintegration.cpp 2015-06-29 22:04:53.000000000 +0200
+++ qtbase-opensource-src-5.5.0-new/src/gui/kernel/qplatformintegration.cpp 2015-07-12 10:24:17.195000304 +0200
@@ -456,6 +456,14 @@ void QPlatformIntegration::screenAdded(Q
} else {
QGuiApplicationPrivate::screen_list.append(screen);
}
+
+ // All screens might have been removed before a new one is added, so
+ // iterate over the toplevel windows and set their screen to the current
+ // primary screen if the window has no screen set
+ foreach (QWindow *window, QGuiApplication::topLevelWindows()) {
+ if (window->screen() == 0)
+ window->setScreen(QGuiApplicationPrivate::screen_list.at(0));
+ }
emit qGuiApp->screenAdded(screen);
}
diff -rupN qtbase-opensource-src-5.5.0/src/gui/kernel/qwindow.cpp qtbase-opensource-src-5.5.0-new/src/gui/kernel/qwindow.cpp
--- qtbase-opensource-src-5.5.0/src/gui/kernel/qwindow.cpp 2015-06-29 22:04:52.000000000 +0200
+++ qtbase-opensource-src-5.5.0-new/src/gui/kernel/qwindow.cpp 2015-07-12 11:51:18.832889497 +0200
@@ -372,15 +372,14 @@ void QWindowPrivate::setTopLevelScreen(Q
return;
}
if (newScreen != topLevelScreen) {
- const bool shouldRecreate = recreate && windowRecreationRequired(newScreen);
- const bool shouldShow = visibilityOnDestroy && !topLevelScreen;
+ const bool shouldRecreate = recreate/* && windowRecreationRequired(newScreen)*/;
if (shouldRecreate && platformWindow)
q->destroy();
connectToScreen(newScreen);
- if (shouldShow)
- q->setVisible(true);
- else if (newScreen && shouldRecreate)
+ if (newScreen && shouldRecreate) {
create(true);
+ q->setVisible(visibilityOnDestroy);
+ }
emitScreenChangedRecursion(newScreen);
}
}

View File

@ -1,14 +0,0 @@
diff -up qtbase-opensource-src-5.4.1/src/dbus/qdbusconnection.cpp.qdbusconnection_no_debug qtbase-opensource-src-5.4.1/src/dbus/qdbusconnection.cpp
--- qtbase-opensource-src-5.4.1/src/dbus/qdbusconnection.cpp.qdbusconnection_no_debug 2015-02-16 22:56:38.000000000 -0600
+++ qtbase-opensource-src-5.4.1/src/dbus/qdbusconnection.cpp 2015-04-25 10:48:52.099668703 -0500
@@ -1056,8 +1056,10 @@ public:
// make sure this connection is running on the main thread
QCoreApplication *instance = QCoreApplication::instance();
if (!instance) {
+#ifndef QT_NO_DEBUG
qWarning("QDBusConnection: %s D-Bus connection created before QCoreApplication. Application may misbehave.",
type == SessionBus ? "session" : type == SystemBus ? "system" : "generic");
+#endif
} else if (QDBusConnectionPrivate::d(*this)) {
QDBusConnectionPrivate::d(*this)->moveToThread(instance->thread());
}

View File

@ -0,0 +1,12 @@
diff -up qtbase-opensource-src-5.6.0-beta/config.tests/unix/alsa/alsatest.cpp.than qtbase-opensource-src-5.6.0-beta/config.tests/unix/alsa/alsatest.cpp
--- qtbase-opensource-src-5.6.0-beta/config.tests/unix/alsa/alsatest.cpp.than 2015-12-14 21:49:46.000000000 +0100
+++ qtbase-opensource-src-5.6.0-beta/config.tests/unix/alsa/alsatest.cpp 2016-02-11 13:29:59.249275394 +0100
@@ -32,7 +32,7 @@
****************************************************************************/
#include <alsa/asoundlib.h>
-#if(!(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 10))
+#if(!(SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 10)))
#error "Alsa version found too old, require >= 1.0.10"
#endif

View File

@ -0,0 +1,13 @@
diff -up qtbase-opensource-src-5.6.0-beta/configure.than qtbase-opensource-src-5.6.0-beta/configure
--- qtbase-opensource-src-5.6.0-beta/configure.than 2016-02-12 13:56:20.057741037 +0100
+++ qtbase-opensource-src-5.6.0-beta/configure 2016-02-12 14:10:10.267768256 +0100
@@ -4346,6 +4346,9 @@ if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; th
else
# not cross compiling, host == target
CFG_HOST_ARCH="$CFG_ARCH"
+ if [ "$CFG_ARCH" = "arm" ] ; then
+ CFG_CPUFEATURES="neon"
+ fi
CFG_HOST_CPUFEATURES="$CFG_CPUFEATURES"
fi
unset OUTFILE

View File

@ -0,0 +1,14 @@
diff -up qtbase-opensource-src-5.6.0-beta/src/tools/moc/main.cpp.moc_WORDSIZE qtbase-opensource-src-5.6.0-beta/src/tools/moc/main.cpp
--- qtbase-opensource-src-5.6.0-beta/src/tools/moc/main.cpp.moc_WORDSIZE 2015-12-04 18:05:24.000000000 -0600
+++ qtbase-opensource-src-5.6.0-beta/src/tools/moc/main.cpp 2015-12-15 20:57:55.554485416 -0600
@@ -184,6 +184,10 @@ int runMoc(int argc, char **argv)
Moc moc;
pp.macros["Q_MOC_RUN"];
pp.macros["__cplusplus"];
+ Macro macro;
+ macro.symbols = Preprocessor::tokenize(QByteArray::number(Q_PROCESSOR_WORDSIZE*8), 1, Preprocessor::TokenizeDefine);
+ macro.symbols.removeLast(); // remove the EOF symbol
+ pp.macros.insert("__WORDSIZE", macro);
// Don't stumble over GCC extensions
Macro dummyVariadicFunctionMacro;

2
qtlogging.ini Normal file
View File

@ -0,0 +1,2 @@
[Rules]
*.debug=false

View File

@ -1 +1 @@
687e2b122fa2c3390b5e20a166d38038 qtbase-opensource-src-5.5.1.tar.xz
833a991814a38947aa07da7dfd4eb153 qtbase-opensource-src-5.6.0.tar.xz