From 79533291672fd5e6ddafe5be90501cbe2ec97b1b Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 8 May 2010 18:38:54 +0200 Subject: QUrl: update the whitelist of IDN domains The list is taken from the Mozilla page. --- src/corelib/io/qurl.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index ffe8d06..3604648 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -3129,10 +3129,11 @@ static void toPunycodeHelper(const QChar *s, int ucLength, QString *output) static const char * const idn_whitelist[] = { - "ac", "at", - "br", + "ac", "ar", "at", + "biz", "br", "cat", "ch", "cl", "cn", "de", "dk", + "es", "fi", "gr", "hu", @@ -3146,6 +3147,9 @@ static const char * const idn_whitelist[] = { "se", "sh", "th", "tm", "tw", "vn", + "xn--mgbaam7a8h", // UAE + "xn--mgberp4a5d4ar", // Saudi Arabia + "xn--wgbh1c" // Egypt }; static QStringList *user_idn_whitelist = 0; -- cgit v0.12 From 75f0c1f0f0496ae22ed89b996dfb0050defd0f3e Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 8 May 2010 18:36:26 +0200 Subject: QUrl: fix parsing of IRIs with more than one IDN label Task-number: QTBUG-10511 Reviewed-by: Trust Me --- src/corelib/io/qurl.cpp | 1 + tests/auto/qurl/tst_qurl.cpp | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 3604648..bdb0cfd 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -3308,6 +3308,7 @@ static QString qt_ACE_do(const QString &domain, AceOperation op) qt_nameprep(&result, prevLen); labelLength = result.length() - prevLen; register int toReserve = labelLength + 4 + 6; // "xn--" plus some extra bytes + aceForm.resize(0); if (toReserve > aceForm.capacity()) aceForm.reserve(toReserve); toPunycodeHelper(result.constData() + prevLen, result.size() - prevLen, &aceForm); diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp index 83109b5..8dffebb 100644 --- a/tests/auto/qurl/tst_qurl.cpp +++ b/tests/auto/qurl/tst_qurl.cpp @@ -3189,6 +3189,32 @@ void tst_QUrl::ace_testsuite_data() QTest::newRow("separator-3002") << QString::fromUtf8("example\343\200\202com") << "example.com" << "." << "example.com"; + + QString egyptianIDN = + QString::fromUtf8("\331\210\330\262\330\247\330\261\330\251\055\330\247\331\204\330" + "\243\330\252\330\265\330\247\331\204\330\247\330\252.\331\205" + "\330\265\330\261"); + QTest::newRow("egyptian-tld-ace") + << "xn----rmckbbajlc6dj7bxne2c.xn--wgbh1c" + << "xn----rmckbbajlc6dj7bxne2c.xn--wgbh1c" + << "." + << egyptianIDN; + QTest::newRow("egyptian-tld-unicode") + << egyptianIDN + << "xn----rmckbbajlc6dj7bxne2c.xn--wgbh1c" + << "." + << egyptianIDN; + QTest::newRow("egyptian-tld-mix1") + << QString::fromUtf8("\331\210\330\262\330\247\330\261\330\251\055\330\247\331\204\330" + "\243\330\252\330\265\330\247\331\204\330\247\330\252.xn--wgbh1c") + << "xn----rmckbbajlc6dj7bxne2c.xn--wgbh1c" + << "." + << egyptianIDN; + QTest::newRow("egyptian-tld-mix2") + << QString::fromUtf8("xn----rmckbbajlc6dj7bxne2c.\331\205\330\265\330\261") + << "xn----rmckbbajlc6dj7bxne2c.xn--wgbh1c" + << "." + << egyptianIDN; } void tst_QUrl::ace_testsuite() -- cgit v0.12 From 6d7c9261239390cb7d57861417da5f6d5a8456ee Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Mon, 10 May 2010 07:48:37 +1000 Subject: Update to low-level audio documentation. Reviewed-by:Gareth Stockwell --- src/multimedia/audio/qaudioinput.cpp | 10 ++++++++++ src/multimedia/audio/qaudiooutput.cpp | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/multimedia/audio/qaudioinput.cpp b/src/multimedia/audio/qaudioinput.cpp index c99e870..a1708f1 100644 --- a/src/multimedia/audio/qaudioinput.cpp +++ b/src/multimedia/audio/qaudioinput.cpp @@ -211,6 +211,10 @@ QAudioInput::~QAudioInput() If a problem occurs during this process the error() is set to QAudio::OpenError, state() is set to QAudio::StoppedState and stateChanged() signal is emitted. + In either case, the stateChanged() signal may be emitted either synchronously + during execution of the start() function or asynchronously after start() has + returned to the caller. + \sa {Symbian Platform Security Requirements} \sa QIODevice @@ -233,6 +237,10 @@ void QAudioInput::start(QIODevice* device) If a problem occurs during this process the error() is set to QAudio::OpenError, state() is set to QAudio::StoppedState and stateChanged() signal is emitted. + In either case, the stateChanged() signal may be emitted either synchronously + during execution of the start() function or asynchronously after start() has + returned to the caller. + \sa {Symbian Platform Security Requirements} \sa QIODevice @@ -278,6 +286,8 @@ void QAudioInput::reset() Sets error() to QAudio::NoError, state() to QAudio::SuspendedState and emit stateChanged() signal. + + Note: signal will always be emitted during execution of the resume() function. */ void QAudioInput::suspend() diff --git a/src/multimedia/audio/qaudiooutput.cpp b/src/multimedia/audio/qaudiooutput.cpp index b0b5244..371773c 100644 --- a/src/multimedia/audio/qaudiooutput.cpp +++ b/src/multimedia/audio/qaudiooutput.cpp @@ -209,6 +209,10 @@ QAudioFormat QAudioOutput::format() const If a problem occurs during this process the error() is set to QAudio::OpenError, state() is set to QAudio::StoppedState and stateChanged() signal is emitted. + In either case, the stateChanged() signal may be emitted either synchronously + during execution of the start() function or asynchronously after start() has + returned to the caller. + \sa QIODevice */ @@ -228,6 +232,10 @@ void QAudioOutput::start(QIODevice* device) If a problem occurs during this process the error() is set to QAudio::OpenError, state() is set to QAudio::StoppedState and stateChanged() signal is emitted. + In either case, the stateChanged() signal may be emitted either synchronously + during execution of the start() function or asynchronously after start() has + returned to the caller. + \sa QIODevice */ @@ -276,6 +284,8 @@ void QAudioOutput::suspend() Sets state() to QAudio::ActiveState if you previously called start(QIODevice*). Sets state() to QAudio::IdleState if you previously called start(). emits stateChanged() signal. + + Note: signal will always be emitted during execution of the resume() function. */ void QAudioOutput::resume() -- cgit v0.12 From 005dc6c7448a724d3df496a1e528199f5a638ce0 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Fri, 7 May 2010 17:02:14 +0200 Subject: Fixes a crash in gestures. This is a partial backport of a fix that was pushed to 4.7 (734ba1f540aaedc4a3558268bd7350c0b15325a4) Task-number: QT-3349 Reviewed-by: trustme --- src/gui/graphicsview/qgraphicsscene.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 98fc10f..2131993 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -693,6 +693,14 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item) --selectionChanging; if (!selectionChanging && selectedItems.size() != oldSelectedItemsSize) emit q->selectionChanged(); + + QHash::iterator it; + for (it = gestureTargets.begin(); it != gestureTargets.end();) { + if (it.value() == item) + it = gestureTargets.erase(it); + else + ++it; + } } /*! @@ -5960,7 +5968,8 @@ void QGraphicsScenePrivate::gestureEventHandler(QGestureEvent *event) if (gesture->state() == Qt::GestureStarted) startedGestures.insert(gesture); } else { - gesturesPerItem[target].append(gesture); + if (index->items().contains(target)) + gesturesPerItem[target].append(gesture); } } -- cgit v0.12 From da45b1ce09c318acecf8a44ca08bef57a74ff1f1 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Mon, 10 May 2010 15:00:26 +0300 Subject: QS60Style will draw focus frame to a PushButton with any stylesheeting Due to incorrect braces in the if-within-if, QS60Style decided to use QCommonStyle for styling focus frame into QPushButton when button had *any* kind of stylesheet. Corrected the braces. Task-number: QTBUG-10549 Reviewed-by: Alessandro Portale --- src/gui/styles/qs60style.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 8bae18e..924cabc 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -2045,16 +2045,17 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti case PE_FrameFocusRect: { //Draw themed highlight to radiobuttons and checkboxes. //For other widgets skip, unless palette has been modified. In that case, draw with commonstyle. - if (option->palette.highlight().color() == QS60StylePrivate::themePalette()->highlight().color()) + if (option->palette.highlight().color() == QS60StylePrivate::themePalette()->highlight().color()) { if ((qstyleoption_cast(option) && (qobject_cast(widget) || qobject_cast(widget)))) QS60StylePrivate::drawSkinElement( QS60StylePrivate::isWidgetPressed(widget) ? QS60StylePrivate::SE_ListItemPressed : QS60StylePrivate::SE_ListHighlight, painter, option->rect, flags); - else + } else { commonStyleDraws = true; } + } break; #ifndef QT_NO_LINEEDIT case PE_PanelLineEdit: -- cgit v0.12 From 560aa609be8b3f4d05e3df050cfa4feb39d060f1 Mon Sep 17 00:00:00 2001 From: Janne Koskinen Date: Tue, 11 May 2010 11:11:39 +0300 Subject: Spectrum Analyzer demo Symbian fix Fixes compilation and deployment issue when compiling the app from root directory. Reviewed-by: Gareth Stockwell --- demos/spectrum/spectrum.pro | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/demos/spectrum/spectrum.pro b/demos/spectrum/spectrum.pro index 86a7583..04bbdee 100644 --- a/demos/spectrum/spectrum.pro +++ b/demos/spectrum/spectrum.pro @@ -1,3 +1,4 @@ +load(data_caging_paths) include(spectrum.pri) TEMPLATE = subdirs @@ -21,19 +22,16 @@ symbian { # UID for the SIS file TARGET.UID3 = 0xA000E3FA - epoc32_dir = $${EPOCROOT}epoc32 - release_dir = $${epoc32_dir}/release/$(PLATFORM)/$(TARGET) - - bin.sources = $${release_dir}/spectrum.exe + bin.sources = spectrum.exe !contains(DEFINES, DISABLE_FFT) { - bin.sources += $${release_dir}/fftreal.dll + bin.sources += fftreal.dll } - bin.path = !:/sys/bin - rsc.sources = $${epoc32_dir}/data/z/resource/apps/spectrum.rsc - rsc.path = !:/resource/apps - mif.sources = $${epoc32_dir}/data/z/resource/apps/spectrum.mif - mif.path = !:/resource/apps - reg_rsc.sources = $${epoc32_dir}/data/z/private/10003a3f/import/apps/spectrum_reg.rsc - reg_rsc.path = !:/private/10003a3f/import/apps + bin.path = /sys/bin + rsc.sources = $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/spectrum.rsc + rsc.path = $$APP_RESOURCE_DIR + mif.sources = $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/spectrum.mif + mif.path = $$APP_RESOURCE_DIR + reg_rsc.sources = $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/spectrum_reg.rsc + reg_rsc.path = $$REG_RESOURCE_IMPORT_DIR DEPLOYMENT += bin rsc mif reg_rsc } -- cgit v0.12