summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-09-30 08:20:05 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-09-30 08:20:05 (GMT)
commit19a57f4e192267523fb815246b347bbc2054b736 (patch)
tree48b229343687afd3ea22f3d43425ec529e87b84d /src
parentd6eb899ee2c937a871dd945a995e2fd4a3eb7821 (diff)
parent753d366ced1a62a97d5207eb2708817efc35bc4d (diff)
downloadQt-19a57f4e192267523fb815246b347bbc2054b736.zip
Qt-19a57f4e192267523fb815246b347bbc2054b736.tar.gz
Qt-19a57f4e192267523fb815246b347bbc2054b736.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (34 commits) Add declarative changelog entries for 4.7.1 connman backend My changelog entries for 4.7.1 updated changes-4.7.1 Update frameGeometry when the unified toolbar visiblity is toggled Update changelog my contributions to dist/changes-4.7.1 My 4.7.1 changes. added my and Jan-Arve's change to changelog for 4.7.1 Changes done for 4.7.1 Updated changes-4.7.1 My changes. Fix for bug QTMOBILITY-448 to list the default network configuration in Bearermonitor example Initialise pointer variables. An aborted QNetworkSession on Maemo must emit SessionAbortedError. Autotest: also enable testing of QtDeclarative Add Qt 4.7.0 baseline symbols to the 4.7 branch Call createpackage without the explicit .bat suffix Improve Qt/Symbian compatibility with unix shells Ukrainian translation updated ...
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qsimd.cpp2
-rw-r--r--src/gui/kernel/qt_cocoa_helpers_mac.mm1
-rw-r--r--src/gui/painting/qgrayraster.c46
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp9
-rw-r--r--src/gui/painting/qpainter.cpp8
-rw-r--r--src/gui/painting/qrasterdefs_p.h1
-rw-r--r--src/gui/styles/qgtkstyle_p.cpp24
-rw-r--r--src/gui/styles/qgtkstyle_p.h1
-rw-r--r--src/gui/styles/qwindowsxpstyle.cpp2
-rw-r--r--src/network/kernel/qhostinfo.cpp5
-rw-r--r--src/network/ssl/qsslsocket.cpp2
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp37
-rw-r--r--src/plugins/bearer/icd/qnetworksession_impl.cpp7
-rw-r--r--src/plugins/bearer/symbian/symbianengine.cpp4
14 files changed, 110 insertions, 39 deletions
diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp
index 7babf3a..b2fe2da 100644
--- a/src/corelib/tools/qsimd.cpp
+++ b/src/corelib/tools/qsimd.cpp
@@ -286,7 +286,7 @@ static inline uint detectProcessorFeatures()
uint feature_result = 0;
#if defined(Q_CC_GNU)
- long tmp;
+ quint64 tmp;
asm ("xchg %%rbx, %1\n"
"cpuid\n"
"xchg %%rbx, %1\n"
diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm
index 7d23abf..3945754 100644
--- a/src/gui/kernel/qt_cocoa_helpers_mac.mm
+++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm
@@ -193,6 +193,7 @@ void macWindowToolbarShow(const QWidget *widget, bool show )
}
}
#else
+ qt_widget_private(const_cast<QWidget *>(widget))->updateFrameStrut();
ShowHideWindowToolbar(wnd, show, false);
#endif
}
diff --git a/src/gui/painting/qgrayraster.c b/src/gui/painting/qgrayraster.c
index 94039fb..d0e25a9 100644
--- a/src/gui/painting/qgrayraster.c
+++ b/src/gui/painting/qgrayraster.c
@@ -233,7 +233,7 @@
/* new algorithms */
typedef int TCoord; /* integer scanline/pixel coordinate */
- typedef long TPos; /* sub-pixel coordinate */
+ typedef int TPos; /* sub-pixel coordinate */
/* determine the type used to store cell areas. This normally takes at */
/* least PIXEL_BITS*2 + 1 bits. On 16-bit systems, we need to use */
@@ -317,6 +317,7 @@
PCell* ycells;
int ycount;
+ int skip_spans;
} TWorker, *PWorker;
@@ -330,7 +331,12 @@
} TRaster, *PRaster;
-
+ int q_gray_rendered_spans(TRaster *raster)
+ {
+ if ( raster && raster->worker )
+ return raster->worker->skip_spans > 0 ? 0 : -raster->worker->skip_spans;
+ return 0;
+ }
/*************************************************************************/
/* */
@@ -538,7 +544,7 @@
TCoord y2 )
{
TCoord ex1, ex2, fx1, fx2, delta;
- long p, first, dx;
+ int p, first, dx;
int incr, lift, mod, rem;
@@ -643,7 +649,7 @@
{
TCoord ey1, ey2, fy1, fy2;
TPos dx, dy, x, x2;
- long p, first;
+ int p, first;
int delta, rem, mod, lift, incr;
@@ -1178,6 +1184,7 @@
{
QT_FT_Span* span;
int coverage;
+ int skip;
/* compute the coverage line's coverage, depending on the */
@@ -1228,9 +1235,16 @@
if ( ras.num_gray_spans >= QT_FT_MAX_GRAY_SPANS )
{
- if ( ras.render_span )
- ras.render_span( ras.num_gray_spans, ras.gray_spans,
+ if ( ras.render_span && ras.num_gray_spans > ras.skip_spans )
+ {
+ skip = ras.skip_spans > 0 ? ras.skip_spans : 0;
+ ras.render_span( ras.num_gray_spans - skip,
+ ras.gray_spans + skip,
ras.render_span_data );
+ }
+
+ ras.skip_spans -= ras.num_gray_spans;
+
/* ras.render_span( span->y, ras.gray_spans, count ); */
#ifdef DEBUG_GRAYS
@@ -1600,7 +1614,8 @@
TBand* volatile band;
int volatile n, num_bands;
TPos volatile min, max, max_y;
- QT_FT_BBox* clip;
+ QT_FT_BBox* clip;
+ int skip;
ras.num_gray_spans = 0;
@@ -1670,7 +1685,7 @@
{
PCell cells_max;
int yindex;
- long cell_start, cell_end, cell_mod;
+ int cell_start, cell_end, cell_mod;
ras.ycells = (PCell*)ras.buffer;
@@ -1741,9 +1756,15 @@
}
}
- if ( ras.render_span && ras.num_gray_spans > 0 )
- ras.render_span( ras.num_gray_spans,
- ras.gray_spans, ras.render_span_data );
+ if ( ras.render_span && ras.num_gray_spans > ras.skip_spans )
+ {
+ skip = ras.skip_spans > 0 ? ras.skip_spans : 0;
+ ras.render_span( ras.num_gray_spans - skip,
+ ras.gray_spans + skip,
+ ras.render_span_data );
+ }
+
+ ras.skip_spans -= ras.num_gray_spans;
if ( ras.band_shoot > 8 && ras.band_size > 16 )
ras.band_size = ras.band_size / 2;
@@ -1764,6 +1785,9 @@
if ( !raster || !raster->buffer || !raster->buffer_size )
return ErrRaster_Invalid_Argument;
+ if ( raster->worker )
+ raster->worker->skip_spans = params->skip_spans;
+
// If raster object and raster buffer are allocated, but
// raster size isn't of the minimum size, indicate out of
// memory.
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 09a87aa..36e1082 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -4148,6 +4148,10 @@ void QRasterPaintEnginePrivate::rasterize(QT_FT_Outline *outline,
rasterize(outline, callback, (void *)spanData, rasterBuffer);
}
+extern "C" {
+ int q_gray_rendered_spans(QT_FT_Raster raster);
+}
+
void QRasterPaintEnginePrivate::rasterize(QT_FT_Outline *outline,
ProcessSpans callback,
void *userData, QRasterBuffer *)
@@ -4212,10 +4216,13 @@ void QRasterPaintEnginePrivate::rasterize(QT_FT_Outline *outline,
bool done = false;
int error;
+ int rendered_spans = 0;
+
while (!done) {
rasterParams.flags |= (QT_FT_RASTER_FLAG_AA | QT_FT_RASTER_FLAG_DIRECT);
rasterParams.gray_spans = callback;
+ rasterParams.skip_spans = rendered_spans;
error = qt_ft_grays_raster.raster_render(*grayRaster.data(), &rasterParams);
// Out of memory, reallocate some more and try again...
@@ -4244,6 +4251,8 @@ void QRasterPaintEnginePrivate::rasterize(QT_FT_Outline *outline,
#endif
Q_CHECK_PTR(rasterPoolBase); // note: we just freed the old rasterPoolBase. I hope it's not fatal.
+ rendered_spans += q_gray_rendered_spans(*grayRaster.data());
+
qt_ft_grays_raster.raster_done(*grayRaster.data());
qt_ft_grays_raster.raster_new(grayRaster.data());
qt_ft_grays_raster.raster_reset(*grayRaster.data(), rasterPoolBase, rasterPoolSize);
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 12be93e..5fbe3ed 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -2717,7 +2717,7 @@ void QPainter::setClipRect(const QRectF &rect, Qt::ClipOperation op)
Q_D(QPainter);
if (d->extended) {
- if (!hasClipping() && (op == Qt::IntersectClip || op == Qt::UniteClip))
+ if ((!d->state->clipEnabled && op != Qt::NoClip) || (d->state->clipOperation == Qt::NoClip && op == Qt::UniteClip))
op = Qt::ReplaceClip;
if (!d->engine) {
@@ -2775,7 +2775,7 @@ void QPainter::setClipRect(const QRect &rect, Qt::ClipOperation op)
return;
}
- if (!hasClipping() && (op == Qt::IntersectClip || op == Qt::UniteClip))
+ if ((!d->state->clipEnabled && op != Qt::NoClip) || (d->state->clipOperation == Qt::NoClip && op == Qt::UniteClip))
op = Qt::ReplaceClip;
if (d->extended) {
@@ -2830,7 +2830,7 @@ void QPainter::setClipRegion(const QRegion &r, Qt::ClipOperation op)
return;
}
- if (!hasClipping() && (op == Qt::IntersectClip || op == Qt::UniteClip))
+ if ((!d->state->clipEnabled && op != Qt::NoClip) || (d->state->clipOperation == Qt::NoClip && op == Qt::UniteClip))
op = Qt::ReplaceClip;
if (d->extended) {
@@ -3235,7 +3235,7 @@ void QPainter::setClipPath(const QPainterPath &path, Qt::ClipOperation op)
return;
}
- if (!hasClipping() && (op == Qt::IntersectClip || op == Qt::UniteClip))
+ if ((!d->state->clipEnabled && op != Qt::NoClip) || (d->state->clipOperation == Qt::NoClip && op == Qt::UniteClip))
op = Qt::ReplaceClip;
if (d->extended) {
diff --git a/src/gui/painting/qrasterdefs_p.h b/src/gui/painting/qrasterdefs_p.h
index 19a0b16..4131e4b 100644
--- a/src/gui/painting/qrasterdefs_p.h
+++ b/src/gui/painting/qrasterdefs_p.h
@@ -1088,6 +1088,7 @@ QT_FT_BEGIN_HEADER
QT_FT_Raster_BitSet_Func bit_set; /* doesn't work! */
void* user;
QT_FT_BBox clip_box;
+ int skip_spans;
} QT_FT_Raster_Params;
diff --git a/src/gui/styles/qgtkstyle_p.cpp b/src/gui/styles/qgtkstyle_p.cpp
index 4ed0fab..fdbe1f8 100644
--- a/src/gui/styles/qgtkstyle_p.cpp
+++ b/src/gui/styles/qgtkstyle_p.cpp
@@ -524,7 +524,9 @@ void QGtkStylePrivate::initGtkWidgets() const
QGtkStylePrivate::gtk_widget_realize(gtkWindow);
if (displayDepth == -1)
displayDepth = QGtkStylePrivate::gdk_drawable_get_depth(gtkWindow->window);
- gtkWidgetMap()->insert(QHashableLatin1Literal::fromData(strdup("GtkWindow")), gtkWindow);
+ QHashableLatin1Literal widgetPath = QHashableLatin1Literal::fromData(strdup("GtkWindow"));
+ removeWidgetFromMap(widgetPath);
+ gtkWidgetMap()->insert(widgetPath, gtkWindow);
// Make all other widgets. respect the text direction
@@ -576,6 +578,7 @@ void QGtkStylePrivate::initGtkWidgets() const
if (!strchr(it.key().data(), '.')) {
addAllSubWidgets(it.value());
}
+ free(const_cast<char *>(it.key().data()));
}
}
} else {
@@ -743,19 +746,24 @@ void QGtkStylePrivate::setupGtkWidget(GtkWidget* widget)
}
}
+void QGtkStylePrivate::removeWidgetFromMap(const QHashableLatin1Literal &path)
+{
+ WidgetMap *map = gtkWidgetMap();
+ WidgetMap::iterator it = map->find(path);
+ if (it != map->end()) {
+ free(const_cast<char *>(it.key().data()));
+ map->erase(it);
+ }
+}
+
void QGtkStylePrivate::addWidgetToMap(GtkWidget *widget)
{
if (Q_GTK_IS_WIDGET(widget)) {
gtk_widget_realize(widget);
QHashableLatin1Literal widgetPath = classPath(widget);
- WidgetMap *map = gtkWidgetMap();
- WidgetMap::iterator it = map->find(widgetPath);
- if (it != map->end()) {
- free(const_cast<char *>(it.key().data()));
- map->erase(it);
- }
- map->insert(widgetPath, widget);
+ removeWidgetFromMap(widgetPath);
+ gtkWidgetMap()->insert(widgetPath, widget);
#ifdef DUMP_GTK_WIDGET_TREE
qWarning("Inserted Gtk Widget: %s", widgetPath.data());
#endif
diff --git a/src/gui/styles/qgtkstyle_p.h b/src/gui/styles/qgtkstyle_p.h
index 68a04e9..4e1d07a 100644
--- a/src/gui/styles/qgtkstyle_p.h
+++ b/src/gui/styles/qgtkstyle_p.h
@@ -502,6 +502,7 @@ protected:
static void addWidgetToMap(GtkWidget* widget);
static void addAllSubWidgets(GtkWidget *widget, gpointer v = 0);
static void addWidget(GtkWidget *widget);
+ static void removeWidgetFromMap(const QHashableLatin1Literal &path);
virtual void init();
diff --git a/src/gui/styles/qwindowsxpstyle.cpp b/src/gui/styles/qwindowsxpstyle.cpp
index d36011c..a5e9c19 100644
--- a/src/gui/styles/qwindowsxpstyle.cpp
+++ b/src/gui/styles/qwindowsxpstyle.cpp
@@ -2154,7 +2154,7 @@ void QWindowsXPStyle::drawControl(ControlElement element, const QStyleOption *op
p->setPen(menuitem->palette.text().color());
p->setBrush(Qt::NoBrush);
if (checked)
- p->drawRect(vIconRect.adjusted(-1, -2, 1, 1));
+ p->drawRect(vIconRect.adjusted(-1, -1, 0, 0));
p->drawPixmap(vIconRect.topLeft(), pixmap);
// draw checkmark -------------------------------------------------
diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp
index 41a9512..f984cf8 100644
--- a/src/network/kernel/qhostinfo.cpp
+++ b/src/network/kernel/qhostinfo.cpp
@@ -243,7 +243,10 @@ QHostInfo QHostInfo::fromName(const QString &name)
qDebug("QHostInfo::fromName(\"%s\")",name.toLatin1().constData());
#endif
- return QHostInfoAgent::fromName(name);
+ QHostInfo hostInfo = QHostInfoAgent::fromName(name);
+ QHostInfoLookupManager *manager = theHostInfoLookupManager();
+ manager->cache.put(name, hostInfo);
+ return hostInfo;
}
/*!
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index f18c629..c9f421f 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -1354,7 +1354,7 @@ QList<QSslCertificate> QSslSocket::defaultCaCertificates()
*/
QList<QSslCertificate> QSslSocket::systemCaCertificates()
{
- QSslSocketPrivate::ensureInitialized();
+ // we are calling ensureInitialized() in the method below
return QSslSocketPrivate::systemCaCertificates();
}
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index 5033393..cd224df 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -772,14 +772,35 @@ QList<QSslCertificate> QSslSocketPrivate::systemCaCertificates()
}
}
#elif defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
- systemCerts.append(QSslCertificate::fromPath(QLatin1String("/var/ssl/certs/*.pem"), QSsl::Pem, QRegExp::Wildcard)); // AIX
- systemCerts.append(QSslCertificate::fromPath(QLatin1String("/usr/local/ssl/certs/*.pem"), QSsl::Pem, QRegExp::Wildcard)); // Solaris
- systemCerts.append(QSslCertificate::fromPath(QLatin1String("/opt/openssl/certs/*.pem"), QSsl::Pem, QRegExp::Wildcard)); // HP-UX
- systemCerts.append(QSslCertificate::fromPath(QLatin1String("/etc/ssl/certs/*.pem"), QSsl::Pem, QRegExp::Wildcard)); // (K)ubuntu, OpenSUSE, Mandriva, ...
- systemCerts.append(QSslCertificate::fromPath(QLatin1String("/etc/pki/tls/certs/ca-bundle.crt"), QSsl::Pem)); // Fedora
- systemCerts.append(QSslCertificate::fromPath(QLatin1String("/usr/lib/ssl/certs/*.pem"), QSsl::Pem, QRegExp::Wildcard)); // Gentoo, Mandrake
- systemCerts.append(QSslCertificate::fromPath(QLatin1String("/usr/share/ssl/*.pem"), QSsl::Pem, QRegExp::Wildcard)); // Centos, Redhat, SuSE
- systemCerts.append(QSslCertificate::fromPath(QLatin1String("/usr/local/ssl/*.pem"), QSsl::Pem, QRegExp::Wildcard)); // Normal OpenSSL Tarball
+ QSet<QString> certFiles;
+ QList<QByteArray> directories;
+ directories << "/etc/ssl/certs/"; // (K)ubuntu, OpenSUSE, Mandriva, MeeGo ...
+ directories << "/usr/lib/ssl/certs/"; // Gentoo, Mandrake
+ directories << "/usr/share/ssl/"; // Centos, Redhat, SuSE
+ directories << "/usr/local/ssl/"; // Normal OpenSSL Tarball
+ directories << "/var/ssl/certs/"; // AIX
+ directories << "/usr/local/ssl/certs/"; // Solaris
+ directories << "/opt/openssl/certs/"; // HP-UX
+
+ QDir currentDir;
+ QStringList nameFilters;
+ nameFilters << QLatin1String("*.pem") << QLatin1String("*.crt");
+ currentDir.setNameFilters(nameFilters);
+ for (int a = 0; a < directories.count(); a++) {
+ currentDir.setPath(QLatin1String(directories.at(a)));
+ QDirIterator it(currentDir);
+ while(it.hasNext()) {
+ it.next();
+ // use canonical path here to not load the same certificate twice if symlinked
+ certFiles.insert(it.fileInfo().canonicalFilePath());
+ }
+ }
+ QSetIterator<QString> it(certFiles);
+ while(it.hasNext()) {
+ systemCerts.append(QSslCertificate::fromPath(it.next()));
+ }
+ systemCerts.append(QSslCertificate::fromPath(QLatin1String("/etc/pki/tls/certs/ca-bundle.crt"), QSsl::Pem)); // Fedora, Mandriva
+
#elif defined(Q_OS_SYMBIAN)
QList<QByteArray> certs;
QScopedPointer<CSymbianCertificateRetriever> retriever(CSymbianCertificateRetriever::NewL());
diff --git a/src/plugins/bearer/icd/qnetworksession_impl.cpp b/src/plugins/bearer/icd/qnetworksession_impl.cpp
index 2ed0b88..37434e3 100644
--- a/src/plugins/bearer/icd/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/icd/qnetworksession_impl.cpp
@@ -794,7 +794,7 @@ void QNetworkSessionPrivateImpl::stateChange(const QDBusMessage& rep)
qDebug() << "connect to"<< publicConfig.identifier() << "failed, result is empty";
#endif
updateState(QNetworkSession::Disconnected);
- emit QNetworkSessionPrivate::error(QNetworkSession::InvalidConfigurationError);
+ emit QNetworkSessionPrivate::error(QNetworkSession::SessionAbortedError);
if (publicConfig.type() == QNetworkConfiguration::UserChoice)
copyConfig(publicConfig, activeConfig);
return;
@@ -808,7 +808,7 @@ void QNetworkSessionPrivateImpl::stateChange(const QDBusMessage& rep)
if ((publicConfig.type() != QNetworkConfiguration::UserChoice) &&
(connected_iap != config.identifier())) {
updateState(QNetworkSession::Disconnected);
- emit QNetworkSessionPrivate::error(QNetworkSession::InvalidConfigurationError);
+ emit QNetworkSessionPrivate::error(QNetworkSession::UnknownSessionError);
return;
}
@@ -1026,6 +1026,9 @@ QString QNetworkSessionPrivateImpl::errorString() const
case QNetworkSession::SessionAbortedError:
errorStr = QNetworkSessionPrivateImpl::tr("Session aborted by user or system");
break;
+ case QNetworkSession::InvalidConfigurationError:
+ errorStr = QNetworkSessionPrivateImpl::tr("The specified configuration cannot be used.");
+ break;
default:
case QNetworkSession::UnknownSessionError:
errorStr = QNetworkSessionPrivateImpl::tr("Unidentified Error");
diff --git a/src/plugins/bearer/symbian/symbianengine.cpp b/src/plugins/bearer/symbian/symbianengine.cpp
index 2e2b671..f759a95 100644
--- a/src/plugins/bearer/symbian/symbianengine.cpp
+++ b/src/plugins/bearer/symbian/symbianengine.cpp
@@ -84,8 +84,8 @@ SymbianNetworkConfigurationPrivate::~SymbianNetworkConfigurationPrivate()
}
SymbianEngine::SymbianEngine(QObject *parent)
-: QBearerEngine(parent), CActive(CActive::EPriorityHigh), iFirstUpdate(true), iInitOk(true),
- iUpdatePending(false)
+: QBearerEngine(parent), CActive(CActive::EPriorityHigh), iFirstUpdate(true), ipCommsDB(0),
+ iInitOk(true), iUpdatePending(false), ipAccessPointsAvailabilityScanner(0)
{
}