From d950a35334dda4620a138914c8d8198da670b2dd Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 4 Feb 2010 10:07:53 +0100 Subject: I10n: Use 'real' Linguist comments in Phonon::EnvironmentalReverb Reviewed-by: Oswald Buddenhagen --- src/3rdparty/phonon/mmf/environmentalreverb.cpp | 53 ++++++++++--------------- 1 file changed, 22 insertions(+), 31 deletions(-) diff --git a/src/3rdparty/phonon/mmf/environmentalreverb.cpp b/src/3rdparty/phonon/mmf/environmentalreverb.cpp index 4a6ce29..d4f5223 100644 --- a/src/3rdparty/phonon/mmf/environmentalreverb.cpp +++ b/src/3rdparty/phonon/mmf/environmentalreverb.cpp @@ -139,77 +139,68 @@ bool EnvironmentalReverb::getParameters(CMdaAudioOutputStream *stream, TInt32 min, max; TUint32 umin, umax; - // DecayHFRatio - // Ratio of high-frequency decay time to the value specified by - // DecayTime. effect->DecayHFRatioRange(umin, umax); + //: DecayHFRatio: Ratio of high-frequency decay time to the value specified by + //: DecayTime. parameters.append(createParameter( DecayHFRatio, tr("Decay HF ratio (%)"), effect->DecayHFRatio(), umin, umax)); - // DecayTime - // Time over which reverberation is diminished. effect->DecayTimeRange(umin, umax); + //: DecayTime: Time over which reverberation is diminished. parameters.append(createParameter( DecayTime, tr("Decay time (ms)"), effect->DecayTime(), umin, umax)); - // Density - // Delay between first and subsequent reflections. - // Note that the S60 platform documentation does not make clear - // the distinction between this value and the Diffusion value. + //: Density Delay between first and subsequent reflections. + //: Note that the S60 platform documentation does not make clear + //: the distinction between this value and the Diffusion value. parameters.append(createParameter( Density, tr("Density (%)"), effect->Density(), 0, 100)); - // Diffusion - // Delay between first and subsequent reflections. - // Note that the S60 platform documentation does not make clear - // the distinction between this value and the Density value. + //: Diffusion: Delay between first and subsequent reflections. + //: Note that the S60 platform documentation does not make clear + //: the distinction between this value and the Density value. parameters.append(createParameter( Diffusion, tr("Diffusion (%)"), effect->Diffusion(), 0, 100)); - // ReflectionsDelay - // Amount of delay between the arrival the direct path from the - // source and the arrival of the first reflection. + //: ReflectionsDelay: Amount of delay between the arrival the direct + //: path from the source and the arrival of the first reflection. parameters.append(createParameter( ReflectionsDelay, tr("Reflections delay (ms)"), effect->ReflectionsDelay(), 0, effect->ReflectionsDelayMax())); - // ReflectionsLevel - // Amplitude of reflections. This value is corrected by the RoomLevel - // to give the final reflection amplitude. - effect->ReflectionLevelRange(min, max); + effect->ReflectionLevelRange(min, max); + //: ReflectionsLevel: Amplitude of reflections. This value is + //: corrected by the RoomLevel to give the final reflection amplitude. parameters.append(createParameter( ReflectionsLevel, tr("Reflections level (mB)"), effect->ReflectionsLevel(), min, max, EffectParameter::LogarithmicHint)); - // ReverbDelay - // Amount of time between arrival of the first reflection and start of - // the late reverberation. + //: ReverbDelay: Amount of time between arrival of the first + //: reflection and start of the late reverberation. parameters.append(createParameter( ReverbDelay, tr("Reverb delay (ms)"), effect->ReverbDelay(), 0, effect->ReverbDelayMax())); - // ReverbLevel - // Amplitude of reverberations. This value is corrected by the - // RoomLevel to give the final reverberation amplitude. effect->ReverbLevelRange(min, max); + //: ReverbLevel Amplitude of reverberations. This value is + //: corrected by the RoomLevel to give the final reverberation + //: amplitude. parameters.append(createParameter( ReverbLevel, tr("Reverb level (mB)"), effect->ReverbLevel(), min, max, EffectParameter::LogarithmicHint)); - // RoomHFLevel - // Amplitude of low-pass filter used to attenuate the high frequency - // component of reflected sound. effect->RoomHFLevelRange(min, max); + //: RoomHFLevel: Amplitude of low-pass filter used to attenuate the + //: high frequency component of reflected sound. parameters.append(createParameter( RoomHFLevel, tr("Room HF level"), effect->RoomHFLevel(), min, max)); - // RoomLevel - // Master volume control for all reflected sound. effect->RoomLevelRange(min, max); + //: RoomLevel: Master volume control for all reflected sound. parameters.append(createParameter( RoomLevel, tr("Room level (mB)"), effect->RoomLevel(), min, max, EffectParameter::LogarithmicHint)); -- cgit v0.12 From 3e6b22f138ad5b592dedbca99f91fdf612f20cea Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 4 Feb 2010 10:08:54 +0100 Subject: I10n/German: Update translations for 4.6.2 --- translations/designer_de.ts | 45 ++-- translations/qt_de.ts | 533 +++++++++++++++++++++++++++++++++----------- 2 files changed, 436 insertions(+), 142 deletions(-) diff --git a/translations/designer_de.ts b/translations/designer_de.ts index b731595..8c1ba68 100644 --- a/translations/designer_de.ts +++ b/translations/designer_de.ts @@ -517,12 +517,12 @@ - + Move action Aktion verschieben - + Change Title Titel ändern @@ -1027,7 +1027,7 @@ FormBuilder - + Invalid stretch value for '%1': '%2' Parsing layout stretch values Ungültiger Stretch-Wert für '%1': '%2' @@ -1412,7 +1412,7 @@ Fehler beim Lesen der ui-Datei: Das Wurzelelement <ui> fehlt. - + The creation of a widget of the class '%1' failed. Es konnte kein Widget der Klasse '%1' erzeugt werden. @@ -2273,7 +2273,7 @@ Container-Seiten sollten ausschließlich im XML der domXML()-Methode spezifizier QFormBuilder - + An empty class name was passed on to %1 (object name: '%2'). Empty class name passed to widget factory method Der Methode %1 wurde ein leerer Klassennamen übergeben (Name '%2'). @@ -2313,6 +2313,16 @@ Container-Seiten sollten ausschließlich im XML der domXML()-Methode spezifizier The property %1 could not be written. The type %2 is not supported yet. Die Eigenschaft %1 konnte nicht geschrieben werden, da der Typ %2 nicht unterstützt wird. + + + The enumeration-value '%1' is invalid. The default value '%2' will be used instead. + Der Aufzählungswert '%1' ist ungültig. Es wird der Vorgabewert '%2' verwendet. + + + + The flag-value '%1' is invalid. Zero will be used instead. + Der Flag-Wert '%1' ist ungültig. Es wird der Wert 0 verwendet. + QStackedWidgetEventFilter @@ -2446,7 +2456,7 @@ Container-Seiten sollten ausschließlich im XML der domXML()-Methode spezifizier QtBoolEdit - + True @@ -2475,7 +2485,7 @@ Container-Seiten sollten ausschließlich im XML der domXML()-Methode spezifizier QtCharEdit - + Clear Char Zeichen löschen @@ -2491,7 +2501,7 @@ Container-Seiten sollten ausschließlich im XML der domXML()-Methode spezifizier QtColorPropertyManager - + Red Rot @@ -2514,7 +2524,7 @@ Container-Seiten sollten ausschließlich im XML der domXML()-Methode spezifizier QtCursorDatabase - + Arrow Pfeil @@ -3062,6 +3072,7 @@ Container-Seiten sollten ausschließlich im XML der domXML()-Methode spezifizier QtGradientViewDialog + Select Gradient Gradienten auswählen @@ -3069,7 +3080,7 @@ Container-Seiten sollten ausschließlich im XML der domXML()-Methode spezifizier QtKeySequenceEdit - + Clear Shortcut Tastenkürzel löschen @@ -3131,7 +3142,7 @@ Container-Seiten sollten ausschließlich im XML der domXML()-Methode spezifizier QtPropertyBrowserUtils - + [%1, %2, %3] (%4) [%1, %2, %3] (%4) @@ -3904,7 +3915,7 @@ Möchten Sie sie überschreiben? VersionDialog - + <h3>%1</h3><br/><br/>Version %2 <h3>%1</h3><br/><br/>Version %2 @@ -4742,7 +4753,7 @@ Möchten Sie sie überschreiben? Fehler beim Einfügen - + Lay out Layout @@ -4753,7 +4764,7 @@ Möchten Sie sie überschreiben? Widget einfügen - + Paste %n action(s) Eine Aktion einfügen @@ -4794,12 +4805,12 @@ Möchten Sie sie überschreiben? Übergeordnetes Widget auswählen - + A QMainWindow-based form does not contain a central widget. Ein auf QMainWindow basierendes Formular enthält kein zentrales Widget. - + Raise widgets Widgets nach vorn bringen @@ -4825,7 +4836,7 @@ Möchten Sie sie überschreiben? qdesigner_internal::FormWindowManager - + Cu&t &Ausschneiden diff --git a/translations/qt_de.ts b/translations/qt_de.ts index d916733..8cbf402 100644 --- a/translations/qt_de.ts +++ b/translations/qt_de.ts @@ -4,7 +4,7 @@ CloseButton - + Close Tab Schließen @@ -12,7 +12,7 @@ FakeReply - + Fake error ! Fake error ! @@ -143,7 +143,7 @@ Bitte überprüfen Sie Ihre GStreamer-Installation und stellen Sie sicher, dass Phonon::MMF - + Audio Output Audio-Ausgabe @@ -152,60 +152,333 @@ Bitte überprüfen Sie Ihre GStreamer-Installation und stellen Sie sicher, dass The audio output device Audio-Ausgabegerät - - - Phonon::MMF::AudioEqualizer - - Frequency band, %1 Hz - Frequenzband, %1 Hz + + No error + Kein Fehler - - - Phonon::MMF::EffectFactory - - Audio Equalizer - Audio-Equalizer + + Not found + Nicht gefunden - Bass Boost - Bass-Boost + Out of memory + Es ist kein Speicher mehr verfügbar + + + + Not supported + Nicht unterstützt + + + + Overflow + Überlauf + + + + Underflow + Unterlauf + + + + Already exists + Existiert bereits + + + + Path not found + Pfad konnte nicht gefunden werden + + + + In use + Bereits in Verwendung + + + + Not ready + Nicht bereit + + + + Access denied + Zugriff verweigert + + + + Could not connect + Es konnte keine Verbindung hergestellt werden + + + + Disconnected + Getrennt + + + + Permission denied + Zugriff verweigert + + + + Insufficient bandwidth + Unzureichende Bandweite + + + + Network unavailable + Netzwerk nicht verfügbar + + + + Network communication error + Fehler bei der Kommunikation über das Netzwerk - Distance Attenuation - Abschwächung in Abhängigkeit von der Entfernung + Streaming not supported + Streaming nicht unterstützt + Server alert + Server alert + + + + Invalid protocol + Ungültiges Protokoll + + - Environmental Reverb - Hall-Effekt der Umgebung + Invalid URL + Ungültige URL - Loudness - Lautstärke + Multicast error + Multicast-Fehler + + + + Proxy server error + Fehler bei Proxy-Server-Kommunikation - Source Orientation - Ausrichtung der Quelle + Proxy server not supported + Proxy-Server nicht unterstützt - Stereo Widening - Stereo-Basisverbreiterung + Audio output error + Fehler bei Audio-Ausgabe + + + + Video output error + Fehler bei Video-Ausgabe + + + + Decoder error + Fehler im Decoder + + + + Audio or video components could not be played + Audio- oder Videokomponenten konnten nicht abgespielt werden + + + + DRM error + DRM-Fehler + + + + Unknown error (%1) + Unbekannter Fehler (%1) + + + + Phonon::MMF::AbstractMediaPlayer + + + Not ready to play + Das Abspielen ist im Grundzustand nicht möglich + + + + + Error opening file + Die Datei konnte nicht geöffnet werden + + + + Error opening URL + Der URL konnte nicht geöffnet werden + + + + Setting volume failed + Die Lautstärke konnte nicht eingestellt werden + + + + Playback complete + Abspielen beendet + + + + Phonon::MMF::AudioEqualizer + + + %1 Hz + %1 Hz + + + + Phonon::MMF::AudioPlayer + + + Getting position failed + Die Position konnte nicht bestimmt werden + + + + Opening clip failed + Der Clip konnte nicht geöffnet werden + + + + Phonon::MMF::EffectFactory + + + Enabled + Aktiviert + + + + Phonon::MMF::EnvironmentalReverb + + + Decay HF ratio (%) + DecayHFRatio: Ratio of high-frequency decay time to the value specified by DecayTime. + Hochfrequenz-Abklingverhältnis (%) + + + + Decay time (ms) + Abklingzeit (ms) + + + + Density (%) + Density Delay between first and subsequent reflections. Note that the S60 platform documentation does not make clear the distinction between this value and the Diffusion value. + Dichte (%) + + + + Diffusion (%) + Diffusion: Delay between first and subsequent reflections. Note that the S60 platform documentation does not make clear the distinction between this value and the Density value. + Diffusion (%) + + + + Reflections delay (ms) + ReflectionsDelay: Amount of delay between the arrival the direct path from the source and the arrival of the first reflection. + Verzögerung des Echos (ms) + + + + Reflections level (mB) + ReflectionsLevel: Amplitude of reflections. This value is corrected by the RoomLevel to give the final reflection amplitude. + Stärke des Echos (mB) + + + + Reverb delay (ms) + ReverbDelay: Amount of time between arrival of the first reflection and start of the late reverberation. + Verzögerung des Nachhalls (ms) + + + + Reverb level (mB) + ReverbLevel Amplitude of reverberations. This value is corrected by the RoomLevel to give the final reverberation amplitude. + Stärke des Nachhalls (mB) + + + + Room HF level + RoomHFLevel: Amplitude of low-pass filter used to attenuate the high frequency component of reflected sound. + Hochfrequenz-Pegel des Raums + + + + Room level (mB) + RoomLevel: Master volume control for all reflected sound. + Pegel des Raums (mB) Phonon::MMF::MediaObject - - Media type could not be determined - Der Typ des Mediums konnte nicht bestimmt werden + + Error opening source: type not supported + Die Quelle konnte nicht geöffnet werden: Dieser Typ wird nicht unterstützt + + + + Error opening source: media type could not be determined + Die Quelle konnte nicht geöffnet werden: Der Medientyp konnte nicht bestimmt werden + + + + Phonon::MMF::StereoWidening + + + Level (%) + Stärke (%) + + + + Phonon::MMF::VideoPlayer + + + Pause failed + Fehler bei Pause-Funktion + + + + Seek failed + Suchoperation fehlgeschlagen + + + + Getting position failed + Die Position konnte nicht bestimmt werden + + + + Opening clip failed + Der Clip konnte nicht geöffnet werden + + + + Buffering clip failed + Fehler beim Puffern des Clips + + + + + + + + Video display error + Fehler bei der Video-Anzeige @@ -275,7 +548,7 @@ Bitte überprüfen Sie Ihre GStreamer-Installation und stellen Sie sicher, dass Q3FileDialog - + Copy or Move a File Datei kopieren oder verschieben @@ -300,7 +573,7 @@ Bitte überprüfen Sie Ihre GStreamer-Installation und stellen Sie sicher, dass - + All Files (*) Alle Dateien (*) @@ -912,8 +1185,8 @@ nach QAbstractSocket - - + + Host not found @@ -932,19 +1205,20 @@ nach Das Zeitlimit für die Verbindung wurde überschritten - - + + Operation on socket is not supported Diese Socket-Operation wird nicht unterstützt - + + Socket operation timed out Das Zeitlimit für die Operation wurde überschritten - + Socket is not connected Nicht verbunden @@ -957,7 +1231,7 @@ nach QAbstractSpinBox - + &Step up &Inkrementieren @@ -983,7 +1257,7 @@ nach QApplication - + QT_LAYOUT_DIRECTION Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout. LTR @@ -1053,7 +1327,7 @@ nach QColorDialog - + Hu&e: Farb&ton: @@ -1093,7 +1367,7 @@ nach Farbauswahl - + &Basic colors Grundfar&ben @@ -1180,7 +1454,7 @@ nach QDB2Driver - + Unable to connect Es kann keine Verbindung aufgebaut werden @@ -1203,7 +1477,7 @@ nach QDB2Result - + Unable to execute statement Der Befehl kann nicht ausgeführt werden @@ -1278,7 +1552,7 @@ nach QDialog - + What's This? Direkthilfe @@ -1291,9 +1565,9 @@ nach QDialogButtonBox - + - + OK OK @@ -1505,7 +1779,7 @@ nach QFile - + Destination file exists Die Zieldatei existiert bereits @@ -1545,7 +1819,7 @@ nach QFileDialog - + All Files (*) Alle Dateien (*) @@ -1568,13 +1842,13 @@ nach Details - + File Datei - + Open Öffnen @@ -1584,25 +1858,25 @@ nach Speichern unter - - - + + + &Open &Öffnen - - + + &Save S&peichern - + Recent Places Zuletzt besucht - + &Rename &Umbenennen @@ -1617,17 +1891,17 @@ nach &Versteckte Dateien anzeigen - + New Folder Neues Verzeichnis - + Find Directory Verzeichnis suchen - + Directories Verzeichnisse @@ -1637,13 +1911,13 @@ nach Alle Dateien (*.*) - - + + Directory: Verzeichnis: - + %1 already exists. Do you want to replace it? Die Datei %1 existiert bereits. @@ -1737,7 +2011,7 @@ Möchten Sie die Datei trotzdem löschen? Unbekannt - + Show Anzeigen @@ -1753,8 +2027,8 @@ Möchten Sie die Datei trotzdem löschen? &Neues Verzeichnis - - + + &Choose &Auswählen @@ -1764,8 +2038,8 @@ Möchten Sie die Datei trotzdem löschen? Löschen - - + + File &name: Datei&name: @@ -2286,7 +2560,7 @@ Möchten Sie die Datei trotzdem löschen? QHostInfo - + Unknown error Unbekannter Fehler @@ -2296,7 +2570,7 @@ Möchten Sie die Datei trotzdem löschen? - + Host not found Rechner konnte nicht gefunden werden @@ -2330,7 +2604,7 @@ Möchten Sie die Datei trotzdem löschen? QHttp - + Connection refused Verbindung verweigert @@ -2350,8 +2624,6 @@ Möchten Sie die Datei trotzdem löschen? - - HTTP request failed HTTP-Anfrage fehlgeschlagen @@ -2382,7 +2654,7 @@ Möchten Sie die Datei trotzdem löschen? Verbindung mit %1 beendet - + Connection closed Verbindung beendet @@ -2647,7 +2919,7 @@ Möchten Sie die Datei trotzdem löschen? QIODevice - + Permission denied Zugriff verweigert @@ -2667,7 +2939,7 @@ Möchten Sie die Datei trotzdem löschen? Kein freier Speicherplatz auf dem Gerät vorhanden - + Unknown error Unbekannter Fehler @@ -2731,7 +3003,7 @@ Möchten Sie die Datei trotzdem löschen? Operation unmap fehlgeschlagen für '%1': %2 - + The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5] Das Plugin '%1' verwendet eine inkompatible Qt-Bibliothek. (%2.%3.%4) [%5] @@ -2783,12 +3055,12 @@ Möchten Sie die Datei trotzdem löschen? QLineEdit - + Select All Alles auswählen - + &Undo &Rückgängig @@ -2798,22 +3070,22 @@ Möchten Sie die Datei trotzdem löschen? Wieder&herstellen - + Cu&t &Ausschneiden - + &Copy &Kopieren - + &Paste Einf&ügen - + Delete Löschen @@ -2916,7 +3188,7 @@ Möchten Sie die Datei trotzdem löschen? QMYSQLDriver - + Unable to open database ' Die Datenbankverbindung kann nicht geöffnet werden ' @@ -2926,7 +3198,7 @@ Möchten Sie die Datei trotzdem löschen? Es kann keine Verbindung aufgebaut werden - + Unable to begin transaction Es kann keine Transaktion gestartet werden @@ -2944,12 +3216,13 @@ Möchten Sie die Datei trotzdem löschen? QMYSQLResult - + + Unable to fetch data Es konnten keine Daten abgeholt werden - + Unable to execute query Die Abfrage konnte nicht ausgeführt werden @@ -3127,7 +3400,7 @@ Möchten Sie die Datei trotzdem löschen? QMenuBar - + Actions Optionen @@ -3163,7 +3436,7 @@ Möchten Sie die Datei trotzdem löschen? Hilfe - + Show Details... Details einblenden... @@ -3346,13 +3619,13 @@ Möchten Sie die Datei trotzdem löschen? QNetworkAccessFileBackend - + Request for opening non-local file %1 Anforderung zum Öffnen einer Datei über Netzwerk %1 - + Error opening %1: %2 %1 konnte nicht geöffnet werden: %2 @@ -3363,7 +3636,7 @@ Möchten Sie die Datei trotzdem löschen? Fehler beim Schreiben zur Datei %1: %2 - + Cannot open %1: Path is a directory %1 kann nicht geöffnet werden: Der Pfad spezifiziert ein Verzeichnis @@ -3405,7 +3678,7 @@ Möchten Sie die Datei trotzdem löschen? QNetworkAccessHttpBackend - + No suitable proxy found Es konnte kein geeigneter Proxy-Server gefunden werden @@ -3413,12 +3686,12 @@ Möchten Sie die Datei trotzdem löschen? QNetworkReply - + Error downloading %1 - server replied: %2 Beim Herunterladen von %1 trat ein Fehler auf - Die Antwort des Servers ist: %2 - + Protocol "%1" is unknown Das Protokoll "%1" ist unbekannt @@ -3426,7 +3699,7 @@ Möchten Sie die Datei trotzdem löschen? QNetworkReplyImpl - + Operation canceled Operation abgebrochen @@ -3509,7 +3782,7 @@ Möchten Sie die Datei trotzdem löschen? QODBCDriver - + Unable to connect Es kann keine Verbindung aufgebaut werden @@ -3542,14 +3815,14 @@ Möchten Sie die Datei trotzdem löschen? QODBCResult - - + + QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration QODBCResult::reset: 'SQL_CURSOR_STATIC' konnte nicht als Attribut des Befehls gesetzt werden. Bitte prüfen Sie die Konfiguration Ihres ODBC-Treibers - - + + Unable to execute statement Der Befehl konnte nicht ausgeführt werden @@ -3569,7 +3842,7 @@ Möchten Sie die Datei trotzdem löschen? Die Variable konnte nicht gebunden werden - + Unable to fetch last @@ -3619,7 +3892,7 @@ Möchten Sie die Datei trotzdem löschen? Der entfernte Rechner hat die Verbindung zu %1 vorzeitig beendet - + No host name given Es wurde kein Hostname angegeben @@ -3803,7 +4076,7 @@ Möchten Sie die Datei trotzdem löschen? QPrintDialog - + locally connected direkt verbunden @@ -4232,12 +4505,12 @@ Bitte wählen Sie einen anderen Dateinamen. QPrintPreviewDialog - + %1% %1% - + Print Preview Druckvorschau @@ -4317,7 +4590,12 @@ Bitte wählen Sie einen anderen Dateinamen. Seite einrichten - + + Close + Schließen + + + Export to PDF PDF exportieren @@ -4530,7 +4808,7 @@ Bitte wählen Sie einen anderen Dateinamen. Zeitüberschreitung - + @@ -4645,7 +4923,7 @@ Bitte wählen Sie einen anderen Dateinamen. QSQLite2Driver - + Error opening database Die Datenbankverbindung konnte nicht geöffnet werden @@ -4668,12 +4946,12 @@ Bitte wählen Sie einen anderen Dateinamen. QSQLite2Result - + Unable to fetch results Das Ergebnis konnte nicht abgeholt werden - + Unable to execute statement Der Befehl konnte nicht ausgeführt werden @@ -4681,7 +4959,7 @@ Bitte wählen Sie einen anderen Dateinamen. QSQLiteDriver - + Error opening database Die Datenbankverbindung konnte nicht geöffnet werden @@ -5184,7 +5462,7 @@ Bitte wählen Sie einen anderen Dateinamen. - + %1: permission denied %1: Zugriff verweigert @@ -6150,7 +6428,7 @@ Bitte wählen Sie einen anderen Dateinamen. Umdrehen - + Ctrl Strg @@ -6184,7 +6462,7 @@ Bitte wählen Sie einen anderen Dateinamen. F%1 - + Home Page Startseite @@ -6293,7 +6571,7 @@ Bitte wählen Sie einen anderen Dateinamen. QSoftKeyManager - + Ok Ok @@ -6318,7 +6596,7 @@ Bitte wählen Sie einen anderen Dateinamen. Abbrechen - + Exit Beenden @@ -6401,7 +6679,12 @@ Bitte wählen Sie einen anderen Dateinamen. Die Daten konnten nicht geschrieben werden: %1 - + + Unable to decrypt data: %1 + Die Daten konnten nicht entschlüsselt werden: %1 + + + Error while reading: %1 Beim Lesen ist ein Fehler aufgetreten: %1 @@ -6411,7 +6694,7 @@ Bitte wählen Sie einen anderen Dateinamen. Im Ablauf des SSL-Protokolls ist ein Fehler aufgetreten: %1 - + Error creating SSL context (%1) Es konnte keine SSL-Kontextstruktur erzeugt werden (%1) @@ -6657,7 +6940,7 @@ Bitte wählen Sie einen anderen Dateinamen. QTextControl - + &Undo &Rückgängig @@ -7375,7 +7658,7 @@ Bitte wählen Sie einen anderen Dateinamen. %1 (%2x%3 Pixel) - + Bad HTTP request Ungültige HTTP-Anforderung @@ -7460,7 +7743,7 @@ Bitte wählen Sie einen anderen Dateinamen. - + JavaScript Alert - %1 JavaScript-Hinweis - %1 @@ -7470,7 +7753,7 @@ Bitte wählen Sie einen anderen Dateinamen. JavaScript-Bestätigung - %1 - + JavaScript Prompt - %1 JavaScript-Eingabeaufforderung - %1 @@ -7706,7 +7989,7 @@ Bitte wählen Sie einen anderen Dateinamen. QWidget - + * * -- cgit v0.12 From 04e34fe3aecca482abeeabe2e31778e9102eeb08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Mon, 18 Jan 2010 09:14:12 +0100 Subject: Improve raster graphics system performance on Mac (second try). This fixes the qmlviewer "sluggish animations and lost mouse events" issue by making sure we don't block and wait for for the screen refresh when flushing the backing store to the screen. NB: This commit fixes build issues found in f5f62c0bed. Review: msorvig Details: - Don't force repaints, flush the backingstore in response to a Cocoa paint/display events only. - Flush once per window. - Get the CGContext from the window (don't create a new one) - Don't call CGContextiFlush on the context. --- src/gui/kernel/qcocoapanel_mac.mm | 3 +++ src/gui/kernel/qcocoasharedwindowmethods_mac_p.h | 20 ++++++++++++++++++++ src/gui/kernel/qcocoaview_mac.mm | 9 +++++---- src/gui/kernel/qcocoawindow_mac_p.h | 3 +++ src/gui/kernel/qt_cocoa_helpers_mac.mm | 2 +- src/gui/kernel/qwidget.cpp | 15 ++++++++++++++- src/gui/kernel/qwidget_mac.mm | 19 +++++++++++++++++++ src/gui/painting/qwindowsurface_raster.cpp | 4 +--- 8 files changed, 66 insertions(+), 9 deletions(-) diff --git a/src/gui/kernel/qcocoapanel_mac.mm b/src/gui/kernel/qcocoapanel_mac.mm index e535aac..5e24c84 100644 --- a/src/gui/kernel/qcocoapanel_mac.mm +++ b/src/gui/kernel/qcocoapanel_mac.mm @@ -46,6 +46,9 @@ #import #import #import +#include +#include + #include diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h index 1a265d0..d2b74d7 100644 --- a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h +++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h @@ -51,6 +51,9 @@ NSPanel, while QCocoaWindow needs to inherit NSWindow rather than NSPanel). ****************************************************************************/ +// WARNING: Don't include any header files from within this file. Put them +// directly into qcocoawindow_mac_p.h and qcocoapanel_mac_p.h + QT_BEGIN_NAMESPACE extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); // qcocoaview.mm extern QPointer qt_button_down; //qapplication_mac.cpp @@ -185,3 +188,20 @@ QT_END_NAMESPACE return [super frameViewClassForStyleMask:styleMask]; } +- (void)displayIfNeeded +{ + + QWidget *qwidget = [[QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate] qt_qwidgetForWindow:self]; + if (qwidget == 0) { + [super displayIfNeeded]; + return; + } + + if (QApplicationPrivate::graphicsSystem() != 0) { + if (QWidgetBackingStore *bs = qt_widget_private(qwidget)->maybeBackingStore()) + bs->sync(qwidget, qwidget->rect()); + } + [super displayIfNeeded]; +} + + diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index d255604..2c35be2 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -520,10 +520,11 @@ extern "C" { - (void)drawRect:(NSRect)aRect { if (QApplicationPrivate::graphicsSystem() != 0) { - if (QWidgetBackingStore *bs = qwidgetprivate->maybeBackingStore()) - bs->markDirty(qwidget->rect(), qwidget); - qwidgetprivate->syncBackingStore(qwidget->rect()); - return; + if (QWidgetBackingStore *bs = qwidgetprivate->maybeBackingStore()) { + // Drawing is handled on the window level + // See qcocoasharedwindowmethods_mac_p. + return; + } } CGContextRef cg = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; qwidgetprivate->hd = cg; diff --git a/src/gui/kernel/qcocoawindow_mac_p.h b/src/gui/kernel/qcocoawindow_mac_p.h index c0d8252..0474882 100644 --- a/src/gui/kernel/qcocoawindow_mac_p.h +++ b/src/gui/kernel/qcocoawindow_mac_p.h @@ -53,6 +53,9 @@ #ifdef QT_MAC_USE_COCOA #include "qmacdefines_mac.h" #import +#include +#include + enum { QtMacCustomizeWindow = 1 << 21 }; // This will one day be run over by diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index e06a810..65c04e5 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -1162,7 +1162,7 @@ CGContextRef qt_mac_graphicsContextFor(QWidget *widget) CGrafPtr port = GetWindowPort(qt_mac_window_for(widget)); QDBeginCGContext(port, &context); #else - CGContextRef context = (CGContextRef)[[NSGraphicsContext graphicsContextWithWindow:qt_mac_window_for(widget)] graphicsPort]; + CGContextRef context = reinterpret_cast([[qt_mac_window_for(widget) graphicsContext] graphicsPort]); #endif return context; } diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index ffad38b..78a25ac 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1660,7 +1660,13 @@ void QWidgetPrivate::syncBackingStore() repaint_sys(dirty); dirty = QRegion(); } else if (QWidgetBackingStore *bs = maybeBackingStore()) { +#ifdef QT_MAC_USE_COCOA + Q_UNUSED(bs); + void qt_mac_set_needs_display(QWidget *, QRegion); + qt_mac_set_needs_display(q_func(), QRegion()); +#else bs->sync(); +#endif } } @@ -1668,8 +1674,15 @@ void QWidgetPrivate::syncBackingStore(const QRegion ®ion) { if (paintOnScreen()) repaint_sys(region); - else if (QWidgetBackingStore *bs = maybeBackingStore()) + else if (QWidgetBackingStore *bs = maybeBackingStore()) { +#ifdef QT_MAC_USE_COCOA + Q_UNUSED(bs); + void qt_mac_set_needs_display(QWidget *, QRegion); + qt_mac_set_needs_display(q_func(), region); +#else bs->sync(q_func(), region); +#endif + } } void QWidgetPrivate::setUpdatesEnabled_helper(bool enable) diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 78c1562..b5888b4 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -565,6 +565,25 @@ inline static void qt_mac_set_window_group_to_popup(OSWindowRef window) } #endif +#ifdef QT_MAC_USE_COCOA +void qt_mac_set_needs_display(QWidget *widget, QRegion region) +{ + NSView *theNSView = qt_mac_nativeview_for(widget); + if (region.isNull()) { + [theNSView setNeedsDisplay:YES]; + return; + } + + QVector rects = region.rects(); + for (int i = 0; i Date: Thu, 4 Feb 2010 10:26:27 +0100 Subject: Change log updated --- dist/changes-4.6.2 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index 00509ed..f80c526 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -120,7 +120,7 @@ Third party components Qt for Unix (X11 and Mac OS X) ------------------------------ - - + - Qt for Linux/X11 ---------------- @@ -141,6 +141,9 @@ Qt for Mac OS X - [QTBUG-7312]: Menubar and dock disappear after hiding a fullscreen widget on Cocoa. - [QTBUG-7522]: Drawing fake buttons using QMacStyle+QStyleOptionViewItemV4 lead to crash. - [QTBUG-7625]: Calling showFullScreen() then showNormal() on a widget results in top menu hiding. + - [QTBUG-7086]: QFileDialog now correctly responds to fileMode & acceptMode changes. + - [QTBUG-7162]: Fixed a crash in Designer when previewing a QMainWindow with native toolbar. + - [QTBUG-7305]: Fixed a crash when deleting QMainWindow with native toolbar on Cocoa. Qt for Embedded Linux -- cgit v0.12 From 88a3be84f9a1cb235a8e3a9b25df7763646166b6 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Thu, 4 Feb 2010 10:32:55 +0100 Subject: Add some entries to the change log --- dist/changes-4.6.2 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index f80c526..65c07cb 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -51,6 +51,8 @@ QtGui * [QTBUG-7029] Fixed a crash when re-creating QApplication object due to a dangling gesture manager pointer. + * [QTBUG-7198] Setting a style sheet could break the checkbox position in item views. + QtDBus ------ @@ -130,21 +132,25 @@ Qt for Linux/X11 * Fixed a crash when an input method tries to create a widget after the application is destroyed. + - [QTBUG-6952] Fixed a problem using NoButtons in spinbox with QGtkStyle + - [QTBUG-7504] Fixed missing focus rect on check- and radiobutton with + some GTK+ themes. + - [QTBUG-6522] Fixed missing menu separator in some GTK+ themes. + Qt for Windows -------------- - - - Qt for Mac OS X --------------- + - [QTBUG-7832]: Restored missing margins around non-unified toolbars. - [QTBUG-7312]: Menubar and dock disappear after hiding a fullscreen widget on Cocoa. - [QTBUG-7522]: Drawing fake buttons using QMacStyle+QStyleOptionViewItemV4 lead to crash. - [QTBUG-7625]: Calling showFullScreen() then showNormal() on a widget results in top menu hiding. - [QTBUG-7086]: QFileDialog now correctly responds to fileMode & acceptMode changes. - [QTBUG-7162]: Fixed a crash in Designer when previewing a QMainWindow with native toolbar. - [QTBUG-7305]: Fixed a crash when deleting QMainWindow with native toolbar on Cocoa. - + - [QTBUG-6882]: Fixed a text layout issue with QHeaderView in right-to-left mode. Qt for Embedded Linux --------------------- -- cgit v0.12 From 26b696f9333147218bb7dca0abdf0e5f321763f9 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Thu, 4 Feb 2010 11:18:49 +0100 Subject: Doc: Removed promisse to fix a problem The problem is out of scope and will not be fixed. Task-number:QTBUG-4377 Reviewed-by:Trust Me --- src/gui/widgets/qtoolbar.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gui/widgets/qtoolbar.cpp b/src/gui/widgets/qtoolbar.cpp index 53050ac..8beda55 100644 --- a/src/gui/widgets/qtoolbar.cpp +++ b/src/gui/widgets/qtoolbar.cpp @@ -441,8 +441,7 @@ void QToolBarPrivate::plug(const QRect &r) When a QToolBar is not a child of a QMainWindow, it looses the ability to populate the extension pop up with widgets added to the toolbar using addWidget(). Please use widget actions created by inheriting QWidgetAction - and implementing QWidgetAction::createWidget() instead. This is a known - issue which will be fixed in a future release. + and implementing QWidgetAction::createWidget() instead. \sa QToolButton, QMenu, QAction, {Application Example} */ -- cgit v0.12 From 3569038ffec0c133ff29f80d506f334cc0f2ddb3 Mon Sep 17 00:00:00 2001 From: Iain Date: Thu, 4 Feb 2010 10:29:34 +0000 Subject: Further bug fixes for enable/disables DEF files mechanism on Symbian Fix bug where all target types, including apps, plugins and static libraries were getting DEFFILE statements - now it's just libraries that get it. Fix bug where duplicate DEFFILE blocks were being added to projects that manually specified their own DEFFILE - this now tests for the qmake variable "defBlock" being set, and doesn't add additional DEFFILE statements if it is. NOTE: This means that adding DEFFILE statements to MMP_RULES manually should be done by creating a variable called defBlock, and adding that to the MMP_RULES (ie. MMP_RULES += defBlock) Fix bug in configure.exe, where using -nokia-developer for Windows builds would warn about Symbian DEF file usage (or lack thereof) Reviewed-by: Janne Koskinen Reviewed-by: Jason Barron --- configure.exe | Bin 1178112 -> 1180160 bytes mkspecs/features/symbian/def_files.prf | 48 ++++++++++++++---------- mkspecs/features/symbian/def_files_disabled.prf | 12 ++++-- tools/configure/configureapp.cpp | 4 +- 4 files changed, 40 insertions(+), 24 deletions(-) diff --git a/configure.exe b/configure.exe index 21fdcfa..8913de1 100644 Binary files a/configure.exe and b/configure.exe differ diff --git a/mkspecs/features/symbian/def_files.prf b/mkspecs/features/symbian/def_files.prf index c29d4ec..48d91aa 100644 --- a/mkspecs/features/symbian/def_files.prf +++ b/mkspecs/features/symbian/def_files.prf @@ -3,24 +3,32 @@ CONFIG -= def_files_disabled -!isEmpty(defFilePath) { - defBlock = \ - "$${LITERAL_HASH}ifdef WINSCW" \ - "DEFFILE $$defFilePath/bwins/$${TARGET}.def" \ - "$${LITERAL_HASH}elif defined EABI" \ - "DEFFILE $$defFilePath/eabi/$${TARGET}.def" \ - "$${LITERAL_HASH}endif" - - MMP_RULES += defBlock -} else { - # If defFilePath is not defined, then put the folders containing the DEF files at the - # same level as the .pro (and generated MMP) file(s) - defBlock = \ - "$${LITERAL_HASH}ifdef WINSCW" \ - "DEFFILE ./bwins/$${TARGET}.def" \ - "$${LITERAL_HASH}elif defined EABI" \ - "DEFFILE ./eabi/$${TARGET}.def" \ - "$${LITERAL_HASH}endif" - - MMP_RULES += defBlock +# Firstly, if the MMP_RULES already contain a defBlock variable, don't generate another one +# (this bit is slightly magic, because it depends upon everyone creating their DEFFILE statements +# in a defBlock variable; but otherwise we have to expand MMP_RULES then scan for the DEFFILE keyword) +!contains(MMP_RULES, defBlock) { + # Apps are executables on Symbian, so don't have exports, and therefore don't have DEF files + # Plugins use standard DEF files, which qmake generates, so shouldn't be using these DEFFILE + # statements - they use the qmake generated statements instead + # Static libraries obviously don't have DEF files, as they don't take part in dynamic linkage + !contains(TEMPLATE, app):!contains(CONFIG, plugin):!contains(CONFIG, staticlib): { + !isEmpty(defFilePath) { + defBlock = \ + "$${LITERAL_HASH}ifdef WINSCW" \ + "DEFFILE $$defFilePath/bwins/$${TARGET}.def" \ + "$${LITERAL_HASH}elif defined EABI" \ + "DEFFILE $$defFilePath/eabi/$${TARGET}.def" \ + "$${LITERAL_HASH}endif" + } else { + # If defFilePath is not defined, then put the folders containing the DEF files at the + # same level as the .pro (and generated MMP) file(s) + defBlock = \ + "$${LITERAL_HASH}ifdef WINSCW" \ + "DEFFILE ./bwins/$${TARGET}.def" \ + "$${LITERAL_HASH}elif defined EABI" \ + "DEFFILE ./eabi/$${TARGET}.def" \ + "$${LITERAL_HASH}endif" + } + MMP_RULES += defBlock + } } diff --git a/mkspecs/features/symbian/def_files_disabled.prf b/mkspecs/features/symbian/def_files_disabled.prf index d5c9505..557c5e3 100644 --- a/mkspecs/features/symbian/def_files_disabled.prf +++ b/mkspecs/features/symbian/def_files_disabled.prf @@ -2,6 +2,12 @@ CONFIG -= def_files -# with EXPORTUNFROZEN enabled, new exports are included in the dll without -# needing to run abld/sbs freeze -MMP_RULES += EXPORTUNFROZEN +# See def_files.prf for reasoning on the slight nastiness of this +!contains(MMP_RULES, defBlock) { + # See def_files.prf for reasoning for excluding target types and configs below + !contains(TEMPLATE, app):!contains(CONFIG, plugin):!contains(CONFIG, staticlib): { + # with EXPORTUNFROZEN enabled, new exports are included in the dll and dso/lib without + # needing to run abld/sbs freeze + MMP_RULES += EXPORTUNFROZEN + } +} diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 8d1b640..83b4d9c 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -482,7 +482,9 @@ void Configure::parseCmdLine() dictionary[ "BUILDNOKIA" ] = "yes"; dictionary[ "BUILDDEV" ] = "yes"; dictionary["LICENSE_CONFIRMED"] = "yes"; - dictionary[ "SYMBIAN_DEFFILES" ] = "no"; + if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) { + dictionary[ "SYMBIAN_DEFFILES" ] = "no"; + } } else if( configCmdLine.at(i) == "-opensource" ) { dictionary[ "BUILDTYPE" ] = "opensource"; -- cgit v0.12 From 6d1d425e219b0a5e03603f7d708cd740b7d3a3f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Thu, 4 Feb 2010 11:44:44 +0100 Subject: Cache the sizes of the images in an animated GIF. Rework the previous commit a bit and include caching of image sizes. Task-number: QTBUG-6696 Reviewed-by: Kim --- src/plugins/imageformats/gif/qgifhandler.cpp | 85 ++++++++++++++++++---------- src/plugins/imageformats/gif/qgifhandler.h | 4 +- tests/auto/qimagereader/tst_qimagereader.cpp | 1 + 3 files changed, 59 insertions(+), 31 deletions(-) diff --git a/src/plugins/imageformats/gif/qgifhandler.cpp b/src/plugins/imageformats/gif/qgifhandler.cpp index 6cd7841..6d473e3 100644 --- a/src/plugins/imageformats/gif/qgifhandler.cpp +++ b/src/plugins/imageformats/gif/qgifhandler.cpp @@ -71,8 +71,8 @@ public: ~QGIFFormat(); int decode(QImage *image, const uchar* buffer, int length, - int *nextFrameDelay, int *loopCount, QSize *nextSize); - static int imageCount(QIODevice *device); + int *nextFrameDelay, int *loopCount); + static void scan(QIODevice *device, QVector *imageSizes); bool newFrame; bool partialNewFrame; @@ -230,7 +230,7 @@ void QGIFFormat::disposePrevious(QImage *image) Returns the number of bytes consumed. */ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length, - int *nextFrameDelay, int *loopCount, QSize *nextSize) + int *nextFrameDelay, int *loopCount) { // We are required to state that // "The Graphics Interchange Format(c) is the Copyright property of @@ -347,10 +347,6 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length, bpl = image->bytesPerLine(); bits = image->bits(); memset(bits, 0, image->byteCount()); - - // ### size of the upcoming frame, should rather - // be known before decoding it. - *nextSize = QSize(swidth, sheight); } disposePrevious(image); @@ -647,17 +643,17 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length, } /*! - Returns the number of images that can be read from \a device. + Scans through the data stream defined by \a device and returns the image + sizes found in the stream in the \a imageSizes vector. */ - -int QGIFFormat::imageCount(QIODevice *device) +void QGIFFormat::scan(QIODevice *device, QVector *imageSizes) { if (!device) - return 0; + return; qint64 oldPos = device->pos(); if (!device->seek(0)) - return 0; + return; int colorCount = 0; int localColorCount = 0; @@ -667,18 +663,21 @@ int QGIFFormat::imageCount(QIODevice *device) bool globalColormap = false; int count = 0; int blockSize = 0; + int imageWidth = 0; + int imageHeight = 0; bool done = false; uchar hold[16]; - int imageCount = 0; State state = Header; const int readBufferSize = 40960; // 40k read buffer QByteArray readBuffer(device->read(readBufferSize)); - if (readBuffer.isEmpty()) - return 0; + if (readBuffer.isEmpty()) { + device->seek(oldPos); + return; + } - // this is a specialized version of the state machine from decode(), + // This is a specialized version of the state machine from decode(), // which doesn't do any image decoding or mallocing, and has an // optimized way of skipping SkipBlocks, ImageDataBlocks and // Global/LocalColorMaps. @@ -700,6 +699,8 @@ int QGIFFormat::imageCount(QIODevice *device) case LogicalScreenDescriptor: hold[count++] = ch; if (count == 7) { + imageWidth = LM(hold[0], hold[1]); + imageHeight = LM(hold[2], hold[3]); globalColormap = !!(hold[4] & 0x80); globalColorCount = 2 << (hold[4] & 0x7); count = 0; @@ -753,13 +754,29 @@ int QGIFFormat::imageCount(QIODevice *device) case ImageDescriptor: hold[count++] = ch; if (count == 10) { + int newLeft = LM(hold[1], hold[2]); + int newTop = LM(hold[3], hold[4]); + int newWidth = LM(hold[5], hold[6]); + int newHeight = LM(hold[7], hold[8]); + + if (imageWidth/10 > qMax(newWidth,200)) + imageWidth = -1; + if (imageHeight/10 > qMax(newHeight,200)) + imageHeight = -1; + + if (imageWidth <= 0) + imageWidth = newLeft + newWidth; + if (imageHeight <= 0) + imageHeight = newTop + newHeight; + + *imageSizes << QSize(imageWidth, imageHeight); + localColormap = !!(hold[9] & 0x80); localColorCount = localColormap ? (2 << (hold[9] & 0x7)) : 0; if (localColorCount) colorCount = localColorCount; else colorCount = globalColorCount; - imageCount++; count = 0; if (localColormap) { @@ -865,13 +882,13 @@ int QGIFFormat::imageCount(QIODevice *device) break; case Error: device->seek(oldPos); - return 0; + return; } } readBuffer = device->read(readBufferSize); } device->seek(oldPos); - return imageCount; + return; } void QGIFFormat::fillRect(QImage *image, int col, int row, int w, int h, QRgb color) @@ -994,8 +1011,7 @@ QGifHandler::QGifHandler() nextDelay = 0; loopCnt = 0; frameNumber = -1; - nextSize = QSize(); - imageCnt = -1; + scanIsCached = false; } QGifHandler::~QGifHandler() @@ -1017,7 +1033,7 @@ bool QGifHandler::imageIsComing() const } int decoded = gifFormat->decode(&lastImage, (const uchar *)buffer.constData(), buffer.size(), - &nextDelay, &loopCnt, &nextSize); + &nextDelay, &loopCnt); if (decoded == -1) break; buffer.remove(0, decoded); @@ -1061,7 +1077,7 @@ bool QGifHandler::read(QImage *image) } int decoded = gifFormat->decode(&lastImage, (const uchar *)buffer.constData(), buffer.size(), - &nextDelay, &loopCnt, &nextSize); + &nextDelay, &loopCnt); if (decoded == -1) break; buffer.remove(0, decoded); @@ -1092,8 +1108,18 @@ bool QGifHandler::supportsOption(ImageOption option) const QVariant QGifHandler::option(ImageOption option) const { if (option == Size) { - if (imageIsComing()) - return nextSize; + if (!scanIsCached) { + QGIFFormat::scan(device(), &imageSizes); + scanIsCached = true; + } + // before the first frame is read, or we have an empty data stream + if (frameNumber == -1) + return (imageSizes.count() > 0) ? QVariant(imageSizes.at(0)) : QVariant(); + // after the last frame has been read, the next size is undefined + if (frameNumber >= imageSizes.count() - 1) + return QVariant(); + // and the last case: the size of the next frame + return imageSizes.at(frameNumber + 1); } else if (option == Animation) { return true; } @@ -1113,10 +1139,11 @@ int QGifHandler::nextImageDelay() const int QGifHandler::imageCount() const { - if (imageCnt != -1) - return imageCnt; - imageCnt = QGIFFormat::imageCount(device()); - return imageCnt; + if (!scanIsCached) { + QGIFFormat::scan(device(), &imageSizes); + scanIsCached = true; + } + return imageSizes.count(); } int QGifHandler::loopCount() const diff --git a/src/plugins/imageformats/gif/qgifhandler.h b/src/plugins/imageformats/gif/qgifhandler.h index 830cd38..8e07aff 100644 --- a/src/plugins/imageformats/gif/qgifhandler.h +++ b/src/plugins/imageformats/gif/qgifhandler.h @@ -87,8 +87,8 @@ private: mutable int nextDelay; mutable int loopCnt; int frameNumber; - mutable QSize nextSize; - mutable int imageCnt; + mutable QVector imageSizes; + mutable bool scanIsCached; }; QT_END_NAMESPACE diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp index debc090..3e40527 100644 --- a/tests/auto/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/qimagereader/tst_qimagereader.cpp @@ -881,6 +881,7 @@ void tst_QImageReader::gifImageCount() { QImageReader io(":images/trolltech.gif"); QVERIFY(io.imageCount() == 34); + QVERIFY(io.size() == QSize(128,64)); } } #endif -- cgit v0.12 From 4cd8dd562ea149d5a6cdcc15533e4975682106f6 Mon Sep 17 00:00:00 2001 From: Janne Koskinen Date: Thu, 4 Feb 2010 13:39:55 +0200 Subject: Revert "Daylight savings time for Symbian take 2" This reverts commit 7bc18035816a2eac15dfac4d987eb9bf43f90ef6. --- src/corelib/corelib.pro | 2 -- src/corelib/tools/qdatetime.cpp | 60 +++++++++++++--------------------- tests/auto/qdatetime/tst_qdatetime.cpp | 7 ---- 3 files changed, 23 insertions(+), 46 deletions(-) diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro index 7f33791..9a15bf1 100644 --- a/src/corelib/corelib.pro +++ b/src/corelib/corelib.pro @@ -35,6 +35,4 @@ symbian: { # Workaroud for problems with paging this dll MMP_RULES -= PAGED MMP_RULES *= UNPAGED - # Timezone server - LIBS += -ltzclient } diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index 9a361c0..c1027ed 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -75,7 +75,6 @@ #if defined(Q_OS_SYMBIAN) #include -#include #endif QT_BEGIN_NAMESPACE @@ -3722,32 +3721,23 @@ static QDateTimePrivate::Spec utcToLocal(QDate &date, QTime &time) #elif defined(Q_OS_SYMBIAN) // months and days are zero index based _LIT(KUnixEpoch, "19700000:000000.000000"); + TTimeIntervalSeconds utcOffset = User::UTCOffset(); TTimeIntervalSeconds tTimeIntervalSecsSince1Jan1970UTC(secsSince1Jan1970UTC); TTime epochTTime; TInt err = epochTTime.Set(KUnixEpoch); tm res; if(err == KErrNone) { TTime utcTTime = epochTTime + tTimeIntervalSecsSince1Jan1970UTC; - TRAP(err, - RTz tz; - User::LeaveIfError(tz.Connect()); - CleanupClosePushL(tz); - res.tm_isdst = tz.IsDaylightSavingOnL(*tz.GetTimeZoneIdL(),utcTTime); - User::LeaveIfError(tz.ConvertToLocalTime(utcTTime)); - CleanupStack::PopAndDestroy(&tz)); - if (KErrNone == err) { - TDateTime localDateTime = utcTTime.DateTime(); - res.tm_sec = localDateTime.Second(); - res.tm_min = localDateTime.Minute(); - res.tm_hour = localDateTime.Hour(); - res.tm_mday = localDateTime.Day() + 1; // non-zero based index for tm struct - res.tm_mon = localDateTime.Month(); - res.tm_year = localDateTime.Year() - 1900; - // Symbian's timezone server doesn't know how to handle DST before year 1997 - if (res.tm_year < 97) - res.tm_isdst = -1; - brokenDown = &res; - } + utcTTime = utcTTime + utcOffset; + TDateTime utcDateTime = utcTTime.DateTime(); + res.tm_sec = utcDateTime.Second(); + res.tm_min = utcDateTime.Minute(); + res.tm_hour = utcDateTime.Hour(); + res.tm_mday = utcDateTime.Day() + 1; // non-zero based index for tm struct + res.tm_mon = utcDateTime.Month(); + res.tm_year = utcDateTime.Year() - 1900; + res.tm_isdst = 0; + brokenDown = &res; } #elif !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) // use the reentrant version of localtime() where available @@ -3822,27 +3812,23 @@ static void localToUtc(QDate &date, QTime &time, int isdst) #elif defined(Q_OS_SYMBIAN) // months and days are zero index based _LIT(KUnixEpoch, "19700000:000000.000000"); + TTimeIntervalSeconds utcOffset = TTimeIntervalSeconds(0 - User::UTCOffset().Int()); TTimeIntervalSeconds tTimeIntervalSecsSince1Jan1970UTC(secsSince1Jan1970UTC); TTime epochTTime; TInt err = epochTTime.Set(KUnixEpoch); tm res; if(err == KErrNone) { - TTime localTTime = epochTTime + tTimeIntervalSecsSince1Jan1970UTC; - RTz tz; - if (KErrNone == tz.Connect()) { - if (KErrNone == tz.ConvertToUniversalTime(localTTime)) { - TDateTime utcDateTime = localTTime.DateTime(); - res.tm_sec = utcDateTime.Second(); - res.tm_min = utcDateTime.Minute(); - res.tm_hour = utcDateTime.Hour(); - res.tm_mday = utcDateTime.Day() + 1; // non-zero based index for tm struct - res.tm_mon = utcDateTime.Month(); - res.tm_year = utcDateTime.Year() - 1900; - res.tm_isdst = (int)isdst; - brokenDown = &res; - } - tz.Close(); - } + TTime utcTTime = epochTTime + tTimeIntervalSecsSince1Jan1970UTC; + utcTTime = utcTTime + utcOffset; + TDateTime utcDateTime = utcTTime.DateTime(); + res.tm_sec = utcDateTime.Second(); + res.tm_min = utcDateTime.Minute(); + res.tm_hour = utcDateTime.Hour(); + res.tm_mday = utcDateTime.Day() + 1; // non-zero based index for tm struct + res.tm_mon = utcDateTime.Month(); + res.tm_year = utcDateTime.Year() - 1900; + res.tm_isdst = (int)isdst; + brokenDown = &res; } #elif !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) // use the reentrant version of gmtime() where available diff --git a/tests/auto/qdatetime/tst_qdatetime.cpp b/tests/auto/qdatetime/tst_qdatetime.cpp index b9d1d7c..86a4c80 100644 --- a/tests/auto/qdatetime/tst_qdatetime.cpp +++ b/tests/auto/qdatetime/tst_qdatetime.cpp @@ -147,16 +147,9 @@ Q_DECLARE_METATYPE(QTime) tst_QDateTime::tst_QDateTime() { -#ifdef Q_OS_SYMBIAN - // Symbian's timezone server cannot handle DST correctly for dates before year 1997 - uint x1 = QDateTime(QDate(2000, 1, 1), QTime()).toTime_t(); - uint x2 = QDateTime(QDate(2000, 6, 1), QTime()).toTime_t(); - europeanTimeZone = (x1 == 946681200 && x2 == 959810400); -#else uint x1 = QDateTime(QDate(1990, 1, 1), QTime()).toTime_t(); uint x2 = QDateTime(QDate(1990, 6, 1), QTime()).toTime_t(); europeanTimeZone = (x1 == 631148400 && x2 == 644191200); -#endif } tst_QDateTime::~tst_QDateTime() -- cgit v0.12 From 4c8b2aa00acc00a95b6f950a4ab7de737631e494 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Thu, 4 Feb 2010 11:18:47 +0100 Subject: Add the QMAKE_FILE_EXT variable to extra compilers generation. This give the possibility to get the file name with the extension and without the path. Reviewed-by: Joao Reviewed-by: Marius Storm-Olsen --- qmake/generators/makefile.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 69e1d8a..db2737b 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -1513,6 +1513,19 @@ MakefileGenerator::replaceExtraCompilerVariables(const QString &orig_var, const base = fi.fileName(); val += base; } + } else if(var == QLatin1String("QMAKE_FILE_EXT")) { + filePath = true; + for(int i = 0; i < in.size(); ++i) { + QFileInfo fi(fileInfo(Option::fixPathToLocalOS(in.at(i)))); + QString ext; + // Ensure complementarity with QMAKE_FILE_BASE + int baseLen = fi.completeBaseName().length(); + if(baseLen == 0) + ext = fi.fileName(); + else + ext = fi.fileName().remove(0, baseLen); + val += ext; + } } else if(var == QLatin1String("QMAKE_FILE_PATH") || var == QLatin1String("QMAKE_FILE_IN_PATH")) { filePath = true; for(int i = 0; i < in.size(); ++i) -- cgit v0.12 From 34f1758428282a327c12b0d8040061c1f67ecc7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Thu, 4 Feb 2010 11:35:27 +0100 Subject: Crash when closing any top-level widget on Symbian. The window surface must be deleted while the window is valid because on some graphics systems a notifcation is sent to the window when the surface is released. This fix is also an optmization as we no longer process any backing store requests while deleting the top-level. Previously it would handle requests from the window itself and all its children. Task-number: QT-2513 Reviewed-by: jbarron --- src/gui/kernel/qwidget.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 4054d2a..4520a1b 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1439,7 +1439,16 @@ QWidget::~QWidget() } #endif - if (QWidgetBackingStore *bs = d->maybeBackingStore()) { + if (d->extra && d->extra->topextra && d->extra->topextra->backingStore) { + // Okay, we are about to destroy the top-level window that owns + // the backing store. Make sure we delete the backing store right away + // before the window handle is invalid. This is important because + // the backing store will delete its window surface, which may or may + // not have a reference to this widget that will be used later to + // notify the window it no longer has a surface. + delete d->extra->topextra->backingStore; + d->extra->topextra->backingStore = 0; + } else if (QWidgetBackingStore *bs = d->maybeBackingStore()) { bs->removeDirtyWidget(this); if (testAttribute(Qt::WA_StaticContents)) bs->removeStaticWidget(this); -- cgit v0.12 From b52e4ac1dfcce317872d9104142c026951a29145 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Thu, 4 Feb 2010 12:49:37 +0100 Subject: My Changelog entries for 4.6.2 --- dist/changes-4.6.2 | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index 65c07cb..5f3d23c 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -42,6 +42,10 @@ QtCore - QXmlStreamWriter * [QTBUG-6893] Fixed adding extra Byte Order Marks when writing to a xml file. + - QFSFileEngine + * Fix typo that made realpath() not being used + - QIODevice + * Optimized readAll() QtGui ----- @@ -63,8 +67,17 @@ QtDBus QtNetwork --------- - - foo - * bar + - QNetworkAccessManager + * Optimizations + * HTTP: Get rid of QAbstractSocket warnings that were sometimes displayed + * HTTP: setReadBufferSize() of the QNetworkReply finally is working on all layers + * [QTBUG-7713] HTTP: Fix bug related to re-sending a request + - QSslCertificate + * [QTBUG-6466] Fix issuerInfo() and subjectInfo() + - QTcpSocket + * [QTBUG-7344] Fix performance degredation with write() on Windows + * [QTBUG-7316] Also handle unknown errors from socket engine + * [QTBUG-7317] Also handle unknown errors from socket engine QtOpenGL -------- -- cgit v0.12 From 417e269c648fab4ad6e2075014419cc7fad69145 Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Thu, 4 Feb 2010 12:29:47 +0100 Subject: Fix copy/pasto Reviewed-by: trustme --- src/gui/text/qzipreader_p.h | 2 +- src/gui/text/qzipwriter_p.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/text/qzipreader_p.h b/src/gui/text/qzipreader_p.h index 1086464..67a2ace 100644 --- a/src/gui/text/qzipreader_p.h +++ b/src/gui/text/qzipreader_p.h @@ -49,7 +49,7 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of the QLibrary class. This header file may change from +// of the QZipReader class. This header file may change from // version to version without notice, or even be removed. // // We mean it. diff --git a/src/gui/text/qzipwriter_p.h b/src/gui/text/qzipwriter_p.h index 7b97937..9322f4a 100644 --- a/src/gui/text/qzipwriter_p.h +++ b/src/gui/text/qzipwriter_p.h @@ -47,7 +47,7 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of the QLibrary class. This header file may change from +// of the QZipWriter class. This header file may change from // version to version without notice, or even be removed. // // We mean it. -- cgit v0.12 From bc1638138b71adf056f5972b7b1239f4eeffcfec Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Thu, 4 Feb 2010 12:30:18 +0100 Subject: Make sure we define S_IFDIR on Windows Reviewed-by: Thierry Bastian --- src/gui/text/qzip.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gui/text/qzip.cpp b/src/gui/text/qzip.cpp index 2fc1940..d30c996 100644 --- a/src/gui/text/qzip.cpp +++ b/src/gui/text/qzip.cpp @@ -54,10 +54,13 @@ #include #if defined(Q_OS_WIN) -#undef S_IFREG -#define S_IFREG 0100000 +# undef S_IFREG +# define S_IFREG 0100000 +# ifndef S_IFDIR +# define S_IFDIR 0040000 +# endif # ifndef S_ISDIR -# define S_ISDIR(x) ((x) & 0040000) > 0 +# define S_ISDIR(x) ((x) & S_IFDIR) > 0 # endif # ifndef S_ISREG # define S_ISREG(x) ((x) & 0170000) == S_IFREG -- cgit v0.12 From db82dda4ae3672844f7637394bf9a403e7c4f4b3 Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Thu, 4 Feb 2010 13:15:31 +0100 Subject: My changelog for 4.6.2 --- dist/changes-4.6.2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index 5f3d23c..0175f1d 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -56,6 +56,8 @@ QtGui * [QTBUG-7029] Fixed a crash when re-creating QApplication object due to a dangling gesture manager pointer. * [QTBUG-7198] Setting a style sheet could break the checkbox position in item views. + * [QTBUG-7253] Fixed wrong stroke clipping with the raster engine when using a QPen + with a style other than SolidLine. QtDBus -- cgit v0.12 From 3c991df1681471cbfb737f6bed0c679e5ca67aa9 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 4 Feb 2010 13:58:35 +0100 Subject: uic: Fixed code generating setCentralWidget()-calls of QMainWindow. Regression introduced by QTBUG-5824 change 6809bd020e3307324e136707f32f6f17f77b9591. Do not generate setCentralWidget() for Qt3Support toolbar/dock widget classes. Reviewed-by: ogoffart Task-number: QTBUG-7612 --- src/tools/uic/cpp/cppwriteinitialization.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp index 8099ffa..dc1d181 100644 --- a/src/tools/uic/cpp/cppwriteinitialization.cpp +++ b/src/tools/uic/cpp/cppwriteinitialization.cpp @@ -721,8 +721,9 @@ void WriteInitialization::acceptWidget(DomWidget *node) m_output << m_indent << parentWidget << "->addDockWidget(" << area << varName << ");\n"; } else if (m_uic->customWidgetsInfo()->extends(className, QLatin1String("QStatusBar"))) { m_output << m_indent << parentWidget << "->setStatusBar(" << varName << ");\n"; - } else { - m_output << m_indent << parentWidget << "->setCentralWidget(" << varName << ");\n"; + } else if (!m_uic->customWidgetsInfo()->extends(className, QLatin1String("Q3DockWindow")) + && !m_uic->customWidgetsInfo()->extends(className, QLatin1String("Q3ToolBar"))) { + m_output << m_indent << parentWidget << "->setCentralWidget(" << varName << ");\n"; } } -- cgit v0.12 From 551575ae14de1c80712478ba07fd26c7cccec322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Thu, 4 Feb 2010 14:15:00 +0100 Subject: My changes for 4.6.2 --- dist/changes-4.6.2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index 0175f1d..f667c91 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -42,6 +42,12 @@ QtCore - QXmlStreamWriter * [QTBUG-6893] Fixed adding extra Byte Order Marks when writing to a xml file. + - QFile + * Fixed double-buffering issue when opening files in buffered mode. + * [QTBUG-7285] QFile::remove would fail if an unrelated operation on the + same instance had been previously failed. This manisfested itself in + QTemporaryFile failing to auto-remove files and QFile::copy leaving + temporary files behind in certain situations. - QFSFileEngine * Fix typo that made realpath() not being used - QIODevice -- cgit v0.12 From 5160af692fd0352457cdf12cb497e1b8d8eed858 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Thu, 4 Feb 2010 14:32:20 +0100 Subject: Doc: Correcting image Changing "Trolltech" to "Nokia" Task-number:QTBUG-7370 Reviewed-by:Trust me --- doc/src/images/qpainter-text.png | Bin 791 -> 1391 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/doc/src/images/qpainter-text.png b/doc/src/images/qpainter-text.png index af7821c..e95c965 100644 Binary files a/doc/src/images/qpainter-text.png and b/doc/src/images/qpainter-text.png differ -- cgit v0.12 From 5ddcf96b8339850d1f84db9f487ac15a1ed3364a Mon Sep 17 00:00:00 2001 From: axis Date: Thu, 4 Feb 2010 14:42:50 +0100 Subject: Added my changes to changes file. --- dist/changes-4.6.2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index f667c91..e7c2860 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -59,6 +59,12 @@ QtGui - foo * bar + - QApplication + * [QTBUG-6098] Added a flag to avoid construction of application panes. + - QInputContext + * [QTBUG-7439] Avoided the loss of preedit text when losing focus on Symbian. + + * [QT-2629] Implemented event filter functions for Symbian. * [QTBUG-7029] Fixed a crash when re-creating QApplication object due to a dangling gesture manager pointer. * [QTBUG-7198] Setting a style sheet could break the checkbox position in item views. -- cgit v0.12 From 38d31452b3cafd738c215b5686bf3ff95c1d27d6 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 4 Feb 2010 14:48:11 +0100 Subject: My 4.6.2 changes --- dist/changes-4.6.2 | 63 ++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 47 insertions(+), 16 deletions(-) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index e7c2860..45b7086 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -1,7 +1,7 @@ Qt 4.6.2 is a bug-fix release. It maintains both forward and backward -compatibility (source and binary) with Qt 4.6.0. For more details, -refer to the online documentation included in this distribution. The -documentation is also available online: +compatibility (source and binary) with Qt 4.6.0 and 4.6.1. For more +details, refer to the online documentation included in this +distribution. The documentation is also available online: http://qt.nokia.com/doc/4.6 @@ -40,19 +40,29 @@ Optimizations QtCore ------ - - QXmlStreamWriter - * [QTBUG-6893] Fixed adding extra Byte Order Marks when writing to a xml file. + - QAtomicPointer + * [QTBUG-7356] Fixed a compilation failure when using the Intel + compiler on IA-64 + - QFile * Fixed double-buffering issue when opening files in buffered mode. * [QTBUG-7285] QFile::remove would fail if an unrelated operation on the same instance had been previously failed. This manisfested itself in QTemporaryFile failing to auto-remove files and QFile::copy leaving temporary files behind in certain situations. + - QFSFileEngine * Fix typo that made realpath() not being used + - QIODevice * Optimized readAll() + - QReadWriteLock + * [MR 426] Fixed documentation + + - QXmlStreamWriter + * [QTBUG-6893] Fixed adding extra Byte Order Marks when writing to a xml file. + QtGui ----- @@ -72,26 +82,31 @@ QtGui with a style other than SolidLine. + * [MR 2077] Integrated merge request 2077 + QtDBus ------ - - foo - * bar + - QDBusConnection + * [QT-2307] Fixed sending of D-Bus method calls with QDBus::BlockWithGui QtNetwork --------- - QNetworkAccessManager - * Optimizations - * HTTP: Get rid of QAbstractSocket warnings that were sometimes displayed - * HTTP: setReadBufferSize() of the QNetworkReply finally is working on all layers - * [QTBUG-7713] HTTP: Fix bug related to re-sending a request + * Optimizations + * HTTP: Get rid of QAbstractSocket warnings that were sometimes displayed + * HTTP: setReadBufferSize() of the QNetworkReply finally is working on all layers + * [QTBUG-7713] HTTP: Fix bug related to re-sending a request + * [QTBUG-7060] Fixed an issue with parsing of HTTP headers like + "private, max-age=300" + - QSslCertificate - * [QTBUG-6466] Fix issuerInfo() and subjectInfo() + * [QTBUG-6466] Fix issuerInfo() and subjectInfo() + - QTcpSocket - * [QTBUG-7344] Fix performance degredation with write() on Windows - * [QTBUG-7316] Also handle unknown errors from socket engine - * [QTBUG-7317] Also handle unknown errors from socket engine + * [QTBUG-7344] Fix performance degredation with write() on Windows + * [QTBUG-7316,QTBUG-7317] Also handle unknown errors from socket engine QtOpenGL -------- @@ -134,6 +149,15 @@ Qt Plugins - foo * bar +Examples +-------- + + - QtMultimedia + * [MR 418] Fixed the example for QAudioOutput + + - WebKit + * [MR 2235] Added the framecapture example to the default build + Third party components ---------------------- @@ -222,5 +246,12 @@ Qt for Windows CE * Important Behavior Changes * **************************************************************************** - - + - QNetworkAccessManager cache + * QNetworkAccessManager will no longer return expired pages, as + stated in the documentation + * The behaviour of PreferCache and PreferNetwork modes now match + the documentation more closely + - QUrl + * QUrl will now accept hostnames ending in dot and will not treat + those as invalid hostnames -- cgit v0.12 From 63d50974f104f3626fee13c24251b91a6b3d046b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Thu, 4 Feb 2010 14:51:59 +0100 Subject: Stabilize tst_QGraphicsWidget::initialShow2 (new test) --- tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp index 526486e..a7195c4 100644 --- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp @@ -2892,6 +2892,26 @@ void tst_QGraphicsWidget::initialShow2() void polishEvent() { update(); } }; + // Don't let paint events triggered by the windowing system + // influence our test case. We're only interested in knowing + // whether a QGraphicsWidget generates an additional repaint + // on the inital show. Hence create a dummy scenario to find out + // how many repaints we should expect. + QGraphicsScene dummyScene(0, 0, 200, 200); + dummyScene.addItem(new QGraphicsRectItem(0, 0, 100, 100)); + + QGraphicsView *dummyView = new QGraphicsView(&dummyScene); + EventSpy paintSpy(dummyView->viewport(), QEvent::Paint); + dummyView->show(); + // Not using QTest::qWaitForWindowShown(&view); on purpose, because there's + // a bug in qt_x11_wait_for_window_manager that prevents this test + // to pass. Denis is looking into it. + QTest::qWait(300); + const int expectedRepaintCount = paintSpy.count(); + delete dummyView; + dummyView = 0; + QTest::qWait(200); + MyGraphicsWidget *widget = new MyGraphicsWidget; widget->resize(100, 100); @@ -2905,7 +2925,7 @@ void tst_QGraphicsWidget::initialShow2() // to pass. Denis is looking into it. QTest::qWait(300); - QCOMPARE(widget->repaints, 1); + QCOMPARE(widget->repaints, expectedRepaintCount); } void tst_QGraphicsWidget::QT_BUG_6544_tabFocusFirstUnsetWhenRemovingItems() -- cgit v0.12 From 94abb3ee93aa09f79640e14fed89b286c57ce05c Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Thu, 4 Feb 2010 15:57:44 +0200 Subject: Initial support for S60 softkey icons. The logic for resolving the icon size in landscape mode for S60 5.0 (5800XM) is somewhat fragile, but better way is not yet know. Also the 50% transparent mask what CBA implementation tries to create for pressed down CB Abuttons fails for some reason. When button is pressed down there are drawing artifacts in softkey images. These issues will be tried to resolve with later commits Task-number: QTBUG-7314 Review-By: Sami Merila --- src/3rdparty/s60/eiksoftkeyimage.h | 112 +++++++++++++++++++++++++++++++++ src/gui/kernel/qsoftkeymanager_s60.cpp | 89 +++++++++++++++++++------- src/gui/kernel/qsoftkeymanager_s60_p.h | 4 +- 3 files changed, 180 insertions(+), 25 deletions(-) create mode 100644 src/3rdparty/s60/eiksoftkeyimage.h diff --git a/src/3rdparty/s60/eiksoftkeyimage.h b/src/3rdparty/s60/eiksoftkeyimage.h new file mode 100644 index 0000000..84f6108a --- /dev/null +++ b/src/3rdparty/s60/eiksoftkeyimage.h @@ -0,0 +1,112 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Changes cba button's label to image. +* +*/ + +#ifndef EIKSOFTKEYIMAGE_H +#define EIKSOFTKEYIMAGE_H + +// FORWARD DECLARATIONS +class CEikButtonGroupContainer; + +// CLASS DECLARATION + +/** +* Changes cba button's label to image. +* +* @lib EIKCOCTL +* @since 2.0 +*/ +class EikSoftkeyImage + { + public: + + /** + * Set image to cba button by replacing label + * @since 2.0 + * @param aButtonGroupContainer Button container + * @param aImage Image to button, + * Takes Images ownership + * @param aLeft Boolean: left or right button. + * If true, then change left, + * if false, change right + */ + IMPORT_C static void SetImage(CEikButtonGroupContainer* aButtonGroupContainer, CEikImage& aImage, TBool aLeft); + + /** + * Change to cba button image back to label + * @since 2.0 + * @param aButtonGroupContainer Button container + * @param aLeft Boolean: left or right button. + * If true, then change left, + * if false, change right + */ + IMPORT_C static void SetLabel(CEikButtonGroupContainer* aButtonGroupContainer, TBool aLeft); + + private: + + /** + * C++ default constructor. + */ + EikSoftkeyImage() {}; + + + }; + +#endif // EIKSOFTKEYIMAGE_H + +// End of File + diff --git a/src/gui/kernel/qsoftkeymanager_s60.cpp b/src/gui/kernel/qsoftkeymanager_s60.cpp index 67ed8b0..a72d16c 100644 --- a/src/gui/kernel/qsoftkeymanager_s60.cpp +++ b/src/gui/kernel/qsoftkeymanager_s60.cpp @@ -49,7 +49,7 @@ #include "private/qsoftkeymanager_p.h" #include "private/qsoftkeymanager_s60_p.h" #include "private/qobject_p.h" -//#include +#include #include #ifndef QT_NO_SOFTKEYMANAGER @@ -64,6 +64,8 @@ QSoftKeyManagerPrivateS60::QSoftKeyManagerPrivateS60() { cachedCbaIconSize[0] = QSize(0,0); cachedCbaIconSize[1] = QSize(0,0); + cachedCbaIconSize[2] = QSize(0,0); + cachedCbaIconSize[3] = QSize(0,0); skipNextUpdate = false; } @@ -149,6 +151,39 @@ void QSoftKeyManagerPrivateS60::setNativeSoftkey(CEikButtonGroupContainer &cba, QT_TRAP_THROWING(cba.SetCommandL(position, command, text)); } +QPoint QSoftKeyManagerPrivateS60::softkeyIconPosition(int position, QSize sourceSize, QSize targetSize) +{ + QPoint iconPosition(0,0); + switch( AknLayoutUtils::CbaLocation() ) + { + case AknLayoutUtils::EAknCbaLocationBottom: + // RSK must be moved to right, LSK in on correct position by default + if (position == RSK_POSITION) + iconPosition.setX(targetSize.width() - sourceSize.width()); + break; + case AknLayoutUtils::EAknCbaLocationRight: + case AknLayoutUtils::EAknCbaLocationLeft: + // Already in correct position + default: + break; + } + + // Align horizontally to center + iconPosition.setY((targetSize.height() - sourceSize.height()) >> 1); + return iconPosition; +} + +QPixmap QSoftKeyManagerPrivateS60::prepareSoftkeyPixmap(QPixmap src, int position, QSize targetSize) +{ + QPixmap target(targetSize); + target.fill(Qt::transparent); + QPainter p; + p.begin(&target); + p.drawPixmap(softkeyIconPosition(position, src.size(), targetSize), src); + p.end(); + return target; +} + bool QSoftKeyManagerPrivateS60::isOrientationLandscape() { // Hard to believe that there is no public API in S60 to @@ -158,15 +193,11 @@ bool QSoftKeyManagerPrivateS60::isOrientationLandscape() QSize QSoftKeyManagerPrivateS60::cbaIconSize(CEikButtonGroupContainer *cba, int position) { - Q_UNUSED(cba); - Q_UNUSED(position); - // Will be implemented when EikSoftkeyImage usage license wise is OK -/* - const int index = isOrientationLandscape() ? 0 : 1; + int index = position; + index += isOrientationLandscape() ? 0 : 1; if(cachedCbaIconSize[index].isNull()) { // Only way I figured out to get CBA icon size without RnD SDK, was - // Only way I figured out to get CBA icon size without RnD SDK, was // to set some dummy icon to CBA first and then ask CBA button CCoeControl::Size() // The returned value is cached to avoid unnecessary icon setting every time. const bool left = (position == LSK_POSITION); @@ -178,38 +209,49 @@ QSize QSoftKeyManagerPrivateS60::cbaIconSize(CEikButtonGroupContainer *cba, int setNativeSoftkey(*cba, position, command, KNullDesC()); cachedCbaIconSize[index] = qt_TSize2QSize(cba->ControlOrNull(command)->Size()); EikSoftkeyImage::SetLabel(cba, left); + + if(cachedCbaIconSize[index] == QSize(138,72)) { + // Hack for S60 5.0 (5800) landscape orientation, which return wrong icon size + cachedCbaIconSize[index] = QSize(60,60); + } } } return cachedCbaIconSize[index]; -*/ - return QSize(); } bool QSoftKeyManagerPrivateS60::setSoftkeyImage(CEikButtonGroupContainer *cba, QAction &action, int position) { bool ret = false; - Q_UNUSED(cba); - Q_UNUSED(action); - Q_UNUSED(position); - // Will be implemented when EikSoftkeyImage usage license wise is OK - /* const bool left = (position == LSK_POSITION); if(position == LSK_POSITION || position == RSK_POSITION) { QIcon icon = action.icon(); if (!icon.isNull()) { - QPixmap pm = icon.pixmap(cbaIconSize(cba, position)); - pm = pm.scaled(cbaIconSize(cba, position)); - QBitmap mask = pm.mask(); - if (mask.isNull()) { - mask = QBitmap(pm.size()); - mask.fill(Qt::color1); + // Get size of CBA icon area based on button position and orientation + QSize requiredIconSize = cbaIconSize(cba, position); + // Get pixmap out of icon based on preferred size, the aspect ratio is kept + QPixmap pmWihtAspectRatio = icon.pixmap(requiredIconSize); + // Native softkeys require that pixmap size is exactly the same as requiredIconSize + // prepareSoftkeyPixmap creates a new pixmap with requiredIconSize and blits the 'pmWihtAspectRatio' + // to correct location of it + QPixmap softkeyPixmap = prepareSoftkeyPixmap(pmWihtAspectRatio, position, requiredIconSize); + QBitmap softkeyMask = softkeyPixmap.mask(); + if (softkeyMask.isNull()) { + softkeyMask = QBitmap(softkeyPixmap.size()); + softkeyMask.fill(Qt::color1); + } + + // Softkey mask in > SV_S60_5_1 has to be inverted + if(QSysInfo::s60Version() > QSysInfo::SV_S60_5_1) { + QImage maskImage = softkeyMask.toImage(); + maskImage.invertPixels(); + softkeyMask = QPixmap::fromImage(maskImage); } - CFbsBitmap* nBitmap = pm.toSymbianCFbsBitmap(); - CFbsBitmap* nMask = mask.toSymbianCFbsBitmap(); + CFbsBitmap* nBitmap = softkeyPixmap.toSymbianCFbsBitmap(); + CFbsBitmap* nMask = softkeyMask.toSymbianCFbsBitmap(); CEikImage* myimage = new (ELeave) CEikImage; myimage->SetPicture( nBitmap, nMask ); // nBitmap and nMask ownership transfered @@ -221,7 +263,6 @@ bool QSoftKeyManagerPrivateS60::setSoftkeyImage(CEikButtonGroupContainer *cba, EikSoftkeyImage::SetLabel(cba, left); } } - */ return ret; } @@ -272,6 +313,7 @@ bool QSoftKeyManagerPrivateS60::setRightSoftkey(CEikButtonGroupContainer &cba) if (windowType != Qt::Dialog && windowType != Qt::Popup) { QString text(QSoftKeyManager::tr("Exit")); TPtrC nativeText = qt_QString2TPtrC(text); + EikSoftkeyImage::SetLabel(&cba, false); setNativeSoftkey(cba, RSK_POSITION, EAknSoftkeyExit, nativeText); return true; } @@ -303,7 +345,6 @@ void QSoftKeyManagerPrivateS60::setSoftkeys(CEikButtonGroupContainer &cba) void QSoftKeyManagerPrivateS60::updateSoftKeys_sys() { - //bool status = CCoeEnv::Static()->AppUi()->IsDisplayingMenuOrDialog(); if (skipCbaUpdate()) return; diff --git a/src/gui/kernel/qsoftkeymanager_s60_p.h b/src/gui/kernel/qsoftkeymanager_s60_p.h index 46e3596..f8bd6d9 100644 --- a/src/gui/kernel/qsoftkeymanager_s60_p.h +++ b/src/gui/kernel/qsoftkeymanager_s60_p.h @@ -84,6 +84,8 @@ private: QAction *highestPrioritySoftkey(QAction::SoftKeyRole role); static bool actionPriorityMoreThan(const QAction* item1, const QAction* item2); void setNativeSoftkey(CEikButtonGroupContainer &cba, TInt position, TInt command, const TDesC& text); + QPoint softkeyIconPosition(int position, QSize sourceSize, QSize targetSize); + QPixmap prepareSoftkeyPixmap(QPixmap src, int position, QSize targetSize); bool isOrientationLandscape(); QSize cbaIconSize(CEikButtonGroupContainer *cba, int position); bool setSoftkeyImage(CEikButtonGroupContainer *cba, QAction &action, int position); @@ -95,7 +97,7 @@ private: private: QHash realSoftKeyActions; - QSize cachedCbaIconSize[2]; + QSize cachedCbaIconSize[4]; bool skipNextUpdate; }; -- cgit v0.12 From 56d1da45bc15989542fe3621c9c9de444219729c Mon Sep 17 00:00:00 2001 From: Jason Barron Date: Thu, 4 Feb 2010 10:53:05 +0100 Subject: Fix crash when multiple screens are reported from HAL. The support for multiple screens is not implemented yet in Qt on the Symbian platform, so there is really no need to query the HAL for the value since the additional screens can't be used yet anyway. The crash here occured when the HAL returned more than 1 screen, but the arrays were resized to contain one element. The loop in resizeEvent() was iterating past the end of the array because it thought there were more screens than the arrays did. Reviewed-by: axis --- src/gui/kernel/qdesktopwidget_s60.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/gui/kernel/qdesktopwidget_s60.cpp b/src/gui/kernel/qdesktopwidget_s60.cpp index 77745ea..84e3c5d 100644 --- a/src/gui/kernel/qdesktopwidget_s60.cpp +++ b/src/gui/kernel/qdesktopwidget_s60.cpp @@ -88,24 +88,20 @@ QDesktopWidgetPrivate::~QDesktopWidgetPrivate() void QDesktopWidgetPrivate::init(QDesktopWidget *that) { - int screenCount=0; +// int screenCount=0; - if (HAL::Get(0, HALData::EDisplayNumberOfScreens, screenCount) == KErrNone) - QDesktopWidgetPrivate::screenCount = screenCount; - else - QDesktopWidgetPrivate::screenCount = 0; + // ### TODO: Implement proper multi-display support + QDesktopWidgetPrivate::screenCount = 1; +// if (HAL::Get(0, HALData::EDisplayNumberOfScreens, screenCount) == KErrNone) +// QDesktopWidgetPrivate::screenCount = screenCount; +// else +// QDesktopWidgetPrivate::screenCount = 0; rects = new QVector(); workrects = new QVector(); rects->resize(QDesktopWidgetPrivate::screenCount); workrects->resize(QDesktopWidgetPrivate::screenCount); - - // ### TODO: Implement proper multi-display support - rects->resize(1); - rects->replace(0, that->rect()); - workrects->resize(1); - workrects->replace(0, that->rect()); } void QDesktopWidgetPrivate::cleanup() -- cgit v0.12 From 91e236022acd79dfbc4aef9e30edb4d1aeb2685c Mon Sep 17 00:00:00 2001 From: Jason Barron Date: Thu, 4 Feb 2010 14:15:56 +0100 Subject: Flush the WSERV command buffer after deleting a surface. For graphics systems that use EGL surfaces in the backing store destroying the surface does not guarantee that the memory is immediately freed because this command does not cause a flush. This implies that a manual flush is instead needed. We do this in 2 places; the first is when the surface is destroyed due to a visibility changed. The second case is just after the window has been destroyed. At this point the backing store has already been deleted so the deletion of both the surface and window can happen atomically in WSERV. Task-number: QT-2506 Reviewed-by: Iain --- src/gui/kernel/qapplication_s60.cpp | 3 +++ src/gui/kernel/qwidget_s60.cpp | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 6caac9f..6e03d7c 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1647,6 +1647,9 @@ int QApplicationPrivate::symbianProcessWsEvent(const QSymbianEvent *symbianEvent if (visChangedEvent->iFlags & TWsVisibilityChangedEvent::ENotVisible) { delete w->d_func()->topData()->backingStore; w->d_func()->topData()->backingStore = 0; + // In order to ensure that any resources used by the window surface + // are immediately freed, we flush the WSERV command buffer. + S60->wsSession().Flush(); } else if ((visChangedEvent->iFlags & TWsVisibilityChangedEvent::EPartiallyVisible) && !w->d_func()->maybeBackingStore()) { w->d_func()->topData()->backingStore = new QWidgetBackingStore(w); diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 00f2213..0ce7534 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -1195,6 +1195,10 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows) if (destroyWindow) { delete id; + // At this point the backing store should already be destroyed + // so we flush the command buffer to ensure that the freeing of + // those resources and deleting the window can happen "atomically" + S60->wsSession().Flush(); } } -- cgit v0.12 From 9cc4ae77a73bd28ff495f36f26dd87c78b76b976 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 4 Feb 2010 15:08:44 +0200 Subject: Added support for smart installer package generation in Symbian Smart installer packages bundle normal application sis with a bootstrap package that will download a smart installer when the package is installed. Smart installer in turn will download any dependencies of the application that are available on remote server, such as Open C, Qt, and QtWebkit packages, and install them Smart installer packages are generated when DEPLOYMENT.installer_header variable is defined in applicatoin .pro file. This commit is still missing properly signed bootstrap.sis package. Task-number: QTBUG-7908 Reviewed-by: Shane Kearns --- bin/createpackage.pl | 64 ++++++++++++------ demos/embedded/fluidlauncher/fluidlauncher.pro | 2 + doc/src/deployment/deployment.qdoc | 34 ++++++---- doc/src/development/qmake-manual.qdoc | 12 ++++ doc/src/snippets/code/doc_src_deployment.qdoc | 13 ++-- doc/src/snippets/code/doc_src_qmake-manual.qdoc | 10 +-- qmake/generators/symbian/symmake.cpp | 86 ++++++++++++++++++++----- 7 files changed, 160 insertions(+), 61 deletions(-) diff --git a/bin/createpackage.pl b/bin/createpackage.pl index 197dffe..460df31 100755 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -64,7 +64,7 @@ sub Usage() { ============================================================================================== Convenience script for creating signed packages you can install on your phone. -Usage: createpackage.pl [options] templatepkg target-platform [certificate key [passphrase]] +Usage: createpackage.pl [options] templatepkg [target]-[platform] [certificate key [passphrase]] Where supported optiobns are as follows: [-i|install] = Install the package right away using PC suite @@ -72,9 +72,10 @@ Where supported optiobns are as follows: [-c|certfile=] = The file containing certificate information for signing. The file can have several certificates, each specified in separate line. The certificate, key and passphrase in line - must be ';' separated. Lines starting with '#' are treated - as a comments. Also empty lines are ignored. The paths in + must be ';' separated. Lines starting with '#' are treated + as a comments. Also empty lines are ignored. The paths in can be absolute or relative to . + [-u|unsigned] = Preserves the unsigned package Where parameters are as follows: templatepkg = Name of .pkg file template target = Either debug or release @@ -86,10 +87,10 @@ Where parameters are as follows: Example: createpackage.pl fluidlauncher_template.pkg release-armv5 - + Example with certfile: createpackage.pl -c=mycerts.txt fluidlauncher_template.pkg release-armv5 - + Content of 'mycerts.txt' must be something like this: # This is comment line, also the empty lines are ignored rd.cer;rd-key.pem @@ -109,8 +110,12 @@ ENDUSAGESTRING my $install = ""; my $preprocessonly = ""; my $certfile = ""; +my $preserveUnsigned = ""; -unless (GetOptions('i|install' => \$install, 'p|preprocess' => \$preprocessonly, 'c|certfile=s' => \$certfile)){ +unless (GetOptions('i|install' => \$install, + 'p|preprocess' => \$preprocessonly, + 'c|certfile=s' => \$certfile, + 'u|unsigned' => \$preserveUnsigned,)){ Usage(); } @@ -134,7 +139,12 @@ my $passphrase = $ARGV[4]; # Generate output pkg basename (i.e. file name without extension) my $pkgoutputbasename = $templatepkg; -$pkgoutputbasename =~ s/_template\.pkg/_$targetplatform/g; +my $preservePkgOutput = ""; +$pkgoutputbasename =~ s/_template/_$targetplatform/g; +if ($pkgoutputbasename eq $templatepkg) { + $preservePkgOutput = "1"; +} +$pkgoutputbasename =~ s/\.pkg//g; $pkgoutputbasename = lc($pkgoutputbasename); # Store output file names to variables @@ -150,12 +160,20 @@ $certpath =~ s-^(.*[^\\])$-$1\\-o; # ensure path ends with a backslash $certpath =~ s-/-\\-go; # for those working with UNIX shells $certpath =~ s-bin\\$-src\\s60installs\\-; # certificates are one step up in hierarcy -# Check some pre-conditions and print error messages if needed -unless (length($templatepkg) && length($platform) && length($target)) { - print "\nError: Template PKG filename, platform or target is not defined!\n"; +# Check some pre-conditions and print error messages if needed. +unless (length($templatepkg)) { + print "\nError: Template PKG filename is not defined!\n"; Usage(); } +# If the pkg file is not actually a template, there is no need for plaform or target. +if ($templatepkg =~ m/_template\.pkg/i) { + unless (length($platform) && length($target)) { + print "\nError: Platform or target is not defined!\n"; + Usage(); + } +} + # Check template exist stat($templatepkg); unless( -e _ ) { @@ -192,18 +210,18 @@ if (length($certfile)) { next if /^(\s)*$/; # skip blank lines chomp; # remove trailing newline characters my @certinfo = split(';', $_); # split row to certinfo - + # Trim spaces for(@certinfo) { s/^\s+//; s/\s+$//; - } - + } + # Do some validation - unless(scalar(@certinfo) >= 2 && scalar(@certinfo) <= 3 && length($certinfo[0]) && length($certinfo[1]) ) { + unless(scalar(@certinfo) >= 2 && scalar(@certinfo) <= 3 && length($certinfo[0]) && length($certinfo[1]) ) { print "\nError: $certfile line '$_' does not contain valid information!\n"; - Usage(); - } + Usage(); + } push @certificates, [@certinfo]; # push data to two dimensional array } @@ -212,7 +230,9 @@ if (length($certfile)) { # Remove any existing .sis packages unlink $unsigned_sis_name; unlink $signed_sis_name; -unlink $pkgoutput; +if (!$preservePkgOutput) { + unlink $pkgoutput; +} # Preprocess PKG local $/; @@ -254,10 +274,14 @@ if( -e _ ) { system ("signsis $signed_sis_name $signed_sis_name $abscert $abskey $row->[2]"); print ("\tAdditionally signed the SIS with certificate: $row->[0]!\n"); } - + # remove temporary pkg and unsigned sis - unlink $pkgoutput; - unlink $unsigned_sis_name; + if (!$preservePkgOutput) { + unlink $pkgoutput; + } + if (!$preserveUnsigned) { + unlink $unsigned_sis_name; + } # Install the sis if requested if ($install) { diff --git a/demos/embedded/fluidlauncher/fluidlauncher.pro b/demos/embedded/fluidlauncher/fluidlauncher.pro index 92d6e1e..f71388c 100644 --- a/demos/embedded/fluidlauncher/fluidlauncher.pro +++ b/demos/embedded/fluidlauncher/fluidlauncher.pro @@ -213,5 +213,7 @@ symbian { DEPLOYMENT += config files executables viewerimages saxbookmarks reg_resource resource \ mifs desktopservices_music desktopservices_images fluidbackup + DEPLOYMENT.installer_header = 0xA000D7CD + TARGET.EPOCHEAPSIZE = 100000 20000000 } diff --git a/doc/src/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc index 8ba106c..575a6dc 100644 --- a/doc/src/deployment/deployment.qdoc +++ b/doc/src/deployment/deployment.qdoc @@ -1573,18 +1573,13 @@ By default \c .pkg file generated by \c qmake adds support for all S60 3rd edition FP1, S60 3rd edition FP2 and S60 5th edition devices. - As a last step we will embed the \c qt_installer.sis file to the Wiggly - deployment file: + As a last step we will instruct qmake to generate smart installer \c .pkg file by defining + the UID of the installation package. The UID needs to be different than the application UID, + and should be reserved via normal Symbian mechanisms. You can use a random UID starting with + \c 0xE for testing purposes: \snippet doc/src/snippets/code/doc_src_deployment.qdoc 58 - When \c qt_installer.sis is embedded to the application deployment file, the - end-user does not need to download and install all dependencies separately. - The drawback of \c .sis embedding is that the application \c .sis file size becomes - big. To address these problems Forum Nokia is planning to release a smart installer - which will take care of downloading and installing the necessary dependencies - over-the-air. The expected availability of smart installer is 1Q 2010. - Now we are ready to compile the application and create the application deployment file. Run \c qmake to create Symbian specific makefiles, resources (\.rss) and deployment packaging files (\c .pkg). And do build to create the @@ -1593,13 +1588,26 @@ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 59 If everything compiled and linked without any errors, we are now ready to create - an application installation file: + an application package (\c wiggly.sis): \snippet doc/src/snippets/code/doc_src_deployment.qdoc 60 - If all binaries and dependencies were found, we should now have a self-signed - \c wiggly_release-gcce.sis ready to be installed on a device. For more information - about creating a \c .sis file and installing it to device see also + Now you can create the smart installer package for the application: + + \snippet doc/src/snippets/code/doc_src_deployment.qdoc 61 + + If all binaries and dependencies were found, you should now have a self signed + \c wiggly_installer.sis ready to be installed on a device. The smart installer + contained in the in the installer package will download the necessary dependencies + such as Qt libraries to the device. + + \note If you want to have your application properly Symbian Signed for distribution, + you will have to properly sign both the application and the application installer packages. + Please see + \l{http://developer.symbian.org/wiki/index.php/Category:Symbian_Signed} + {Symbian Signed wiki} for more information about Symbian Signed. + + For more information about creating a \c .sis file and installing it to device see also \l {The Symbian platform - Introduction to Qt#Installing your own applications}{here}. */ diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc index d7aa0db..49e1e71 100644 --- a/doc/src/development/qmake-manual.qdoc +++ b/doc/src/development/qmake-manual.qdoc @@ -1431,6 +1431,18 @@ is the application private directory on the drive it is installed to. \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 141 + On the Symbian platform, you can use \c{DEPLOYMENT.installer_header} + variable to generate smart installer wrapper for your application. + If you specify just UID of the installer package as the value, then + installer package name and version will be autogenerated: + + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 146 + + If autogenerated values are not suitable, you can also specify the sis + header yourself using this variable: + + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 147 + \target DEPLOYMENT_PLUGIN \section1 DEPLOYMENT_PLUGIN diff --git a/doc/src/snippets/code/doc_src_deployment.qdoc b/doc/src/snippets/code/doc_src_deployment.qdoc index 7eb8808..9c00681 100644 --- a/doc/src/snippets/code/doc_src_deployment.qdoc +++ b/doc/src/snippets/code/doc_src_deployment.qdoc @@ -475,11 +475,7 @@ default_deployment.pkg_prerules += supported_platforms //! [57] //! [58] -embedded_deployments = \ - "; Embed Qt dependencies" \ - "@\"$$[QT_INSTALL_PREFIX]/qt_installer.sis\",(0x2001E62D)" - -default_deployment.pkg_prerules += embedded_deployments +DEPLOYMENT.installer_header = 0xE2345678 //! [58] //! [59] @@ -489,4 +485,9 @@ make release-gcce //! [60] make sis -//! [60] \ No newline at end of file +ren wiggly_release-gcce.sis wiggly.sis +//! [60] + +//! [61] +createpackage wiggly_installer.pkg +//! [61] \ No newline at end of file diff --git a/doc/src/snippets/code/doc_src_qmake-manual.qdoc b/doc/src/snippets/code/doc_src_qmake-manual.qdoc index b1cbc72..a48b53f 100644 --- a/doc/src/snippets/code/doc_src_qmake-manual.qdoc +++ b/doc/src/snippets/code/doc_src_qmake-manual.qdoc @@ -963,9 +963,9 @@ RSS_RULES += myrssrules //! [145] //! [146] -BLD_INF_RULES.prj_exports += \ - "$${LITERAL_HASH}include " \ - "rom/my.iby APP_LAYER_PUBLIC_EXPORT_PATH(my.iby)" \ - "inc/myheader.h mycomp/myheader.h" \ - ":zip my_api.zip my_api" +DEPLOYMENT.installer_header = 0x12345678 //! [146] + +//! [147] +DEPLOYMENT.installer_header = "$${LITERAL_HASH}{\"My Application Installer\"},(0x12345678),1,0,0" +//! [147] diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp index 8f712d8..8f0abf4 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -292,12 +292,23 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, Deployme } generatedFiles << pkgFile.fileName(); + QTextStream t(&pkgFile); + + QString installerSisHeader = project->values("DEPLOYMENT.installer_header").join("\n"); + QString wrapperStreamBuffer; + QTextStream tw(&wrapperStreamBuffer); + + QString dateStr = QDateTime::currentDateTime().toString(Qt::ISODate); // Header info - QTextStream t(&pkgFile); - t << QString("; %1 generated by qmake at %2").arg(pkgFilename).arg(QDateTime::currentDateTime().toString(Qt::ISODate)) << endl; - t << "; This file is generated by qmake and should not be modified by the user" << endl; - t << ";" << endl << endl; + QString wrapperPkgFilename = QString("%1_installer.%2") + .arg(fixedTarget) + .arg("pkg"); + QString headerComment = "; %1 generated by qmake at %2\n" + "; This file is generated by qmake and should not be modified by the user\n" + ";\n\n"; + t << headerComment.arg(pkgFilename).arg(dateStr); + tw << headerComment.arg(wrapperPkgFilename).arg(dateStr); // Construct QStringList from pkg_prerules since we need search it before printed to file QStringList rawPkgPreRules; @@ -320,8 +331,9 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, Deployme if (!containsStartWithItem('&', rawPkgPreRules)) { // language, (*** hardcoded to english atm, should be parsed from TRANSLATIONS) - t << "; Language" << endl; - t << "&EN" << endl << endl; + QString languageCode = "; Language\n&EN\n\n"; + t << languageCode; + tw << languageCode; } else { // In case user defines langs, he must take care also about SIS header if (!containsStartWithItem('#', rawPkgPreRules)) @@ -330,34 +342,51 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, Deployme // name of application, UID and version QString applicationVersion = project->first("VERSION").isEmpty() ? "1,0,0" : project->first("VERSION").replace('.', ','); + QString sisHeader = "; SIS header: name, uid, version\n#{\"%1\"},(%2),%3\n\n"; + QString visualTarget = escapeFilePath(fileFixify(project->first("TARGET"))); + visualTarget = removePathSeparators(visualTarget); + QString wrapperTarget = visualTarget + " installer"; - if (!containsStartWithItem('#', rawPkgPreRules)) { - QString visualTarget = escapeFilePath(fileFixify(project->first("TARGET"))); - visualTarget = removePathSeparators(visualTarget); + if (installerSisHeader.startsWith("0x", Qt::CaseInsensitive)) { + tw << sisHeader.arg(wrapperTarget).arg(installerSisHeader).arg(applicationVersion); + } else { + tw << installerSisHeader << endl; + } - t << "; SIS header: name, uid, version" << endl; - t << QString("#{\"%1\"},(%2),%3").arg(visualTarget).arg(uid3).arg(applicationVersion) << endl << endl; + if (!containsStartWithItem('#', rawPkgPreRules)) { + t << sisHeader.arg(visualTarget).arg(uid3).arg(applicationVersion); } // Localized vendor name + QString vendorName; if (!containsStartWithItem('%', rawPkgPreRules)) { - t << "; Localised Vendor name" << endl; - t << "%{\"Vendor\"}" << endl << endl; + vendorName += "; Localised Vendor name\n%{\"Vendor\"}\n\n"; } // Unique vendor name if (!containsStartWithItem(':', rawPkgPreRules)) { - t << "; Unique Vendor name" << endl; - t << ":\"Vendor\"" << endl << endl; + vendorName += "; Unique Vendor name\n:\"Vendor\"\n\n"; } + t << vendorName; + tw << vendorName; + // PKG pre-rules - these are added before actual file installations i.e. SIS package body if (rawPkgPreRules.size()) { - t << "; Manual PKG pre-rules from PRO files" << endl; + QString comment = "\n; Manual PKG pre-rules from PRO files\n"; + t << comment; + tw << comment; + foreach(QString item, rawPkgPreRules) { + // Only regular pkg file should have package dependencies or pkg header if that is + // defined using prerules. + if (!item.startsWith("(") && !item.startsWith("#")) { + tw << item << endl; + } t << item << endl; } t << endl; + tw << endl; } // Begin Manufacturer block @@ -380,7 +409,6 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, Deployme QString epocReleasePath = QString("%1epoc32/release/$(PLATFORM)/$(TARGET)") .arg(epocRoot()); - if (targetType == TypeExe) { // deploy .exe file t << "; Executable and default resource files" << endl; @@ -469,6 +497,30 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, Deployme << " - \"\", FILETEXT, TEXTEXIT" << endl << "ENDIF ; MANUFACTURER" << endl; } + + // Write wrapper pkg + if (!installerSisHeader.isEmpty()) { + QFile wrapperPkgFile(wrapperPkgFilename); + if (!wrapperPkgFile.open(QIODevice::WriteOnly | QIODevice::Text)) { + PRINT_FILE_CREATE_ERROR(wrapperPkgFilename); + return; + } + + generatedFiles << wrapperPkgFile.fileName(); + QTextStream twf(&wrapperPkgFile); + + twf << wrapperStreamBuffer << endl; + + // Wrapped files deployment + QString currentPath = qmake_getpwd(); + QString sisName = QString("%1.sis").arg(fixedTarget); + twf << "\"" << currentPath << "/" << sisName << "\" - \"c:\\adm\\" << sisName << "\"" << endl; + + QString bootStrapPath = QLibraryInfo::location(QLibraryInfo::PrefixPath); + bootStrapPath.append("/src/s60installs/bootstrap.sis"); + QFileInfo fi(fileInfo(bootStrapPath)); + twf << "@\"" << fi.absoluteFilePath() << "\",(0x2002CCCD)" << endl; + } } bool SymbianMakefileGenerator::containsStartWithItem(const QChar &c, const QStringList& src) -- cgit v0.12 From 030c620e9f3f4e86b77a69e77a604a0c1e946229 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Thu, 4 Feb 2010 13:30:13 +0100 Subject: Improved QTest::qWaitForWindowShown on X11. The function is supposed to wait until the window has been managed by the window manager on X11 - i.e. it has been reparented to a frame, mapped and received at least one Expose event after that. Reviewed-by: Olivier Goffart --- src/gui/kernel/qwidget_x11.cpp | 75 +++++++++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 30 deletions(-) diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp index 4684bc1..007de7f 100644 --- a/src/gui/kernel/qwidget_x11.cpp +++ b/src/gui/kernel/qwidget_x11.cpp @@ -346,11 +346,6 @@ Q_GUI_EXPORT void qt_x11_enforce_cursor(QWidget * w) qt_x11_enforce_cursor(w, false); } -static Bool checkForConfigureAndExpose(Display *, XEvent *e, XPointer) -{ - return e->type == ConfigureNotify || e->type == Expose; -} - Q_GUI_EXPORT void qt_x11_wait_for_window_manager(QWidget* w) { if (!w || (!w->isWindow() && !w->internalWinId())) @@ -363,38 +358,58 @@ Q_GUI_EXPORT void qt_x11_wait_for_window_manager(QWidget* w) if (!w->testAttribute(Qt::WA_WState_Created)) return; - if (!(w->windowFlags() & Qt::X11BypassWindowManagerHint)) { - // if the window is not override-redirect, then the window manager - // will reparent us to the frame decoration window. - while (!XCheckTypedWindowEvent(X11->display, w->effectiveWinId(), ReparentNotify, &ev)) { - if (t.elapsed() > maximumWaitTime) - return; - qApp->syncX(); // non-busy wait - } - } + // first deliver events that are already in the local queue + QApplication::sendPostedEvents(); - while (!XCheckTypedWindowEvent(X11->display, w->effectiveWinId(), MapNotify, &ev)) { - if (t.elapsed() > maximumWaitTime) - return; - qApp->syncX(); // non-busy wait - } + // the normal sequence is: + // ... ConfigureNotify ... ReparentNotify ... MapNotify ... Expose + // with X11BypassWindowManagerHint: + // ConfigureNotify ... MapNotify ... Expose - qApp->x11ProcessEvent(&ev); + enum State { + Initial, Reparented, Mapped + } state = Initial; - // ok, seems like the window manager successfully reparented us, we'll wait - // for the first paint event to arrive, while handling ConfigureNotify in - // the arrival order - while(1) - { - if (XCheckIfEvent(X11->display, &ev, checkForConfigureAndExpose, 0)) { + do { + if (XEventsQueued(X11->display, QueuedAlready)) { + XNextEvent(X11->display, &ev); qApp->x11ProcessEvent(&ev); - if (ev.type == Expose) - return; + + if (w->windowFlags() & Qt::X11BypassWindowManagerHint) { + switch (state) { + case Initial: + case Reparented: + if (ev.type == MapNotify) + state = Mapped; + break; + case Mapped: + if (ev.type == Expose) + return; + break; + } + } else { + switch (state) { + case Initial: + if (ev.type == ReparentNotify) + state = Reparented; + break; + case Reparented: + if (ev.type == MapNotify) + state = Mapped; + break; + case Mapped: + if (ev.type == Expose) + return; + break; + } + } + } else { + if (!XEventsQueued(X11->display, QueuedAfterFlush)) + qApp->syncX(); // non-busy wait } if (t.elapsed() > maximumWaitTime) return; - qApp->syncX(); // non-busy wait - } + } while(1); } void qt_change_net_wm_state(const QWidget* w, bool set, Atom one, Atom two = 0) -- cgit v0.12 From 555d5b7a87b8c3a2f207c93c7eda30892de5ecc6 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Thu, 4 Feb 2010 13:55:36 +0100 Subject: Changed qgraphicswidget autotest to use qWaitForWindowShown. Make use of (yet another time) improved QTest::qWaitForWindowShown. Reviewed-by: trustme --- tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp index a7195c4..2bf1521 100644 --- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp @@ -2919,11 +2919,9 @@ void tst_QGraphicsWidget::initialShow2() scene.addItem(widget); QGraphicsView view(&scene); + view.setWindowFlags(Qt::X11BypassWindowManagerHint); view.show(); - // Not using QTest::qWaitForWindowShown(&view); on purpose, because there's - // a bug in qt_x11_wait_for_window_manager that prevents this test - // to pass. Denis is looking into it. - QTest::qWait(300); + QTest::qWaitForWindowShown(&view); QCOMPARE(widget->repaints, expectedRepaintCount); } -- cgit v0.12 From f3bd6565674f163b058bc235670d45631ce559ee Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Thu, 4 Feb 2010 16:14:00 +0100 Subject: Another fix for the non unified title+toolbar regarding text under icons This makes the case where there is text under the icons in toolbuttons and the title and toolbar is not unified on Mac. This was a regression against Qt 4.5.x Reviewed-by: jbache --- src/gui/styles/qmacstyle_mac.mm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm index aab16cb..78074c7 100644 --- a/src/gui/styles/qmacstyle_mac.mm +++ b/src/gui/styles/qmacstyle_mac.mm @@ -3380,8 +3380,14 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter if (tb->toolButtonStyle != Qt::ToolButtonIconOnly) { needText = true; if (tb->toolButtonStyle == Qt::ToolButtonTextUnderIcon) { - pr.setHeight(pixmap.size().height()); - cr.adjust(0, pr.bottom() + 1, 0, 1); + QMainWindow *mw = qobject_cast(w->window()); + if (mw && mw->unifiedTitleAndToolBarOnMac()) { + pr.setHeight(pixmap.size().height()); + cr.adjust(0, pr.bottom() + 1, 0, 1); + } else { + pr.setHeight(pixmap.size().height() + 6); + cr.adjust(0, pr.bottom(), 0, -3); + } alignment |= Qt::AlignCenter; } else { pr.setWidth(pixmap.width() + 8); -- cgit v0.12 From 07d81d0e0f15f015c7436992a99ef4b1ec36ae1c Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 4 Feb 2010 18:04:43 +0200 Subject: Fixed the location where bootstrap.sis is looked for. Task-number: QTBUG-7908 Reviewed-by: TrustMe --- qmake/generators/symbian/symmake.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp index 8f0abf4..6c44f0b 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -517,7 +517,7 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, Deployme twf << "\"" << currentPath << "/" << sisName << "\" - \"c:\\adm\\" << sisName << "\"" << endl; QString bootStrapPath = QLibraryInfo::location(QLibraryInfo::PrefixPath); - bootStrapPath.append("/src/s60installs/bootstrap.sis"); + bootStrapPath.append("/bootstrap.sis"); QFileInfo fi(fileInfo(bootStrapPath)); twf << "@\"" << fi.absoluteFilePath() << "\",(0x2002CCCD)" << endl; } -- cgit v0.12 From 96a169ac3f235433906d58ac0e4c613f51c21bf3 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 4 Feb 2010 18:16:43 +0200 Subject: My changes for 4.6.2 Reviewed-by: TrustMe --- dist/changes-4.6.2 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index 00509ed..f5e4e57 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -164,6 +164,24 @@ Qt for Windows CE - +Qt for Symbian +-------------- + +- QProcess + * [QTBUG-7667] Fixed no-timeout case for QProcess::waitForFinished. + +- qmake + * [QTBUG-7695] Added support for ifdeffing for manufacturer in generated + pkg files. + * [QTBUG-7908] Smart installer package generation support + +- Patch_capabilities script + * Added support for embedded sis name/uid patching. + +- Qt deployment + * [QTBUG-7518] Backup and restore support for Qt libs + + **************************************************************************** * Tools * **************************************************************************** -- cgit v0.12 From 39bbc477e418d4d34c2f44fd10e76950a1ae781d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Thu, 4 Feb 2010 17:44:14 +0100 Subject: Cleanup after "QGraphicsWidget is painted twice on the first show" Commit: dda8a57c085216db609f822837c50bae38006b4e We don't want to reset 'updateAll' at that point, for the same reason as mentioned in the above commit. More details in the task. Task-number: QTBUG-6956 --- src/gui/graphicsview/qgraphicsview.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp index 451f183..96b9373 100644 --- a/src/gui/graphicsview/qgraphicsview.cpp +++ b/src/gui/graphicsview/qgraphicsview.cpp @@ -2748,7 +2748,6 @@ bool QGraphicsView::viewportEvent(QEvent *event) } } } - d->scene->d_func()->updateAll = false; } break; case QEvent::TouchBegin: -- cgit v0.12 From e2f439d8ff3529d9ef50ac58da61432627a8f350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Thu, 4 Feb 2010 17:54:24 +0100 Subject: Cleanup after "Changed qgraphicswidget autotest to use qWaitForWindowShown" Commit: 555d5b7a87b8c3a2f207c93c7eda30892de5ecc6 We also have to do the same for the "dummyView". --- tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp index 2bf1521..00bf144 100644 --- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp @@ -2901,12 +2901,10 @@ void tst_QGraphicsWidget::initialShow2() dummyScene.addItem(new QGraphicsRectItem(0, 0, 100, 100)); QGraphicsView *dummyView = new QGraphicsView(&dummyScene); + dummyView->setWindowFlags(Qt::X11BypassWindowManagerHint); EventSpy paintSpy(dummyView->viewport(), QEvent::Paint); dummyView->show(); - // Not using QTest::qWaitForWindowShown(&view); on purpose, because there's - // a bug in qt_x11_wait_for_window_manager that prevents this test - // to pass. Denis is looking into it. - QTest::qWait(300); + QTest::qWaitForWindowShown(dummyView); const int expectedRepaintCount = paintSpy.count(); delete dummyView; dummyView = 0; -- cgit v0.12 From c8b9acf8abc26e71529b8f5ed6402e70a03b9ac8 Mon Sep 17 00:00:00 2001 From: Justin McPherson Date: Fri, 5 Feb 2010 10:20:23 +1000 Subject: Make sure include for QAudio namespace is created Task-number: QTBUG-7891 Reviewed-by: Kurt Korbatits --- bin/syncqt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/syncqt b/bin/syncqt index 1fb5304..db6dce6 100755 --- a/bin/syncqt +++ b/bin/syncqt @@ -194,6 +194,8 @@ sub classNames { push @ret, "QtConcurrentFilter" } elsif(basename($iheader) eq "qtconcurrentrun.h") { push @ret, "QtConcurrentRun" + } elsif(basename($iheader) eq "qaudio.h") { + push @ret, "QAudio" } my $parsable = ""; -- cgit v0.12 From f92253080a73a60a3d6ce8343b94788334ce9a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Thu, 4 Feb 2010 11:05:39 +0100 Subject: Compile. --- src/gui/kernel/qwidget_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index b5888b4..9e7517f 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -569,7 +569,7 @@ inline static void qt_mac_set_window_group_to_popup(OSWindowRef window) void qt_mac_set_needs_display(QWidget *widget, QRegion region) { NSView *theNSView = qt_mac_nativeview_for(widget); - if (region.isNull()) { + if (region.isEmpty()) { [theNSView setNeedsDisplay:YES]; return; } -- cgit v0.12 From 3baf7b981a8f40ed13c2ffb62d2188a16005f69c Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 5 Feb 2010 09:48:22 +0100 Subject: fix regression from Qt 4.5 wrt missing text pixels in QTabBar The line spacing fix showed a bug in QCommonStylePrivate::tabLayout. Since QFontMetrics::height() now usually returns one pixel less than in Qt 4.5, the tab bar is one pixel smaller. Squeezing the tab rect vertically can result in missing pixels. This depends on anti-aliasing settings and font size. The new behaviour in tabLayout is now: If we have to shift the tab rect, then we move its position instead of changing its height. Task-number: QTBUG-7137 Reviewed-by: jbache --- src/gui/styles/qcommonstyle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index 74d3ec3..b1924e7 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -1149,10 +1149,10 @@ void QCommonStylePrivate::tabLayout(const QStyleOptionTabV3 *opt, const QWidget int vpadding = proxyStyle->pixelMetric(QStyle::PM_TabBarTabVSpace, opt, widget) / 2; if (opt->shape == QTabBar::RoundedSouth || opt->shape == QTabBar::TriangularSouth) verticalShift = -verticalShift; - tr.adjust(hpadding, vpadding, horizontalShift - hpadding, verticalShift - vpadding); + tr.adjust(hpadding, verticalShift - vpadding, horizontalShift - hpadding, vpadding); bool selected = opt->state & QStyle::State_Selected; if (selected) { - tr.setBottom(tr.bottom() - verticalShift); + tr.setTop(tr.top() - verticalShift); tr.setRight(tr.right() - horizontalShift); } -- cgit v0.12 From 7a300d4d3a89d7002643bd7e70b1525d72967681 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Fri, 5 Feb 2010 12:52:37 +0100 Subject: Fixed the context menu test case in the qgraphicsscene autotest. When creating a custom QContextMenuEvent to send to a viewport we should use the viewport to convert the mouse cursor position to screen coordinates. Reviewed-by: Olivier Goffart --- tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp index 6743fbe..469ded0 100644 --- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp +++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp @@ -2806,14 +2806,14 @@ void tst_QGraphicsScene::contextMenuEvent_ItemIgnoresTransformations() { QPoint pos(50, 50); - QContextMenuEvent event(QContextMenuEvent::Keyboard, pos, view.mapToGlobal(pos)); + QContextMenuEvent event(QContextMenuEvent::Keyboard, pos, view.viewport()->mapToGlobal(pos)); event.ignore(); QApplication::sendEvent(view.viewport(), &event); QVERIFY(event.isAccepted()); } { QPoint pos(150, 150); - QContextMenuEvent event(QContextMenuEvent::Keyboard, pos, view.mapToGlobal(pos)); + QContextMenuEvent event(QContextMenuEvent::Keyboard, pos, view.viewport()->mapToGlobal(pos)); event.ignore(); QApplication::sendEvent(view.viewport(), &event); QVERIFY(!event.isAccepted()); @@ -2821,14 +2821,14 @@ void tst_QGraphicsScene::contextMenuEvent_ItemIgnoresTransformations() view.scale(1.5, 1.5); { QPoint pos(25, 25); - QContextMenuEvent event(QContextMenuEvent::Keyboard, pos, view.mapToGlobal(pos)); + QContextMenuEvent event(QContextMenuEvent::Keyboard, pos, view.viewport()->mapToGlobal(pos)); event.ignore(); QApplication::sendEvent(view.viewport(), &event); QVERIFY(event.isAccepted()); } { QPoint pos(55, 55); - QContextMenuEvent event(QContextMenuEvent::Keyboard, pos, view.mapToGlobal(pos)); + QContextMenuEvent event(QContextMenuEvent::Keyboard, pos, view.viewport()->mapToGlobal(pos)); event.ignore(); QApplication::sendEvent(view.viewport(), &event); QVERIFY(!event.isAccepted()); -- cgit v0.12 From fc58ceb0041626baa95d00eaaa2e740171d4767c Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Thu, 21 Jan 2010 17:27:27 +0100 Subject: fix compile error when linuxinput keyboard driver is compiled as plugin When creating the driver instance two parameters are given to the driver. But it accepts only the name of the device to be used. Reviewed-by: Paul Merge-request: 2288 --- src/plugins/kbddrivers/linuxinput/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/kbddrivers/linuxinput/main.cpp b/src/plugins/kbddrivers/linuxinput/main.cpp index 19a3145..db5167e 100644 --- a/src/plugins/kbddrivers/linuxinput/main.cpp +++ b/src/plugins/kbddrivers/linuxinput/main.cpp @@ -69,7 +69,7 @@ QWSKeyboardHandler* QLinuxInputKbdDriver::create(const QString &driver, Q_UNUSED(device); if (driver.compare(QLatin1String("LinuxInput"), Qt::CaseInsensitive)) return 0; - return new QWSLinuxInputKeyboardHandler(driver, device); + return new QWSLinuxInputKeyboardHandler(device); } Q_EXPORT_PLUGIN2(qwslinuxinputkbddriver, QLinuxInputKbdDriver) -- cgit v0.12 From f9c314aa306bfd4a237594775a8aeb14c858e66d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Fri, 5 Feb 2010 13:59:16 +0100 Subject: Fix tst_QAccessiblity failure. This started to fail after 34f1758428282a327c12b0d8040061c1f67ecc7f. Or actually, the test crashes on my machine. Reason is that the the test first creates a top-level line edit (which then gets its own backing store). The line edit is then reparented into another top-level. When the line edit is destroyed extra->topextra->backingStore is true and we delete the backing store it first got when created as a top-level. However, the line edit was reparented so this backing store is not the "active" one. We should still delete topextra->backingstore, but we must also remove any pointer references to the line edit in the "active" backing store. Reviewed-by: jbarron --- src/gui/kernel/qwidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 4520a1b..8b8768c 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1448,7 +1448,8 @@ QWidget::~QWidget() // notify the window it no longer has a surface. delete d->extra->topextra->backingStore; d->extra->topextra->backingStore = 0; - } else if (QWidgetBackingStore *bs = d->maybeBackingStore()) { + } + if (QWidgetBackingStore *bs = d->maybeBackingStore()) { bs->removeDirtyWidget(this); if (testAttribute(Qt::WA_StaticContents)) bs->removeStaticWidget(this); -- cgit v0.12 From f1603d5a8738b13e1c1402e29f393dfbdf079a25 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 5 Feb 2010 14:30:49 +0100 Subject: add const Reviewed-by: hjk --- src/corelib/tools/qstringbuilder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qstringbuilder.h b/src/corelib/tools/qstringbuilder.h index ddb5c7d..74661c2 100644 --- a/src/corelib/tools/qstringbuilder.h +++ b/src/corelib/tools/qstringbuilder.h @@ -71,7 +71,7 @@ public: private: const int m_size; - const char *m_data; + const char * const m_data; }; struct Q_CORE_EXPORT QAbstractConcatenable -- cgit v0.12 From b0e4af35ec8ddb5e7bfa658f916fbf29caa5a550 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 5 Feb 2010 14:32:10 +0100 Subject: remove the rounded extra frame around the main message editor for one, it just added visual noise. second, it did not respect the color scheme, which made it unusable with light-on-dark colors. Task-number: QTBUG-7778 --- tools/linguist/linguist/messageeditor.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tools/linguist/linguist/messageeditor.cpp b/tools/linguist/linguist/messageeditor.cpp index 91c88da..4aeac89 100644 --- a/tools/linguist/linguist/messageeditor.cpp +++ b/tools/linguist/linguist/messageeditor.cpp @@ -135,12 +135,8 @@ MessageEditor::MessageEditor(MultiDataModel *dataModel, QMainWindow *parent) void MessageEditor::setupEditorPage() { QFrame *editorPage = new QFrame; - editorPage->setObjectName(QLatin1String("editorPage")); editorPage->setStyleSheet(QLatin1String( - "QFrame#editorPage { border-image: url(:/images/transbox.png) 12 16 16 12 repeat;" - " border-width: 12px 16px 16px 12px; }" - "QFrame#editorPage { background-color: white; }" "QLabel { font-weight: bold; }" )); editorPage->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); -- cgit v0.12 From 662f94d478063f05155e3d2345aa6617f602ef38 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 5 Feb 2010 14:35:55 +0100 Subject: don't use stylesheet for just making labels bold --- tools/linguist/linguist/messageeditor.cpp | 4 ---- tools/linguist/linguist/messageeditorwidgets.cpp | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/linguist/linguist/messageeditor.cpp b/tools/linguist/linguist/messageeditor.cpp index 4aeac89..b6c1688 100644 --- a/tools/linguist/linguist/messageeditor.cpp +++ b/tools/linguist/linguist/messageeditor.cpp @@ -135,10 +135,6 @@ MessageEditor::MessageEditor(MultiDataModel *dataModel, QMainWindow *parent) void MessageEditor::setupEditorPage() { QFrame *editorPage = new QFrame; - - editorPage->setStyleSheet(QLatin1String( - "QLabel { font-weight: bold; }" - )); editorPage->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); m_source = new FormWidget(tr("Source text"), false); diff --git a/tools/linguist/linguist/messageeditorwidgets.cpp b/tools/linguist/linguist/messageeditorwidgets.cpp index 8b4fa62..4d31db2 100644 --- a/tools/linguist/linguist/messageeditorwidgets.cpp +++ b/tools/linguist/linguist/messageeditorwidgets.cpp @@ -171,6 +171,9 @@ FormWidget::FormWidget(const QString &label, bool isEditable, QWidget *parent) layout->setMargin(0); m_label = new QLabel(this); + QFont fnt; + fnt.setBold(true); + m_label->setFont(fnt); m_label->setText(label); layout->addWidget(m_label); @@ -249,6 +252,9 @@ FormMultiWidget::FormMultiWidget(const QString &label, QWidget *parent) m_minusIcon(QIcon(QLatin1String(":/images/minus.png"))) { m_label = new QLabel(this); + QFont fnt; + fnt.setBold(true); + m_label->setFont(fnt); m_label->setText(label); m_plusButtons.append( -- cgit v0.12 From 381f5ae82cccec3774b68674b4c0e782e9f49f6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Fri, 5 Feb 2010 16:06:33 +0100 Subject: Fixed QGifHandler::loopCount(). Task-number: QTBUG-7037 Reviewed-by: Kim --- src/plugins/imageformats/gif/qgifhandler.cpp | 38 ++++++++++++++++++----- tests/auto/qimagereader/images/qt-gif-anim.gif | Bin 0 -> 1661 bytes tests/auto/qimagereader/images/qt-gif-noanim.gif | Bin 0 -> 1642 bytes tests/auto/qimagereader/qimagereader.qrc | 4 ++- tests/auto/qimagereader/tst_qimagereader.cpp | 14 +++++++++ 5 files changed, 47 insertions(+), 9 deletions(-) create mode 100644 tests/auto/qimagereader/images/qt-gif-anim.gif create mode 100644 tests/auto/qimagereader/images/qt-gif-noanim.gif diff --git a/src/plugins/imageformats/gif/qgifhandler.cpp b/src/plugins/imageformats/gif/qgifhandler.cpp index 6d473e3..25d3dfa 100644 --- a/src/plugins/imageformats/gif/qgifhandler.cpp +++ b/src/plugins/imageformats/gif/qgifhandler.cpp @@ -72,7 +72,7 @@ public: int decode(QImage *image, const uchar* buffer, int length, int *nextFrameDelay, int *loopCount); - static void scan(QIODevice *device, QVector *imageSizes); + static void scan(QIODevice *device, QVector *imageSizes, int *loopCount); bool newFrame; bool partialNewFrame; @@ -646,7 +646,7 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length, Scans through the data stream defined by \a device and returns the image sizes found in the stream in the \a imageSizes vector. */ -void QGIFFormat::scan(QIODevice *device, QVector *imageSizes) +void QGIFFormat::scan(QIODevice *device, QVector *imageSizes, int *loopCount) { if (!device) return; @@ -842,7 +842,10 @@ void QGIFFormat::scan(QIODevice *device, QVector *imageSizes) hold[count] = ch; ++count; if (count == hold[0] + 1) { - state = SkipBlockSize; + if (qstrncmp((char*)(hold+1), "NETSCAPE", 8) == 0) + state=NetscapeExtensionBlockSize; + else + state=SkipBlockSize; count = 0; } break; @@ -855,7 +858,23 @@ void QGIFFormat::scan(QIODevice *device, QVector *imageSizes) state = SkipBlockSize; } break; - case NetscapeExtensionBlockSize: // fallthrough + case NetscapeExtensionBlockSize: + blockSize = ch; + count = 0; + if (blockSize) + state = NetscapeExtensionBlock; + else + state = Introducer; + break; + case NetscapeExtensionBlock: + if (count < 3) + hold[count] = ch; + count++; + if (count == blockSize) { + *loopCount = LM(hold[1], hold[2]); + state = SkipBlockSize; + } + break; case SkipBlockSize: blockSize = ch; count = 0; @@ -871,7 +890,6 @@ void QGIFFormat::scan(QIODevice *device, QVector *imageSizes) state = Introducer; } break; - case NetscapeExtensionBlock: // fallthrough case SkipBlock: ++count; if (count == blockSize) @@ -1009,7 +1027,7 @@ QGifHandler::QGifHandler() { gifFormat = new QGIFFormat; nextDelay = 0; - loopCnt = 0; + loopCnt = 1; frameNumber = -1; scanIsCached = false; } @@ -1109,7 +1127,7 @@ QVariant QGifHandler::option(ImageOption option) const { if (option == Size) { if (!scanIsCached) { - QGIFFormat::scan(device(), &imageSizes); + QGIFFormat::scan(device(), &imageSizes, &loopCnt); scanIsCached = true; } // before the first frame is read, or we have an empty data stream @@ -1140,7 +1158,7 @@ int QGifHandler::nextImageDelay() const int QGifHandler::imageCount() const { if (!scanIsCached) { - QGIFFormat::scan(device(), &imageSizes); + QGIFFormat::scan(device(), &imageSizes, &loopCnt); scanIsCached = true; } return imageSizes.count(); @@ -1148,6 +1166,10 @@ int QGifHandler::imageCount() const int QGifHandler::loopCount() const { + if (!scanIsCached) { + QGIFFormat::scan(device(), &imageSizes, &loopCnt); + scanIsCached = true; + } return loopCnt-1; // In GIF, loop count is iteration count, so subtract one } diff --git a/tests/auto/qimagereader/images/qt-gif-anim.gif b/tests/auto/qimagereader/images/qt-gif-anim.gif new file mode 100644 index 0000000..8bca4a8 Binary files /dev/null and b/tests/auto/qimagereader/images/qt-gif-anim.gif differ diff --git a/tests/auto/qimagereader/images/qt-gif-noanim.gif b/tests/auto/qimagereader/images/qt-gif-noanim.gif new file mode 100644 index 0000000..b6a8540 Binary files /dev/null and b/tests/auto/qimagereader/images/qt-gif-noanim.gif differ diff --git a/tests/auto/qimagereader/qimagereader.qrc b/tests/auto/qimagereader/qimagereader.qrc index 58f2f74..bc48244 100644 --- a/tests/auto/qimagereader/qimagereader.qrc +++ b/tests/auto/qimagereader/qimagereader.qrc @@ -1,5 +1,5 @@ - + images/16bpp.bmp images/4bpp-rle.bmp images/YCbCr_cmyk.jpg @@ -59,5 +59,7 @@ images/qt8.gif images/endless-anim.gif images/four-frames.gif + images/qt-gif-anim.gif + images/qt-gif-noanim.gif diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp index 3e40527..121a8fa 100644 --- a/tests/auto/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/qimagereader/tst_qimagereader.cpp @@ -142,6 +142,7 @@ private slots: void gifHandlerBugs(); void animatedGif(); void gifImageCount(); + void gifLoopCount(); #endif void readCorruptImage_data(); @@ -884,6 +885,19 @@ void tst_QImageReader::gifImageCount() QVERIFY(io.size() == QSize(128,64)); } } + +void tst_QImageReader::gifLoopCount() +{ + { + QImageReader io(":images/qt-gif-anim.gif"); + QCOMPARE(io.loopCount(), -1); // infinite loop + } + { + QImageReader io(":images/qt-gif-noanim.gif"); + QCOMPARE(io.loopCount(), 0); // no loop + } +} + #endif class Server : public QObject -- cgit v0.12 From fb8d0593198313b975ed6c0c9ba99624d1d1fbec Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Fri, 5 Feb 2010 16:44:51 +0100 Subject: Revert change 34f1758 on non-Synbian platforms The change introduces behavior changes (including crashing on QWS). It is only critical for Symbian. To reduce risk, we only apply it on the Symbian platform for now. Task-number: Autotest regression Reviewed-by: Jesper --- src/gui/kernel/qwidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 72388f0..c072d9d 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1439,6 +1439,7 @@ QWidget::~QWidget() } #endif +#ifdef Q_OS_SYMBIAN if (d->extra && d->extra->topextra && d->extra->topextra->backingStore) { // Okay, we are about to destroy the top-level window that owns // the backing store. Make sure we delete the backing store right away @@ -1449,6 +1450,7 @@ QWidget::~QWidget() delete d->extra->topextra->backingStore; d->extra->topextra->backingStore = 0; } +#endif if (QWidgetBackingStore *bs = d->maybeBackingStore()) { bs->removeDirtyWidget(this); if (testAttribute(Qt::WA_StaticContents)) -- cgit v0.12 From 2bc5d161e6820d459f00ac687ed99830a731cb74 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Fri, 5 Feb 2010 16:59:33 +0100 Subject: Fixed qt_x11_wait_for_window_manager When we wait for the window to be shown by looking for ReparentNotify, MapNotify, etc events in the event queue, we should check if those events come for the right window, otherwise we might exit too early if there are event for an other window in the queue. Reviewed-by: Leonardo Sobral Cunha --- src/gui/kernel/qwidget_x11.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp index 007de7f..10fb009 100644 --- a/src/gui/kernel/qwidget_x11.cpp +++ b/src/gui/kernel/qwidget_x11.cpp @@ -358,6 +358,8 @@ Q_GUI_EXPORT void qt_x11_wait_for_window_manager(QWidget* w) if (!w->testAttribute(Qt::WA_WState_Created)) return; + WId winid = w->internalWinId(); + // first deliver events that are already in the local queue QApplication::sendPostedEvents(); @@ -379,26 +381,26 @@ Q_GUI_EXPORT void qt_x11_wait_for_window_manager(QWidget* w) switch (state) { case Initial: case Reparented: - if (ev.type == MapNotify) + if (ev.type == MapNotify && ev.xany.window == winid) state = Mapped; break; case Mapped: - if (ev.type == Expose) + if (ev.type == Expose && ev.xany.window == winid) return; break; } } else { switch (state) { case Initial: - if (ev.type == ReparentNotify) + if (ev.type == ReparentNotify && ev.xany.window == winid) state = Reparented; break; case Reparented: - if (ev.type == MapNotify) + if (ev.type == MapNotify && ev.xany.window == winid) state = Mapped; break; case Mapped: - if (ev.type == Expose) + if (ev.type == Expose && ev.xany.window == winid) return; break; } -- cgit v0.12 From cf14db1f16fffd7755d6200aaa6769a57a9da99d Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 5 Feb 2010 16:27:19 +0100 Subject: don't use QKeySequence::mnemonic() after all it wastes cpu cycles, and it started flooding the console with irrelevant messages. --- tools/linguist/linguist/mainwindow.cpp | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/tools/linguist/linguist/mainwindow.cpp b/tools/linguist/linguist/mainwindow.cpp index 008ebb1..6e5c656 100644 --- a/tools/linguist/linguist/mainwindow.cpp +++ b/tools/linguist/linguist/mainwindow.cpp @@ -94,6 +94,8 @@ #include #include +#include + QT_BEGIN_NAMESPACE static const int MessageMS = 2500; @@ -2356,13 +2358,28 @@ void MainWindow::updatePhraseDicts() static bool haveMnemonic(const QString &str) { - QString mnemonic = QKeySequence::mnemonic(str); - if (mnemonic == QLatin1String("Alt+Space")) { - // "Nobody" ever really uses these, and they are highly annoying - // because we get a lot of false positives. - return false; + for (const ushort *p = (ushort *)str.constData();; ) { // Assume null-termination + ushort c = *p++; + if (!c) + break; + if (c == '&') { + c = *p++; + if (!c) + return false; + // "Nobody" ever really uses these alt-space, and they are highly annoying + // because we get a lot of false positives. + if (c != '&' && c != ' ' && QChar(c).isPrint()) { + const ushort *pp = p; + for (; ::isalpha(*p); p++) ; + if (pp == p || *p != ';') + return true; + // This looks like a HTML &entity;, so ignore it. As a HTML string + // won't contain accels anyway, we can stop scanning here. + break; + } + } } - return !mnemonic.isEmpty(); + return false; } void MainWindow::updateDanger(const MultiDataIndex &index, bool verbose) -- cgit v0.12