Compare commits

..

No commits in common. "master" and "f20" have entirely different histories.
master ... f20

33 changed files with 1557 additions and 1240 deletions

2
.gitignore vendored
View File

@ -1,3 +1,3 @@
/hi128-app-qt4-logo.png
/hi48-app-qt4-logo.png
/qt-everywhere-opensource-src-4.8.7.tar.gz
/qt-everywhere-opensource-src-4.8.6.tar.gz

View File

@ -0,0 +1,31 @@
From d0b790dcd02da959cbdfc83d606906cead9e8375 Mon Sep 17 00:00:00 2001
From: David Faure <david.faure@kdab.com>
Date: Sat, 12 Apr 2014 11:25:28 +0200
Subject: [PATCH 10/37] QDbus: Fix (!a == b) comparison
! binds to a, and that is wrong here.
(cherry picked from qtbase/4b7cd57719a637189696d673b014ae785df669bf)
Change-Id: I75542a0c27f39fb6e684dedd9925a1f3748d4919
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
---
src/dbus/qdbuspendingcall.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/dbus/qdbuspendingcall.cpp b/src/dbus/qdbuspendingcall.cpp
index 06597a6..b7def2e 100644
--- a/src/dbus/qdbuspendingcall.cpp
+++ b/src/dbus/qdbuspendingcall.cpp
@@ -225,7 +225,7 @@ void QDBusPendingCallPrivate::checkReceivedSignature()
return; // no signature to validate against
// can't use startsWith here because a null string doesn't start or end with an empty string
- if (!replyMessage.signature().indexOf(expectedReplySignature) == 0) {
+ if (replyMessage.signature().indexOf(expectedReplySignature) != 0) {
QString errorMsg = QLatin1String("Unexpected reply signature: got \"%1\", "
"expected \"%2\"");
replyMessage = QDBusMessage::createError(
--
1.9.3

View File

@ -0,0 +1,43 @@
From f1b76c126c476c155af8c404b97c42cd1a709333 Mon Sep 17 00:00:00 2001
From: Lars Knoll <lars.knoll@digia.com>
Date: Thu, 24 Apr 2014 15:33:27 +0200
Subject: [PATCH 23/74] Don't crash on broken GIF images
Broken GIF images could set invalid width and height
values inside the image, leading to Qt creating a null
QImage for it. In that case we need to abort decoding
the image and return an error.
Initial patch by Rich Moore.
Backport of Id82a4036f478bd6e49c402d6598f57e7e5bb5e1e from Qt 5
Task-number: QTBUG-38367
Change-Id: I0680740018aaa8356d267b7af3f01fac3697312a
Security-advisory: CVE-2014-0190
Reviewed-by: Richard J. Moore <rich@kde.org>
---
src/gui/image/qgifhandler.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/gui/image/qgifhandler.cpp b/src/gui/image/qgifhandler.cpp
index 3324f04..5199dd3 100644
--- a/src/gui/image/qgifhandler.cpp
+++ b/src/gui/image/qgifhandler.cpp
@@ -359,6 +359,13 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length,
memset(bits, 0, image->byteCount());
}
+ // Check if the previous attempt to create the image failed. If it
+ // did then the image is broken and we should give up.
+ if (image->isNull()) {
+ state = Error;
+ return -1;
+ }
+
disposePrevious(image);
disposed = false;
--
1.9.3

View File

@ -0,0 +1,43 @@
From 6d76e943dab0971d376cebb15fe531efc60622ac Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@digia.com>
Date: Mon, 5 May 2014 10:59:56 +0200
Subject: [PATCH 25/37] Fix visual index lookup in
QTreeViewPrivate::adjustViewOptionsForIndex().
Determine the visual index by looking up the column of the QModelIndex
in the logicalIndices array instead of looping.
Task-number: QTBUG-37813
Change-Id: I5c3c73c67537877b03cdc2c36a52041d99f7f49d
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from qtbase/85aef2dd4b059d2ba9cba4605d9fef87f3e2c4fc)
---
src/gui/itemviews/qtreeview.cpp | 11 ++---------
tests/auto/qtreeview/tst_qtreeview.cpp | 27 +++++++++++++++++++++++++++
2 files changed, 29 insertions(+), 9 deletions(-)
diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp
index f506f48..fdf020e 100644
--- a/src/gui/itemviews/qtreeview.cpp
+++ b/src/gui/itemviews/qtreeview.cpp
@@ -1367,15 +1367,8 @@ void QTreeViewPrivate::adjustViewOptionsForIndex(QStyleOptionViewItemV4 *option,
const int right = (spanning ? header->visualIndex(0) : header->count() - 1 );
calcLogicalIndices(&logicalIndices, &viewItemPosList, left, right);
- int columnIndex = 0;
- for (int visualIndex = 0; visualIndex < current.column(); ++visualIndex) {
- int logicalIndex = header->logicalIndex(visualIndex);
- if (!header->isSectionHidden(logicalIndex)) {
- ++columnIndex;
- }
- }
-
- option->viewItemPosition = viewItemPosList.at(columnIndex);
+ const int visualIndex = logicalIndices.indexOf(current.column());
+ option->viewItemPosition = viewItemPosList.at(visualIndex);
}
--
1.9.3

View File

@ -0,0 +1,379 @@
From 45693cc638d10890f2816a38d38de6ddaf04ffd3 Mon Sep 17 00:00:00 2001
From: Simon Yuan <simon.yuan@navico.com>
Date: Wed, 2 Apr 2014 16:02:04 +1300
Subject: [PATCH 30/74] Memory and file descriptor leak in QFontCache
Make the cache also use the ref counts
Make everyone who decrements a ref count check for 0 and delete
Move all cache logic to the cache
Same idea as 36cb3f3 and b3dae68 in Qt 5 without the extra stuff
Task-number: QTBUG-38035
Change-Id: I27bea376f4ec0888463b4ec3ed1a6bef00d041f8
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
---
src/gui/text/qfont.cpp | 102 +++++++++++++++++-------------------------
src/gui/text/qfontengine.cpp | 7 +--
src/gui/text/qrawfont.cpp | 13 +++---
src/gui/text/qrawfont_win.cpp | 4 +-
src/gui/text/qstatictext.cpp | 6 +--
src/gui/text/qtextengine.cpp | 7 +--
6 files changed, 55 insertions(+), 84 deletions(-)
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index 7e94c1e..fa9bb70 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -275,8 +275,8 @@ QFontPrivate::QFontPrivate(const QFontPrivate &other)
QFontPrivate::~QFontPrivate()
{
- if (engineData)
- engineData->ref.deref();
+ if (engineData && !engineData->ref.deref())
+ delete engineData;
engineData = 0;
if (scFont && scFont != this)
scFont->ref.deref();
@@ -298,7 +298,8 @@ QFontEngine *QFontPrivate::engineForScript(int script) const
script = QUnicodeTables::Common;
if (engineData && engineData->fontCache != QFontCache::instance()) {
// throw out engineData that came from a different thread
- engineData->ref.deref();
+ if (!engineData->ref.deref())
+ delete engineData;
engineData = 0;
}
if (!engineData || !QT_FONT_ENGINE_FROM_DATA(engineData, script))
@@ -417,13 +418,13 @@ QFontEngineData::~QFontEngineData()
{
#if !defined(Q_WS_MAC)
for (int i = 0; i < QUnicodeTables::ScriptCount; ++i) {
- if (engines[i])
- engines[i]->ref.deref();
+ if (engines[i] && !engines[i]->ref.deref())
+ delete engines[i];
engines[i] = 0;
}
#else
- if (engine)
- engine->ref.deref();
+ if (engine && !engine->ref.deref())
+ delete engine;
engine = 0;
#endif // Q_WS_X11 || Q_WS_WIN || Q_WS_MAC
}
@@ -770,8 +771,8 @@ QFont::QFont(QFontPrivate *data)
void QFont::detach()
{
if (d->ref == 1) {
- if (d->engineData)
- d->engineData->ref.deref();
+ if (d->engineData && !d->engineData->ref.deref())
+ delete d->engineData;
d->engineData = 0;
if (d->scFont && d->scFont != d.data())
d->scFont->ref.deref();
@@ -2819,7 +2820,7 @@ QFontCache::~QFontCache()
EngineDataCache::ConstIterator it = engineDataCache.constBegin(),
end = engineDataCache.constEnd();
while (it != end) {
- if (it.value()->ref == 0)
+ if (it.value()->ref.deref() == 0)
delete it.value();
else
FC_DEBUG("QFontCache::~QFontCache: engineData %p still has refcount %d",
@@ -2827,24 +2828,6 @@ QFontCache::~QFontCache()
++it;
}
}
- EngineCache::ConstIterator it = engineCache.constBegin(),
- end = engineCache.constEnd();
- while (it != end) {
- if (--it.value().data->cache_count == 0) {
- if (it.value().data->ref == 0) {
- FC_DEBUG("QFontCache::~QFontCache: deleting engine %p key=(%d / %g %g %d %d %d)",
- it.value().data, it.key().script, it.key().def.pointSize,
- it.key().def.pixelSize, it.key().def.weight, it.key().def.style,
- it.key().def.fixedPitch);
-
- delete it.value().data;
- } else {
- FC_DEBUG("QFontCache::~QFontCache: engine = %p still has refcount %d",
- it.value().data, int(it.value().data->ref));
- }
- }
- ++it;
- }
}
void QFontCache::clear()
@@ -2856,16 +2839,14 @@ void QFontCache::clear()
QFontEngineData *data = it.value();
#if !defined(Q_WS_MAC)
for (int i = 0; i < QUnicodeTables::ScriptCount; ++i) {
- if (data->engines[i]) {
- data->engines[i]->ref.deref();
- data->engines[i] = 0;
- }
+ if (data->engines[i] && !data->engines[i]->ref.deref())
+ delete data->engines[i];
+ data->engines[i] = 0;
}
#else
- if (data->engine) {
- data->engine->ref.deref();
- data->engine = 0;
- }
+ if (data->engine && !data->engine->ref.deref())
+ delete data->engine;
+ data->engine = 0;
#endif
++it;
}
@@ -2873,15 +2854,7 @@ void QFontCache::clear()
for (EngineCache::Iterator it = engineCache.begin(), end = engineCache.end();
it != end; ++it) {
- if (it->data->ref == 0) {
- delete it->data;
- it->data = 0;
- }
- }
-
- for (EngineCache::Iterator it = engineCache.begin(), end = engineCache.end();
- it != end; ++it) {
- if (it->data && it->data->ref == 0) {
+ if (it->data->ref.deref() == 0) {
delete it->data;
it->data = 0;
}
@@ -2916,6 +2889,8 @@ void QFontCache::insertEngineData(const Key &key, QFontEngineData *engineData)
{
FC_DEBUG("QFontCache: inserting new engine data %p", engineData);
+ Q_ASSERT(!engineDataCache.contains(key));
+ engineData->ref.ref(); // the cache has a reference
engineDataCache.insert(key, engineData);
increaseCost(sizeof(QFontEngineData));
}
@@ -2946,6 +2921,11 @@ void QFontCache::insertEngine(const Key &key, QFontEngine *engine)
Engine data(engine);
data.timestamp = ++current_timestamp;
+ QFontEngine *oldEngine = engineCache.value(key).data;
+ engine->ref.ref(); // the cache has a reference
+ if (oldEngine && !oldEngine->ref.deref())
+ delete oldEngine;
+
engineCache.insert(key, data);
// only increase the cost if this is the first time we insert the engine
@@ -3005,12 +2985,11 @@ void QFontCache::cleanupPrinterFonts()
continue;
}
- if(it.value()->ref != 0) {
- for(int i = 0; i < QUnicodeTables::ScriptCount; ++i) {
- if(it.value()->engines[i]) {
- it.value()->engines[i]->ref.deref();
- it.value()->engines[i] = 0;
- }
+ if (it.value()->ref > 1) {
+ for (int i = 0; i < QUnicodeTables::ScriptCount; ++i) {
+ if (it.value()->engines[i] && !it.value()->engines[i]->ref.deref())
+ delete it.value()->engines[i];
+ it.value()->engines[i] = 0;
}
++it;
} else {
@@ -3021,7 +3000,8 @@ void QFontCache::cleanupPrinterFonts()
FC_DEBUG(" %p", rem.value());
- delete rem.value();
+ if (!rem.value()->ref.deref())
+ delete rem.value();
engineDataCache.erase(rem);
}
}
@@ -3030,7 +3010,7 @@ void QFontCache::cleanupPrinterFonts()
EngineCache::Iterator it = engineCache.begin(),
end = engineCache.end();
while(it != end) {
- if (it.value().data->ref != 0 || it.key().screen == 0) {
+ if (it.value().data->ref != 1 || it.key().screen == 0) {
++it;
continue;
}
@@ -3044,7 +3024,8 @@ void QFontCache::cleanupPrinterFonts()
FC_DEBUG(" DELETE: last occurrence in cache");
decreaseCost(it.value().data->cache_cost);
- delete it.value().data;
+ if (!it.value().data->ref.deref())
+ delete it.value().data;
}
engineCache.erase(it++);
@@ -3093,7 +3074,7 @@ void QFontCache::timerEvent(QTimerEvent *)
# endif // Q_WS_X11 || Q_WS_WIN
#endif // QFONTCACHE_DEBUG
- if (it.value()->ref != 0)
+ if (it.value()->ref > 1)
in_use_cost += engine_data_cost;
}
}
@@ -3109,7 +3090,7 @@ void QFontCache::timerEvent(QTimerEvent *)
int(it.value().data->ref), it.value().data->cache_count,
it.value().data->cache_cost);
- if (it.value().data->ref != 0)
+ if (it.value().data->ref > 1)
in_use_cost += it.value().data->cache_cost / it.value().data->cache_count;
}
@@ -3159,7 +3140,7 @@ void QFontCache::timerEvent(QTimerEvent *)
EngineDataCache::Iterator it = engineDataCache.begin(),
end = engineDataCache.end();
while (it != end) {
- if (it.value()->ref != 0) {
+ if (it.value()->ref > 1) {
++it;
continue;
}
@@ -3187,7 +3168,7 @@ void QFontCache::timerEvent(QTimerEvent *)
uint least_popular = ~0u;
for (; it != end; ++it) {
- if (it.value().data->ref != 0)
+ if (it.value().data->ref > 1)
continue;
if (it.value().timestamp < oldest &&
@@ -3200,7 +3181,7 @@ void QFontCache::timerEvent(QTimerEvent *)
FC_DEBUG(" oldest %u least popular %u", oldest, least_popular);
for (it = engineCache.begin(); it != end; ++it) {
- if (it.value().data->ref == 0 &&
+ if (it.value().data->ref == 1 &&
it.value().timestamp == oldest &&
it.value().hits == least_popular)
break;
@@ -3216,7 +3197,8 @@ void QFontCache::timerEvent(QTimerEvent *)
FC_DEBUG(" DELETE: last occurrence in cache");
decreaseCost(it.value().data->cache_cost);
- delete it.value().data;
+ if (!it.value().data->ref.deref())
+ delete it.value().data;
} else {
/*
this particular font engine is in the cache multiple
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 9de475c..bf108c4 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -1325,11 +1325,8 @@ QFontEngineMulti::~QFontEngineMulti()
{
for (int i = 0; i < engines.size(); ++i) {
QFontEngine *fontEngine = engines.at(i);
- if (fontEngine) {
- fontEngine->ref.deref();
- if (fontEngine->cache_count == 0 && fontEngine->ref == 0)
- delete fontEngine;
- }
+ if (fontEngine && !fontEngine->ref.deref())
+ delete fontEngine;
}
}
diff --git a/src/gui/text/qrawfont.cpp b/src/gui/text/qrawfont.cpp
index 2b7554a..cb2bcb3 100644
--- a/src/gui/text/qrawfont.cpp
+++ b/src/gui/text/qrawfont.cpp
@@ -682,8 +682,7 @@ void QRawFont::setPixelSize(qreal pixelSize)
if (d->fontEngine != 0)
d->fontEngine->ref.ref();
- oldFontEngine->ref.deref();
- if (oldFontEngine->cache_count == 0 && oldFontEngine->ref == 0)
+ if (!oldFontEngine->ref.deref())
delete oldFontEngine;
}
@@ -693,12 +692,10 @@ void QRawFont::setPixelSize(qreal pixelSize)
void QRawFontPrivate::cleanUp()
{
platformCleanUp();
- if (fontEngine != 0) {
- fontEngine->ref.deref();
- if (fontEngine->cache_count == 0 && fontEngine->ref == 0)
- delete fontEngine;
- fontEngine = 0;
- }
+ if (fontEngine != 0 && !fontEngine->ref.deref())
+ delete fontEngine;
+ fontEngine = 0;
+
hintingPreference = QFont::PreferDefaultHinting;
}
diff --git a/src/gui/text/qrawfont_win.cpp b/src/gui/text/qrawfont_win.cpp
index 6923aae..9b66886 100644
--- a/src/gui/text/qrawfont_win.cpp
+++ b/src/gui/text/qrawfont_win.cpp
@@ -600,11 +600,11 @@ void QRawFontPrivate::platformLoadFromData(const QByteArray &fontData,
if (request.family != fontEngine->fontDef.family) {
qWarning("QRawFont::platformLoadFromData: Failed to load font. "
"Got fallback instead: %s", qPrintable(fontEngine->fontDef.family));
- if (fontEngine->cache_count == 0 && fontEngine->ref == 0)
+ if (fontEngine->ref == 0)
delete fontEngine;
fontEngine = 0;
} else {
- Q_ASSERT(fontEngine->cache_count == 0 && fontEngine->ref == 0);
+ Q_ASSERT(fontEngine->ref == 0);
// Override the generated font name
static_cast<QFontEngineWin *>(fontEngine)->uniqueFamilyName = uniqueFamilyName;
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp
index 657da33..b111200 100644
--- a/src/gui/text/qstatictext.cpp
+++ b/src/gui/text/qstatictext.cpp
@@ -724,10 +724,8 @@ QStaticTextItem::~QStaticTextItem()
void QStaticTextItem::setFontEngine(QFontEngine *fe)
{
- if (m_fontEngine != 0) {
- if (!m_fontEngine->ref.deref())
- delete m_fontEngine;
- }
+ if (m_fontEngine != 0 && !m_fontEngine->ref.deref())
+ delete m_fontEngine;
m_fontEngine = fe;
if (m_fontEngine != 0)
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index b371237..f4b86b0 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -1453,11 +1453,8 @@ void QTextEngine::shape(int item) const
static inline void releaseCachedFontEngine(QFontEngine *fontEngine)
{
- if (fontEngine) {
- fontEngine->ref.deref();
- if (fontEngine->cache_count == 0 && fontEngine->ref == 0)
- delete fontEngine;
- }
+ if (fontEngine && !fontEngine->ref.deref())
+ delete fontEngine;
}
void QTextEngine::resetFontEngineCache()
--
1.9.3

View File

@ -0,0 +1,33 @@
From 01f42466d37dbbdedd0c2386f2b83c3bc7c3873b Mon Sep 17 00:00:00 2001
From: Allan Sandfeld Jensen <allan.jensen@digia.com>
Date: Mon, 26 May 2014 09:25:42 +0200
Subject: [PATCH 34/37] Fix raster graphics on X11 RGB30
The window surface incorrectly assumes that any pixel depth of 24 or
above would be on 8bit/color. This breaks 10bit/color formats like
RGB30. This patch instead make it specifically check for color depth 24
or 32 which are the two with 8bit/color.
Task-number: QTBUG-25998
Change-Id: Id0b7e07bdb64679f8c647158938da12efede9142
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
---
src/gui/painting/qwindowsurface_raster.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp
index ae5a591..1f2b3fe 100644
--- a/src/gui/painting/qwindowsurface_raster.cpp
+++ b/src/gui/painting/qwindowsurface_raster.cpp
@@ -256,7 +256,7 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi
{
int depth = widget->x11Info().depth();
const QImage &src = d->image->image;
- if (src.format() != QImage::Format_RGB32 || depth < 24 || X11->bppForDepth.value(depth) != 32) {
+ if (src.format() != QImage::Format_RGB32 || (depth != 24 && depth != 32) || X11->bppForDepth.value(depth) != 32) {
Q_ASSERT(src.depth() >= 16);
const QImage sub_src(src.scanLine(br.y()) + br.x() * (uint(src.depth()) / 8),
br.width(), br.height(), src.bytesPerLine(), src.format());
--
1.9.3

View File

@ -0,0 +1,137 @@
From 59eb561989f7a7b65c3e9b11d0ac062479013bf2 Mon Sep 17 00:00:00 2001
From: Peter Hartmann <phartmann@blackberry.com>
Date: Wed, 9 Jul 2014 16:22:44 +0200
Subject: [PATCH 47/74] QSslCertificate: blacklist NIC certificates from India
Those intermediate certificates were used to issue "unauthorized"
certificates according to
http://googleonlinesecurity.blogspot.de/2014/07/maintaining-digital-certificate-security.html
, and are by default trusted on Windows, so to be safe we blacklist
them here.
(backport of commit 916c9d469bd0df227dc3be97fcca27e3cf58144f)
Change-Id: I22c6637895dcd21b1f7af73fdd5ca39d4747cf9e
Reviewed-by: Richard J. Moore <rich@kde.org>
---
src/network/ssl/qsslcertificate.cpp | 4 ++++
.../blacklisted-nic-india-2007.pem | 25 +++++++++++++++++++++
.../blacklisted-nic-india-2011.pem | 26 ++++++++++++++++++++++
.../blacklisted-nic-india-2014.pem | 26 ++++++++++++++++++++++
4 files changed, 81 insertions(+)
create mode 100644 tests/auto/qsslcertificate/more-certificates/blacklisted-nic-india-2007.pem
create mode 100644 tests/auto/qsslcertificate/more-certificates/blacklisted-nic-india-2011.pem
create mode 100644 tests/auto/qsslcertificate/more-certificates/blacklisted-nic-india-2014.pem
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
index 254f45b..a015880 100644
--- a/src/network/ssl/qsslcertificate.cpp
+++ b/src/network/ssl/qsslcertificate.cpp
@@ -832,6 +832,10 @@ static const char *certificate_blacklist[] = {
"2148", "e-islem.kktcmerkezbankasi.org", // Turktrust mis-issued intermediate certificate
"204199", "AC DG Tr\xC3\xA9sor SSL", // intermediate certificate linking back to ANSSI French National Security Agency
+
+ "10115", "NIC Certifying Authority", // intermediate certificate from NIC India (2007)
+ "10130", "NIC CA 2011", // intermediate certificate from NIC India (2011)
+ "10161", "NIC CA 2014", // intermediate certificate from NIC India (2014)
0
};
diff --git a/tests/auto/qsslcertificate/more-certificates/blacklisted-nic-india-2007.pem b/tests/auto/qsslcertificate/more-certificates/blacklisted-nic-india-2007.pem
new file mode 100644
index 0000000..2106f66
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/blacklisted-nic-india-2007.pem
@@ -0,0 +1,25 @@
+-----BEGIN CERTIFICATE-----
+MIIENjCCAx6gAwIBAgICJ4MwDQYJKoZIhvcNAQEFBQAwOjELMAkGA1UEBhMCSU4x
+EjAQBgNVBAoTCUluZGlhIFBLSTEXMBUGA1UEAxMOQ0NBIEluZGlhIDIwMDcwHhcN
+MDcwNzAyMDY0MTU5WhcNMTUwNzA0MDYzMDAwWjCBsDELMAkGA1UEBhMCSU4xJDAi
+BgNVBAoTG05hdGlvbmFsIEluZm9ybWF0aWNzIENlbnRyZTEOMAwGA1UECxMFTklD
+Q0ExITAfBgNVBAMTGE5JQyBDZXJ0aWZ5aW5nIEF1dGhvcml0eTESMBAGA1UEBxMJ
+TmV3IERlbGhpMSQwIgYJKoZIhvcNAQkBFhVzdXBwb3J0QGNhbWFpbC5uaWMuaW4x
+DjAMBgNVBAgTBURlbGhpMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
+wLRKDEWWC1iWcxpVgA7GJEjQVjGIMx9XPLoaMKXiEQdajHgmjKdOhlFkSWiHgiCS
+Uo39U0/UoC4rAYzBCcfHWdAGjXNs7dt/cz+muK2aMoPoAgXWLF2A48CJMrTcyNFE
+HryIYJeCiK8DTlEhBxL8II9VBx8qKSquizh4MQTmpqvfjHNqd6qCHF6q8W439io5
+kVIFnGNd/p0V5HFv0OpWeF/IpKJA1m1lb729FwfsVpqipf7DLVQUKtSjK/32RDtB
+hnAmkDlW6IZRPs2F896A5COPSDjJlAeUX8JqDnBOr64bPRgUy0VDnW/soRB3knkn
+5w5ueXj3DrgONtjGcBSwVwIDAQABo4HOMIHLMA8GA1UdEwEB/wQFMAMBAf8wEQYD
+VR0OBAoECEwne24Nsv9UMBMGA1UdIwQMMAqACE8ewFgn2LjkMAsGA1UdDwQEAwIB
+BjCBggYDVR0fBHsweTB3oHWgc4ZxbGRhcDovL25yZGMuY2NhLmdvdi5pbjozODkv
+Y249Q0NBIEluZGlhIDIwMDcsb3U9Q0NBIEluZGlhIDIwMDcsbz1JbmRpYSBQS0ks
+Yz1JTj9jZXJ0aWZpY2F0ZXJldm9jYXRpb25saXN0O2JpbmFyeT8wDQYJKoZIhvcN
+AQEFBQADggEBAKx6RkVgMGQADgl4jTy3qBDq8nvkegDaDnviTUsGzsR6RpooT0xd
+wuKiRU0I7p2gAo6uBTMEZtS+XWJz+7xlfo4fao5XIU4e1fxkQuxddM23/J7M4+Uz
+3pL7ziK5RcVizhQqz3IjSH440/OoFhUBT5d5WWN0hliEcr7+6nLPAOcAX/qR509a
+Djd/aonfyQFCMyfiPpYLx5ElTuqUZeHApJ58+Iprwbu3EIux+C+mfS8QCMY+WYje
+aocCIwIutrmoxIXxGy9yV5OKIe2+4wsCT8aNin+6AV7qNTmFVhp+MF50v69ONTO7
+w2Sa+ire2N5FgklMW2WTCi8d8rwLzaWuse4=
+-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/more-certificates/blacklisted-nic-india-2011.pem b/tests/auto/qsslcertificate/more-certificates/blacklisted-nic-india-2011.pem
new file mode 100644
index 0000000..d3a8c10
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/blacklisted-nic-india-2011.pem
@@ -0,0 +1,26 @@
+-----BEGIN CERTIFICATE-----
+MIIEWzCCA0OgAwIBAgICJ5IwDQYJKoZIhvcNAQELBQAwOjELMAkGA1UEBhMCSU4x
+EjAQBgNVBAoTCUluZGlhIFBLSTEXMBUGA1UEAxMOQ0NBIEluZGlhIDIwMTEwHhcN
+MTEwMzExMDgxNTExWhcNMTYwMzExMDYzMDAwWjCByDELMAkGA1UEBhMCSU4xJDAi
+BgNVBAoTG05hdGlvbmFsIEluZm9ybWF0aWNzIENlbnRyZTEdMBsGA1UECxMUQ2Vy
+dGlmeWluZyBBdXRob3JpdHkxDzANBgNVBBETBjExMDAwMzEOMAwGA1UECBMFRGVs
+aGkxHjAcBgNVBAkTFUxvZGhpIFJvYWQsIE5ldyBEZWxoaTEdMBsGA1UEMwwUQS1C
+bG9jaywgQ0dPIENvbXBsZXgxFDASBgNVBAMTC05JQyBDQSAyMDExMIIBIjANBgkq
+hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7J/N88MoXcCHTz4A5DKF59+8kvSnriGr
+TEowLSa5NCvH+o89+Mf7V260kKZJ/hQox5RG/F8/gY7u9ziLeypbedeG8EIl88HC
+4x9hT0SNLsrj9qo90waDuGYB4/KQ8q5E6ivVxxV0epzQfFA5A5biKltPBbku/M4D
+iZ+TqBbHxo6nRUEZoukJi0+JLykGI4VpJlQBzow04omxQUZHzvCffo6QvN6FdzZ0
+MopwqaggyfHDFu9o4elCR9Kd/obYlgXAHLYwJlN0pybbe2WpKj81/pxDhKgxrVN+
+OZaI5OMBBkjDRQG+ZyEnQb8XYMNPJbOgQGYgsRdPPjIn7poTzxe7SQIDAQABo4Hb
+MIHYMBIGA1UdEwEB/wQIMAYBAf8CAQEwEQYDVR0OBAoECE5VT66z36FmMBIGA1Ud
+IAQLMAkwBwYFYIJkZAIwEwYDVR0jBAwwCoAITQeoY/LbHN8wLgYIKwYBBQUHAQEE
+IjAgMB4GCCsGAQUFBzABhhJodHRwOi8vb2N2cy5nb3YuaW4wDgYDVR0PAQH/BAQD
+AgEGMEYGA1UdHwQ/MD0wO6A5oDeGNWh0dHA6Ly9jY2EuZ292LmluL3J3L3Jlc291
+cmNlcy9DQ0FJbmRpYTIwMTFMYXRlc3QuY3JsMA0GCSqGSIb3DQEBCwUAA4IBAQB5
+LCqtHbxfO72KRWJbW9dAHNh2xh8n7wstNgSPHLbjL5B0l7RZlCFauy4fjc2faMiB
+xnOq5oEXeIZBrT2NkuEymQ8f0Pzm3pcXrMkFrj78SiA07/cPQShBKKpw39t6puJV
+8ykiVZMZvSCjCzzZZlVO12b2ChADkf6wtseftx5O/zBsqP3Y2+3+KvEeDVtuseKu
+FV2OxSsqSfffJq7IYTwpRPOVzHGJnjV3Igtj3zAzZm8CWxRM/yhnkGyVc+xz/T7o
+WY0870eciR+bmLjZ9j0opudZR6e+lCsMHH2Lxc8C/0XRcCzcganxfWCb/fb0gx44
+iY0a+wWCVebjuyKU/BXk
+-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/more-certificates/blacklisted-nic-india-2014.pem b/tests/auto/qsslcertificate/more-certificates/blacklisted-nic-india-2014.pem
new file mode 100644
index 0000000..5467086
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/blacklisted-nic-india-2014.pem
@@ -0,0 +1,26 @@
+-----BEGIN CERTIFICATE-----
+MIIEWzCCA0OgAwIBAgICJ7EwDQYJKoZIhvcNAQELBQAwOjELMAkGA1UEBhMCSU4x
+EjAQBgNVBAoTCUluZGlhIFBLSTEXMBUGA1UEAxMOQ0NBIEluZGlhIDIwMTQwHhcN
+MTQwMzA1MTExNTI0WhcNMjQwMzA1MDYzMDAwWjCByDELMAkGA1UEBhMCSU4xJDAi
+BgNVBAoTG05hdGlvbmFsIEluZm9ybWF0aWNzIENlbnRyZTEdMBsGA1UECxMUQ2Vy
+dGlmeWluZyBBdXRob3JpdHkxDzANBgNVBBETBjExMDAwMzEOMAwGA1UECBMFRGVs
+aGkxHjAcBgNVBAkTFUxvZGhpIFJvYWQsIE5ldyBEZWxoaTEdMBsGA1UEMxMUQS1C
+bG9jaywgQ0dPIENvbXBsZXgxFDASBgNVBAMTC05JQyBDQSAyMDE0MIIBIjANBgkq
+hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA/OQ56Ge9MhJiBwtOlCJP4p5gjcCuqkQ2
+6BCSQgfAsxyNxAwtL1f0h3d5KNFIInIG2Y9PwBgUrgavOWy2cZICxgXIGaOzK5bI
+TyGhxYMPUzkazGppfj0ScW7Ed/kjeDnic3WlYkPwtNaV1qwTElr8zqPUtT27ZDqd
+6upor9MICngXAC1tHjhPuGrGtu4i6FMPrmkofwdh8dkuRzU/OPjf9lA+E9Qu0Nvq
+soI9grJA0etgRfn9juR4X3KTG21qHnza50PpMYC4+vh8jAnIT7Kcz8Ggr4eghkvP
++iz2yEtIcV9M1xeo98XU/jxuYS7LeWtO79jkiqCIqgI8T3x7LHuCaQIDAQABo4Hb
+MIHYMBIGA1UdEwEB/wQIMAYBAf8CAQEwEQYDVR0OBAoECEZwyi8lTsNHMBIGA1Ud
+IAQLMAkwBwYFYIJkZAIwEwYDVR0jBAwwCoAIQrjFz22zV+EwLgYIKwYBBQUHAQEE
+IjAgMB4GCCsGAQUFBzABhhJodHRwOi8vb2N2cy5nb3YuaW4wDgYDVR0PAQH/BAQD
+AgEGMEYGA1UdHwQ/MD0wO6A5oDeGNWh0dHA6Ly9jY2EuZ292LmluL3J3L3Jlc291
+cmNlcy9DQ0FJbmRpYTIwMTRMYXRlc3QuY3JsMA0GCSqGSIb3DQEBCwUAA4IBAQCB
+i3iJeUlkfjY96HgfBIUEsLi+knO3VUrxDmwps1YyhgRSt22NQLZ4jksSWLI2EQbn
+9k5tH8rwSbsOWf+TZH7jpaKAVSYi1GhEbGR/C2ZeFiWATwtPWKoVGwx/ksUO9YPM
+zf0wh6fDIuyBJIs/nuN93+L2ib+TS5viNky+HrR3XyqE0z43W5bbzMbido3lbwgr
+drMWD6hCNSZs888L0Se4rn2ei0aPmHmxjDjbExF3NF6m2uYC/wAR4cVIzMvvptFY
+n+SAdG/pwkKHaMVncB/cxxEWiKzOxVpjBsM4N19lpxp2RU/n+x7xRK3WTQvNAZdU
+7pcAYmZIXPu/ES9qpK4f
+-----END CERTIFICATE-----
--
1.9.3

View File

@ -0,0 +1,44 @@
From 6c3b032693acf86a894a8ea3a30c937a1d08ed7f Mon Sep 17 00:00:00 2001
From: aavit <eirik.aavitsland@digia.com>
Date: Tue, 12 Aug 2014 13:54:17 +0200
Subject: [PATCH 65/74] Fix QPainter::drawPolyline() painting errors with
cosmetic pen
Task-number: QTBUG-31579
Change-Id: I8fd2c03ff9a22e4963bfcbcfe196ae4c61b9e10f
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
(cherry picked from qtbase/319cbb7597100f3b65792dc6a0ce2885ce6c0e8c)
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
---
src/gui/painting/qcosmeticstroker.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp
index 5ca652e..1255a3b 100644
--- a/src/gui/painting/qcosmeticstroker.cpp
+++ b/src/gui/painting/qcosmeticstroker.cpp
@@ -533,8 +533,8 @@ void QCosmeticStroker::drawPath(const QVectorPath &path)
QPointF p = QPointF(points[0], points[1]) * state->matrix;
patternOffset = state->lastPen.dashOffset()*64;
- lastPixel.x = -1;
- lastPixel.y = -1;
+ lastPixel.x = INT_MIN;
+ lastPixel.y = INT_MIN;
bool closed;
const QPainterPath::ElementType *e = subPath(type, end, points, &closed);
@@ -588,8 +588,8 @@ void QCosmeticStroker::drawPath(const QVectorPath &path)
QPointF p = QPointF(points[0], points[1]) * state->matrix;
QPointF movedTo = p;
patternOffset = state->lastPen.dashOffset()*64;
- lastPixel.x = -1;
- lastPixel.y = -1;
+ lastPixel.x = INT_MIN;
+ lastPixel.y = INT_MIN;
const qreal *begin = points;
const qreal *end = points + 2*path.elementCount();
--
1.9.3

View File

@ -0,0 +1,37 @@
From 3633f35a607872108fdc3ce06914f7d42a4facdf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lisandro=20Dami=C3=A1n=20Nicanor=20P=C3=A9rez=20Meyer?=
<perezmeyer@gmail.com>
Date: Sat, 23 Aug 2014 15:05:34 -0300
Subject: [PATCH 66/74] Allow Qt4 to also build in ppc64[el le]
This simple patch allows ppc64le (aka ppc64el) to build Qt4.
The original patch was done by Ubuntu's William Grant [0], but
I higly doubt this is copyrighteable.
[0] <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749743#39>
Change-Id: I4cd204e314789337e34b460dda6e18143e3712ec
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index a9ba7c8..ea7cc08 100755
--- a/configure
+++ b/configure
@@ -3229,7 +3229,7 @@ if [ -z "${CFG_HOST_ARCH}" ]; then
fi
CFG_HOST_ARCH=powerpc
;;
- *:*:ppc64)
+ *:*:ppc64*)
if [ "$OPT_VERBOSE" = "yes" ]; then
echo " 64-bit PowerPC (powerpc)"
fi
--
1.9.3

View File

@ -0,0 +1,51 @@
From 93c137ea29f011a267e22fa644a40aba6e3e2d22 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lisandro=20Dami=C3=A1n=20Nicanor=20P=C3=A9rez=20Meyer?=
<perezmeyer@gmail.com>
Date: Wed, 20 Aug 2014 17:52:49 -0300
Subject: [PATCH 67/74] Fix AArch64/arm64 detection.
The detection needs to go before arm, else the system will detect AArch64/arm64
as arm.
This patch comes from Wookey, he has agreed to put it under BSD or Expat
to allow it's inclusion in here:
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735488#255>
Change-Id: Ic2171c03fca8bb871347940fa3a2bc467776f797
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
---
configure | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/configure b/configure
index ea7cc08..f3a800a 100755
--- a/configure
+++ b/configure
@@ -3241,17 +3241,17 @@ if [ -z "${CFG_HOST_ARCH}" ]; then
fi
CFG_HOST_ARCH=s390
;;
- *:*:arm*)
+ *:*:aarch64*|*:*:arm64*)
if [ "$OPT_VERBOSE" = "yes" ]; then
- echo " ARM (arm)"
+ echo " AArch64 (aarch64)"
fi
- CFG_HOST_ARCH=arm
+ CFG_HOST_ARCH=aarch64
;;
- *:*:aarch64*)
+ *:*:arm*)
if [ "$OPT_VERBOSE" = "yes" ]; then
- echo " AArch64 (aarch64)"
+ echo " ARM (arm)"
fi
- CFG_HOST_ARCH=aarch64
+ CFG_HOST_ARCH=arm
;;
Linux:*:sparc*)
if [ "$OPT_VERBOSE" = "yes" ]; then
--
1.9.3

View File

@ -0,0 +1,41 @@
From 80e3108f5cd1e1850ec81a21100d79a0946addd7 Mon Sep 17 00:00:00 2001
From: Miikka Heikkinen <miikka.heikkinen@digia.com>
Date: Fri, 16 Mar 2012 11:13:55 +0200
Subject: [PATCH 72/74] Fix font cache check in QFontEngineFT::recalcAdvances()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cached font was used regardless of the format, resulting in incorrect
advance in some cases when default format differed from the cached
format.
Task-number: QTBUG-24188
Change-Id: I39e4156bd9ba743afa7e106e934c90227fbf2b8b
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
(cherry picked from qtbase/2ea976c3a713535c2419d936d575e0b24545f0fa)
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Jiang Jiang <gzjjgod@gmail.com>
---
src/gui/text/qfontengine_ft.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index aecbf76..44a0aca 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -1603,7 +1603,9 @@ void QFontEngineFT::recalcAdvances(QGlyphLayout *glyphs, QTextEngine::ShaperFlag
(flags & HB_ShaperFlag_UseDesignMetrics)) && FT_IS_SCALABLE(freetype->face);
for (int i = 0; i < glyphs->numGlyphs; i++) {
Glyph *g = defaultGlyphSet.getGlyph(glyphs->glyphs[i]);
- if (g) {
+ // Since we are passing Format_None to loadGlyph, use same default format logic as loadGlyph
+ GlyphFormat acceptableFormat = (defaultFormat != Format_None) ? defaultFormat : Format_Mono;
+ if (g && g->format == acceptableFormat) {
glyphs->advances_x[i] = design ? QFixed::fromFixed(g->linearAdvance) : QFixed(g->advance);
} else {
if (!face)
--
1.9.3

View File

@ -0,0 +1,42 @@
From e50aa2252cdd5cb53eef7d8c4503c7edff634f68 Mon Sep 17 00:00:00 2001
From: "Richard J. Moore" <rich@kde.org>
Date: Tue, 24 Feb 2015 19:02:35 +0000
Subject: [PATCH 137/138] Fix a division by zero when processing malformed BMP
files.
This fixes a division by 0 when processing a maliciously crafted BMP
file. No impact beyond DoS.
Backport of 661f6bfd032dacc62841037732816a583640e187
Task-number: QTBUG-44547
Change-Id: I43f06e752b11cb50669101460902a82b885ae618
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
---
src/gui/image/qbmphandler.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp
index b22e842..30fa9e0 100644
--- a/src/gui/image/qbmphandler.cpp
+++ b/src/gui/image/qbmphandler.cpp
@@ -319,10 +319,16 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
}
} else if (comp == BMP_BITFIELDS && (nbits == 16 || nbits == 32)) {
red_shift = calc_shift(red_mask);
+ if (((red_mask >> red_shift) + 1) == 0)
+ return false;
red_scale = 256 / ((red_mask >> red_shift) + 1);
green_shift = calc_shift(green_mask);
+ if (((green_mask >> green_shift) + 1) == 0)
+ return false;
green_scale = 256 / ((green_mask >> green_shift) + 1);
blue_shift = calc_shift(blue_mask);
+ if (((blue_mask >> blue_shift) + 1) == 0)
+ return false;
blue_scale = 256 / ((blue_mask >> blue_shift) + 1);
} else if (comp == BMP_RGB && (nbits == 24 || nbits == 32)) {
blue_mask = 0x000000ff;
--
1.9.3

View File

@ -0,0 +1,434 @@
From fa81aa6d027049e855b76f5408586a288f160575 Mon Sep 17 00:00:00 2001
From: Markus Goetz <markus@woboq.com>
Date: Tue, 28 Apr 2015 11:57:36 +0200
Subject: [PATCH 163/163] QNAM: Fix upload corruptions when server closes
connection
This patch fixes several upload corruptions if the server closes the connection
while/before we send data into it. They happen inside multiple places in the HTTP
layer and are explained in the comments.
Corruptions are:
* The upload byte device has an in-flight signal with pending upload data, if
it gets reset (because server closes the connection) then the re-send of the
request was sometimes taking this stale in-flight pending upload data.
* Because some signals were DirectConnection and some were QueuedConnection, there
was a chance that a direct signal overtakes a queued signal. The state machine
then sent data down the socket which was buffered there (and sent later) although
it did not match the current state of the state machine when it was actually sent.
* A socket was seen as being able to have requests sent even though it was not
encrypted yet. This relates to the previous corruption where data is stored inside
the socket's buffer and then sent later.
The included auto test produces all fixed corruptions, I detected no regressions
via the other tests.
This code also adds a bit of sanity checking to protect from possible further
problems.
[ChangeLog][QtNetwork] Fix HTTP(s) upload corruption when server closes connection
(cherry picked from commit qtbase/cff39fba10ffc10ee4dcfdc66ff6528eb26462d3)
Change-Id: I9793297be6cf3edfb75b65ba03b65f7a133ef194
Reviewed-by: Richard J. Moore <rich@kde.org>
---
src/corelib/io/qnoncontiguousbytedevice.cpp | 19 +++
src/corelib/io/qnoncontiguousbytedevice_p.h | 4 +
.../access/qhttpnetworkconnectionchannel.cpp | 47 +++++-
src/network/access/qhttpthreaddelegate_p.h | 36 ++++-
src/network/access/qnetworkaccesshttpbackend.cpp | 24 ++-
src/network/access/qnetworkaccesshttpbackend_p.h | 5 +-
tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 174 ++++++++++++++++++++-
7 files changed, 280 insertions(+), 29 deletions(-)
diff --git a/src/corelib/io/qnoncontiguousbytedevice.cpp b/src/corelib/io/qnoncontiguousbytedevice.cpp
index bf58eee..1a0591e 100644
--- a/src/corelib/io/qnoncontiguousbytedevice.cpp
+++ b/src/corelib/io/qnoncontiguousbytedevice.cpp
@@ -245,6 +245,12 @@ qint64 QNonContiguousByteDeviceByteArrayImpl::size()
return byteArray->size();
}
+qint64 QNonContiguousByteDeviceByteArrayImpl::pos()
+{
+ return currentPosition;
+}
+
+
QNonContiguousByteDeviceRingBufferImpl::QNonContiguousByteDeviceRingBufferImpl(QSharedPointer<QRingBuffer> rb)
: QNonContiguousByteDevice(), currentPosition(0)
{
@@ -296,6 +302,11 @@ qint64 QNonContiguousByteDeviceRingBufferImpl::size()
return ringBuffer->size();
}
+qint64 QNonContiguousByteDeviceRingBufferImpl::pos()
+{
+ return currentPosition;
+}
+
QNonContiguousByteDeviceIoDeviceImpl::QNonContiguousByteDeviceIoDeviceImpl(QIODevice *d)
: QNonContiguousByteDevice(),
currentReadBuffer(0), currentReadBufferSize(16*1024),
@@ -415,6 +426,14 @@ qint64 QNonContiguousByteDeviceIoDeviceImpl::size()
return device->size() - initialPosition;
}
+qint64 QNonContiguousByteDeviceIoDeviceImpl::pos()
+{
+ if (device->isSequential())
+ return -1;
+
+ return device->pos();
+}
+
QByteDeviceWrappingIoDevice::QByteDeviceWrappingIoDevice(QNonContiguousByteDevice *bd) : QIODevice((QObject*)0)
{
byteDevice = bd;
diff --git a/src/corelib/io/qnoncontiguousbytedevice_p.h b/src/corelib/io/qnoncontiguousbytedevice_p.h
index b6966eb..d1a99a1 100644
--- a/src/corelib/io/qnoncontiguousbytedevice_p.h
+++ b/src/corelib/io/qnoncontiguousbytedevice_p.h
@@ -69,6 +69,7 @@ public:
virtual const char* readPointer(qint64 maximumLength, qint64 &len) = 0;
virtual bool advanceReadPointer(qint64 amount) = 0;
virtual bool atEnd() = 0;
+ virtual qint64 pos() { return -1; }
virtual bool reset() = 0;
void disableReset();
bool isResetDisabled() { return resetDisabled; }
@@ -108,6 +109,7 @@ public:
bool atEnd();
bool reset();
qint64 size();
+ qint64 pos();
protected:
QByteArray* byteArray;
qint64 currentPosition;
@@ -123,6 +125,7 @@ public:
bool atEnd();
bool reset();
qint64 size();
+ qint64 pos();
protected:
QSharedPointer<QRingBuffer> ringBuffer;
qint64 currentPosition;
@@ -140,6 +143,7 @@ public:
bool atEnd();
bool reset();
qint64 size();
+ qint64 pos();
protected:
QIODevice* device;
QByteArray* currentReadBuffer;
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index 550e090..db2f712 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -107,15 +107,19 @@ void QHttpNetworkConnectionChannel::init()
socket->setProxy(QNetworkProxy::NoProxy);
#endif
+ // We want all signals (except the interactive ones) be connected as QueuedConnection
+ // because else we're falling into cases where we recurse back into the socket code
+ // and mess up the state. Always going to the event loop (and expecting that when reading/writing)
+ // is safer.
QObject::connect(socket, SIGNAL(bytesWritten(qint64)),
this, SLOT(_q_bytesWritten(qint64)),
- Qt::DirectConnection);
+ Qt::QueuedConnection);
QObject::connect(socket, SIGNAL(connected()),
this, SLOT(_q_connected()),
- Qt::DirectConnection);
+ Qt::QueuedConnection);
QObject::connect(socket, SIGNAL(readyRead()),
this, SLOT(_q_readyRead()),
- Qt::DirectConnection);
+ Qt::QueuedConnection);
// The disconnected() and error() signals may already come
// while calling connectToHost().
@@ -144,13 +148,13 @@ void QHttpNetworkConnectionChannel::init()
// won't be a sslSocket if encrypt is false
QObject::connect(sslSocket, SIGNAL(encrypted()),
this, SLOT(_q_encrypted()),
- Qt::DirectConnection);
+ Qt::QueuedConnection);
QObject::connect(sslSocket, SIGNAL(sslErrors(QList<QSslError>)),
this, SLOT(_q_sslErrors(QList<QSslError>)),
Qt::DirectConnection);
QObject::connect(sslSocket, SIGNAL(encryptedBytesWritten(qint64)),
this, SLOT(_q_encryptedBytesWritten(qint64)),
- Qt::DirectConnection);
+ Qt::QueuedConnection);
}
#endif
}
@@ -163,7 +167,8 @@ void QHttpNetworkConnectionChannel::close()
else
state = QHttpNetworkConnectionChannel::ClosingState;
- socket->close();
+ if (socket)
+ socket->close();
}
@@ -280,6 +285,14 @@ bool QHttpNetworkConnectionChannel::sendRequest()
// nothing to read currently, break the loop
break;
} else {
+ if (written != uploadByteDevice->pos()) {
+ // Sanity check. This was useful in tracking down an upload corruption.
+ qWarning() << "QHttpProtocolHandler: Internal error in sendRequest. Expected to write at position" << written << "but read device is at" << uploadByteDevice->pos();
+ Q_ASSERT(written == uploadByteDevice->pos());
+ connection->d_func()->emitReplyError(socket, reply, QNetworkReply::ProtocolFailure);
+ return false;
+ }
+
qint64 currentWriteSize = socket->write(readPointer, currentReadSize);
if (currentWriteSize == -1 || currentWriteSize != currentReadSize) {
// socket broke down
@@ -639,6 +652,14 @@ bool QHttpNetworkConnectionChannel::ensureConnection()
}
return false;
}
+
+ // This code path for ConnectedState
+ if (pendingEncrypt) {
+ // Let's only be really connected when we have received the encrypted() signal. Else the state machine seems to mess up
+ // and corrupt the things sent to the server.
+ return false;
+ }
+
return true;
}
@@ -980,6 +1001,13 @@ void QHttpNetworkConnectionChannel::_q_readyRead()
void QHttpNetworkConnectionChannel::_q_bytesWritten(qint64 bytes)
{
Q_UNUSED(bytes);
+
+ if (ssl) {
+ // In the SSL case we want to send data from encryptedBytesWritten signal since that one
+ // is the one going down to the actual network, not only into some SSL buffer.
+ return;
+ }
+
// bytes have been written to the socket. write even more of them :)
if (isSocketWriting())
sendRequest();
@@ -1029,7 +1057,7 @@ void QHttpNetworkConnectionChannel::_q_connected()
// ### FIXME: if the server closes the connection unexpectedly, we shouldn't send the same broken request again!
//channels[i].reconnectAttempts = 2;
- if (!pendingEncrypt) {
+ if (!pendingEncrypt && !ssl) { // FIXME: Didn't work properly with pendingEncrypt only, we should refactor this into an EncrypingState
state = QHttpNetworkConnectionChannel::IdleState;
if (!reply)
connection->d_func()->dequeueRequest(socket);
@@ -1157,7 +1185,10 @@ void QHttpNetworkConnectionChannel::_q_proxyAuthenticationRequired(const QNetwor
void QHttpNetworkConnectionChannel::_q_uploadDataReadyRead()
{
- sendRequest();
+ if (reply && state == QHttpNetworkConnectionChannel::WritingState) {
+ // There might be timing issues, make sure to only send upload data if really in that state
+ sendRequest();
+ }
}
#ifndef QT_NO_OPENSSL
diff --git a/src/network/access/qhttpthreaddelegate_p.h b/src/network/access/qhttpthreaddelegate_p.h
index 7648325..9dd0deb 100644
--- a/src/network/access/qhttpthreaddelegate_p.h
+++ b/src/network/access/qhttpthreaddelegate_p.h
@@ -190,6 +190,7 @@ protected:
QByteArray m_dataArray;
bool m_atEnd;
qint64 m_size;
+ qint64 m_pos; // to match calls of haveDataSlot with the expected position
public:
QNonContiguousByteDeviceThreadForwardImpl(bool aE, qint64 s)
: QNonContiguousByteDevice(),
@@ -197,7 +198,8 @@ public:
m_amount(0),
m_data(0),
m_atEnd(aE),
- m_size(s)
+ m_size(s),
+ m_pos(0)
{
}
@@ -205,6 +207,11 @@ public:
{
}
+ qint64 pos()
+ {
+ return m_pos;
+ }
+
const char* readPointer(qint64 maximumLength, qint64 &len)
{
if (m_amount > 0) {
@@ -232,11 +239,10 @@ public:
m_amount -= a;
m_data += a;
+ m_pos += a;
- // To main thread to inform about our state
- emit processedData(a);
-
- // FIXME possible optimization, already ask user thread for some data
+ // To main thread to inform about our state. The m_pos will be sent as a sanity check.
+ emit processedData(m_pos, a);
return true;
}
@@ -253,10 +259,21 @@ public:
{
m_amount = 0;
m_data = 0;
+ m_dataArray.clear();
+
+ if (wantDataPending) {
+ // had requested the user thread to send some data (only 1 in-flight at any moment)
+ wantDataPending = false;
+ }
// Communicate as BlockingQueuedConnection
bool b = false;
emit resetData(&b);
+ if (b) {
+ // the reset succeeded, we're at pos 0 again
+ m_pos = 0;
+ // the HTTP code will anyway abort the request if !b.
+ }
return b;
}
@@ -267,8 +284,13 @@ public:
public slots:
// From user thread:
- void haveDataSlot(QByteArray dataArray, bool dataAtEnd, qint64 dataSize)
+ void haveDataSlot(qint64 pos, QByteArray dataArray, bool dataAtEnd, qint64 dataSize)
{
+ if (pos != m_pos) {
+ // Sometimes when re-sending a request in the qhttpnetwork* layer there is a pending haveData from the
+ // user thread on the way to us. We need to ignore it since it is the data for the wrong(later) chunk.
+ return;
+ }
wantDataPending = false;
m_dataArray = dataArray;
@@ -288,7 +310,7 @@ signals:
// to main thread:
void wantData(qint64);
- void processedData(qint64);
+ void processedData(qint64 pos, qint64 amount);
void resetData(bool *b);
};
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index cc67258..fe2f627 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -193,6 +193,7 @@ QNetworkAccessHttpBackendFactory::create(QNetworkAccessManager::Operation op,
QNetworkAccessHttpBackend::QNetworkAccessHttpBackend()
: QNetworkAccessBackend()
, statusCode(0)
+ , uploadByteDevicePosition(false)
, pendingDownloadDataEmissions(new QAtomicInt())
, pendingDownloadProgressEmissions(new QAtomicInt())
, loadingFromCache(false)
@@ -610,9 +611,9 @@ void QNetworkAccessHttpBackend::postRequest()
forwardUploadDevice->setParent(delegate); // needed to make sure it is moved on moveToThread()
delegate->httpRequest.setUploadByteDevice(forwardUploadDevice);
- // From main thread to user thread:
- QObject::connect(this, SIGNAL(haveUploadData(QByteArray, bool, qint64)),
- forwardUploadDevice, SLOT(haveDataSlot(QByteArray, bool, qint64)), Qt::QueuedConnection);
+ // From user thread to http thread:
+ QObject::connect(this, SIGNAL(haveUploadData(qint64,QByteArray,bool,qint64)),
+ forwardUploadDevice, SLOT(haveDataSlot(qint64,QByteArray,bool,qint64)), Qt::QueuedConnection);
QObject::connect(uploadByteDevice.data(), SIGNAL(readyRead()),
forwardUploadDevice, SIGNAL(readyRead()),
Qt::QueuedConnection);
@@ -620,8 +621,8 @@ void QNetworkAccessHttpBackend::postRequest()
// From http thread to user thread:
QObject::connect(forwardUploadDevice, SIGNAL(wantData(qint64)),
this, SLOT(wantUploadDataSlot(qint64)));
- QObject::connect(forwardUploadDevice, SIGNAL(processedData(qint64)),
- this, SLOT(sentUploadDataSlot(qint64)));
+ QObject::connect(forwardUploadDevice,SIGNAL(processedData(qint64, qint64)),
+ this, SLOT(sentUploadDataSlot(qint64,qint64)));
connect(forwardUploadDevice, SIGNAL(resetData(bool*)),
this, SLOT(resetUploadDataSlot(bool*)),
Qt::BlockingQueuedConnection); // this is the only one with BlockingQueued!
@@ -915,12 +916,21 @@ void QNetworkAccessHttpBackend::replySslConfigurationChanged(const QSslConfigura
void QNetworkAccessHttpBackend::resetUploadDataSlot(bool *r)
{
*r = uploadByteDevice->reset();
+ if (*r) {
+ // reset our own position which is used for the inter-thread communication
+ uploadByteDevicePosition = 0;
+ }
}
// Coming from QNonContiguousByteDeviceThreadForwardImpl in HTTP thread
-void QNetworkAccessHttpBackend::sentUploadDataSlot(qint64 amount)
+void QNetworkAccessHttpBackend::sentUploadDataSlot(qint64 pos, qint64 amount)
{
+ if (uploadByteDevicePosition + amount != pos) {
+ // Sanity check, should not happen.
+ error(QNetworkReply::UnknownNetworkError, "");
+ }
uploadByteDevice->advanceReadPointer(amount);
+ uploadByteDevicePosition += amount;
}
// Coming from QNonContiguousByteDeviceThreadForwardImpl in HTTP thread
@@ -933,7 +943,7 @@ void QNetworkAccessHttpBackend::wantUploadDataSlot(qint64 maxSize)
QByteArray dataArray(data, currentUploadDataLength);
// Communicate back to HTTP thread
- emit haveUploadData(dataArray, uploadByteDevice->atEnd(), uploadByteDevice->size());
+ emit haveUploadData(uploadByteDevicePosition, dataArray, uploadByteDevice->atEnd(), uploadByteDevice->size());
}
/*
diff --git a/src/network/access/qnetworkaccesshttpbackend_p.h b/src/network/access/qnetworkaccesshttpbackend_p.h
index 13519c6..b4ed67c 100644
--- a/src/network/access/qnetworkaccesshttpbackend_p.h
+++ b/src/network/access/qnetworkaccesshttpbackend_p.h
@@ -112,7 +112,7 @@ signals:
void startHttpRequestSynchronously();
- void haveUploadData(QByteArray dataArray, bool dataAtEnd, qint64 dataSize);
+ void haveUploadData(const qint64 pos, QByteArray dataArray, bool dataAtEnd, qint64 dataSize);
private slots:
// From HTTP thread:
void replyDownloadData(QByteArray);
@@ -129,13 +129,14 @@ private slots:
// From QNonContiguousByteDeviceThreadForwardImpl in HTTP thread:
void resetUploadDataSlot(bool *r);
void wantUploadDataSlot(qint64);
- void sentUploadDataSlot(qint64);
+ void sentUploadDataSlot(qint64, qint64);
bool sendCacheContents(const QNetworkCacheMetaData &metaData);
private:
QHttpNetworkRequest httpRequest; // There is also a copy in the HTTP thread
int statusCode;
+ qint64 uploadByteDevicePosition;
QString reasonPhrase;
// Will be increased by HTTP thread:
QSharedPointer<QAtomicInt> pendingDownloadDataEmissions;
--
1.9.3

View File

@ -18,16 +18,13 @@
%_qt4_sysconfdir %{_sysconfdir}
%_qt4_translationdir %{_datadir}/qt4/translations
%_qt4_ldflags %{?__global_ldflags}
%_qt4_optflags %{optflags}
%_qt4_qmake_flags \\\
QMAKE_CFLAGS_DEBUG="${CFLAGS:-%{_qt4_optflags}}" \\\
QMAKE_CFLAGS_RELEASE="${CFLAGS:-%{_qt4_optflags}}" \\\
QMAKE_CXXFLAGS_DEBUG="${CXXFLAGS:-%{_qt4_optflags}}" \\\
QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS:-%{_qt4_optflags}}" \\\
QMAKE_LFLAGS_DEBUG="${LDFLAGS:-%{_qt4_ldflags}}" \\\
QMAKE_LFLAGS_RELEASE="${LDFLAGS:-%{_qt4_ldflags}}" \\\
%qmake_qt4 \
%{_qt4_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}}" \\\
QMAKE_STRIP=
%qmake_qt4 %{_qt4_qmake} %{_qt4_qmake_flags}

View File

@ -6,10 +6,7 @@
#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

@ -0,0 +1,54 @@
diff -up qt-everywhere-opensource-src-4.8.6/src/gui/image/qbmphandler.cpp.than qt-everywhere-opensource-src-4.8.6/src/gui/image/qbmphandler.cpp
--- qt-everywhere-opensource-src-4.8.6/src/gui/image/qbmphandler.cpp.than 2015-04-13 16:03:24.347475762 +0200
+++ qt-everywhere-opensource-src-4.8.6/src/gui/image/qbmphandler.cpp 2015-04-13 16:04:42.781923479 +0200
@@ -478,12 +478,6 @@ static bool read_dib_body(QDataStream &s
p = data + (h-y-1)*bpl;
break;
case 2: // delta (jump)
- // Protection
- if ((uint)x >= (uint)w)
- x = w-1;
- if ((uint)y >= (uint)h)
- y = h-1;
-
{
quint8 tmp;
d->getChar((char *)&tmp);
@@ -491,6 +485,13 @@ static bool read_dib_body(QDataStream &s
d->getChar((char *)&tmp);
y += tmp;
}
+
+ // Protection
+ if ((uint)x >= (uint)w)
+ x = w-1;
+ if ((uint)y >= (uint)h)
+ y = h-1;
+
p = data + (h-y-1)*bpl + x;
break;
default: // absolute mode
diff -up qt-everywhere-opensource-src-4.8.6/src/gui/image/qgifhandler.cpp.than qt-everywhere-opensource-src-4.8.6/src/gui/image/qgifhandler.cpp
--- qt-everywhere-opensource-src-4.8.6/src/gui/image/qgifhandler.cpp.than 2015-04-13 16:10:38.284420268 +0200
+++ qt-everywhere-opensource-src-4.8.6/src/gui/image/qgifhandler.cpp 2015-04-13 16:11:17.406144797 +0200
@@ -944,6 +944,8 @@ void QGIFFormat::fillRect(QImage *image,
void QGIFFormat::nextY(unsigned char *bits, int bpl)
{
+ if (out_of_bounds)
+ return;
int my;
switch (interlace) {
case 0: // Non-interlaced
diff -up qt-everywhere-opensource-src-4.8.6/src/plugins/imageformats/ico/qicohandler.cpp.than qt-everywhere-opensource-src-4.8.6/src/plugins/imageformats/ico/qicohandler.cpp
--- qt-everywhere-opensource-src-4.8.6/src/plugins/imageformats/ico/qicohandler.cpp.than 2015-04-13 16:05:02.059787728 +0200
+++ qt-everywhere-opensource-src-4.8.6/src/plugins/imageformats/ico/qicohandler.cpp 2015-04-13 16:05:41.141512553 +0200
@@ -571,7 +571,7 @@ QImage ICOReader::iconAt(int index)
QImage::Format format = QImage::Format_ARGB32;
if (icoAttrib.nbits == 24)
format = QImage::Format_RGB32;
- else if (icoAttrib.ncolors == 2)
+ else if (icoAttrib.ncolors == 2 && icoAttrib.depth == 1)
format = QImage::Format_Mono;
else if (icoAttrib.ncolors > 0)
format = QImage::Format_Indexed8;

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@ diff -ur qt-everywhere-opensource-src-4.8.5-CVE-2013-4549/src/xml/sax/qxml.cpp q
static const int dtdRecursionLimit = 2;
// The maximum amount of characters an entity value may contain, after expansion.
- static const int entityCharacterLimit = 1024;
+ static const int entityCharacterLimit = 4096;
+ static const int entityCharacterLimit = 65536;
const QString &string();
void stringClear();

View File

@ -1,7 +1,7 @@
diff -up qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp.QTBUG-22829 qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp
--- qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp.QTBUG-22829 2015-05-07 09:14:44.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp 2016-12-08 12:32:46.638962448 -0600
@@ -188,8 +188,12 @@ int runMoc(int _argc, char **_argv)
diff -up qt-everywhere-opensource-src-4.8.6/src/tools/moc/main.cpp.QTBUG-22829 qt-everywhere-opensource-src-4.8.6/src/tools/moc/main.cpp
--- qt-everywhere-opensource-src-4.8.6/src/tools/moc/main.cpp.QTBUG-22829 2014-04-10 13:37:12.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.6/src/tools/moc/main.cpp 2015-01-29 11:12:31.169465097 -0600
@@ -188,8 +188,10 @@ int runMoc(int _argc, char **_argv)
pp.macros["Q_MOC_RUN"];
pp.macros["__cplusplus"];
@ -10,8 +10,6 @@ diff -up qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp.QTBUG-22829 q
pp.macros["BOOST_TT_HAS_OPERATOR_HPP_INCLUDED"];
+ pp.macros["BOOST_LEXICAL_CAST_INCLUDED"];
+ pp.macros["BOOST_NEXT_PRIOR_HPP_INCLUDED"];
+ pp.macros["BOOST_TYPE_TRAITS_HPP"];
+ pp.macros["_SYS_SYSMACROS_H_OUTER"];
QByteArray filename;
QByteArray output;

View File

@ -1,12 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.7/src/corelib/global/qglobal.h.majmin qt-everywhere-opensource-src-4.8.7/src/corelib/global/qglobal.h
--- qt-everywhere-opensource-src-4.8.7/src/corelib/global/qglobal.h.majmin 2015-05-07 09:14:48.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.7/src/corelib/global/qglobal.h 2016-12-08 12:10:29.677359701 -0600
@@ -52,7 +52,7 @@
/*
can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0))
*/
-#define QT_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch))
+#define QT_VERSION_CHECK(qt_version_check_major, qt_version_check_minor, qt_version_check_patch) ((qt_version_check_major<<16)|(qt_version_check_minor<<8)|(qt_version_check_patch))
#define QT_PACKAGEDATE_STR "2015-05-07"

View File

@ -1,12 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.7/config.tests/unix/alsa/alsatest.cpp.than qt-everywhere-opensource-src-4.8.7/config.tests/unix/alsa/alsatest.cpp
--- qt-everywhere-opensource-src-4.8.7/config.tests/unix/alsa/alsatest.cpp.than 2016-02-10 16:31:02.450152334 +0100
+++ qt-everywhere-opensource-src-4.8.7/config.tests/unix/alsa/alsatest.cpp 2016-02-10 16:31:51.495307579 +0100
@@ -40,7 +40,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

@ -1,45 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.7/config.tests/unix/ibase/ibase.cpp.ibase qt-everywhere-opensource-src-4.8.7/config.tests/unix/ibase/ibase.cpp
--- qt-everywhere-opensource-src-4.8.7/config.tests/unix/ibase/ibase.cpp.ibase 2015-05-07 09:14:42.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.7/config.tests/unix/ibase/ibase.cpp 2016-11-30 10:55:05.825339674 -0600
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <ibase.h>
+#include <firebird/ibase.h>
int main(int, char **)
{
diff -up qt-everywhere-opensource-src-4.8.7/config.tests/unix/ibase/ibase.pro.ibase qt-everywhere-opensource-src-4.8.7/config.tests/unix/ibase/ibase.pro
--- qt-everywhere-opensource-src-4.8.7/config.tests/unix/ibase/ibase.pro.ibase 2015-05-07 09:14:42.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.7/config.tests/unix/ibase/ibase.pro 2016-11-30 10:56:11.017740104 -0600
@@ -1,4 +1,4 @@
SOURCES = ibase.cpp
CONFIG -= qt dylib
mac:CONFIG -= app_bundle
-LIBS += -lgds
+LIBS += -lfbclient
diff -up qt-everywhere-opensource-src-4.8.7/src/sql/drivers/ibase/qsql_ibase.h.ibase qt-everywhere-opensource-src-4.8.7/src/sql/drivers/ibase/qsql_ibase.h
--- qt-everywhere-opensource-src-4.8.7/src/sql/drivers/ibase/qsql_ibase.h.ibase 2015-05-07 09:14:48.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.7/src/sql/drivers/ibase/qsql_ibase.h 2016-11-30 10:57:34.516252974 -0600
@@ -45,7 +45,7 @@
#include <QtSql/qsqlresult.h>
#include <QtSql/qsqldriver.h>
#include <QtSql/private/qsqlcachedresult_p.h>
-#include <ibase.h>
+#include <firebird/ibase.h>
QT_BEGIN_HEADER
diff -up qt-everywhere-opensource-src-4.8.7/src/sql/drivers/ibase/qsql_ibase.pri.ibase qt-everywhere-opensource-src-4.8.7/src/sql/drivers/ibase/qsql_ibase.pri
--- qt-everywhere-opensource-src-4.8.7/src/sql/drivers/ibase/qsql_ibase.pri.ibase 2015-05-07 09:14:48.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.7/src/sql/drivers/ibase/qsql_ibase.pri 2016-11-30 10:57:11.783113341 -0600
@@ -2,7 +2,7 @@ HEADERS += $$PWD/qsql_ibase.h
SOURCES += $$PWD/qsql_ibase.cpp
unix {
- !contains(LIBS, .*gds.*):!contains(LIBS, .*libfb.*):LIBS += -lgds
+ !contains(LIBS, .*gds.*):!contains(LIBS, .*libfb.*):LIBS += -lfbclient
} else {
!contains(LIBS, .*gds.*):!contains(LIBS, .*fbclient.*) {
win32-borland:LIBS += gds32.lib

View File

@ -1,35 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.7/configure.gcc6 qt-everywhere-opensource-src-4.8.7/configure
--- qt-everywhere-opensource-src-4.8.7/configure.gcc6 2016-04-15 07:04:19.430268222 -0500
+++ qt-everywhere-opensource-src-4.8.7/configure 2016-04-15 07:05:22.157568689 -0500
@@ -7744,7 +7744,7 @@ case "$XPLATFORM" in
*-g++*)
# Check gcc's version
case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
- 5*|4*|3.4*)
+ 8*|7*|6*|5*|4*|3.4*)
;;
3.3*)
canBuildWebKit="no"
@@ -8060,7 +8060,7 @@ g++*)
3.*)
COMPILER_VERSION="3.*"
;;
- 5*|4.*)
+ 8*|7*|6*|5*|4.*)
COMPILER_VERSION="4"
;;
*)
diff -up qt-everywhere-opensource-src-4.8.7/src/xmlpatterns/api/qcoloroutput_p.h.gcc6 qt-everywhere-opensource-src-4.8.7/src/xmlpatterns/api/qcoloroutput_p.h
--- qt-everywhere-opensource-src-4.8.7/src/xmlpatterns/api/qcoloroutput_p.h.gcc6 2015-05-07 09:14:48.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.7/src/xmlpatterns/api/qcoloroutput_p.h 2016-04-15 07:04:19.431268227 -0500
@@ -70,8 +70,8 @@ namespace QPatternist
ForegroundShift = 10,
BackgroundShift = 20,
SpecialShift = 20,
- ForegroundMask = ((1 << ForegroundShift) - 1) << ForegroundShift,
- BackgroundMask = ((1 << BackgroundShift) - 1) << BackgroundShift
+ ForegroundMask = 0x1f << ForegroundShift,
+ BackgroundMask = 0x7 << BackgroundShift
};
public:

View File

@ -1,13 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.7/src/script/script.pro.gcc8 qt-everywhere-opensource-src-4.8.7/src/script/script.pro
--- qt-everywhere-opensource-src-4.8.7/src/script/script.pro.gcc8 2015-05-07 09:14:43.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.7/src/script/script.pro 2018-05-19 16:01:24.699926959 -0500
@@ -91,6 +91,9 @@ symbian {
TARGET.UID3=0x2001B2E1
}
+# hack around gcc8 optimization bug with -O2
+QMAKE_CXXFLAGS_RELEASE += -O1
+
symbian {
symbian-abld|symbian-sbsv2 {
MMP_RULES += ALWAYS_BUILD_AS_ARM

View File

@ -1,28 +0,0 @@
From: Fabian Vogt <fabian@ritter-vogt.de>
Subject: Fix build with ICU >= 59
ICU >= 59 requires C++11 for its header files.
Qt can't be compiled with -std=c++11 as a whole, so only enable
it for qlocale_icu.cpp.
Index: qt-everywhere-opensource-src-4.8.7/src/corelib/tools/tools.pri
===================================================================
--- qt-everywhere-opensource-src-4.8.7.orig/src/corelib/tools/tools.pri
+++ qt-everywhere-opensource-src-4.8.7/src/corelib/tools/tools.pri
@@ -102,7 +102,15 @@ contains(QT_CONFIG, zlib):include($$PWD/
else:include($$PWD/../../3rdparty/zlib_dependency.pri)
contains(QT_CONFIG,icu) {
- SOURCES += tools/qlocale_icu.cpp
+ cpp11.name = cpp11
+ cpp11.input = SOURCES_CPP11
+ cpp11.dependency_type = TYPE_C
+ cpp11.variable_out = OBJECTS
+ cpp11.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_IN_BASE}$${first(QMAKE_EXT_OBJ)}
+ cpp11.commands = $${QMAKE_CXX} $(CXXFLAGS) -std=c++11 $(INCPATH) -c ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
+ QMAKE_EXTRA_COMPILERS += cpp11
+
+ SOURCES_CPP11 += tools/qlocale_icu.cpp
DEFINES += QT_USE_ICU
}

View File

@ -1,28 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.7/src/sql/drivers/mysql/qsql_mysql.cpp.mariadb qt-everywhere-opensource-src-4.8.7/src/sql/drivers/mysql/qsql_mysql.cpp
--- qt-everywhere-opensource-src-4.8.7/src/sql/drivers/mysql/qsql_mysql.cpp.mariadb 2015-05-07 09:14:48.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.7/src/sql/drivers/mysql/qsql_mysql.cpp 2017-10-23 14:13:15.871808984 -0500
@@ -1105,11 +1105,16 @@ static void qLibraryInit()
}
# endif // MYSQL_VERSION_ID
#endif // Q_NO_MYSQL_EMBEDDED
+
+#if defined(MARIADB_BASE_VERSION) || defined(MARIADB_VERSION_ID)
+ qAddPostRoutine(mysql_server_end);
+#endif
}
static void qLibraryEnd()
{
#ifndef Q_NO_MYSQL_EMBEDDED
+#if !defined(MARIADB_BASE_VERSION) && !defined(MARIADB_VERSION_ID)
# if MYSQL_VERSION_ID > 40000
# if (MYSQL_VERSION_ID >= 40110 && MYSQL_VERSION_ID < 50000) || MYSQL_VERSION_ID >= 50003
mysql_library_end();
@@ -1118,6 +1123,7 @@ static void qLibraryEnd()
# endif
# endif
#endif
+#endif
}
QMYSQLDriver::QMYSQLDriver(QObject * parent)

View File

@ -1,13 +0,0 @@
diff -urp qt-everywhere-opensource-src-4.8.7/configure q/configure
--- qt-everywhere-opensource-src-4.8.7/configure 2016-04-03 16:49:50.218644449 +0200
+++ q/configure 2016-04-03 17:22:35.376405024 +0200
@@ -3331,6 +3331,9 @@ arm*)
CFG_ARCH=arm
COMPAT_ARCH=armv6
;;
+mips*)
+ CFG_ARCH=mips
+ ;;
esac
if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then

View File

@ -1,694 +0,0 @@
diff -ur qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslcertificate.cpp qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslcertificate.cpp
--- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslcertificate.cpp 2015-05-07 16:14:44.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslcertificate.cpp 2018-01-05 17:44:16.997588265 +0100
@@ -259,10 +259,10 @@
QByteArray QSslCertificate::version() const
{
QMutexLocker lock(QMutexPool::globalInstanceGet(d.data()));
- if (d->versionString.isEmpty() && d->x509)
+ if (d->versionString.isEmpty() && d->x509) {
d->versionString =
- QByteArray::number(qlonglong(q_ASN1_INTEGER_get(d->x509->cert_info->version)) + 1);
-
+ QByteArray::number(qlonglong(q_X509_get_version(d->x509)) + 1);
+ }
return d->versionString;
}
@@ -276,7 +276,7 @@
{
QMutexLocker lock(QMutexPool::globalInstanceGet(d.data()));
if (d->serialNumberString.isEmpty() && d->x509) {
- ASN1_INTEGER *serialNumber = d->x509->cert_info->serialNumber;
+ ASN1_INTEGER *serialNumber = q_X509_get_serialNumber(d->x509);
// if we cannot convert to a long, just output the hexadecimal number
if (serialNumber->length > 4) {
QByteArray hexString;
@@ -489,24 +489,33 @@
QSslKey key;
key.d->type = QSsl::PublicKey;
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
X509_PUBKEY *xkey = d->x509->cert_info->key;
+#else
+ X509_PUBKEY *xkey = q_X509_get_X509_PUBKEY(d->x509);
+#endif
EVP_PKEY *pkey = q_X509_PUBKEY_get(xkey);
Q_ASSERT(pkey);
- if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_RSA) {
+ int key_id;
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ key_id = q_EVP_PKEY_type(pkey->type);
+#else
+ key_id = q_EVP_PKEY_base_id(pkey);
+#endif
+ if (key_id == EVP_PKEY_RSA) {
key.d->rsa = q_EVP_PKEY_get1_RSA(pkey);
key.d->algorithm = QSsl::Rsa;
key.d->isNull = false;
- } else if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA) {
+ } else if (key_id == EVP_PKEY_DSA) {
key.d->dsa = q_EVP_PKEY_get1_DSA(pkey);
key.d->algorithm = QSsl::Dsa;
key.d->isNull = false;
- } else if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_DH) {
+ } else if (key_id == EVP_PKEY_DH) {
// DH unsupported
} else {
// error?
}
-
q_EVP_PKEY_free(pkey);
return key;
}
@@ -687,7 +696,11 @@
unsigned char *data = 0;
int size = q_ASN1_STRING_to_UTF8(&data, q_X509_NAME_ENTRY_get_data(e));
info[QString::fromUtf8(obj)] = QString::fromUtf8((char*)data, size);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
q_CRYPTO_free(data);
+#else
+ q_CRYPTO_free(data, __FILE__, __LINE__);
+#endif
}
return info;
}
diff -ur qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslkey.cpp qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslkey.cpp
--- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslkey.cpp 2015-05-07 16:14:44.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslkey.cpp 2018-01-05 18:00:27.453937599 +0100
@@ -321,8 +321,19 @@
{
if (d->isNull)
return -1;
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
return (d->algorithm == QSsl::Rsa)
? q_BN_num_bits(d->rsa->n) : q_BN_num_bits(d->dsa->p);
+#else
+ if (d->algorithm == QSsl::Rsa) {
+ return q_RSA_bits(d->rsa);
+ } else {
+ const BIGNUM *p = (const BIGNUM *) NULL;
+ q_DSA_get0_pqg(d->dsa, &p, (const BIGNUM **) NULL, (const BIGNUM **) NULL);
+ return q_BN_num_bits(p);
+ }
+#endif
+
}
/*!
diff -ur qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl.cpp qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslsocket_openssl.cpp
--- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl.cpp 2015-05-07 16:14:44.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslsocket_openssl.cpp 2018-01-05 12:06:06.336990956 +0100
@@ -93,6 +93,7 @@
bool QSslSocketPrivate::s_loadedCiphersAndCerts = false;
bool QSslSocketPrivate::s_loadRootCertsOnDemand = false;
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
/* \internal
From OpenSSL's thread(3) manual page:
@@ -174,6 +175,8 @@
}
} // extern "C"
+#endif //OPENSSL_VERSION_NUMBER >= 0x10100000L
+
QSslSocketBackendPrivate::QSslSocketBackendPrivate()
: ssl(0),
ctx(0),
@@ -222,9 +225,12 @@
ciph.d->encryptionMethod = descriptionList.at(4).mid(4);
ciph.d->exportable = (descriptionList.size() > 6 && descriptionList.at(6) == QLatin1String("export"));
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
ciph.d->bits = cipher->strength_bits;
ciph.d->supportedBits = cipher->alg_bits;
-
+#else
+ ciph.d->bits = q_SSL_CIPHER_get_bits(cipher, &ciph.d->supportedBits);
+#endif
}
return ciph;
}
@@ -363,7 +369,7 @@
//
// See also: QSslContext::fromConfiguration()
if (caCertificate.expiryDate() >= QDateTime::currentDateTime()) {
- q_X509_STORE_add_cert(ctx->cert_store, (X509 *)caCertificate.handle());
+ q_X509_STORE_add_cert(q_SSL_CTX_get_cert_store(ctx), (X509 *)caCertificate.handle());
}
}
@@ -500,8 +506,10 @@
*/
void QSslSocketPrivate::deinitialize()
{
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
q_CRYPTO_set_id_callback(0);
q_CRYPTO_set_locking_callback(0);
+#endif
}
/*!
@@ -522,13 +530,17 @@
return false;
// Check if the library itself needs to be initialized.
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
QMutexLocker locker(openssl_locks()->initLock());
+#endif
if (!s_libraryLoaded) {
s_libraryLoaded = true;
// Initialize OpenSSL.
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
q_CRYPTO_set_id_callback(id_function);
q_CRYPTO_set_locking_callback(locking_function);
+#endif
if (q_SSL_library_init() != 1)
return false;
q_SSL_load_error_strings();
@@ -567,7 +579,9 @@
void QSslSocketPrivate::ensureCiphersAndCertsLoaded()
{
- QMutexLocker locker(openssl_locks()->initLock());
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ QMutexLocker locker(openssl_locks()->initLock());
+#endif
if (s_loadedCiphersAndCerts)
return;
s_loadedCiphersAndCerts = true;
@@ -659,13 +673,18 @@
STACK_OF(SSL_CIPHER) *supportedCiphers = q_SSL_get_ciphers(mySsl);
for (int i = 0; i < q_sk_SSL_CIPHER_num(supportedCiphers); ++i) {
if (SSL_CIPHER *cipher = q_sk_SSL_CIPHER_value(supportedCiphers, i)) {
- if (cipher->valid) {
+
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ if (cipher->valid) {
+#endif
QSslCipher ciph = QSslSocketBackendPrivate::QSslCipher_from_SSL_CIPHER(cipher);
if (!ciph.isNull()) {
if (!ciph.name().toLower().startsWith(QLatin1String("adh")))
ciphers << ciph;
}
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
}
+#endif
}
}
diff -ur qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_p.h qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslsocket_openssl_p.h
--- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_p.h 2015-05-07 16:14:44.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslsocket_openssl_p.h 2018-01-05 12:06:06.337990940 +0100
@@ -84,6 +84,10 @@
#include <openssl/tls1.h>
#endif
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#define OPENSSL_NO_SSL2
+#endif
+
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
typedef _STACK STACK;
#endif
diff -ur qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_symbols.cpp qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslsocket_openssl_symbols.cpp
--- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_symbols.cpp 2015-05-07 16:14:44.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslsocket_openssl_symbols.cpp 2018-01-05 17:59:10.636973932 +0100
@@ -111,16 +111,30 @@
DEFINEFUNC2(int, ASN1_STRING_to_UTF8, unsigned char **a, a, ASN1_STRING *b, b, return 0, return);
DEFINEFUNC4(long, BIO_ctrl, BIO *a, a, int b, b, long c, c, void *d, d, return -1, return)
DEFINEFUNC(int, BIO_free, BIO *a, a, return 0, return)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
DEFINEFUNC(BIO *, BIO_new, BIO_METHOD *a, a, return 0, return)
+#else
+DEFINEFUNC(BIO *, BIO_new, const BIO_METHOD *a, a, return 0, return)
+#endif
DEFINEFUNC2(BIO *, BIO_new_mem_buf, void *a, a, int b, b, return 0, return)
DEFINEFUNC3(int, BIO_read, BIO *a, a, void *b, b, int c, c, return -1, return)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
DEFINEFUNC(BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return 0, return)
+#else
+DEFINEFUNC(const BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return 0, return)
+#endif
DEFINEFUNC3(int, BIO_write, BIO *a, a, const void *b, b, int c, c, return -1, return)
DEFINEFUNC(int, BN_num_bits, const BIGNUM *a, a, return 0, return)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
DEFINEFUNC(int, CRYPTO_num_locks, DUMMYARG, DUMMYARG, return 0, return)
DEFINEFUNC(void, CRYPTO_set_locking_callback, void (*a)(int, int, const char *, int), a, return, DUMMYARG)
DEFINEFUNC(void, CRYPTO_set_id_callback, unsigned long (*a)(), a, return, DUMMYARG)
+#endif
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
DEFINEFUNC(void, CRYPTO_free, void *a, a, return, DUMMYARG)
+#else
+DEFINEFUNC3(void, CRYPTO_free, void *a, a, const char *b, b, int c, c, return, DUMMYARG)
+#endif
DEFINEFUNC(void, DSA_free, DSA *a, a, return, DUMMYARG)
#if OPENSSL_VERSION_NUMBER < 0x00908000L
DEFINEFUNC3(X509 *, d2i_X509, X509 **a, a, unsigned char **b, b, long c, c, return 0, return)
@@ -157,6 +171,7 @@
DEFINEFUNC2(void, RAND_seed, const void *a, a, int b, b, return, DUMMYARG)
DEFINEFUNC(int, RAND_status, void, DUMMYARG, return -1, return)
DEFINEFUNC(void, RSA_free, RSA *a, a, return, DUMMYARG)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
DEFINEFUNC(int, sk_num, STACK *a, a, return -1, return)
DEFINEFUNC2(void, sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
@@ -166,6 +181,12 @@
DEFINEFUNC(void, sk_free, STACK *a, a, return, DUMMYARG)
DEFINEFUNC2(char *, sk_value, STACK *a, a, int b, b, return 0, return)
#endif
+#else
+DEFINEFUNC(int, OPENSSL_sk_num, STACK *a, a, return -1, return)
+DEFINEFUNC2(void, OPENSSL_sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
+DEFINEFUNC(void, OPENSSL_sk_free, _STACK *a, a, return, DUMMYARG)
+DEFINEFUNC2(void *, OPENSSL_sk_value, STACK *a, a, int b, b, return 0, return)
+#endif
DEFINEFUNC(int, SSL_accept, SSL *a, a, return -1, return)
DEFINEFUNC(int, SSL_clear, SSL *a, a, return -1, return)
DEFINEFUNC3(char *, SSL_CIPHER_description, SSL_CIPHER *a, a, char *b, b, int c, c, return 0, return)
@@ -213,8 +234,12 @@
#else
DEFINEFUNC(long, SSL_get_verify_result, SSL *a, a, return -1, return)
#endif
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
DEFINEFUNC(int, SSL_library_init, void, DUMMYARG, return -1, return)
DEFINEFUNC(void, SSL_load_error_strings, void, DUMMYARG, return, DUMMYARG)
+#else
+DEFINEFUNC2(int, OPENSSL_init_ssl, uint64_t opts, opts, const OPENSSL_INIT_SETTINGS *settings, settings, return -1, return)
+#endif
DEFINEFUNC(SSL *, SSL_new, SSL_CTX *a, a, return 0, return)
#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
DEFINEFUNC4(long, SSL_ctrl, SSL *a, a, int cmd, cmd, long larg, larg, void *parg, parg, return -1, return)
@@ -229,13 +254,21 @@
DEFINEFUNC(const SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return)
#endif
DEFINEFUNC(const SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
DEFINEFUNC(const SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return)
+#else
+DEFINEFUNC(const SSL_METHOD *, TLS_client_method, DUMMYARG, DUMMYARG, return 0, return)
+#endif
DEFINEFUNC(const SSL_METHOD *, TLSv1_client_method, DUMMYARG, DUMMYARG, return 0, return)
#ifndef OPENSSL_NO_SSL2
DEFINEFUNC(const SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return 0, return)
#endif
DEFINEFUNC(const SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return 0, return)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
DEFINEFUNC(const SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return 0, return)
+#else
+DEFINEFUNC(const SSL_METHOD *, TLS_server_method, DUMMYARG, DUMMYARG, return 0, return)
+#endif
DEFINEFUNC(const SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return 0, return)
#else
DEFINEFUNC(SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return)
@@ -274,7 +307,11 @@
DEFINEFUNC(int, X509_STORE_CTX_get_error, X509_STORE_CTX *a, a, return -1, return)
DEFINEFUNC(int, X509_STORE_CTX_get_error_depth, X509_STORE_CTX *a, a, return -1, return)
DEFINEFUNC(X509 *, X509_STORE_CTX_get_current_cert, X509_STORE_CTX *a, a, return 0, return)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get_chain, X509_STORE_CTX *a, a, return 0, return)
+#else
+DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get0_chain, X509_STORE_CTX *a, a, return 0, return)
+#endif
DEFINEFUNC(X509_STORE_CTX *, X509_STORE_CTX_new, DUMMYARG, DUMMYARG, return 0, return)
#ifdef SSLEAY_MACROS
DEFINEFUNC2(int, i2d_DSAPrivateKey, const DSA *a, a, unsigned char **b, b, return -1, return)
@@ -282,10 +319,34 @@
DEFINEFUNC3(RSA *, d2i_RSAPrivateKey, RSA **a, a, unsigned char **b, b, long c, c, return 0, return)
DEFINEFUNC3(DSA *, d2i_DSAPrivateKey, DSA **a, a, unsigned char **b, b, long c, c, return 0, return)
#endif
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
DEFINEFUNC(void, OPENSSL_add_all_algorithms_noconf, void, DUMMYARG, return, DUMMYARG)
DEFINEFUNC(void, OPENSSL_add_all_algorithms_conf, void, DUMMYARG, return, DUMMYARG)
+#else
+DEFINEFUNC2(int, OPENSSL_init_crypto, uint64_t opts, opts, const OPENSSL_INIT_SETTINGS *settings, settings, return -1, return)
+#endif
DEFINEFUNC3(int, SSL_CTX_load_verify_locations, SSL_CTX *ctx, ctx, const char *CAfile, CAfile, const char *CApath, CApath, return 0, return)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
DEFINEFUNC(long, SSLeay, void, DUMMYARG, return 0, return)
+#else
+DEFINEFUNC(unsigned long, OpenSSL_version_num, void, DUMMYARG, return 0, return)
+#endif
+DEFINEFUNC(X509_STORE *, SSL_CTX_get_cert_store, const SSL_CTX *ctx, ctx, return 0, return)
+
+DEFINEFUNC(ASN1_INTEGER *, X509_get_serialNumber, X509 *x, x, return 0, return)
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+DEFINEFUNC(int, EVP_PKEY_id, const EVP_PKEY *pkey, pkey, return 0, return)
+DEFINEFUNC(int, EVP_PKEY_base_id, const EVP_PKEY *pkey, pkey, return 0, return)
+DEFINEFUNC2(int, SSL_CIPHER_get_bits, const SSL_CIPHER *cipher, cipher, int *alg_bits, alg_bits, return 0, return)
+DEFINEFUNC2(long, SSL_CTX_set_options, SSL_CTX *ctx, ctx, long options, options, return 0, return)
+DEFINEFUNC(long, X509_get_version, X509 *x, x, return 0, return)
+DEFINEFUNC(X509_PUBKEY *, X509_get_X509_PUBKEY, X509 *x, x, return 0, return)
+DEFINEFUNC(int, RSA_bits, const RSA *rsa, rsa, return 0, return)
+DEFINEFUNC(int, DSA_security_bits, const DSA *dsa, dsa, return 0, return)
+DEFINEFUNC(ASN1_TIME *, X509_getm_notAfter, X509 *x, x, return 0, return)
+DEFINEFUNC(ASN1_TIME *, X509_getm_notBefore, X509 *x, x, return 0, return)
+DEFINEFUNC4(void, DSA_get0_pqg, const DSA *d, d, const BIGNUM **p, p, const BIGNUM **q, q, const BIGNUM **g, g, return, return)
+#endif
#ifdef Q_OS_SYMBIAN
#define RESOLVEFUNC(func, ordinal, lib) \
@@ -580,7 +641,11 @@
static volatile bool symbolsResolved = false;
static volatile bool triedToResolveSymbols = false;
#ifndef QT_NO_THREAD
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
QMutexLocker locker(QMutexPool::globalInstanceGet((void *)&q_SSL_library_init));
+#else
+ QMutexLocker locker(QMutexPool::globalInstanceGet((void *)&q_OPENSSL_init_ssl));
+#endif
#endif
if (symbolsResolved)
return true;
@@ -614,9 +679,11 @@
RESOLVEFUNC(BIO_write, 269, libs.second )
RESOLVEFUNC(BN_num_bits, 387, libs.second )
RESOLVEFUNC(CRYPTO_free, 469, libs.second )
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
RESOLVEFUNC(CRYPTO_num_locks, 500, libs.second )
RESOLVEFUNC(CRYPTO_set_id_callback, 513, libs.second )
RESOLVEFUNC(CRYPTO_set_locking_callback, 516, libs.second )
+#endif
RESOLVEFUNC(DSA_free, 594, libs.second )
RESOLVEFUNC(ERR_error_string, 744, libs.second )
RESOLVEFUNC(ERR_get_error, 749, libs.second )
@@ -674,8 +741,10 @@
RESOLVEFUNC(SSL_get_peer_cert_chain, 117, libs.first )
RESOLVEFUNC(SSL_get_peer_certificate, 118, libs.first )
RESOLVEFUNC(SSL_get_verify_result, 132, libs.first )
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
RESOLVEFUNC(SSL_library_init, 137, libs.first )
RESOLVEFUNC(SSL_load_error_strings, 139, libs.first )
+#endif
RESOLVEFUNC(SSL_new, 140, libs.first )
#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
RESOLVEFUNC(SSL_ctrl, 95, libs.first )
@@ -747,9 +816,11 @@
RESOLVEFUNC(BIO_write)
RESOLVEFUNC(BN_num_bits)
RESOLVEFUNC(CRYPTO_free)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
RESOLVEFUNC(CRYPTO_num_locks)
RESOLVEFUNC(CRYPTO_set_id_callback)
RESOLVEFUNC(CRYPTO_set_locking_callback)
+#endif
RESOLVEFUNC(DSA_free)
RESOLVEFUNC(ERR_error_string)
RESOLVEFUNC(ERR_get_error)
@@ -779,10 +850,17 @@
RESOLVEFUNC(RAND_seed)
RESOLVEFUNC(RAND_status)
RESOLVEFUNC(RSA_free)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
RESOLVEFUNC(sk_free)
RESOLVEFUNC(sk_num)
RESOLVEFUNC(sk_pop_free)
RESOLVEFUNC(sk_value)
+#else
+ RESOLVEFUNC(OPENSSL_sk_free)
+ RESOLVEFUNC(OPENSSL_sk_num)
+ RESOLVEFUNC(OPENSSL_sk_pop_free)
+ RESOLVEFUNC(OPENSSL_sk_value)
+#endif
RESOLVEFUNC(SSL_CIPHER_description)
RESOLVEFUNC(SSL_CTX_check_private_key)
RESOLVEFUNC(SSL_CTX_ctrl)
@@ -797,6 +875,7 @@
RESOLVEFUNC(SSL_CTX_use_PrivateKey)
RESOLVEFUNC(SSL_CTX_use_RSAPrivateKey)
RESOLVEFUNC(SSL_CTX_use_PrivateKey_file)
+ RESOLVEFUNC(SSL_CTX_get_cert_store)
RESOLVEFUNC(SSL_accept)
RESOLVEFUNC(SSL_clear)
RESOLVEFUNC(SSL_connect)
@@ -807,8 +886,12 @@
RESOLVEFUNC(SSL_get_peer_cert_chain)
RESOLVEFUNC(SSL_get_peer_certificate)
RESOLVEFUNC(SSL_get_verify_result)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
RESOLVEFUNC(SSL_library_init)
RESOLVEFUNC(SSL_load_error_strings)
+#else
+ RESOLVEFUNC(OPENSSL_init_ssl)
+#endif
RESOLVEFUNC(SSL_new)
#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
RESOLVEFUNC(SSL_ctrl)
@@ -819,17 +902,47 @@
RESOLVEFUNC(SSL_set_connect_state)
RESOLVEFUNC(SSL_shutdown)
RESOLVEFUNC(SSL_write)
+
+ RESOLVEFUNC(X509_get_serialNumber)
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+ RESOLVEFUNC(SSL_CTX_ctrl)
+ RESOLVEFUNC(EVP_PKEY_id)
+ RESOLVEFUNC(EVP_PKEY_base_id)
+ RESOLVEFUNC(SSL_CIPHER_get_bits)
+ RESOLVEFUNC(SSL_CTX_set_options)
+ RESOLVEFUNC(X509_get_version)
+ RESOLVEFUNC(X509_get_X509_PUBKEY)
+ RESOLVEFUNC(RSA_bits)
+ RESOLVEFUNC(DSA_security_bits)
+ RESOLVEFUNC(DSA_get0_pqg)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ RESOLVEFUNC(X509_get_notAfter)
+ RESOLVEFUNC(X509_get_notBefore)
+#else
+ RESOLVEFUNC(X509_getm_notAfter)
+ RESOLVEFUNC(X509_getm_notBefore)
+#endif
+#endif
+
#ifndef OPENSSL_NO_SSL2
RESOLVEFUNC(SSLv2_client_method)
#endif
RESOLVEFUNC(SSLv3_client_method)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
RESOLVEFUNC(SSLv23_client_method)
+#else
+ RESOLVEFUNC(TLS_client_method)
+#endif
RESOLVEFUNC(TLSv1_client_method)
#ifndef OPENSSL_NO_SSL2
RESOLVEFUNC(SSLv2_server_method)
#endif
RESOLVEFUNC(SSLv3_server_method)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
RESOLVEFUNC(SSLv23_server_method)
+#else
+ RESOLVEFUNC(TLS_server_method)
+#endif
RESOLVEFUNC(TLSv1_server_method)
RESOLVEFUNC(X509_NAME_entry_count)
RESOLVEFUNC(X509_NAME_get_entry)
@@ -846,7 +959,11 @@
RESOLVEFUNC(X509_STORE_CTX_get_error)
RESOLVEFUNC(X509_STORE_CTX_get_error_depth)
RESOLVEFUNC(X509_STORE_CTX_get_current_cert)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
RESOLVEFUNC(X509_STORE_CTX_get_chain)
+#else
+ RESOLVEFUNC(X509_STORE_CTX_get0_chain)
+#endif
RESOLVEFUNC(X509_cmp)
#ifndef SSLEAY_MACROS
RESOLVEFUNC(X509_dup)
@@ -867,10 +984,18 @@
RESOLVEFUNC(d2i_DSAPrivateKey)
RESOLVEFUNC(d2i_RSAPrivateKey)
#endif
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
RESOLVEFUNC(OPENSSL_add_all_algorithms_noconf)
RESOLVEFUNC(OPENSSL_add_all_algorithms_conf)
+#else
+ RESOLVEFUNC(OPENSSL_init_crypto)
+#endif
RESOLVEFUNC(SSL_CTX_load_verify_locations)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
RESOLVEFUNC(SSLeay)
+#else
+ RESOLVEFUNC(OpenSSL_version_num)
+#endif
#endif // Q_OS_SYMBIAN
symbolsResolved = true;
delete libs.first;
diff -ur qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_symbols_p.h qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslsocket_openssl_symbols_p.h
--- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_symbols_p.h 2015-05-07 16:14:44.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslsocket_openssl_symbols_p.h 2018-01-05 17:59:42.041550255 +0100
@@ -207,16 +207,31 @@
int q_ASN1_STRING_to_UTF8(unsigned char **a, ASN1_STRING *b);
long q_BIO_ctrl(BIO *a, int b, long c, void *d);
int q_BIO_free(BIO *a);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
BIO *q_BIO_new(BIO_METHOD *a);
+#else
+BIO *q_BIO_new(const BIO_METHOD *a);
+#endif
BIO *q_BIO_new_mem_buf(void *a, int b);
int q_BIO_read(BIO *a, void *b, int c);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
BIO_METHOD *q_BIO_s_mem();
+#else
+const BIO_METHOD *q_BIO_s_mem();
+#endif
int q_BIO_write(BIO *a, const void *b, int c);
int q_BN_num_bits(const BIGNUM *a);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
int q_CRYPTO_num_locks();
void q_CRYPTO_set_locking_callback(void (*a)(int, int, const char *, int));
void q_CRYPTO_set_id_callback(unsigned long (*a)());
void q_CRYPTO_free(void *a);
+#else
+#define q_CRYPTO_num_locks() 1
+#define q_CRYPTO_set_locking_callback(a)
+#define q_CRYPTO_set_id_callback(a)
+void q_CRYPTO_free(void *a, const char *b, int c);
+#endif
void q_DSA_free(DSA *a);
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
// 0.9.8 broke SC and BC by changing this function's signature.
@@ -258,6 +273,7 @@
void q_RAND_seed(const void *a, int b);
int q_RAND_status();
void q_RSA_free(RSA *a);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
int q_sk_num(STACK *a);
void q_sk_pop_free(STACK *a, void (*b)(void *));
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
@@ -267,6 +283,16 @@
void q_sk_free(STACK *a);
char * q_sk_value(STACK *a, int b);
#endif
+#else
+int q_OPENSSL_sk_num(STACK *a);
+void q_OPENSSL_sk_pop_free(STACK *a, void (*b)(void *));
+void q_OPENSSL_sk_free(_STACK *a);
+void * q_OPENSSL_sk_value(STACK *a, int b);
+#define q_sk_num q_OPENSSL_sk_num
+#define q_sk_pop_free q_OPENSSL_sk_pop_free
+#define q_sk_free q_OPENSSL_sk_free
+#define q_sk_value q_OPENSSL_sk_value
+#endif
int q_SSL_accept(SSL *a);
int q_SSL_clear(SSL *a);
char *q_SSL_CIPHER_description(SSL_CIPHER *a, char *b, int c);
@@ -314,8 +340,14 @@
#else
long q_SSL_get_verify_result(SSL *a);
#endif
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
int q_SSL_library_init();
void q_SSL_load_error_strings();
+#else
+int q_OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
+#define q_SSL_library_init() q_OPENSSL_init_ssl(0, (const OPENSSL_INIT_SETTINGS *) NULL)
+#define q_SSL_load_error_strings() q_OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, (const OPENSSL_INIT_SETTINGS *) NULL)
+#endif
SSL *q_SSL_new(SSL_CTX *a);
#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
long q_SSL_ctrl(SSL *ssl,int cmd, long larg, void *parg);
@@ -328,11 +360,21 @@
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
const SSL_METHOD *q_SSLv2_client_method();
const SSL_METHOD *q_SSLv3_client_method();
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
const SSL_METHOD *q_SSLv23_client_method();
+#else
+const SSL_METHOD *q_TLS_client_method();
+#define q_SSLv23_client_method q_TLS_client_method
+#endif
const SSL_METHOD *q_TLSv1_client_method();
const SSL_METHOD *q_SSLv2_server_method();
const SSL_METHOD *q_SSLv3_server_method();
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
const SSL_METHOD *q_SSLv23_server_method();
+#else
+const SSL_METHOD *q_TLS_server_method();
+#define q_SSLv23_server_method q_TLS_server_method
+#endif
const SSL_METHOD *q_TLSv1_server_method();
#else
SSL_METHOD *q_SSLv2_client_method();
@@ -377,7 +419,12 @@
int q_X509_STORE_CTX_get_error(X509_STORE_CTX *ctx);
int q_X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx);
X509 *q_X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
STACK_OF(X509) *q_X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx);
+#else
+STACK_OF(X509) *q_X509_STORE_CTX_get0_chain(X509_STORE_CTX *ctx);
+#define q_X509_STORE_CTX_get_chain q_X509_STORE_CTX_get0_chain
+#endif
#define q_BIO_get_mem_data(b, pp) (int)q_BIO_ctrl(b,BIO_CTRL_INFO,0,(char *)pp)
#define q_BIO_pending(b) (int)q_BIO_ctrl(b,BIO_CTRL_PENDING,0,NULL)
@@ -399,7 +446,25 @@
PEM_ASN1_write_bio((int (*)(void*, unsigned char**))q_i2d_DSAPrivateKey,PEM_STRING_DSA,\
bp,(char *)x,enc,kstr,klen,cb,u)
#endif
+
+X509_STORE * q_SSL_CTX_get_cert_store(const SSL_CTX *ctx);
+ASN1_INTEGER * q_X509_get_serialNumber(X509 *x);
+
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
#define q_SSL_CTX_set_options(ctx,op) q_SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,(op),NULL)
+#define q_X509_get_version(x) X509_get_version(x)
+#else
+int q_EVP_PKEY_id(const EVP_PKEY *pkey);
+int q_EVP_PKEY_base_id(const EVP_PKEY *pkey);
+int q_SSL_CIPHER_get_bits(const SSL_CIPHER *cipher, int *alg_bits);
+long q_SSL_CTX_set_options(SSL_CTX *ctx, long options);
+long q_X509_get_version(X509 *x);
+X509_PUBKEY * q_X509_get_X509_PUBKEY(X509 *x);
+int q_RSA_bits(const RSA *rsa);
+int q_DSA_security_bits(const DSA *dsa);
+void q_DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g);
+#endif
+
#define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_sk_num)(st)
#define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_sk_value)(st, i)
#define q_sk_GENERAL_NAME_num(st) q_SKM_sk_num(GENERAL_NAME, (st))
@@ -410,8 +475,17 @@
#define q_sk_SSL_CIPHER_value(st, i) q_SKM_sk_value(SSL_CIPHER, (st), (i))
#define q_SSL_CTX_add_extra_chain_cert(ctx,x509) \
q_SSL_CTX_ctrl(ctx,SSL_CTRL_EXTRA_CHAIN_CERT,0,(char *)x509)
+
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
#define q_X509_get_notAfter(x) X509_get_notAfter(x)
#define q_X509_get_notBefore(x) X509_get_notBefore(x)
+#else
+ASN1_TIME *q_X509_getm_notAfter(X509 *x);
+ASN1_TIME *q_X509_getm_notBefore(X509 *x);
+#define q_X509_get_notAfter(x) q_X509_getm_notAfter(x)
+#define q_X509_get_notBefore(x) q_X509_getm_notBefore(x)
+#endif
+
#define q_EVP_PKEY_assign_RSA(pkey,rsa) q_EVP_PKEY_assign((pkey),EVP_PKEY_RSA,\
(char *)(rsa))
#define q_EVP_PKEY_assign_DSA(pkey,dsa) q_EVP_PKEY_assign((pkey),EVP_PKEY_DSA,\
@@ -421,10 +495,21 @@
#else
#define q_OpenSSL_add_all_algorithms() q_OPENSSL_add_all_algorithms_noconf()
#endif
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
void q_OPENSSL_add_all_algorithms_noconf();
void q_OPENSSL_add_all_algorithms_conf();
+#else
+int q_OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
+#define q_OPENSSL_add_all_algorithms_conf() q_OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS | OPENSSL_INIT_LOAD_CONFIG, (const OPENSSL_INIT_SETTINGS *) NULL)
+# define q_OPENSSL_add_all_algorithms_noconf() q_OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS, (const OPENSSL_INIT_SETTINGS *) NULL)
+#endif
int q_SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, const char *CApath);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
long q_SSLeay();
+#else
+unsigned long q_OpenSSL_version_num();
+#define q_SSLeay q_OpenSSL_version_num
+#endif
// Helper function
class QDateTime;

View File

@ -1,12 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.7/qmake/Makefile.unix.qmake_LFLAGS qt-everywhere-opensource-src-4.8.7/qmake/Makefile.unix
--- qt-everywhere-opensource-src-4.8.7/qmake/Makefile.unix.qmake_LFLAGS 2015-05-07 09:14:42.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.7/qmake/Makefile.unix 2018-02-15 08:25:13.168838577 -0600
@@ -3,7 +3,7 @@ BUILD_PATH = @BUILD_PATH@
QTOBJS = @QMAKE_QTOBJS@
QTSRCS = @QMAKE_QTSRCS@
QMAKESPEC = @QMAKESPEC@
-LFLAGS = @QMAKE_LFLAGS@
+LFLAGS = @QMAKE_LFLAGS@ $(QMAKE_LFLAGS_RELEASE)
#qmake code
OBJS=project.o property.o main.o makefile.o unixmake2.o unixmake.o \

View File

@ -0,0 +1,24 @@
diff -up qt-everywhere-opensource-src-4.8.6/configure.fix_detection_of_gcc5 qt-everywhere-opensource-src-4.8.6/configure
--- qt-everywhere-opensource-src-4.8.6/configure.fix_detection_of_gcc5 2014-04-10 13:37:08.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.6/configure 2015-02-16 08:36:16.363785377 -0600
@@ -7729,7 +7729,7 @@ case "$XPLATFORM" in
*-g++*)
# Check gcc's version
case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
- 4*|3.4*)
+ 5*|4*|3.4*)
;;
3.3*)
canBuildWebKit="no"
@@ -8031,6 +8031,11 @@ g++*)
QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
QT_GCC_PATCH_VERSION=0
;;
+ *)
+ QT_GCC_MAJOR_VERSION=$COMPILER_VERSION
+ QT_GCC_MINOR_VERSION=0
+ QT_GCC_PATCH_VERSION=0
+ ;;
esac
case "$COMPILER_VERSION" in

View File

@ -0,0 +1,12 @@
diff -up qt-everywhere-opensource-src-4.8.6/configure.qt_build_key qt-everywhere-opensource-src-4.8.6/configure
--- qt-everywhere-opensource-src-4.8.6/configure.qt_build_key 2015-02-16 08:00:01.698531648 -0600
+++ qt-everywhere-opensource-src-4.8.6/configure 2015-02-16 08:06:43.198794608 -0600
@@ -8044,7 +8044,7 @@ g++*)
3.*)
COMPILER_VERSION="3.*"
;;
- 4.*)
+ 5.*|4.*)
COMPILER_VERSION="4"
;;
*)

400
qt.spec
View File

@ -5,23 +5,18 @@
%define no_pch -no-pch
# See http://bugzilla.redhat.com/223663
%define multilib_archs x86_64 %{ix86} %{mips} ppc64 ppc64le ppc s390x s390 sparc64 sparcv9
%define multilib_basearchs x86_64 %{mips64} ppc64 ppc64le s390x sparc64
%define multilib_archs x86_64 %{ix86} ppc64 ppc s390x s390 sparc64 sparcv9 ppc64le
%define multilib_basearchs x86_64 ppc64 s390x sparc64 ppc64le
%if 0%{?fedora} || 0%{?rhel} > 6
%if 0%{?fedora} > 16 || 0%{?rhel} > 6
# use external qt_settings pkg
%define qt_settings 1
%endif
%if (0%{?fedora} && 0%{?fedora} < 26) || (0%{?rhel} > 6 && 0%{?rhel} <= 7)
%if 0%{?fedora} > 19 || 0%{?rhel} > 6
%global system_clucene 1
%endif
# See http://bugzilla.redhat.com/1279265
%if 0%{?rhel} && 0%{?rhel} <= 7
%global inject_optflags 1
%endif
%global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
# trim changelog included in binary rpms
@ -39,18 +34,19 @@
Summary: Qt toolkit
Name: qt
Epoch: 1
Version: 4.8.7
Release: 40%{?dist}
Version: 4.8.6
Release: 30%{?dist}
# See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details
License: (LGPLv2 with exceptions or GPLv3 with exceptions) and ASL 2.0 and BSD and FTL and MIT
Group: System Environment/Libraries
Url: http://qt-project.org/
%if 0%{?beta:1}
Source0: https://download.qt-project.org/development_releases/qt/4.8/%{version}-%{beta}/qt-everywhere-opensource-src-%{version}-%{beta}.tar.gz
%if 0%{?pre:1}
Source0: http://download.qt-project.org/development_releases/qt/4.8/%{version}-%{pre}/qt-everywhere-opensource-src-%{version}-%{pre}.tar.gz
%else
Source0: https://download.qt-project.org/official_releases/qt/4.8/%{version}/qt-everywhere-opensource-src-%{version}.tar.gz
Source0: http://download.qt-project.org/official_releases/qt/4.8/%{version}/qt-everywhere-opensource-src-%{version}.tar.gz
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Obsoletes: qt4 < %{version}-%{release}
Provides: qt4 = %{version}-%{release}
@ -102,11 +98,13 @@ Patch28: qt-everywhere-opensource-src-4.8.5-qt_plugin_path.patch
# add support for pkgconfig's Requires.private to qmake
Patch50: qt-everywhere-opensource-src-4.8.4-qmake_pkgconfig_requires_private.patch
# FTBFS against newer firebird
Patch51: qt-everywhere-opensource-src-4.8.7-firebird.patch
# backport part of 'Fix detection of GCC5'
# https://qt.gitorious.org/qt/qtbase/commit/9fb4c2c412621b63c06dbbd899f44041b2e126c2
Patch51: qt-fix_detection_of_gcc5.patch
# workaround major/minor macros possibly being defined already
Patch52: qt-everywhere-opensource-src-4.8.7-QT_VERSION_CHECK.patch
# F22's gcc5 uses gcc4 ABI, so ensure QT_BUILD_KEY remains the same too
# TODO: ask upstream how to handle gcc5 moving forward, use g++-5 or not?
Patch52: qt-gcc5_compat_qt_build_key.patch
# fix invalid inline assembly in qatomic_{i386,x86_64}.h (de)ref implementations
Patch53: qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm.patch
@ -118,12 +116,6 @@ Patch54: qt-everywhere-opensource-src-4.8.5-mysql_config.patch
# http://bugs.kde.org/show_bug.cgi?id=180051#c22
Patch55: qt-everywhere-opensource-src-4.6.2-cups.patch
# backport https://codereview.qt-project.org/#/c/205874/
Patch56: qt-everywhere-opensource-src-4.8.7-mariadb.patch
# use QMAKE_LFLAGS_RELEASE when building qmake
Patch57: qt-everywhere-opensource-src-4.8.7-qmake_LFLAGS.patch
# Fails to create debug build of Qt projects on mingw (rhbz#653674)
Patch64: qt-everywhere-opensource-src-4.8.5-QTBUG-14467.patch
@ -179,28 +171,6 @@ Patch89: qt-everywhere-opensource-src-4.8.6-QTBUG-38585.patch
# build against the system clucene09-core
Patch90: qt-everywhere-opensource-src-4.8.6-system-clucene.patch
# fix arch autodetection for 64-bit MIPS
Patch91: qt-everywhere-opensource-src-4.8.7-mips64.patch
# fix build issue(s) with gcc6
Patch92: qt-everywhere-opensource-src-4.8.7-gcc6.patch
# support alsa-1.1.x
Patch93: qt-everywhere-opensource-src-4.8.7-alsa-1.1.patch
# support OpenSSL 1.1.x, from Debian (Gert Wollny, Dmitry Eremin-Solenikov)
# https://anonscm.debian.org/cgit/pkg-kde/qt/qt4-x11.git/tree/debian/patches/openssl_1.1.patch?h=experimental
# fixes for -openssl-linked by Kevin Kofler
Patch94: qt-everywhere-opensource-src-4.8.7-openssl-1.1.patch
# fix build with ICU >= 59, from OpenSUSE (Fabian Vogt)
# https://build.opensuse.org/package/view_file/KDE:Qt/libqt4/fix-build-icu59.patch?expand=1
Patch95: qt-everywhere-opensource-src-4.8.7-icu59.patch
# workaround qtscript failures when building with f28's gcc8
# https://bugzilla.redhat.com/show_bug.cgi?id=1580047
Patch96: qt-everywhere-opensource-src-4.8.7-gcc8_qtscript.patch
# upstream patches
# backported from Qt5 (essentially)
# http://bugzilla.redhat.com/702493
@ -214,8 +184,24 @@ Patch113: qt-everywhere-opensource-src-4.8.6-QTBUG-22829.patch
Patch180: qt-aarch64.patch
## upstream git
Patch210: 0010-QDbus-Fix-a-b-comparison.patch
Patch223: 0023-Don-t-crash-on-broken-GIF-images.patch
Patch225: 0025-Fix-visual-index-lookup-in-QTreeViewPrivate-adjustVi.patch
Patch230: 0030-Memory-and-file-descriptor-leak-in-QFontCache.patch
Patch234: 0034-Fix-raster-graphics-on-X11-RGB30.patch
Patch247: 0047-QSslCertificate-blacklist-NIC-certificates-from-Indi.patch
Patch265: 0065-Fix-QPainter-drawPolyline-painting-errors-with-cosme.patch
Patch266: 0066-Allow-Qt4-to-also-build-in-ppc64-el-le.patch
Patch267: 0067-Fix-AArch64-arm64-detection.patch
Patch272: 0072-Fix-font-cache-check-in-QFontEngineFT-recalcAdvances.patch
Patch363: 0163-QNAM-Fix-upload-corruptions-when-server-closes-conne.patch
## security patches
# CVE-2015-0295
# http://lists.qt-project.org/pipermail/announce/2015-February/000059.html
Patch337: 0137-Fix-a-division-by-zero-when-processing-malformed-BMP.patch
# CVE-2015-1860 CVE-2015-1859 CVE-2015-1858
Patch338: qt-4.8.6-CVE-2015-1860_CVE-2015-1859_CVE-2015-1858.patch
# desktop files
Source20: assistant.desktop
@ -234,24 +220,24 @@ Source31: hi48-app-qt4-logo.png
## optional plugin bits
# set to -no-sql-<driver> to disable
# set to -qt-sql-<driver> to enable *in* qt library
%global mysql -plugin-sql-mysql
%define mysql -plugin-sql-mysql
%define odbc -plugin-sql-odbc
%define psql -plugin-sql-psql
%define sqlite -plugin-sql-sqlite
%if 0%{?rhel} && 0%{?rhel} <= 7
%if 0%{?fedora} < 21 && 0%{?rhel} < 8
%define phonon -phonon
%define phonon_backend -phonon-backend
%endif
%define dbus -dbus-linked
%define graphicssystem -graphicssystem raster
%define gtkstyle -gtkstyle
%if 0%{?fedora} || 0%{?rhel} > 7
%if 0%{?fedora}
# FIXME/TODO: use system webkit for assistant, examples/webkit, demos/browser
%define webkit -webkit
%define ibase -plugin-sql-ibase
%define tds -plugin-sql-tds
%endif
%if 0%{?rhel} && 0%{?rhel} <= 7
%if 0%{?rhel}
%define no_javascript_jit -no-javascript-jit
%define ibase -no-sql-ibase
%define tds -no-sql-tds
@ -278,7 +264,6 @@ Source1: macros.qt4
BuildRequires: cups-devel
BuildRequires: desktop-file-utils
BuildRequires: findutils
BuildRequires: gcc-c++
BuildRequires: libjpeg-devel
BuildRequires: libmng-devel
BuildRequires: libtiff-devel
@ -293,8 +278,7 @@ BuildRequires: pkgconfig(icu-i18n)
BuildRequires: libicu-devel
%endif
BuildRequires: pkgconfig(NetworkManager)
%global openssl -openssl-linked
BuildRequires: openssl-devel
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libpulse)
BuildRequires: pkgconfig(xtst)
@ -314,15 +298,9 @@ BuildRequires: clucene09-core-devel >= 0.9.21b-12
BuildRequires: firebird-devel
%endif
%if "%{?mysql}" == "-no-sql-mysql"
Obsoletes: %{name}-mysql < %{epoch}:%{version}-%{release}
%else
%if 0%{?fedora} > 27 || 0%{?rhel} > 7
BuildRequires: mariadb-connector-c-devel
%else
%if "%{?mysql}" != "-no-sql-mysql"
BuildRequires: mysql-devel >= 4.0
%endif
%endif
%if "%{?phonon_backend}" == "-phonon-backend"
BuildRequires: pkgconfig(gstreamer-0.10)
@ -387,9 +365,6 @@ Group: Documentation
Requires: %{name}-sqlite%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: qt4-assistant = %{version}-%{release}
Requires: %{name}-x11%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%if ! 0%{?system_clucene}
Provides: bundled(clucene09)
%endif
%description assistant
%{summary}.
@ -441,12 +416,6 @@ Group: Development/Libraries
Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: %{name}-x11%{?_isa}
Requires: %{name}-sqlite%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
# qmake defaults, could also consider something like:
# Requires: (gcc-c++ if redhat-rpm-config
# or
# Recommends: gcc-c++
# or a combination of the 2
Requires: gcc-c++
Requires: %{gl_deps}
Requires: %{x_deps}
Requires: pkgconfig
@ -456,15 +425,12 @@ Provides: qt4-phonon-devel = %{version}-%{release}
Obsoletes: qt4-designer < %{version}-%{release}
Provides: qt4-designer = %{version}-%{release}
# as long as libQtUiTools.a is included
Provides: %{name}-static = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: qt4-static = %{version}-%{release}
Provides: %{name}-static = %{version}-%{release}
Obsoletes: qt4-devel < %{version}-%{release}
Provides: qt4-devel = %{version}-%{release}
%{?_isa:Provides: qt4-devel%{?_isa} = %{version}-%{release}}
%if (0%{?fedora} && 0%{?inject_optflags}) || (0%{?rhel} > 7 && 0%{?inject_optflags})
# default flags are used, important configuration is contained here (#1279265)
Requires: redhat-rpm-config
%endif
Provides: qt4-static = %{version}-%{release}
%description devel
This package contains the files necessary to develop
applications using the Qt toolkit. Includes:
@ -476,8 +442,6 @@ Qt Linguist
Summary: Private headers for Qt toolkit
Group: Development/Libraries
Provides: qt4-devel-private = %{version}-%{release}
Provides: %{name}-private-devel = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: qt4-private-devel = %{version}-%{release}
Requires: %{name}-devel = %{?epoch:%{epoch}:}%{version}-%{release}
BuildArch: noarch
%description devel-private
@ -563,12 +527,6 @@ Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Obsoletes: qt4-x11 < %{version}-%{release}
Provides: qt4-x11 = %{version}-%{release}
%{?_isa:Provides: qt4-x11%{?_isa} = %{version}-%{release}}
%if 0%{?fedora} || 0%{?rhel} > 7
## add kde-workspace too? -- rex
#Requires: (sni-qt%{?_isa} if plasma-workspace)
## yum-based tools still cannot handle rich deps ^^, so settle for Recommends until fixed
Recommends: sni-qt%{?_isa}
%endif
%description x11
Qt libraries used for drawing widgets and OpenGL items.
@ -585,10 +543,13 @@ and invoke methods on those objects.
%prep
%setup -q -n qt-everywhere-opensource-src-%{version}
%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 .uic_multilib
%patch5 -p1 -b .webcore_debuginfo
# ie, where cups-1.6+ is present
%if 0%{?fedora} || 0%{?rhel} > 7
%if 0%{?fedora} > 18
#patch6 -p1 -b .cupsEnumDests
%endif
%patch10 -p0 -b .prefer_adwaita_on_gnome
@ -599,15 +560,13 @@ and invoke methods on those objects.
%patch27 -p1 -b .qt3support_debuginfo
%patch28 -p1 -b .qt_plugin_path
%patch50 -p1 -b .qmake_pkgconfig_requires_private
%patch51 -p1 -b .firebird
%patch52 -p1 -b .QT_VERSION_CHECK
%patch51 -p1 -b .fix_detection_of_gcc5
%patch52 -p1 -b .gcc5_compat_qt_build_key
## TODO: still worth carrying? if so, upstream it.
%patch53 -p1 -b .qatomic-inline-asm
## TODO: upstream me
%patch54 -p1 -b .mysql_config
%patch55 -p1 -b .cups-1
%patch56 -p1 -b .mariadb
%patch57 -p1 -b .qmake_LFLAGS
%patch64 -p1 -b .QTBUG-14467
%patch65 -p1 -b .qtreeview-kpackagekit-crash
%patch67 -p1 -b .s390
@ -629,14 +588,6 @@ and invoke methods on those objects.
# delete bundled copy
rm -rf src/3rdparty/clucene
%endif
%patch91 -p1 -b .mips64
%patch92 -p1 -b .gcc6
%patch93 -p1 -b .alsa1.1
%patch94 -p1 -b .openssl1.1
%patch95 -p1 -b .icu59
%if 0%{?fedora} > 27
%patch96 -p1 -b .gcc8_qtscript
%endif
# upstream patches
%patch102 -p1 -b .qgtkstyle_disable_gtk_theme_check
@ -645,6 +596,19 @@ rm -rf src/3rdparty/clucene
%patch180 -p1 -b .aarch64
# upstream git
%patch210 -p1 -b .0010
%patch223 -p1 -b .0023
%patch225 -p1 -b .0025
%patch230 -p1 -b .0030
%patch234 -p1 -b .0034
%patch247 -p1 -b .0047
%patch265 -p1 -b .0065
%patch266 -p1 -b .0066
%patch267 -p1 -b .0067
%patch272 -p1 -b .0072
%patch337 -p1 -b .0137
%patch338 -p1 -b .CVE-2015-1860_CVE-2015-1859_CVE-2015-1858
%patch363 -p1 -b .0163
# security fixes
# regression fixes for the security fixes
@ -652,6 +616,9 @@ rm -rf src/3rdparty/clucene
%patch86 -p1 -b .systemtrayicon
# drop -fexceptions from $RPM_OPT_FLAGS
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'`
%define platform linux-g++
# some 64bit platforms assume -64 suffix, https://bugzilla.redhat.com/569542
@ -664,20 +631,11 @@ rm -rf src/3rdparty/clucene
%define platform linux-g++
%endif
%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
# drop -fexceptions from $RPM_OPT_FLAGS
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'`
sed -i -e "s|-O2|$RPM_OPT_FLAGS|g" \
mkspecs/%{platform}/qmake.conf
sed -i -e "s|^\(QMAKE_LFLAGS_RELEASE.*\)|\1 $RPM_LD_FLAGS|" \
mkspecs/common/g++-unix.conf
%endif
# undefine QMAKE_STRIP (and friends), so we get useful -debuginfo pkgs (#193602)
sed -i -e 's|^\(QMAKE_STRIP.*=\).*$|\1|g' mkspecs/common/linux.conf
@ -688,12 +646,6 @@ if [ "%{_lib}" == "lib64" ] ; then
sed -i -e "s,/lib /usr/lib,/%{_lib} /usr/%{_lib},g" config.tests/{unix,x11}/*.test
fi
# MIPS does not accept -m64/-m32 flags
%ifarch %{mips}
sed -i -e 's,-m32,,' mkspecs/linux-g++-32/qmake.conf
sed -i -e 's,-m64,,' mkspecs/linux-g++-64/qmake.conf
%endif
# let makefile create missing .qm files, the .qm files should be included in qt upstream
for f in translations/*.ts ; do
touch ${f%.ts}.qm
@ -702,30 +654,11 @@ done
%build
# drop -fexceptions from $RPM_OPT_FLAGS
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'`
%if 0%{?fedora} || 0%{?rhel} > 7
# workaround for class std::auto_ptr' is deprecated with gcc-6
CXXFLAGS="$CXXFLAGS -std=gnu++98"
# javascriptcore FTBFS with gcc-6
CXXFLAGS="$CXXFLAGS -Wno-deprecated"
%endif
export QTDIR=$PWD
export PATH=$PWD/bin:$PATH
export LD_LIBRARY_PATH=$PWD/lib/
# TODO: opensuse adds -DOPENSSL_LOAD_CONF, find out if we want that too -- rex
export CXXFLAGS="$CXXFLAGS $RPM_OPT_FLAGS"
export CFLAGS="$CFLAGS $RPM_OPT_FLAGS"
export LDFLAGS="$LDFLAGS $RPM_LD_FLAGS"
export MAKEFLAGS="%{?_smp_mflags}"
# build shared, threaded (default) libraries
./configure -v \
-confirm-license \
-opensource \
-optimized-qmake \
-fast \
-prefix %{_qt4_prefix} \
-bindir %{_qt4_bindir} \
-datadir %{_qt4_datadir} \
@ -746,7 +679,7 @@ export MAKEFLAGS="%{?_smp_mflags}"
-largefile \
-gtkstyle \
-no-rpath \
%{?reduce_relocations} \
-reduce-relocations \
-no-separate-debug-info \
%{?phonon} %{!?phonon:-no-phonon} \
%{?phonon_backend} \
@ -769,7 +702,7 @@ export MAKEFLAGS="%{?_smp_mflags}"
-xkb \
-glib \
-icu \
%{?openssl} \
-openssl-linked \
-xmlpatterns \
%{?dbus} %{!?dbus:-no-dbus} \
%{?graphicssystem} \
@ -784,31 +717,13 @@ export MAKEFLAGS="%{?_smp_mflags}"
%{!?demos:-nomake demos} \
%{!?examples:-nomake examples}
# verify QT_BUILD_KEY
grep '^#define QT_BUILD_KEY ' src/corelib/global/qconfig.h
QT_BUILD_KEY_COMPILER="$(grep '^#define QT_BUILD_KEY ' src/corelib/global/qconfig.h | cut -d' ' -f5)"
if [ "$QT_BUILD_KEY_COMPILER" != 'g++-4' ]; then
echo "QT_BUILD_KEY_COMPILER failure"
exit 1
fi
%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}
# TODO: consider patching tools/tools.pro to enable building this by default
%{?qvfb:make %{?_smp_mflags} -C tools/qvfb}
# recreate .qm files
bin/lrelease translations/*.ts
LD_LIBRARY_PATH=`pwd`/lib bin/lrelease translations/*.ts
%install
@ -843,9 +758,7 @@ desktop-file-install \
# strip extraneous dirs/libraries
# safe ones
glib2_libs=$(pkg-config --libs glib-2.0 gobject-2.0 gthread-2.0)
if [ "%{?openssl}" == "-openssl-linked" ]; then
ssl_libs=$(pkg-config --libs openssl)
fi
for dep in \
-laudio -ldbus-1 -lfreetype -lfontconfig ${glib2_libs} \
-ljpeg -lm -lmng -lpng -lpulse -lpulse-mainloop-glib ${ssl_libs} -lsqlite3 -lz \
@ -863,7 +776,7 @@ done
# nuke dangling reference(s) to %buildroot
sed -i -e "/^QMAKE_PRL_BUILD_DIR/d" %{buildroot}%{_qt4_libdir}/*.prl
sed -i -e "s|-L%{_builddir}/qt-everywhere-opensource-src-%{version}%{?beta:-%{beta}}/lib||g" \
sed -i -e "s|-L%{_builddir}/qt-everywhere-opensource-src-%{version}%{?pre:-%{pre}}/lib||g" \
%{buildroot}%{_qt4_libdir}/pkgconfig/*.pc \
%{buildroot}%{_qt4_libdir}/*.prl
@ -968,6 +881,20 @@ done
install -p -m644 -D tools/qdbus/qdbusviewer/images/qdbusviewer.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/qdbusviewer.png
install -p -m644 -D tools/qdbus/qdbusviewer/images/qdbusviewer-128.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/qdbusviewer.png
# Merge applications into one software center item
mkdir -p %{buildroot}%{_datadir}/appdata
cat > %{buildroot}%{_datadir}/appdata/qt4-linguist.appdata.xml <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2014 Richard Hughes <richard@hughsie.com> -->
<component type="desktop">
<metadata_license>CC0-1.0</metadata_license>
<id>qt4-linguist.desktop</id>
<metadata>
<value key="X-Merge-With-Parent">qt4-designer.desktop</value>
</metadata>
</component>
EOF
# Qt.pc
cat >%{buildroot}%{_libdir}/pkgconfig/Qt.pc<<EOF
prefix=%{_qt4_prefix}
@ -1045,6 +972,9 @@ cat assistant.lang qt_help.lang qtconfig.lang qtscript.lang >qt-x11.lang
cat designer.lang linguist.lang >qt-devel.lang
%clean
rm -rf %{buildroot}
%if 0%{?qtchooser}
%pre
@ -1091,8 +1021,8 @@ fi
%endif
%files -f qt.lang
%doc README
%license LICENSE.GPL3 LICENSE.LGPL LGPL_EXCEPTION.txt
%defattr(-,root,root,-)
%doc README LICENSE.GPL3 LICENSE.LGPL LGPL_EXCEPTION.txt
%if 0%{?qtchooser}
%dir %{_sysconfdir}/xdg/qtchooser
# not editable config files, so not using %%config here
@ -1163,6 +1093,7 @@ gtk-update-icon-cache -q %{_datadir}/icons/hicolor 2> /dev/null ||:
fi
%files assistant
%defattr(-,root,root,-)
%if "%{_qt4_bindir}" != "%{_bindir}"
%{_bindir}/assistant*
%endif
@ -1171,24 +1102,27 @@ fi
%{_datadir}/icons/hicolor/*/apps/assistant*
%files config
%defattr(-,root,root,-)
%if "%{_qt4_bindir}" != "%{_bindir}"
%{_bindir}/qt*config*
%endif
%{_qt4_bindir}/qt*config*
%{_datadir}/applications/*qtconfig.desktop
%if 0%{?demos}
%files demos
%defattr(-,root,root,-)
%if 0%{?demos}
%{_qt4_bindir}/qt*demo*
%if "%{_qt4_bindir}" != "%{_bindir}"
%{_bindir}/qt*demo*
%endif
%{_datadir}/applications/*qtdemo.desktop
%{_qt4_demosdir}/
%endif
%{_qt4_demosdir}/
%if "%{?webkit}" == "-webkit"
%files designer-plugin-webkit
%defattr(-,root,root,-)
%{_qt4_plugindir}/designer/libqwebview.so
%endif
@ -1207,6 +1141,7 @@ update-desktop-database -q &> /dev/null ||:
fi
%files devel -f qt-devel.lang
%defattr(-,root,root,-)
%{rpm_macros_dir}/macros.qt4
%{_qt4_bindir}/lconvert
%{_qt4_bindir}/lrelease*
@ -1280,6 +1215,7 @@ fi
%{?docs:%{_qt4_docdir}/qch/designer.qch}
# Qt Linguist
%{_qt4_bindir}/linguist*
%{_datadir}/appdata/*linguist.appdata.xml
%{_datadir}/applications/*linguist.desktop
%{_datadir}/icons/hicolor/*/apps/linguist*
%{?docs:%{_qt4_docdir}/qch/linguist.qch}
@ -1287,6 +1223,7 @@ fi
%exclude %{_qt4_headerdir}/*/private/
%files devel-private
%defattr(-,root,root,-)
%{_qt4_headerdir}/QtCore/private/
%{_qt4_headerdir}/QtDeclarative/private/
%{_qt4_headerdir}/QtGui/private/
@ -1299,6 +1236,7 @@ fi
%if 0%{?docs}
%files doc
%defattr(-,root,root,-)
%{_qt4_docdir}/html/*
%{_qt4_docdir}/qch/*.qch
%exclude %{_qt4_docdir}/qch/designer.qch
@ -1307,39 +1245,44 @@ fi
#{_qt4_prefix}/doc
%endif
%if 0%{?examples}
%files examples
%defattr(-,root,root,-)
%{_qt4_examplesdir}/
%endif
%if 0%{?qvfb}
%files qvfb -f qvfb.lang
%defattr(-,root,root,-)
%{_bindir}/qvfb
%{_qt4_bindir}/qvfb
%endif
%if "%{?ibase}" == "-plugin-sql-ibase"
%files ibase
%defattr(-,root,root,-)
%{_qt4_plugindir}/sqldrivers/libqsqlibase*
%endif
%if "%{?mysql}" == "-plugin-sql-mysql"
%files mysql
%defattr(-,root,root,-)
%{_qt4_plugindir}/sqldrivers/libqsqlmysql*
%endif
%if "%{?odbc}" == "-plugin-sql-odbc"
%files odbc
%defattr(-,root,root,-)
%{_qt4_plugindir}/sqldrivers/libqsqlodbc*
%endif
%if "%{?psql}" == "-plugin-sql-psql"
%files postgresql
%defattr(-,root,root,-)
%{_qt4_plugindir}/sqldrivers/libqsqlpsql*
%endif
%if "%{?tds}" == "-plugin-sql-tds"
%files tds
%defattr(-,root,root,-)
%{_qt4_plugindir}/sqldrivers/libqsqltds*
%endif
@ -1358,6 +1301,7 @@ gtk-update-icon-cache -q %{_datadir}/icons/hicolor 2> /dev/null ||:
fi
%files x11 -f qt-x11.lang
%defattr(-,root,root,-)
%dir %{_qt4_importdir}/
%{_qt4_importdir}/Qt/
%{_qt4_libdir}/libQt3Support.so.4*
@ -1403,138 +1347,6 @@ fi
%changelog
* Sat May 19 2018 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.7-40
- build only qtscript using -O1 (#1580047)
* Sat May 19 2018 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.7-39
- workaround qtscript/gcc8 bug (#1580047)
* Wed Mar 07 2018 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.7-38
- -devel: Requires: gcc-c++
* Tue Feb 20 2018 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.7-37
- BR: gcc-c++, use %%license, .spec cosmetics
* Thu Feb 15 2018 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.7-36
- qt: Fedora build flags only partially applied (#1543887)
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1:4.8.7-35
- Escape macros in %%changelog
* Fri Jan 05 2018 Kevin Kofler <Kevin@tigcc.ticalc.org> - 1:4.8.7-34
- build with OpenSSL 1.1.x, from Debian (Gert Wollny, Dmitry Eremin-Solenikov)
- fix build with ICU >= 59, from OpenSUSE (Fabian Vogt)
- update URL to use HTTPS
* Wed Oct 25 2017 Troy Dawson <tdawson@redhat.com> - 1:4.8.7-33
- Cleanup spec file conditionals
* Mon Oct 23 2017 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.7-32
- BR: mariadb-connector-c-devel (f28+, #1494085)
- backport mysql driver mariadb fix (QTBUG-63108)
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.8.7-31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.8.7-30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Tue Jul 11 2017 Than Ngo <than@redhat.com> - 1:4.8.7-29
- fixed bz#1409600, stack overflow in QXmlSimpleReader, CVE-2016-1004
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:4.8.7-28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
* Tue Mar 21 2017 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.7-27
- drop system_clucene on f26+ (clucene09 is FTBFS, #1424046)
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.8.7-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Fri Dec 09 2016 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.7-25
- update QTBUG-22829.patch to use _SYS_SYSMACROS_H_OUTER instead (#1396755)
* Thu Dec 08 2016 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.7-24
- namespace QT_VERSION_CHECK to workaround major/minor being pre-defined (#1396755)
- update QTBUG-22829.patch to define _SYS_SYSMACROS_H (#1396755)
* Wed Dec 07 2016 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.7-23
- (re)enable mysql support (#1400233)
* Thu Dec 1 2016 Orion Poplawski <orion@cora.nwra.com> - 1:4.8.7-22
- Add additional workarounds for boost/glib parsing (#1396755)
* Wed Nov 30 2016 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.7-21
- BR: compat-openssl10-devel, restore -openssl-linked (#1328659)
- -no-sql-mysql (#1400233)
* Wed Nov 30 2016 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.7-20
- FTBFS firebird
- FTBFS openssl-1.1, bootstrap using -no-openssl (#1400196)
* Thu Sep 29 2016 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.7-19
- load openssl libs dynamically, f26+ (#1328659)
* Sun Jun 26 2016 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.7-18
- qmake-qt4 adds '-std=gnu++98' flag to compiler flags (#1349951)
* Wed Apr 20 2016 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.7-17
- %%build: drop --buildkey g++-4 (#1327360)
- %%build: add QT_BUILD_KEY verification (to avoid future regressions)
* Sun Apr 17 2016 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.7-16
- use epoch in -static Provides
- -devel-private: Provides: qt(4)-private-devel
* Fri Apr 15 2016 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.7-15
- %%build: -buildkey g++-4 (#1327360)
* Sun Apr 03 2016 Michal Toman <mtoman@fedoraproject.org> - 1:4.8.7-14
- Fix build on MIPS (#1322524)
* Wed Mar 16 2016 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.7-13
- respin boost/moc patch for boost-1.60 (BOOST_TYPE_TRAITS_HPP)
* Mon Mar 14 2016 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.7-12
- -x11: back to Recommends: sni-qt (#1317481)
* Sat Mar 12 2016 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.7-11
- -x11: Requires: sni-qt if plasma-workspace, f23+
* Fri Mar 11 2016 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.7-10
- -x11: Recommends: sni-qt, f24+
* Tue Mar 01 2016 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.7-9
- rebuild (openssl)
* Wed Feb 10 2016 Than Ngo <than@redhat.com> - 1:4.8.7-8
- fix build issue with gcc6
- fix alsa version check for version >= 1.1.x
* Tue Feb 02 2016 Rex Dieter <rdieter@fedoraproject.org> 1:4.8.7-7
- macros.qt4 : cleanup, introduce %%_qt4_optflags, %%_qt4_ldflags, %%_qt4_qmake_flags
* Thu Nov 26 2015 Rex Dieter <rdieter@fedoraproject.org> 1:4.8.7-6
- don't inject $RPM_OPT_FLAGS/$RPM_LD_FLAGS into qmake defaults (#1279265)
* Wed Nov 25 2015 Rex Dieter <rdieter@fedoraproject.org> 1:4.8.7-5
- -devel: Requires: redhat-rpm-config (#1279265)
* Fri Sep 18 2015 Richard Hughes <rhughes@redhat.com> - 1:4.8.7-4
- Remove no longer required AppData file
* Tue Jun 16 2015 Rex Dieter <rdieter@fedoraproject.org> 1:4.8.7-3
- macros.qt4: fix qmake_qt4 so "FOO=BAR %%qmake_qt4" works as expected
* Tue Jun 09 2015 Rex Dieter <rdieter@fedoraproject.org> 1:4.8.7-2
- drop -reduce-relocations (f22+)
* Tue May 26 2015 Rex Dieter <rdieter@fedoraproject.org> 1:4.8.7-1
- qt-4.8.7 (final)
* Fri May 08 2015 Rex Dieter <rdieter@fedoraproject.org> 1:4.8.7-0.1.rc2
- qt-4.8.7-rc2
* Tue May 05 2015 Rex Dieter <rdieter@fedoraproject.org> 1:4.8.6-30
- backport: data corruption in QNetworkAccessManager
@ -2297,7 +2109,7 @@ fi
- add arch'd provides for sql drivers
* Sun Nov 08 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.6.0-0.4.beta1
- -x11: Requires: %%{name}-sqlite%%{?_isa}
- -x11: Requires: %%{name}-sqlite%{?_isa}
* Mon Oct 26 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.6.0-0.3.beta1
- kde-qt patches (as of 20091026)

View File

@ -1,3 +1,3 @@
d9f511e4b51983b4e10eb58b320416d5 hi128-app-qt4-logo.png
6dcc0672ff9e60a6b83f95c5f42bec5b hi48-app-qt4-logo.png
d990ee66bf7ab0c785589776f35ba6ad qt-everywhere-opensource-src-4.8.7.tar.gz
2edbe4d6c2eff33ef91732602f3518eb qt-everywhere-opensource-src-4.8.6.tar.gz