summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWater-Team <water@pad.test.qt.nokia.com>2011-10-28 23:00:13 (GMT)
committerWater-Team <water@pad.test.qt.nokia.com>2011-10-28 23:00:13 (GMT)
commitecc412f02004d4e6c0b56d4daa54a387131619dc (patch)
treef5d928347345e8c875f9f7465b7c77725d4555d4 /src
parenta1e3906c5d4b4c25356b56292b650a20e4895f41 (diff)
parentcf5695691682957b68b67fd951addf4a52bfba84 (diff)
downloadQt-ecc412f02004d4e6c0b56d4daa54a387131619dc.zip
Qt-ecc412f02004d4e6c0b56d4daa54a387131619dc.tar.gz
Qt-ecc412f02004d4e6c0b56d4daa54a387131619dc.tar.bz2
Merge branch '4.8-upstream' into master-water
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp2
-rw-r--r--src/corelib/io/qiodevice.cpp6
-rw-r--r--src/corelib/kernel/qobject.cpp5
-rw-r--r--src/gui/dialogs/dialogs.pri6
-rw-r--r--src/gui/kernel/qapplication_s60.cpp6
-rw-r--r--src/gui/painting/qgraphicssystemex_symbian.cpp6
-rw-r--r--src/gui/styles/qs60style_p.h4
-rw-r--r--src/gui/styles/qs60style_s60.cpp10
-rw-r--r--src/gui/styles/styles.pri6
-rw-r--r--src/gui/util/util.pri6
-rw-r--r--src/gui/widgets/qlabel.cpp2
-rw-r--r--src/network/access/qftp.cpp4
-rw-r--r--src/network/access/qnetworkaccessbackend.cpp4
-rw-r--r--src/plugins/bearer/symbian/symbian.pri6
-rw-r--r--src/plugins/phonon/mmf/mmf.pro12
15 files changed, 34 insertions, 51 deletions
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp
index 3410782..7f4bb0c 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp
@@ -1293,7 +1293,7 @@ HB_Bool HB_OpenTypePosition(HB_ShaperItem *item, int availableGlyphs, HB_Bool do
// (int)(positions[i].x_pos >> 6), (int)(positions[i].y_pos >> 6),
// positions[i].back, positions[i].new_advance);
- HB_Fixed adjustment = (item->item.bidiLevel % 2) ? -positions[i].x_advance : positions[i].x_advance;
+ HB_Fixed adjustment = positions[i].x_advance;
if (!(face->current_flags & HB_ShaperFlag_UseDesignMetrics))
adjustment = HB_FIXED_ROUND(adjustment);
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index dae4e82..56fff90 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -468,11 +468,17 @@ void QIODevice::setOpenMode(OpenMode openMode)
otherwise the \l Text flag is removed. This feature is useful for classes
that provide custom end-of-line handling on a QIODevice.
+ The IO device should be opened before calling this function.
+
\sa open(), setOpenMode()
*/
void QIODevice::setTextModeEnabled(bool enabled)
{
Q_D(QIODevice);
+ if (!isOpen()) {
+ qWarning("QIODevice::setTextModeEnabled: The device is not open");
+ return;
+ }
if (enabled)
d->openMode |= Text;
else
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 5d6e4d7..1f716bc 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -163,14 +163,15 @@ QObjectPrivate::~QObjectPrivate()
{
if (pendTimer) {
// unregister pending timers
- if (threadData->eventDispatcher)
+ if (threadData && threadData->eventDispatcher)
threadData->eventDispatcher->unregisterTimers(q_ptr);
}
if (postedEvents)
QCoreApplication::removePostedEvents(q_ptr, 0);
- threadData->deref();
+ if (threadData)
+ threadData->deref();
delete static_cast<QAbstractDynamicMetaObject*>(metaObject);
#ifdef QT_JAMBI_BUILD
diff --git a/src/gui/dialogs/dialogs.pri b/src/gui/dialogs/dialogs.pri
index 1dddb44..fc1ea9e 100644
--- a/src/gui/dialogs/dialogs.pri
+++ b/src/gui/dialogs/dialogs.pri
@@ -109,11 +109,7 @@ SOURCES += \
dialogs/qprintpreviewdialog.cpp
symbian:contains(QT_CONFIG, s60) {
- contains(CONFIG, is_using_gnupoc) {
- LIBS += -lcommondialogs
- } else {
- LIBS += -lCommonDialogs
- }
+ LIBS += -lcommondialogs
SOURCES += dialogs/qfiledialog_symbian.cpp \
dialogs/qcolordialog_symbian.cpp
}
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 954d7fb..a9634d8 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -590,7 +590,11 @@ QSymbianControl::~QSymbianControl()
{
// Ensure backing store is deleted before the top-level
// window is destroyed
- qt_widget_private(qwidget)->topData()->backingStore.destroy();
+ QT_TRY {
+ qt_widget_private(qwidget)->topData()->backingStore.destroy();
+ } QT_CATCH(const std::exception&) {
+ // ignore exceptions, nothing can be done
+ }
if (S60->curWin == this)
S60->curWin = 0;
diff --git a/src/gui/painting/qgraphicssystemex_symbian.cpp b/src/gui/painting/qgraphicssystemex_symbian.cpp
index 32e040f..5a182ff 100644
--- a/src/gui/painting/qgraphicssystemex_symbian.cpp
+++ b/src/gui/painting/qgraphicssystemex_symbian.cpp
@@ -46,7 +46,7 @@
#include <e32property.h>
-#ifdef Q_SYMBIAN_SUPPORTS_SURFACES
+#if defined(Q_SYMBIAN_SUPPORTS_SURFACES) && !defined (QT_NO_EGL)
#include "private/qegl_p.h"
#endif
@@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE
static bool bcm2727Initialized = false;
static bool bcm2727 = false;
-#ifdef Q_SYMBIAN_SUPPORTS_SURFACES
+#if defined(Q_SYMBIAN_SUPPORTS_SURFACES) && !defined (QT_NO_EGL)
typedef EGLBoolean (*NOK_resource_profiling)(EGLDisplay, EGLint, EGLint*, EGLint, EGLint*);
#define EGL_PROF_TOTAL_MEMORY_NOK 0x3070
#endif
@@ -69,7 +69,7 @@ bool QSymbianGraphicsSystemEx::hasBCM2727()
if (bcm2727Initialized)
return bcm2727;
-#ifdef Q_SYMBIAN_SUPPORTS_SURFACES
+#if defined(Q_SYMBIAN_SUPPORTS_SURFACES) && !defined (QT_NO_EGL)
EGLDisplay display = QEgl::display();
#if 1
// Hacky but fast ~0ms.
diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h
index 2fa8c7f..ad55761 100644
--- a/src/gui/styles/qs60style_p.h
+++ b/src/gui/styles/qs60style_p.h
@@ -473,8 +473,8 @@ public:
private: //data members
//TODO: consider changing these to non-pointers as the classes are rather small anyway
- AnimationData *m_defaultData;
- AnimationDataV2 *m_currentData;
+ QScopedPointer<AnimationData> m_defaultData;
+ QScopedPointer<AnimationDataV2> m_currentData;
};
#endif //Q_WS_S60
diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp
index cfb10fa..eb59115 100644
--- a/src/gui/styles/qs60style_s60.cpp
+++ b/src/gui/styles/qs60style_s60.cpp
@@ -132,14 +132,12 @@ AnimationDataV2::~AnimationDataV2()
QS60StyleAnimation::QS60StyleAnimation(const QS60StyleEnums::SkinParts part, int frames, int interval)
{
- QT_TRAP_THROWING(m_defaultData = new (ELeave) AnimationData(part, frames, interval));
- QT_TRAP_THROWING(m_currentData = new (ELeave) AnimationDataV2(*m_defaultData));
+ m_defaultData.reset(new AnimationData(part, frames, interval));
+ m_currentData.reset(new AnimationDataV2(*m_defaultData));
}
QS60StyleAnimation::~QS60StyleAnimation()
{
- delete m_currentData;
- delete m_defaultData;
}
void QS60StyleAnimation::setAnimationObject(CAknBitmapAnimation* animation)
@@ -152,9 +150,7 @@ void QS60StyleAnimation::setAnimationObject(CAknBitmapAnimation* animation)
void QS60StyleAnimation::resetToDefaults()
{
- delete m_currentData;
- m_currentData = 0;
- QT_TRAP_THROWING(m_currentData = new (ELeave) AnimationDataV2(*m_defaultData));
+ m_currentData.reset(new AnimationDataV2(*m_defaultData));
}
class QS60StyleModeSpecifics
diff --git a/src/gui/styles/styles.pri b/src/gui/styles/styles.pri
index b6eeec9..45ed8eb 100644
--- a/src/gui/styles/styles.pri
+++ b/src/gui/styles/styles.pri
@@ -172,11 +172,7 @@ contains( styles, s60 ):contains(QT_CONFIG, s60) {
symbian {
SOURCES += styles/qs60style_s60.cpp
LIBS += -legul -lbmpanim
- contains(CONFIG, is_using_gnupoc) {
- LIBS += -laknicon -laknskins -laknskinsrv -lfontutils
- } else {
- LIBS += -lAknIcon -lAKNSKINS -lAKNSKINSRV -lFontUtils
- }
+ LIBS += -laknicon -laknskins -laknskinsrv -lfontutils
} else {
SOURCES += styles/qs60style_simulated.cpp
RESOURCES += styles/qstyle_s60_simulated.qrc
diff --git a/src/gui/util/util.pri b/src/gui/util/util.pri
index 7395604..7cf1a55 100644
--- a/src/gui/util/util.pri
+++ b/src/gui/util/util.pri
@@ -57,9 +57,5 @@ symbian {
DEFINES += USE_SCHEMEHANDLER
}
- contains(CONFIG, is_using_gnupoc) {
- LIBS += -ldirectorylocalizer
- } else {
- LIBS += -lDirectoryLocalizer
- }
+ LIBS += -ldirectorylocalizer
}
diff --git a/src/gui/widgets/qlabel.cpp b/src/gui/widgets/qlabel.cpp
index c0be3e1..2b6eeb7 100644
--- a/src/gui/widgets/qlabel.cpp
+++ b/src/gui/widgets/qlabel.cpp
@@ -60,7 +60,7 @@
#endif
#ifdef Q_OS_SYMBIAN
-#include "qt_s60_p.h"
+#include "private/qt_s60_p.h"
#endif
QT_BEGIN_NAMESPACE
diff --git a/src/network/access/qftp.cpp b/src/network/access/qftp.cpp
index 50a3b1e..eccfea6 100644
--- a/src/network/access/qftp.cpp
+++ b/src/network/access/qftp.cpp
@@ -1851,11 +1851,11 @@ int QFtp::cd(const QString &dir)
int QFtp::get(const QString &file, QIODevice *dev, TransferType type)
{
QStringList cmds;
- cmds << QLatin1String("SIZE ") + file + QLatin1String("\r\n");
if (type == Binary)
cmds << QLatin1String("TYPE I\r\n");
else
cmds << QLatin1String("TYPE A\r\n");
+ cmds << QLatin1String("SIZE ") + file + QLatin1String("\r\n");
cmds << QLatin1String(d_func()->transferMode == Passive ? "PASV\r\n" : "PORT\r\n");
cmds << QLatin1String("RETR ") + file + QLatin1String("\r\n");
return d_func()->addCommand(new QFtpCommand(Get, cmds, dev));
@@ -2336,7 +2336,7 @@ void QFtpPrivate::_q_piError(int errorCode, const QString &text)
// non-fatal errors
if (c->command == QFtp::Get && pi.currentCommand().startsWith(QLatin1String("SIZE "))) {
- pi.dtp.setBytesTotal(-1);
+ pi.dtp.setBytesTotal(0);
return;
} else if (c->command==QFtp::Put && pi.currentCommand().startsWith(QLatin1String("ALLO "))) {
return;
diff --git a/src/network/access/qnetworkaccessbackend.cpp b/src/network/access/qnetworkaccessbackend.cpp
index 88c45d1..1dc1268 100644
--- a/src/network/access/qnetworkaccessbackend.cpp
+++ b/src/network/access/qnetworkaccessbackend.cpp
@@ -72,10 +72,10 @@ public:
QMutex mutex;
//this is used to avoid (re)constructing factory data from destructors of other global classes
- static QAtomicInt valid;
+ static QBasicAtomicInt valid;
};
Q_GLOBAL_STATIC(QNetworkAccessBackendFactoryData, factoryData)
-QAtomicInt QNetworkAccessBackendFactoryData::valid;
+QBasicAtomicInt QNetworkAccessBackendFactoryData::valid = Q_BASIC_ATOMIC_INITIALIZER(0);
QNetworkAccessBackendFactory::QNetworkAccessBackendFactory()
{
diff --git a/src/plugins/bearer/symbian/symbian.pri b/src/plugins/bearer/symbian/symbian.pri
index 8d92f57..74dc4ee 100644
--- a/src/plugins/bearer/symbian/symbian.pri
+++ b/src/plugins/bearer/symbian/symbian.pri
@@ -21,11 +21,7 @@ LIBS += -lcommdb \
-lefsrv \
-lnetmeta
-is_using_gnupoc {
- LIBS += -lconnmon
-} else {
- LIBS += -lConnMon
-}
+LIBS += -lconnmon
QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/bearer
target.path += $$[QT_INSTALL_PLUGINS]/bearer
diff --git a/src/plugins/phonon/mmf/mmf.pro b/src/plugins/phonon/mmf/mmf.pro
index a84c5ac..5144f35 100644
--- a/src/plugins/phonon/mmf/mmf.pro
+++ b/src/plugins/phonon/mmf/mmf.pro
@@ -103,11 +103,7 @@ symbian {
exists($${EPOCROOT}epoc32/include/mw/downloadmgrclient.h) {
HEADERS += $$PHONON_MMF_DIR/download.h
SOURCES += $$PHONON_MMF_DIR/download.cpp
- contains(CONFIG, is_using_gnupoc) {
- LIBS += -ldownloadmgr
- } else {
- LIBS += -lDownloadMgr
- }
+ LIBS += -ldownloadmgr
DEFINES += PHONON_MMF_PROGRESSIVE_DOWNLOAD
}
}
@@ -129,11 +125,7 @@ symbian {
LIBS += -lmediaclientaudiostream # For CMdaAudioOutputStream
# These are for effects.
- is_using_gnupoc {
- LIBS += -laudioequalizereffect -lbassboosteffect -ldistanceattenuationeffect -ldopplerbase -leffectbase -lenvironmentalreverbeffect -llistenerdopplereffect -llistenerlocationeffect -llistenerorientationeffect -llocationbase -lloudnesseffect -lorientationbase -lsourcedopplereffect -lsourcelocationeffect -lsourceorientationeffect -lstereowideningeffect
- } else {
- LIBS += -lAudioEqualizerEffect -lBassBoostEffect -lDistanceAttenuationEffect -lDopplerbase -lEffectBase -lEnvironmentalReverbEffect -lListenerDopplerEffect -lListenerLocationEffect -lListenerOrientationEffect -lLocationBase -lLoudnessEffect -lOrientationBase -lSourceDopplerEffect -lSourceLocationEffect -lSourceOrientationEffect -lStereoWideningEffect
- }
+ LIBS += -laudioequalizereffect -lbassboosteffect -ldistanceattenuationeffect -ldopplerbase -leffectbase -lenvironmentalreverbeffect -llistenerdopplereffect -llistenerlocationeffect -llistenerorientationeffect -llocationbase -lloudnesseffect -lorientationbase -lsourcedopplereffect -lsourcelocationeffect -lsourceorientationeffect -lstereowideningeffect
# This is to allow IAP to be specified
LIBS += -lcommdb