From 9e5daecead75e1c7a77679a04a14cee9fd616215 Mon Sep 17 00:00:00 2001 From: Thomas Sondergaard Date: Wed, 20 May 2009 21:22:00 +0200 Subject: Danish translations --- translations/assistant_da.ts | 1134 ++++++++ translations/qt_da.ts | 6317 ++++++++++++++++++++++++++++++++++++++++++ translations/qt_help_da.ts | 354 +++ 3 files changed, 7805 insertions(+) create mode 100644 translations/assistant_da.ts create mode 100644 translations/qt_da.ts create mode 100644 translations/qt_help_da.ts diff --git a/translations/assistant_da.ts b/translations/assistant_da.ts new file mode 100644 index 0000000..d039248 --- /dev/null +++ b/translations/assistant_da.ts @@ -0,0 +1,1134 @@ + + + + + + AboutDialog + + + &Close + &Luk + + + + BookmarkDialog + + + + + + + Bookmarks + Favoritter + + + + Add Bookmark + Føj til Favoritter + + + + Bookmark: + Favorit: + + + + Add in Folder: + Føj til mappen: + + + + + + + + + + New Folder + Ny mappe + + + + Delete Folder + Slet mappe + + + + Rename Folder + Omdøb mappe + + + + BookmarkManager + + + Bookmarks + Favoritter + + + + Remove + Fjern + + + You are going to delete a Folder, this will also<br>remove it's content. Are you sure to continue? + Ved at slette denne mappe fjernes hele mappens<br>indhold. Ønsker du alligevel at slette? + + + + + New Folder + Ny mappe + + + + You are about to delete a folder which means that its content<br>will also be removed. Do you want to continue? + Ved at slette denne mappe fjernes hele mappens indhold.<br>Ønsker du alligevel at slette? + + + + BookmarkWidget + + + Remove + Fjern + + + + Delete Folder + Slet mappe + + + + Rename Folder + Omdøb mappe + + + + Show Bookmark + Vis favorit + + + + Show Bookmark in New Tab + Vis favorit på ny fane + + + + Delete Bookmark + Slet favorit + + + + Rename Bookmark + Omdøb favorit + + + + Search for: + Søg efter: + + + + Add + Tilføj + + + + CentralWidget + + + Add new page + Tilføj ny side + + + + Close current page + Luk nuværende side + + + + Print Document + Udskriv dokument + + + + + unknown + ukendt + + + + Add New Page + Tilføj ny side + + + + Close This Page + Luk denne side + + + + Close Other Pages + Luk de andre sider + + + + Add Bookmark for this Page... + Føj denne side til Favoritter... + + + + Search + Søg + + + + ContentWindow + + + Open Link + Åbn link + + + + Open Link in New Tab + Åbn link på ny fane + + + + FilterNameDialogClass + + + FilterNameDialog + FilterNavnDialog + + + + Filter Name: + Filternavn: + + + + FindWidget + + + Previous + Forrige + + + + Next + Næste + + + + Case Sensitive + Der skelnes mellem store og små bogstaver + + + + Whole words + Hele ord + + + + <img src="%1">&nbsp;Search wrapped + <img src=":/trolltech/assistant/images/wrap.png">&nbsp;Search wrapped + <img src="%1">&nbsp;Søgning startet forfra + + + + FontPanel + + + Font + Skrifttype + + + + &Writing system + &Skrivesystem + + + + &Family + &Familie + + + + &Style + &Stil + + + + &Point size + &Punktstørrelse + + + + HelpViewer + + + Help + Hjælp + + + + OK + + + + + <title>Error 404...</title><div align="center"><br><br><h1>The page could not be found</h1><br><h3>'%1'</h3></div> + <title>Fejl 404...</title><div align="center"><br><br><h1>Siden blev ikke fundet</h1><br><h3>'%1'</h3></div> + + + + Copy &Link Location + Kopiér &linkets placering + + + + Open Link in New Tab Ctrl+LMB + Åbn link på ny fane Ctrl+LMB + + + + Open Link in New Tab + Åbn link på ny fane + + + + <b>Page not found:<p>%1.</p></b> + <b>Kunne ikke finde siden:<p>%1.</p></b> + + + + Unable to launch external application. + + Kunne ikke starte ekstern applikation. + + + + + IndexWindow + + + &Look for: + &Søg efter: + + + + Open Link + Åbn link + + + + Open Link in New Tab + Åbn link på ny fane + + + + InstallDialog + + + + Install Documentation + Installér dokumentation + + + + Downloading documentation info... + Downloader dokumentationsinformation... + + + + Download canceled. + Download blev annulleret. + + + + + + Done. + Færdig. + + + + The file %1 already exists. Do you want to overwrite it? + Filen %1 findes allerede. Ønsker du at overskrive? + + + + Unable to save the file %1: %2. + Kunne ikke gemme filen %1: %2. + + + + Downloading %1... + Downloader %1... + + + + + + Download failed: %1. + Download mislykkedes: %1. + + + + Documentation info file is corrupt! + Dokumentationsinformationsfilen er ødelagt! + + + + Download failed: Downloaded file is corrupted. + Download mislykkedes: Den downloadede fil er ødelagt. + + + + Installing documentation %1... + Installerer dokumentation %1... + + + + Error while installing documentation: +%1 + Der opstod fejl under installation af dokumentation: +%1 + + + + Available Documentation: + Tilgængeligt dokumentation: + + + + Install + Installér + + + + Cancel + Annuller + + + + Close + Luk + + + + Installation Path: + Installationssti: + + + + ... + + + + + MainWindow + + + + Index + Indeks + + + + + Contents + Indhold + + + + + Bookmarks + Favoritter + + + + + Search + Søg + + + + + + Qt Assistant + + + + + + Unfiltered + Ufiltreret + + + Page Set&up... + Side&opsætning... + + + Print Preview... + Vis udskrift... + + + &Print... + &Udskriv... + + + CTRL+P + Ctrl+U + + + + New &Tab + &Ny Fane + + + CTRL+T + Ctrl+N + + + + &Close Tab + &Luk fane + + + CTRL+W + Ctrl+L + + + + &Quit + &Afslut + + + CTRL+Q + Ctrl+A + + + &Copy selected Text + &Kopiér markeret tekst + + + Ctrl+C + Ctrl+K + + + + &Find in Text... + &Find i tekst... + + + + Ctrl+F + + + + + Find &Next + Find N&æste + + + + F3 + + + + + Find &Previous + Find fo&rrige + + + + Shift+F3 + + + + + Preferences... + Indstillinger... + + + + Zoom &in + Zoom &ind + + + + Ctrl++ + + + + + Zoom &out + Zoom u&d + + + + Ctrl+- + + + + + Normal &Size + Normal &størrelse + + + + Ctrl+0 + + + + + &Home + &Hjem + + + + Ctrl+Home + + + + + &Back + &Tilbage + + + + &Forward + Fr&em + + + Sync with Table of Contents + Synkronisér med Indholdsfortegnelse + + + + Next Page + Næste side + + + + Ctrl+Alt+Right + Ctrl+Alt+Højre + + + + Previous Page + Forrige side + + + + Ctrl+Alt+Left + Ctrl+Alt+Venstre + + + + Add Bookmark... + Føj til Favoritter... + + + + About... + Om... + + + + Navigation Toolbar + Navigationsværktøjslinie + + + + Toolbars + Værktøjslinier + + + + Filter Toolbar + Filtrer værktøjslinie + + + + Filtered by: + Filtreret efter: + + + + Address Toolbar + Adresseværktøjslinie + + + + Address: + Adresse: + + + + Could not find the associated content item. + Det tilhørende indholdselement kunne ikke findes. + + + + Open Source Edition + + + + + This version of Qt Assistant is part of the Qt Open Source Edition, for use in the development of Open Source applications. Qt is a comprehensive C++ framework for cross-platform application development. + Denne version af Qt Assistant er en del af Qt Open Source Edition til brug med henblik på udvikling af Open Source-applikationer. Qt er et omfattende C++ framework for cross-platform applikationsudvikling. + + + + This program is licensed to you under the terms of the Qt Commercial License Agreement. For details, see the file LICENSE that came with this software distribution. + Dette program er omfattet af Qt Commercial License Agreement. Se filen LICENCE, der var vedlagt denne software-distribution, for yderligere detaljer. + + + + About %1 + Om %1 + + + + Updating search index + Opdaterer søgeindeks + + + + Looking for Qt Documentation... + Søger efter Qt-dokumentation... + + + + &Window + &Vindue + + + + Minimize + Minimér + + + + Ctrl+M + Ctrl+M + + + + Zoom + + + + + &File + &Filer + + + + &Edit + &Redigér + + + + &View + &Vis + + + + &Go + &Gå til + + + + &Bookmarks + F&avoritter + + + + &Help + &Hjælp + + + + You need a commercial Qt license for development of proprietary (closed source) applications. Please see <a href="http://trolltech.com/company/about/businessmodel">http://trolltech.com/company/about/businessmodel</a> for an overview of Qt licensing. + + + + ALT+O + Alt+F + + + CTRL+D + Ctrl+Ø + + + Ctrl+P + Ctrl+U + + + + Ctrl+T + Ctrl+N + + + + Ctrl+W + Ctrl+L + + + + Ctrl+Q + Ctrl+A + + + + Alt+C + Alt+L + + + + Alt+I + + + + + Alt+O + Alt+F + + + + Alt+S + + + + + Ctrl+D + Ctrl+Ø + + + + PreferencesDialog + + + + + Add Documentation + Tilføj dokumentation + + + + Qt Compressed Help Files (*.qch) + Qt komprimeret hjælpefil (*.qch) + + + + The specified file is not a valid Qt Help File! + Den anførte fil er ikke en gyldig Qt hjælpefil! + + + + The namespace %1 is already registered! + Navnerummet %1 er allerede registreret! + + + + Use custom settings + Benyt brugerdefineret opsætning + + + + PreferencesDialogClass + + + Preferences + Indstillinger + + + + Fonts + Skrifttyper + + + + Font settings: + Indstillinger for skrifttype: + + + + Browser + + + + + Application + Applikation + + + + Filters + Filtre + + + + Filter: + Filter: + + + + Attributes: + Attributter: + + + + 1 + + + + + Add + Tilføj + + + + + Remove + Fjern + + + + Documentation + Dokumentation + + + + Registered Documentation: + Registreret dokumentation: + + + + Add... + Tilføj... + + + + Network + Netværk + + + + Use Http Proxy + Benyt Http Proxy + + + + Http Proxy: + + + + + Port: + + + + + QObject + + + The specified collection file does not exist! + Den angivne hjælpesamling findes ikke! + + + + Missing collection file! + Hjælpesamling mangler! + + + + Invalid URL! + Ugyldig URL! + + + + Missing URL! + URL mangler! + + + + + + Unknown widget: %1 + Ukendt widget: %1 + + + + + + Missing widget! + Widget mangler! + + + + + The specified Qt help file does not exist! + Den angivne Qt-hjælpefil findes ikke! + + + + + Missing help file! + Hjælpefilen mangler! + + + + Unknown option: %1 + Ukendt parameter: %1 + + + + + Qt Assistant + + + + + Could not register documentation file +%1 + +Reason: +%2 + Kunne ikke registrere dokumentationsfil +%1 + +Årsag: +%2 + + + + Documentation successfully registered. + Dokumentationen blev registreret. + + + + Could not unregister documentation file +%1 + +Reason: +%2 + Kunne ikke afregistrere dokumentationsfil +%1 + +Årsag: +%2 + + + + Documentation successfully unregistered. + Dokumentationen blev afregistreret. + + + + The specified collection file could not be read! + Den angivne hjælpesamling kunne ikke læses! + + + + + Bookmark + Favorit + + + + QtDocInstaller + + + The file %1 could not be registered successfully! + +Reason: %2 + Filen %1 kunne ikke registreres! + +Årsag: %2 + + + + RemoteControl + + + Debugging Remote Control + + + + + Received Command: %1 %2 + Modtaget kommando: %1 %2 + + + + SearchWidget + + + &Copy + &Kopiér + + + + Copy &Link Location + Kopiér &linkets placering + + + + + Open Link in New Tab + Åbn link på ny fane + + + + Select All + Markér alt + + + + Open Link + Åbn link + + + + TopicChooser + + + Choose a topic for <b>%1</b>: + Vælg et emne for <b>%1</b>: + + + + Choose Topic + Vælg emne + + + + &Topics + &Emner + + + + &Display + &Vis + + + + &Close + &Luk + + + TopicChooser + Emnevælger + + + unnamed + unavngivet + + + diff --git a/translations/qt_da.ts b/translations/qt_da.ts new file mode 100644 index 0000000..9350687 --- /dev/null +++ b/translations/qt_da.ts @@ -0,0 +1,6317 @@ + + + + + AudioOutput + + + <html>The audio playback device <b>%1</b> does not work.<br/>Falling back to <b>%2</b>.</html> + <html>Audio-playback-enheden<b>%1</b> virker ikke.<br/>Falder tilbage til <b>%2</b>.</html> + + + <html>Switching to the audio playback device <b>%1</b><br/>which just became available and has higher preference.</html> + <html>Skifter til audio-playback-enheden, <b>%1</b><br/>der lige er blevet tilgængeligt og har en højere præference.</html> + + + Revert back to device '%1' + Gå tilbage til enheden '%1' + + + + CloseButton + + + Close Tab + Luk fane + + + + Phonon:: + + + Notifications + Meddelelser + + + Music + Musik + + + Video + + + + Communication + Kommunikation + + + Games + Spil + + + Accessibility + Tilgængelighed + + + + Phonon::Gstreamer::Backend + + + Warning: You do not seem to have the package gstreamer0.10-plugins-good installed. + Some video features have been disabled. + Advarsel: Det ser ikke ud til, at gstreamer0.10-plugins-good pakken er installeret. + Nogle videofunktioner er deaktiveret. + + + Warning: You do not seem to have the base GStreamer plugins installed. + All audio and video support has been disabled + Advarsel: Det ser ikke ud til, at base GStreamer plugins er installeret. + Al audio- og videosupport er deaktiveret + + + + Phonon::Gstreamer::MediaObject + + + Cannot start playback. + +Check your Gstreamer installation and make sure you +have libgstreamer-plugins-base installed. + Kan ikke starte playback. + +Tjek Gstreamer-installationen og kontrollér, at +libgstreamer-plugins-base er installeret. + + + A required codec is missing. You need to install the following codec(s) to play this content: %0 + Der mangler et codec. Følgende codecs skal installeres for at afspille dette indhold: %0 + + + Could not open media source. + Kunne ikke åbne mediekilden. + + + Invalid source type. + Ugyldig kilde. + + + Could not locate media source. + Kunne ikke lokalisere mediekilden. + + + Could not open audio device. The device is already in use. + Kunne ikke åbne lydenheden. Enheden er allerede i brug. + + + Could not decode media source. + Kunne ikke afkode mediekilden. + + + + Phonon::VolumeSlider + + Volume: %1% + + + + Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1% + Anvend denne skyder til at indstille lydstyrken. Længst til venstre er 0% og længst til højre er %1% + + + + Q3Accel + + + %1, %2 not defined + %1, %2 ikke definerede + + + Ambiguous %1 not handled + Tvetydig %1 ikke behandlet + + + + Q3DataTable + + + True + Sandt + + + False + Falsk + + + Insert + Indsæt + + + Update + Opdater + + + Delete + Slet + + + + Q3FileDialog + + + Copy or Move a File + Kopiér eller flyt en fil + + + Read: %1 + Læs: %1 + + + Write: %1 + Skriv: %1 + + + Cancel + Annuller + + + + All Files (*) + Alle filer (*) + + + Name + Navn + + + Size + Størrelse + + + Type + + + + Date + Dato + + + Attributes + Attributter + + + &OK + &OK + + + Look &in: + Kig &i: + + + File &name: + Fil&navn: + + + File &type: + Fil&type: + + + Back + Tilbage + + + One directory up + En mappe op + + + Create New Folder + Opret ny folder + + + List View + Listevisning + + + Detail View + Detaljevisning + + + Preview File Info + Vis filinformation + + + Preview File Contents + Vis filindhold + + + Read-write + Læs-skriv + + + Read-only + Skrivebeskyttet + + + Write-only + Write-only + + + Inaccessible + Utilgængelig + + + Symlink to File + Symlink til Fil + + + Symlink to Directory + Symlink til katalog + + + Symlink to Special + Symlink til Speciel + + + File + Fil + + + Dir + Katalog + + + Special + Speciel + + + + Open + Åbn + + + + Save As + Gem som + + + &Open + &Åbn + + + &Save + &Gem + + + &Rename + &Omdøb + + + &Delete + &Slet + + + R&eload + Gen&indlæs + + + Sort by &Name + Sortér efter n&avn + + + Sort by &Size + Sortér efter s&tørrelse + + + Sort by &Date + Sortér efter &dato + + + &Unsorted + &Usorteret + + + Sort + Sortér + + + Show &hidden files + Vis s&kjulte filer + + + the file + filen + + + the directory + kataloget + + + the symlink + symlinket + + + Delete %1 + Slet %1 + + + <qt>Are you sure you wish to delete %1 "%2"?</qt> + <qt>Er du sikker på, at du vil slette %1 "%2"?</qt> + + + &Yes + &Ja + + + &No + &Nej + + + New Folder 1 + Ny folder 1 + + + New Folder + Ny folder + + + New Folder %1 + Ny folder %1 + + + Find Directory + Find katalog + + + Directories + Kataloger + + + Directory: + Katalog: + + + Error + Fejl + + + %1 +File not found. +Check path and filename. + %1 +Filen blev ikke fundet. +Kontrollér sti og filnavn. + + + All Files (*.*) + Alle filer (*.*) + + + Open + Åbn + + + Select a Directory + Vælg et katalog + + + + Q3LocalFs + + Could not read directory +%1 + Kunne ikke læse katalog +%1 + + + Could not create directory +%1 + Kunne ikke oprette katalog +%1 + + + Could not remove file or directory +%1 + Kunne ikke fjerne fil eller katalog +%1 + + + Could not rename +%1 +to +%2 + Kunne ikke omdøbe +%1 +to +%2 + + + Could not open +%1 + Kunne ikke åbne +%1 + + + Could not write +%1 + Kunne ikke skrive +%1 + + + + Q3MainWindow + + + Line up + Linie op + + + Customize... + Tilpas... + + + + Q3NetworkProtocol + + + Operation stopped by the user + Brugeren stoppede handlingen + + + + Q3ProgressDialog + + Cancel + Annuller + + + + Q3TabDialog + + OK + + + + Apply + Udfør + + + Help + Hjælp + + + Defaults + Standarder + + + Cancel + Annuller + + + + Q3TextEdit + + + &Undo + &Fortryd + + + &Redo + &Gendan + + + Cu&t + &Klip + + + &Copy + K&opiér + + + &Paste + &Sæt ind + + + Clear + Ryd + + + Select All + Markér alt + + + + Q3TitleBar + + + System + + + + Restore up + Gendan op + + + Minimize + Minimer + + + Restore down + Gendan ned + + + Maximize + Maksimér + + + Close + Luk + + + Contains commands to manipulate the window + Indeholder kommandoer til indstilling af vinduet + + + Puts a minimized back to normal + Sætter et minimeret vindue til normal størrelse + + + Moves the window out of the way + Flytter vinduet væk + + + Puts a maximized window back to normal + Sætter et maksimeret vindue til normal størrelse + + + Makes the window full screen + Gør vinduet til fuld skærm + + + Closes the window + Lukker vinduet + + + Displays the name of the window and contains controls to manipulate it + Viser vinduets navn og indeholder kontroller til indstilling af vinduet + + + + Q3ToolBar + + + More... + Mere... + + + + Q3UrlOperator + + The protocol `%1' is not supported + Protokollen '%1' understøttes ikke + + + The protocol `%1' does not support listing directories + Protokollen '%1' understøtter ikke opremsning af kataloger + + + The protocol `%1' does not support creating new directories + Protokollen '%1' understøtter ikke oprettelse af nye kataloger + + + The protocol `%1' does not support removing files or directories + Protokollen '%1' understøtter ikke, at filer eller kataloger fjernes + + + The protocol `%1' does not support renaming files or directories + Protokollen '%1' understøtter ikke, at filer eller kataloger omdøbes + + + The protocol `%1' does not support getting files + Protokollen '%1' understøtter ikke hentning af filer + + + The protocol `%1' does not support putting files + Protokollen '%1' understøtter ikke upload af filer + + + The protocol `%1' does not support copying or moving files or directories + Protokollen '%1' understøtter ikke kopiering eller flytning af filer eller kataloger + + + (unknown) + (ukendt) + + + + Q3Wizard + + + &Cancel + &Annuller + + + < &Back + < &Tilbage + + + &Next > + &Næste > + + + &Finish + &Udfør + + + &Help + &Hjælp + + + + QAbstractSocket + + Host not found + Host blev ikke fundet + + + + Connection refused + Forbindelse afvist + + + Connection timed out + Forbindelsen timed out + + + Operation on socket is not supported + Socket-operation ikke understøttet + + + Socket operation timed out + Socket-operation timed out + + + Socket is not connected + Socket ikke forbundet + + + Network unreachable + Netværket er ikke tilgængeligt + + + + QAbstractSpinBox + + + &Step up + &Trin op + + + Step &down + Trin &ned + + + &Select All + &Vælg alle + + + + QApplication + + + Activate + Aktivér + + + + Executable '%1' requires Qt %2, found Qt %3. + Eksekverbar '%1' kræver Qt %2, ikke fundet Qt %3. + + + Incompatible Qt Library Error + Inkompatibel Qt Library fejl + + + + 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. + + + + + Activates the program's main window + Aktiverer programmets hovedvindue + + + + QAxSelect + + Select ActiveX Control + Vælg ActiveX-kontrol + + + OK + + + + &Cancel + &Annuller + + + COM &Object: + COM &Objekt: + + + + QCheckBox + + + Uncheck + Fjern markering + + + Check + Kryds af + + + Toggle + Slå til/fra + + + + QColorDialog + + + Hu&e: + Ton&e: + + + &Sat: + &Mæt: + + + &Val: + &Vær: + + + &Red: + &Rød: + + + &Green: + &Grøn: + + + Bl&ue: + Bl&å: + + + A&lpha channel: + Al&fa-kanal: + + + Select Color + Vælg farve + + + &Basic colors + &Basisfarver + + + &Custom colors + &Egne farver + + + &Add to Custom Colors + &Føj til egne farver + + + + QComboBox + + Open + Åbn + + + + False + Falsk + + + True + Sandt + + + + Close + Luk + + + + QCoreApplication + + + %1: key is empty + QSystemSemaphore + %1: nøgle er tom + + + %1: unable to make key + QSystemSemaphore + %1: kunne ikke lave nøgle + + + %1: ftok failed + QSystemSemaphore + %1: ftok mislykkedes + + + + QDB2Driver + + + Unable to connect + Kunne ikke skabe forbindelse + + + Unable to commit transaction + Kunne ikke gennemføre transaktion + + + Unable to rollback transaction + Kunne ikke tilbagetrække transaktion + + + Unable to set autocommit + Kunne ikke aktivere autocommit + + + + QDB2Result + + Unable to execute statement + Kunne ikke udføre statement + + + Unable to prepare statement + Kunne ikke forberede udsagn + + + Unable to bind variable + Kunne ikke binde variabel + + + Unable to fetch record %1 + Kunne ikke hente post %1 + + + Unable to fetch next + Kunne ikke hente næste + + + Unable to fetch first + Kunne ikke hente første + + + + QDateTimeEdit + + + AM + + + + am + + + + PM + + + + pm + + + + + QDial + + + QDial + + + + SpeedoMeter + Speedometer + + + SliderHandle + + + + + QDialog + + + What's This? + Hvad er dette? + + + Done + Udført + + + + QDialogButtonBox + + + OK + + + + + &OK + + + + &Save + &Gem + + + Save + Gem + + + Open + Åbn + + + &Cancel + &Annuller + + + Cancel + Annuller + + + &Close + &Luk + + + Close + Luk + + + Apply + Udfør + + + Reset + Nulstil + + + Help + Hjælp + + + Don't Save + Gem ikke + + + Discard + Kassér + + + &Yes + &Ja + + + Yes to &All + Ja til &alle + + + &No + &Nej + + + N&o to All + Ne&j til alle + + + Save All + Gem alle + + + Abort + Afbryd + + + Retry + Prøv igen + + + Ignore + Ignorer + + + Restore Defaults + Gendan standardværdier + + + Close without Saving + Luk uden at gemme + + + + QDirModel + + + Name + Navn + + + Size + Størrelse + + + Kind + Match OS X Finder + Type + + + Type + All other platforms + + + + Date Modified + Ændringsdato + + + + QDockWidget + + + Close + Luk + + + Dock + Låst + + + Float + Flydende + + + + QDoubleSpinBox + + More + Mere + + + Less + Mindre + + + + QErrorMessage + + + Debug Message: + Debug-besked: + + + Warning: + Advarsel: + + + Fatal Error: + Fatal fejl: + + + &Show this message again + &Vis denne besked igen + + + &OK + + + + + QFile + + Destination file exists + Destinationsfil findes + + + Cannot open %1 for input + Kan ikke åbne %1 til input + + + Cannot open for output + Kan ikke åbne til output + + + Failure to write block + Kunne ikke skrive blok + + + Cannot create %1 for output + Kunne ikke oprette %1 til output + + + + QFileDialog + + All Files (*) + Alle filer (*) + + + Directories + Kataloger + + + &Open + &Åbn + + + &Save + &Gem + + + Open + Åbn + + + %1 already exists. +Do you want to replace it? + %1 findes allerede. +Ønsker du at erstatte den? + + + %1 +File not found. +Please verify the correct file name was given. + %1 +Filen kunne ikke findes. +Kontrollér, at det rigtige filnavn er indtastet. + + + + My Computer + Min computer + + + &Rename + &Omdøb + + + &Delete + &Slet + + + Show &hidden files + Vis s&kjulte filer + + + Back + Tilbage + + + Parent Directory + Ovenliggende katalog + + + List View + Listevisning + + + Detail View + Detaljevisning + + + Files of type: + Filer af typen: + + + Directory: + Katalog: + + + %1 +Directory not found. +Please verify the correct directory name was given. + %1 +Katalog kunne ikke findes. +Kontrollér, at det rigtige katalognavn er indtastet. + + + '%1' is write protected. +Do you want to delete it anyway? + '%1' er skrivebeskyttet. +Ønsker du alligevel at slette? + + + Are sure you want to delete '%1'? + Er du sikker på, at '%1' skal slettes? + + + Could not delete directory. + Kunne ikke slette kataloget. + + + Recent Places + Aktuelle steder + + + + All Files (*.*) + Alle filer (*.*) + + + Save As + Gem som + + + + Drive + Drev + + + File + Fil + + + Unknown + Ukendt + + + Find Directory + Find katalog + + + Show + Vis + + + Forward + Frem + + + + New Folder + Ny folder + + + &New Folder + &Ny folder + + + &Choose + &Vælg + + + + Remove + Fjern + + + File &name: + &Filnavn: + + + Look in: + Søg i: + + + Create New Folder + Opret ny folder + + + + QFileSystemModel + + + Invalid filename + Ugyldigt filnavn + + + <b>The name "%1" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks. + <b>Navnet, %1, kan ikke benyttes.</b><p>Brug et andet navn med færre tegn og ingen kommatering. + + + Name + Navn + + + Size + Størrelse + + + Kind + Match OS X Finder + Type + + + Type + All other platforms + + + + Date Modified + Ændringsdato + + + + My Computer + Min computer + + + Computer + + + + %1 TB + %1 TB + + + %1 GB + %1 GB + + + %1 MB + %1 MB + + + %1 KB + %1 KB' + + + %1 bytes + %1 bytes + + + + QFontDatabase + + Normal + + + + Bold + Fed + + + Demi Bold + + + + Black + Sort + + + Demi + + + + Light + Lys + + + Italic + Kursiv + + + Oblique + Skråt + + + Any + Alle + + + Latin + + + + Greek + Græsk + + + Cyrillic + Kyrillisk + + + Armenian + Armensk + + + Hebrew + Hebræisk + + + Arabic + Arabisk + + + Syriac + Syrisk + + + Thaana + + + + Devanagari + + + + Bengali + Bengalsk + + + Gurmukhi + + + + Gujarati + + + + Oriya + + + + Tamil + + + + Telugu + + + + Kannada + + + + Malayalam + + + + Sinhala + + + + Thai + Thailandsk + + + Lao + + + + Tibetan + Tibetansk + + + Myanmar + + + + Georgian + georgisk + + + Khmer + + + + Simplified Chinese + Forenklet kinesisk + + + Traditional Chinese + Traditionelt kinesisk + + + Japanese + Japansk + + + Korean + Koreansk + + + Vietnamese + Vietnamesisk + + + Symbol + + + + Ogham + + + + Runic + + + + + QFontDialog + + + &Font + S&krifttype + + + Font st&yle + S&til + + + &Size + &Størrelse + + + Effects + Effekter + + + Stri&keout + &Overstreget + + + &Underline + &Understreg + + + Sample + Eksempel + + + Wr&iting System + Skr&ivesystem + + + Select Font + Vælg skrifttype + + + + QFtp + + + Not connected + Ingen forbindelse + + + + Host %1 not found + Vært %1 ikke fundet + + + + Connection refused to host %1 + Forbindelse til vært %1 afvist + + + Connection timed out to host %1 + Forbindelsen timed out til host %1 + + + Connected to host %1 + Tilsluttet vært %1 + + + Connection refused for data connection + Dataforbindelse afvist + + + Unknown error + Ukendt fejl + + + + Connecting to host failed: +%1 + Forbindelse til vært mislykkedes: +%1 + + + + Login failed: +%1 + Login mislykkedes: +%1 + + + + Listing directory failed: +%1 + Opremsning af katalogindhold mislykkedes: +%1 + + + + Changing directory failed: +%1 + Ændring af katalog mislykkedes: +%1 + + + + Downloading file failed: +%1 + Downloading af fil mislykkedes: +%1 + + + + Uploading file failed: +%1 + Uploading af fil mislykkedes: +%1 + + + + Removing file failed: +%1 + Det mislykkedes at fjerne fil: +%1 + + + + Creating directory failed: +%1 + Oprettelse af katalog mislykkedes: +%1 + + + + Removing directory failed: +%1 + Det mislykkedes at fjerne katalog: +%1 + + + Connection closed + Forbindelse lukket + + + Host %1 found + Vært %1 fundet + + + Connection to %1 closed + Forbindelse til %1 lukket + + + Host found + Vært fundet + + + Connected to host + Tilsluttet vært + + + + QHostInfo + + + Unknown error + Ukendt fejl + + + + QHostInfoAgent + + Host not found + Vært ikke fundet + + + Unknown address type + Ukendt adressetype + + + Unknown error + Ukendt fejl + + + + QHttp + + Unknown error + Ukendt fejl + + + Request aborted + Forespørgsel blev annulleret + + + + No server set to connect to + Ingen server at forbinde til + + + + Wrong content length + Forkert indholdslængde + + + + Server closed connection unexpectedly + Serveren afsluttede uventet forbindelsen + + + Error writing response to device + Skrivefejl mens der blev skrevet til enheden + + + + Connection refused + Forbindelse afvist + + + + Host %1 not found + Vært %1 ikke fundet + + + + HTTP request failed + HTTP anmodning mislykkedes + + + + Invalid HTTP response header + Ugyldig HTTP-svar-header + + + Invalid HTTP chunked body + Ugyldig HTTP chunked body + + + + Host %1 found + Vært %1 fundet + + + Connected to host %1 + Tilsluttet vært %1 + + + Connection to %1 closed + Forbindelse til %1 lukket + + + Host found + Vært fundet + + + Connected to host + Tilsluttet vært + + + + Connection closed + Forbindelse lukket + + + Proxy authentication required + Kræver proxy-autentificering + + + Authentication required + Autentificering påkrævet + + + Connection refused (or timed out) + Forbindelse blev afvist (eller tid udløb) + + + + Proxy requires authentication + Proxy kræver autentificering + + + Host requires authentication + Vært kræver autentificering + + + Data corrupted + Data er ødelagt + + + Unknown protocol specified + En ukendt protokol blev angivet + + + SSL handshake failed + SSL handshake mislykkedes + + + HTTPS connection requested but SSL support not compiled in + Der blevet anmodet om en HTTPS-forbindelse, men SSL understøttelse er ikke kompileret ind + + + + QHttpSocketEngine + + Did not receive HTTP response from proxy + Modtog ikke HTTP-svar fra proxy + + + Error parsing authentication request from proxy + Fejl under fortolking af autentificeringsanmodning fra proxy + + + Authentication required + Autentificering påkrævet + + + Proxy denied connection + Proxy nægtede forbindelse + + + Error communicating with HTTP proxy + Fejl under kommunikation med HTTP-proxy + + + Proxy server not found + Proxy-server kunne ikke findes + + + Proxy connection refused + Proxy-forbindelse nægtede + + + Proxy server connection timed out + Proxy-serverforbindelse timed out + + + Proxy connection closed prematurely + Proxy-forbindelse afsluttede i utide + + + + QIBaseDriver + + + Error opening database + Der opstod fejl ved åbning af database + + + Could not start transaction + Kunne ikke påbegynde transaktionen + + + Unable to commit transaction + Kunne ikke gennemføre transaktionen + + + Unable to rollback transaction + Kunne ikke tilbagetrække transaktionen + + + + QIBaseResult + + Unable to create BLOB + Kunne ikke oprette BLOB + + + Unable to write BLOB + Kunne ikke skrive BLOB + + + Unable to open BLOB + Kunne ikke åbne BLOB + + + Unable to read BLOB + Kunne ikke læse BLOB + + + Could not find array + Kunne ikke finde array + + + Could not get array data + Kunne ikke hente arraydata + + + Could not get query info + Kunne ikke hente forespørgselsinfo + + + Could not start transaction + Kunne ikke påbegynde transaktionen + + + Unable to commit transaction + Kunne ikke gennemføre transaktionen + + + Could not allocate statement + Kunne ikke allokere statement + + + Could not prepare statement + Kunne ikke forberede udsagn + + + Could not describe input statement + Kunne ikke beskrive input-statement + + + Could not describe statement + Kunne ikke beskrive statement + + + Unable to close statement + Kunne ikke lukke udsagn + + + Unable to execute query + Kunne ikke udføre forespørgsel + + + Could not fetch next item + Kunne ikke hente næste element + + + Could not get statement info + Kunne ikke hente udsagnsinformation + + + + QIODevice + + + Permission denied + Tilladelse nægtet + + + Too many open files + Der er for mange åbne filer + + + No such file or directory + Fil eller katalog findes ikke + + + No space left on device + Ingen plads tilbage på enheden + + + + Unknown error + Ukendt fejl + + + + QInputContext + + + XIM + + + + XIM input method + XIM input-metode + + + Windows input method + Windows input-metode + + + Mac OS X input method + Mac OS X input-metode + + + + QInputDialog + + + Enter a value: + Indtast en værdi: + + + + QLibrary + + + Could not mmap '%1': %2 + + + + Plugin verification data mismatch in '%1' + Plugin-verifikationsdata er sat forkert sammen i '%1' + + + Could not unmap '%1': %2 + Der var ikke muligt at lave unmap på '%1': %2 + + + The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5] + Plugin '%1' bruger inkompatibelt Qt-bibliotek. (%2.%3.%4) [%5] + + + The plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3" + Plugin '%1' bruger inkompatibelt Qt-bibliotek. Forventet build key "%2", hentede "%3"' + + + Unknown error + Ukendt fejl' + + + + The shared library was not found. + DSO blev ikke fundet. + + + The file '%1' is not a valid Qt plugin. + Filen '%1' er ikke et gyldigt Qt-plugin. + + + The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.) + Plugin '%1' bruger inkompatibelt Qt-bibliotek. (Ikke muligt at mikse debug og release-biblioteker) + + + + Cannot load library %1: %2 + Kan ikke indlæse bibliotek %1: %2 + + + + Cannot unload library %1: %2 + Kan ikke afregistrere bibliotek %1: %2 + + + + Cannot resolve symbol "%1" in %2: %3 + Kan ikke løse symbol "%1" i %2: %3 + + + + QLineEdit + + + &Undo + &Fortryd + + + &Redo + &Gendan + + + Cu&t + K&lip + + + &Copy + &Kopiér + + + &Paste + &Sæt ind + + + Delete + Slet + + + Select All + Markér alt + + + + QLocalServer + + + %1: Name error + %1: Navnefejl + + + %1: Permission denied + %1: Tilladelse nægtet + + + %1: Address in use + %1: Adresse i brug + + + + %1: Unknown error %2 + %1: Ukendt fejl %2 + + + + QLocalSocket + + + %1: Connection refused + %1: Forbindelse afvist + + + + %1: Remote closed + %1: Den anden ende lukkede + + + %1: Invalid name + %1: Ugyldigt navn + + + + %1: Socket access error + %1: Fejl i socket-adgang + + + + %1: Socket resource error + %1: Fejl i socket-ressource + + + + %1: Socket operation timed out + %1: Socket-handling timed out + + + + %1: Datagram too large + %1: Datagram er for stort + + + %1: Connection error + %1: Forbindelsesfejl + + + + %1: The socket operation is not supported + %1: Socket-handlingen understøttes ikke + + + %1: Unknown error + %1: Ukendt fejl + + + + %1: Unknown error %2 + %1: Ukendt fejl %2 + + + + QMYSQLDriver + + + Unable to open database ' + Kunne ikke åbne databasen ' + + + Unable to connect + Kunne ikke forbinde + + + Unable to begin transaction + Kunne ikke påbegynde transaktionen + + + Unable to commit transaction + Kunne ikke gennemføre transaktionen + + + Unable to rollback transaction + Kunne ikke tilbagetrække transaktionen + + + + QMYSQLResult + + Unable to fetch data + Kunne ikke hente data + + + Unable to execute query + Kunne ikke udføre forespørgsel + + + Unable to store result + Kunne ikke gemme resultatet + + + Unable to prepare statement + Kunne ikke forberede udsagn + + + Unable to reset statement + Kunne ikke nulstille udsagn + + + Unable to bind value + Kunne ikke tildele værdi + + + Unable to execute statement + Kunne ikke udføre udsagn + + + Unable to bind outvalues + Kunne ikke binde udværdier + + + Unable to store statement results + Kunne ikke gemme udsagnsresultater + + + Unable to execute next query + Kunne ikke udføre næste forespørgsel + + + Unable to store next result + Kunne ikke gemme næste resultat + + + + QMdiArea + + + (Untitled) + (Uden titel) + + + + QMdiSubWindow + + + %1 - [%2] + + + + Close + Luk + + + Minimize + Minimér + + + Restore Down + Gendan Ned + + + &Restore + &Gendan + + + &Move + &Flyt + + + &Size + &Størrelse + + + Mi&nimize + Mi&nimér + + + Ma&ximize + Ma&ksimér + + + Stay on &Top + Bliv &oppe + + + &Close + &Luk + + + - [%1] + + + + Maximize + Maksimér + + + Unshade + Fjern skygge + + + Shade + Skygge + + + Restore + Gendan + + + Help + Hjælp + + + Menu + + + + + QMenu + + Close + Luk + + + Open + Åbn + + + Execute + Udfør + + + + QMessageBox + + Help + Hjælp + + + OK + + + + About Qt + Om Qt + + + <p>This program uses Qt version %1.</p> + <p>Dette program bruger Qt-version %1.</p> + + + Show Details... + Vis detaljer... + + + Hide Details... + Skjul detaljer... + + + <h3>About Qt</h3>%1<p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is a Nokia product. See <a href="http://qtsoftware.com/qt/">qtsoftware.com/qt/</a> for more information.</p> + <h3>Om Qt</h3>%1<p>Qt er et C++ toolkit til cross-platform applikationsudvikling.</p><p>Qt tilbyder single-source portabilitet til MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, og alle større kommercielle Unix-varianter. Qt er også tilgængeligt til indlejrede systemer som Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt er et Nokia produkt. Se <a href="http://qtsoftware.com/qt/">qtsoftware.com/qt/</a> for yderligere information.</p> + + + <p>This program uses Qt Open Source Edition version %1.</p><p>Qt Open Source Edition is intended for the development of Open Source applications. You need a commercial Qt license for development of proprietary (closed source) applications.</p><p>Please see <a href="http://qtsoftware.com/company/model/">qtsoftware.com/company/model/</a> for an overview of Qt licensing.</p> + <p>Dette program bruger Qt Open Source Edition version %1.</p><p>Qt Open Source Edition er beregnet til udvikling af Open Source applikationer. En kommerciel Qt licens er nødvendig til udvikling af proprietære (lukket sourcekode) applikationer.</p><p>Se venligst <a href="http://qtsoftware.com/company/model/">qtsoftware.com/company/model/</a> for et overblik over Qt licensforhold.</p> + + + + QMultiInputContext + + + Select IM + Markér IM + + + + QMultiInputContextPlugin + + + Multiple input method switcher + Multiple input metode-switcher + + + Multiple input method switcher that uses the context menu of the text widgets + Multiple input metode-switcher, der benytter tekstkontrollernes kontekstmenuer + + + + QNativeSocketEngine + + + The remote host closed the connection + Fjern-hosten lukkede forbindelsen + + + Network operation timed out + Netværksoperationen timed out + + + Out of resources + Ikke flere ressourcer + + + Unsupported socket operation + Socket-operation ikke understøttet + + + Protocol type not supported + Protokoltypen understøttes ikke + + + Invalid socket descriptor + Ugyldig socket-deskriptor + + + Network unreachable + Netværket er ikke tilgængeligt + + + Permission denied + Tilladelse nægtet + + + Connection timed out + Forbindelsen timed out + + + Connection refused + Forbindelse afvist + + + The bound address is already in use + Den bundne adresse er allerede i brug + + + The address is not available + Adressen er ikke tilgængelig + + + The address is protected + Adressen er beskyttet + + + Unable to send a message + Kunne ikke sende en besked + + + Unable to receive a message + Kunne ikke modtage en besked + + + Unable to write + Kunne ikke skrive + + + Network error + Netværksfejl + + + Another socket is already listening on the same port + En anden socket lytter allerede på samme port + + + Unable to initialize non-blocking socket + Kunne ikke initialisere non-blocking socket + + + Unable to initialize broadcast socket + Kunne ikke initialisere broadcast-socket + + + Attempt to use IPv6 socket on a platform with no IPv6 support + Forsøg på at bruge IPv6-socket på en platform uden IPv6-support + + + Host unreachable + Vært er ikke tilgængelig + + + Datagram was too large to send + Datagrammet var for stort til at blive sendt + + + Operation on non-socket + Handling på non-socket + + + Unknown error + Ukendt fejl + + + The proxy type is invalid for this operation + Proxytypen er ugyldig til denne handling + + + + QNetworkAccessCacheBackend + + + Error opening %1 + Der opstod fejl i at åbne %1 + + + + QNetworkAccessFileBackend + + + Request for opening non-local file %1 + Anmodning om at åbne ikke-lokal fil %1 + + + Error opening %1: %2 + Der opstod fejl i at åbne %1: %2 + + + Write error writing to %1: %2 + Skrivefejl mens der blev skrevet til %1: %2 + + + Cannot open %1: Path is a directory + Kan ikke åbne %1: Stien er et katalog + + + Read error reading from %1: %2 + Læsefejl mens der blev læst fra %1: %2 + + + + QNetworkAccessFtpBackend + + + No suitable proxy found + Ingen passende proxy blev fundet + + + Cannot open %1: is a directory + Kan ikke åbne %1: Er et katalog + + + Logging in to %1 failed: authentication required + Der opstod fejl i at logge på %1: Autentificering kræves + + + Error while downloading %1: %2 + Der opstod fejl i at downloade %1: %2 + + + Error while uploading %1: %2 + Der opstod fejl i at uploade %1: %2 + + + + QNetworkAccessHttpBackend + + + No suitable proxy found + Ingen passende proxy blev fundet + + + + QNetworkReply + + Error downloading %1 - server replied: %2 + Der opstod fejl i at downloade %1 - serveren svarede: %2 + + + + Protocol "%1" is unknown + Protokollen "%1" er ukendt + + + + QNetworkReplyImpl + + Operation canceled + Handling blev annulleret + + + + QOCIDriver + + + Unable to logon + Kunne ikke logge på + + + Unable to initialize + QOCIDriver + Kunne ikke initialisere + + + Unable to begin transaction + Kunne ikke påbegynde transaktionen + + + Unable to commit transaction + Kunne ikke gennemføre transaktionen + + + Unable to rollback transaction + Kunne ikke tilbagetrække transaktionen + + + + QOCIResult + + Unable to bind column for batch execute + Kunne ikke tildele kolonne til batch-udførsel + + + Unable to execute batch statement + Kunne ikke udføre batch-udsagn + + + Unable to goto next + Kunne ikke gå til den næste + + + Unable to alloc statement + Kunne ikke allokere udsagn + + + Unable to prepare statement + Kunne ikke forberede udsagn + + + Unable to bind value + Kunne ikke tildele værdi + + + Unable to execute select statement + Kunne ikke udføre det valgte udsagn + + + Unable to execute statement + Kunne ikke udføre udsagn + + + + QODBCDriver + + + Unable to connect + Kunne ikke forbinde + + + Unable to connect - Driver doesn't support all needed functionality + Kunne ikke forbinde. Driveren understøtter ikke alle de nødvendige funktionaliteter + + + Unable to disable autocommit + Kunne ikke slå auto-udfør fra + + + Unable to commit transaction + Kunne ikke gennemføre transaktionen + + + Unable to rollback transaction + Kunne ikke tilbagetrække transaktionen + + + Unable to enable autocommit + Kunne ikke slå auto-udfør til + + + + QODBCResult + + QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration + QODBCResult::reset: Kunne ikke indstille 'SQL_CURSOR_STATIC' til udsagnsattribut. Kontrollér ODBC-driver-konfigurationen + + + Unable to execute statement + Kunne ikke udføre udsagn + + + Unable to fetch next + Kunne ikke hente den næste + + + Unable to prepare statement + Kunne ikke forberede udsagn + + + Unable to bind variable + Kunne ikke tildele variabel + + + Unable to fetch last + Kunne ikke hente den sidste + + + Unable to fetch + Kunne ikke hente + + + Unable to fetch first + Kunne ikke hente den første + + + Unable to fetch previous + Kunne ikke hente den forrige + + + + QObject + + + Home + Hjem + + + + Operation not supported on %1 + Handling blev ikke understøttet på %1 + + + Invalid URI: %1 + Ugyldig URI: %1 + + + + Write error writing to %1: %2 + Skrivefejl mens der blev skrevet til %1: %2 + + + Read error reading from %1: %2 + Læsefejl mens der blev læst fra %1: %2 + + + Socket error on %1: %2 + Socket-fejl på %1: %2 + + + Remote host closed the connection prematurely on %1 + Fjern-host lukkede forbindelsen for tidligt på %1 + + + Protocol error: packet of size 0 received + Protokolfejl: Pakke på størrelsen 0 modtaget + + + No host name given + Hostnavn mangler + + + + QPPDOptionsModel + + + Name + Navn + + + Value + Værdi + + + + QPSQLDriver + + + Unable to connect + Kunne ikke skabe forbindelse + + + Could not begin transaction + Kunne ikke påbegynde transaktion + + + Could not commit transaction + Kunne ikke gennemføre transaktion + + + Could not rollback transaction + Kunne ikke tilbagetrække transaktion + + + Unable to subscribe + Kunne ikke tilmelde + + + Unable to unsubscribe + Kunne ikke afmelde + + + + QPSQLResult + + Unable to create query + Kunne ikke oprette forespørgsel + + + Unable to prepare statement + Kunne ikke forberede udsagn + + + + QPageSetupWidget + + + Centimeters (cm) + Centimeter (cm) + + + Millimeters (mm) + Millimeter (mm) + + + Inches (in) + + + + Points (pt) + Point (pt) + + + Form + + + + Paper + Papir + + + Page size: + Sidestørrelse: + + + Width: + Vidde: + + + Height: + Højde: + + + Paper source: + Papirkilde: + + + Orientation + + + + Portrait + Portræt + + + Landscape + Landskab + + + Reverse landscape + Omvendt landskab + + + Reverse portrait + Omvendt portræt + + + Margins + Margener + + + top margin + Margen - øverst + + + left margin + Margen - venstre + + + right margin + Margen - højre + + + bottom margin + Margen - bund + + + + QPluginLoader + + + Unknown error + Ukendt fejl + + + The plugin was not loaded. + Plugin blev ikke indlæst. + + + + QPrintDialog + + + locally connected + lokalt forbundet + + + Aliases: %1 + Aliasser: %1 + + + unknown + Ukendt + + + + A0 (841 x 1189 mm) + + + + A1 (594 x 841 mm) + + + + A2 (420 x 594 mm) + + + + A3 (297 x 420 mm) + + + + A4 (210 x 297 mm, 8.26 x 11.7 inches) + + + + A5 (148 x 210 mm) + + + + A6 (105 x 148 mm) + + + + A7 (74 x 105 mm) + + + + A8 (52 x 74 mm) + + + + A9 (37 x 52 mm) + + + + B0 (1000 x 1414 mm) + + + + B1 (707 x 1000 mm) + + + + B2 (500 x 707 mm) + + + + B3 (353 x 500 mm) + + + + B4 (250 x 353 mm) + + + + B5 (176 x 250 mm, 6.93 x 9.84 inches) + + + + B6 (125 x 176 mm) + + + + B7 (88 x 125 mm) + + + + B8 (62 x 88 mm) + + + + B9 (44 x 62 mm) + + + + B10 (31 x 44 mm) + + + + C5E (163 x 229 mm) + + + + DLE (110 x 220 mm) + + + + Executive (7.5 x 10 inches, 191 x 254 mm) + + + + Folio (210 x 330 mm) + + + + Ledger (432 x 279 mm) + + + + Legal (8.5 x 14 inches, 216 x 356 mm) + + + + Letter (8.5 x 11 inches, 216 x 279 mm) + + + + Tabloid (279 x 432 mm) + + + + US Common #10 Envelope (105 x 241 mm) + + + + + OK + + + + Print + Udskriv + + + Print To File ... + Udskriv til fil... + + + + Print range + Udskriftsområde + + + Print all + Udskriv alle + + + + File %1 is not writable. +Please choose a different file name. + Filen %1 kan ikke skrives. +Vælg et andet filnavn. + + + %1 already exists. +Do you want to overwrite it? + %1 findes allerede. +Ønsker du at overskrive? + + + File exists + Fil findes + + + <qt>Do you want to overwrite it?</qt> + <qt>Ønsker du at overskrive?</qt> + + + Print selection + Udskriv markerede + + + %1 is a directory. +Please choose a different file name. + %1 er et katalog. +Vælg et andet filnavn. + + + A0 + + + + A1 + + + + A2 + + + + A3 + + + + A4 + + + + A5 + + + + A6 + + + + A7 + + + + A8 + + + + A9 + + + + B0 + + + + B1 + + + + B2 + + + + B3 + + + + B4 + + + + B5 + + + + B6 + + + + B7 + + + + B8 + + + + B9 + + + + B10 + + + + C5E + + + + DLE + + + + Executive + + + + Folio + + + + Ledger + + + + Legal + + + + Letter + + + + Tabloid + + + + US Common #10 Envelope + + + + Custom + Brugerdefineret + + + &Options >> + &Indstillinger>> + + + &Print + &Udskriv + + + &Options << + &Indstillinger<< + + + Print to File (PDF) + Udskriv til fil (PDF) + + + Print to File (Postscript) + Udskriv til fil (Postscript) + + + Local file + Lokal fil + + + Write %1 file + Skriv %1 fil + + + + The 'From' value cannot be greater than the 'To' value. + 'Fra'-værdien kan ikke være større end 'til'-værdien. + + + + QPrintPreviewDialog + + Page Setup + Sideopsætning + + + + %1% + + + + Print Preview + Vis udskrift + + + Next page + Næste side + + + Previous page + Forrige side + + + First page + Første side + + + Last page + Sidste side + + + Fit width + Tilpas bredde + + + Fit page + Tilpas siden + + + Zoom in + Zoom ind + + + Zoom out + Zoom ud + + + Portrait + Portræt + + + Landscape + Landskab + + + Show single page + Vis enkelt side + + + Show facing pages + Vis sideopslag + + + Show overview of all pages + Vis oversigt af alle sider + + + Print + Udskriv + + + Page setup + Sideopsætning + + + Close + Luk + + + Export to PDF + Eksportér til PDF + + + Export to PostScript + Eksportér til PostScript + + + + QPrintPropertiesWidget + + Form + Form + + + Page + Side + + + Advanced + Avanceret + + + + QPrintSettingsOutput + + Form + + + + Copies + Kopier + + + Print range + Udskriv sider + + + Print all + Udskriv alle + + + Pages from + Sider fra + + + to + til + + + Selection + Valg + + + Output Settings + Udskriftsindstillinger + + + Copies: + Kopier: + + + Collate + Samordne + + + Reverse + Omvendt + + + Options + Valgmuligheder + + + Color Mode + Farvetilstand + + + Color + Farve + + + Grayscale + Gråskala + + + Duplex Printing + Dobbelsidet + + + None + Ingen + + + Long side + Bog + + + Short side + Tavle + + + + QPrintWidget + + Form + + + + Printer + ' + + + &Name: + &Navn: + + + P&roperties + &Egenskaber + + + Location: + Placering: + + + Preview + Vis udskrift + + + Type: + + + + Output &file: + Udskrifts&fil: + + + ... + + + + + QProcess + + + Could not open input redirection for reading + Kunne ikke åbne input redirection for læsning + + + + Could not open output redirection for writing + Kunne ikke åbne output redirection for skrivning + + + Resource error (fork failure): %1 + Ressource fejl (fork fejl): %1 + + + Process operation timed out + Proces-operation time out + + + Error reading from process + Fejl ved læsning fra proces + + + + Error writing to process + Fejl ved skrivning til proces + + + Process crashed + Proces crashede + + + Process failed to start + Processen kunne ikke starte + + + + QProgressDialog + + + Cancel + Annuller + + + + QPushButton + + Open + Åbn + + + + QRadioButton + + Check + Kontrollér + + + + QRegExp + + + no error occurred + der opstod ingen fejl + + + disabled feature used + deaktiveret funktion blev brugt + + + bad char class syntax + dårlig char class syntaks + + + bad lookahead syntax + dårlig lookahead syntaks + + + bad repetition syntax + dårlig gentagelsessyntaks + + + invalid octal value + ugyldigt oktal-tal + + + missing left delim + Manglende venstre delimiter + + + unexpected end + uventet afslutning + + + met internal limit + nåede interne grænse + + + + QSQLite2Driver + + + Error to open database + Der opstod fejl ved åbning af database + + + Unable to begin transaction + Kunne ikke påbegynde transaktionen + + + Unable to commit transaction + Kunne ikke gennemføre transaktionen + + + Unable to rollback Transaction + Kunne ikke tilbagetrække transaktion + + + + QSQLite2Result + + Unable to fetch results + Kunne ikke hente resultater + + + Unable to execute statement + Kunne ikke udføre statement + + + + QSQLiteDriver + + + Error opening database + Der opstod fejl ved åbning af database + + + Error closing database + Der opstod fejl ved lukning af database + + + Unable to begin transaction + Kunne ikke påbegynde transaktionen + + + Unable to commit transaction + Kunne ikke gennemføre transaktion + + + Unable to rollback transaction + Kunne ikke tilbagetrække transaktion + + + + QSQLiteResult + + Unable to fetch row + Kunne ikke hente række + + + Unable to execute statement + Kunne ikke udføre udsagn + + + Unable to reset statement + Kunne ikke nulstille udsagn + + + Unable to bind parameters + Unable to bind parameters + + + Parameter count mismatch + Misforhold i parametertælling + + + No query + Ingen forespørgesel + + + + QScrollBar + + + Scroll here + Scroll her + + + Left edge + Venstre kant + + + Top + Øverst + + + Right edge + Højre kant + + + Bottom + Bund + + + Page left + Side venstre + + + + Page up + Side øverst + + + Page right + Side højre + + + + Page down + Side ned + + + Scroll left + Scroll til venstre + + + Scroll up + Scroll op + + + Scroll right + Scroll til højre + + + Scroll down + Scroll ned + + + Line up + Linie op + + + Position + Placering + + + Line down + Linie ned + + + + QSharedMemory + + + %1: unable to set key on lock + %1: Kunne ikke oprette nøgle + + + %1: create size is less then 0 + %1: create size is less then 0 + + + + %1: unable to lock + %1: Kunne ikke låse + + + %1: unable to unlock + %1: Kunne ikke oprette nøgle + + + + %1: permission denied + %1: Tilladelse nægtet + + + %1: already exists + %1: Findes allerede + + + + %1: doesn't exists + %1: Findes ikke + + + + %1: out of resources + %1: Ikke flere ressourcer + + + + %1: unknown error %2 + %1: ukendt fejl %2 + + + %1: key is empty + %1: nøgle er tom + + + %1: unix key file doesn't exists + %1: Kunne ikke oprette nøgle + + + %1: ftok failed + %1: ftok mislykkedes + + + + %1: unable to make key + %1: Kunne ikke oprette nøgle + + + %1: system-imposed size restrictions + %1: System-pålagte størrelsesrestriktioner + + + %1: not attached + %1: Ikke vedhæftet + + + %1: invalid size + %1: Ugyldig størrelse + + + %1: key error + %1: Nøglefejl + + + %1: size query failed + %1: Størrelsesforespørgsel mislykkedes + + + + QShortcut + + + Space + + + + Esc + + + + Tab + + + + Backtab + Tilbage-tabulator + + + Backspace + Tilbage + + + Return + + + + Enter + + + + Ins + + + + Del + + + + Pause + + + + Print + Udskriv + + + SysReq + + + + Home + + + + End + + + + Left + Venstre + + + Up + Op + + + Right + Højre + + + Down + Ned + + + PgUp + + + + PgDown + + + + CapsLock + ' + + + NumLock + + + + ScrollLock + + + + Menu + + + + Help + Hjælp + + + Back + Tilbage + + + Forward + Frem + + + Stop + + + + Refresh + Opdater + + + Volume Down + Lydstyrke ned + + + Volume Mute + Lydstyrke mute + + + Volume Up + Lydstyrke op + + + Bass Boost + + + + Bass Up + Bass op + + + Bass Down + Bass ned + + + Treble Up + Diskant op + + + Treble Down + Diskant ned + + + Media Play + + + + Media Stop + + + + Media Previous + Media forrige + + + Media Next + Media næste + + + Media Record + + + + Favorites + + + + Search + Søg + + + Standby + + + + Open URL + Åbn URL + + + Launch Mail + Start mail + + + Launch Media + Start Media + + + Launch (0) + Start (0) + + + Launch (1) + Start (1) + + + Launch (2) + Start (2) + + + Launch (3) + Start (3) + + + Launch (4) + Start (4) + + + Launch (5) + Start (5) + + + Launch (6) + Start (6) + + + Launch (7) + Start (7) + + + Launch (8) + Start (8) + + + Launch (9) + Start (9) + + + Launch (A) + Start (A) + + + Launch (B) + Start (B) + + + Launch (C) + Start (C) + + + Launch (D) + Start (D) + + + Launch (E) + Start (E) + + + Launch (F) + Start (F) + + + Print Screen + + + + Page Up + + + + Page Down + + + + Caps Lock + + + + Num Lock + + + + Number Lock + + + + Scroll Lock + + + + Insert + + + + Delete + + + + Escape + + + + System Request + + + + Select + Væg + + + Yes + Ja + + + No + Nej + + + Context1 + Kontekst1 + + + Context2 + Kontekst2 + + + Context3 + Kontekst3 + + + Context4 + Kontekst4 + + + Call + Ring til + + + Hangup + Læg på + + + Flip + Vend + + + Ctrl + + + + Shift + + + + Alt + + + + Meta + + + + + + + + + F%1 + + + + Home Page + Startside + + + + QSlider + + + Page left + Side venstre + + + Page up + Side op + + + Position + Placering + + + Page right + Side højre + + + Page down + Side ned + + + + QSocks5SocketEngine + + Connection to proxy refused + Proxy-forbindelse nægtede + + + Connection to proxy closed prematurely + Proxy-forbindelse afsluttede i utide + + + Proxy host not found + Proxy-host kunne ikke findes + + + Connection to proxy timed out + Proxy-serverforbindelse timed out + + + Proxy authentication failed + Proxy autentificering mislykkedes + + + Proxy authentication failed: %1 + Proxy autentificering mislykkedes: %1 + + + SOCKS version 5 protocol error + SOCKS version 5 protokolfejl + + + General SOCKSv5 server failure + General SOCKSv5 serverfejl + + + Connection not allowed by SOCKSv5 server + Forbindelse ikke tilladt a SOCKSv5-server + + + TTL expired + TTL udløbet + + + SOCKSv5 command not supported + SOCKSv5-kommando ikke understøttet + + + Address type not supported + Adressetype understøttes ikke + + + Unknown SOCKSv5 proxy error code 0x%1 + Ukendt SOCKSv5 proxy fejlkode 0x%1 + + + Network operation timed out + Netværksoperationen timed out + + + + QSpinBox + + More + Mere + + + Less + Mindre + + + + QSql + + + Delete + Slet + + + Delete this record? + Slet denne post? + + + Yes + Ja + + + No + Nej + + + Insert + Indsæt + + + Update + Opdater + + + Save edits? + Gem ændringer? + + + Cancel + Annuller + + + Confirm + Bekræft + + + Cancel your edits? + Skal dine ændringer annulleres? + + + + QSslSocket + + + Unable to write data: %1 + Kunne ikke skrive data: %1 + + + Error while reading: %1 + Der opstod en fejl under læsning af: %1 + + + Error during SSL handshake: %1 + Der opstod en fejl under SSL handshake: %1 + + + Error creating SSL context (%1) + Der opstod fejl under oprettelse af SSL-kontekst (%1) + + + Invalid or empty cipher list (%1) + Ugyldig eller tom chifferliste (%1) + + + Error creating SSL session, %1 + Der opstod fejl under oprettelse af SSL-session, %1 + + + Error creating SSL session: %1 + Der opstod fejl under oprettelse af SSL-session, %1 + + + Cannot provide a certificate with no key, %1 + Kan ikke give et certifikat uden nøgle, %1 + + + Error loading local certificate, %1 + Der opstod fejl under indlæsning af lokalt certifikat, %1 + + + Error loading private key, %1 + Der opstod fejl under indlæsning af privat nøgle, %1 + + + Private key does not certificate public key, %1 + Privat-nøgle autoriserer ikke offentlig-nøgle, %1 + + + + QSystemSemaphore + + + %1: out of resources + %1: Ikke flere ressourcer + + + + %1: permission denied + %1: Tilladelse nægtet + + + %1: already exists + %1: Findes allerede + + + %1: does not exist + %1: Findes ikke + + + + %1: unknown error %2 + %1: Ukendt fejl %2 + + + + QTDSDriver + + + Unable to open connection + Kunne ikke etablere forbindelsen + + + Unable to use database + Kunne ikke bruge databasen + + + + QTabBar + + Scroll Left + Scroll til venstre + + + Scroll Right + Scroll til højre + + + + QTcpServer + + + Operation on socket is not supported + Socket-operation ikke understøttet + + + + QTextControl + + + &Undo + &Fortryd + + + &Redo + &Gendan + + + Cu&t + K&lip + + + &Copy + &Kopiér + + + Copy &Link Location + Kopiér l&ink + + + &Paste + &Sæt ind + + + Delete + Slet + + + Select All + Markér alt + + + + QToolButton + + Press + Tryk på + + + Open + Åbn + + + + QUdpSocket + + + This platform does not support IPv6 + Denne platform understøtter ikke IPv6 + + + + QUndoGroup + + + Undo + Fortryd + + + Redo + Gendan + + + + QUndoModel + + + <empty> + <tom> + + + + QUndoStack + + + Undo + Fortryd + + + Redo + Gendan + + + + QUnicodeControlCharacterMenu + + + LRM Left-to-right mark + + + + RLM Right-to-left mark + + + + ZWJ Zero width joiner + + + + ZWNJ Zero width non-joiner + + + + ZWSP Zero width space + + + + LRE Start of left-to-right embedding + + + + RLE Start of right-to-left embedding + + + + LRO Start of left-to-right override + + + + RLO Start of right-to-left override + + + + PDF Pop directional formatting + + + + Insert Unicode control character + + + + + QWebFrame + + + Request cancelled + Anmodning annulleret + + + Request blocked + Anmodning blokeret + + + Cannot show URL + Kan ikke vise URL + + + Frame load interruped by policy change + Billedindlæsning afbrudt af ændringer i retningslinier + + + Cannot show mimetype + Kan ikke vise MIME-type + + + File does not exist + Filen findes ikke + + + + QWebPage + + + Bad HTTP request + Dårlig HTTP-anmodning + + + + Submit + default label for Submit buttons in forms on web pages + Send + + + Submit + Submit (input element) alt text for <input> elements with no alt, title, or value + Send + + + Reset + default label for Reset buttons in forms on web pages + Nulstil + + + This is a searchable index. Enter search keywords: + text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index' + Dette er et søgeindeks. Indtast søgeord: + + + Choose File + title for file button used in HTML forms + Vælg fil + + + No file selected + text to display in file button used in HTML forms when no file is selected + Der er ikke valgt en fil + + + Open in New Window + Open in New Window context menu item + Åbn i nyt vindue + + + Save Link... + Download Linked File context menu item + Gem link... + + + Copy Link + Copy Link context menu item + Kopiér link + + + Open Image + Open Image in New Window context menu item + Åbn billede + + + Save Image + Download Image context menu item + Gem billede + + + Copy Image + Copy Link context menu item + Kopiér billede + + + Open Frame + Open Frame in New Window context menu item + Åbn faneblad + + + Copy + Copy context menu item + Kopiér + + + Go Back + Back context menu item + Gå tilbage + + + Go Forward + Forward context menu item + Gå frem + + + Stop + Stop context menu item + Stop + + + Reload + Reload context menu item + Genindlæs + + + Cut + Cut context menu item + Klip + + + Paste + Paste context menu item + Sæt ind + + + No Guesses Found + No Guesses Found context menu item + Der er ikke fundet nogen gæt + + + Ignore + Ignore Spelling context menu item + Ignorér + + + Add To Dictionary + Learn Spelling context menu item + Tilføj til ordbog + + + Search The Web + Search The Web context menu item + Søg på nettet + + + Look Up In Dictionary + Look Up in Dictionary context menu item + Slå op i ordbog + + + Open Link + Open Link context menu item + Åbn link + + + Ignore + Ignore Grammar context menu item + Ignorér + + + Spelling + Spelling and Grammar context sub-menu item + Stavekontrol + + + Show Spelling and Grammar + menu item title + Vis stave- og grammatikkontrol + + + Hide Spelling and Grammar + menu item title + Skjul stave- og grammatikkontrol + + + Check Spelling + Check spelling context menu item + Kør stavekontrol + + + Check Spelling While Typing + Check spelling while typing context menu item + Kør stavekontrol mens der tastes + + + Check Grammar With Spelling + Check grammar with spelling context menu item + Kør grammatikkontrol sammen med stavekontrol + + + Fonts + Font context sub-menu item + Skrifttyper + + + Bold + Bold context menu item + Fed + + + Italic + Italic context menu item + Kursiv + + + Underline + Underline context menu item + Understreget + + + Outline + Outline context menu item + Kontur + + + Direction + Writing direction context sub-menu item + Retning + + + Text Direction + Text direction context sub-menu item + Tekstretning + + + Default + Default writing direction context menu item + Standard + + + LTR + Left to Right context menu item + + + + RTL + Right to Left context menu item + + + + Inspect + Inspect Element context menu item + Inspicér + + + No recent searches + Label for only item in menu that appears when clicking on the search field image, when no searches have been performed + Ingen aktuelle søgninger + + + Recent searches + label for first item in the menu that appears when clicking on the search field image, used as embedded menu title + Aktuelle søgninger + + + Clear recent searches + menu item in Recent Searches menu that empties menu's contents + Ryd aktuelle søgninger + + + Unknown + Unknown filesize FTP directory listing item + Ukendt + + + %1 (%2x%3 pixels) + Title string for images + %1 (%2x%3 pixels) + + + + Web Inspector - %2 + Web-inspektør - %2 + + + + Scroll here + Scroll her + + + Left edge + Venstre kant + + + Top + + + + Right edge + Højre kant + + + Bottom + Bund + + + Page left + Side venstre + + + Page up + Side øverst + + + Page right + Side højre + + + Page down + Side ned + + + Scroll left + Scroll til venstre + + + Scroll up + Scroll op + + + Scroll right + Scroll til højre + + + Scroll down + Scroll ned + + + + %n file(s) + number of chosen file + + %n fil + %n filer + + + + + JavaScript Alert - %1 + JavaScript alert - %1 + + + JavaScript Confirm - %1 + JavaScript Bekræft - %1 + + + JavaScript Prompt - %1 + JavaScript Prompt - %1 + + + Move the cursor to the next character + Flyt markør til næste tegn + + + Move the cursor to the previous character + Flyt markør til forrige tegn + + + Move the cursor to the next word + Flyt markør til næste ord + + + Move the cursor to the previous word + Flyt markør til forrige ord + + + Move the cursor to the next line + Flyt markør til næste linie + + + Move the cursor to the previous line + Flyt markør til forrige linie + + + Move the cursor to the start of the line + Flyt markør til starten af linien + + + Move the cursor to the end of the line + Flyt markør til slutningen af linien + + + Move the cursor to the start of the block + Flyt markør til starten af sektionen + + + Move the cursor to the end of the block + Flyt markør til slutningen af sektionen + + + Move the cursor to the start of the document + Flyt markør til starten af dokumentet + + + Move the cursor to the end of the document + Flyt markør til slutningen af dokumentet + + + Select to the next character + Vælg til næste tegn + + + Select to the previous character + Vælg til forrige tegn + + + Select to the next word + Vælg til næste ord + + + Select to the previous word + Vælg til forrige ord + + + Select to the next line + Vælg til næste linie + + + Select to the previous line + Vælg til forrige linie + + + Select to the start of the line + Vælg til starten af linien + + + Select to the end of the line + Vælg til slutningen af linien + + + Select to the start of the block + Vælg til starten af sektionen + + + Select to the end of the block + Vælg til slutningen af sektionen + + + Select to the start of the document + Vælg til starten af dokumentet + + + Select to the end of the document + Vælg til slutningen af dokumentet + + + Delete to the start of the word + Slet til starten af ordet + + + Delete to the end of the word + Slet til slutningen af ordet + + + + QWhatsThisAction + + + What's This? + Hvad er dette? + + + + QWidget + + + * + + + + + QWizard + + + Go Back + Gå tilbage + + + Continue + Fortsæt + + + Commit + Udfør + + + Done + Færdig + + + Help + Hjælp + + + < &Back + < &Tilbage + + + &Finish + &Afslut + + + Cancel + Annuller + + + &Help + &Hjælp + + + &Next + &Næste + + + &Next > + &Næste > + + + + QWorkspace + + + &Restore + &Gendan + + + &Move + &Flyt + + + &Size + &Størrelse + + + Mi&nimize + Mi&nimér + + + Ma&ximize + Ma&ksimér + + + &Close + &Luk + + + Stay on &Top + Bliv på &toppen + + + Sh&ade + Sk&ygge + + + %1 - [%2] + + + + Minimize + Minimer + + + Restore Down + Gendan ned + + + Close + Luk + + + &Unshade + &Fjern skygge + + + + QXml + + + no error occurred + der opstod ingen fejl + + + error triggered by consumer + + + + unexpected end of file + uventet afslutning på fil + + + more than one document type definition + mere end én definition på dokumenttype + + + error occurred while parsing element + der opstod fejl under fortolking af element + + + tag mismatch + + + + error occurred while parsing content + der opstod fejl under fortolking af indhold + + + unexpected character + uventet tegn + + + invalid name for processing instruction + + + + version expected while reading the XML declaration + version forventet under læsning af XML-deklaration + + + wrong value for standalone declaration + + + + encoding declaration or standalone declaration expected while reading the XML declaration + + + + standalone declaration expected while reading the XML declaration + + + + error occurred while parsing document type definition + der opstod fejl under fortolking af dokumenttypedefinition + + + letter is expected + + + + error occurred while parsing comment + der opstod fejl under fortolking af kommentar + + + error occurred while parsing reference + der opstod fejl under fortolking af reference + + + internal general entity reference not allowed in DTD + + + + external parsed general entity reference not allowed in attribute value + + + + external parsed general entity reference not allowed in DTD + + + + unparsed entity reference in wrong context + ufortolket enhedsreference i forkert kontekst + + + recursive entities + + + + error in the text declaration of an external entity + fejl i tekstdeklaration på en ekstern enhed + + + + QXmlStream + + + Extra content at end of document. + Ekstra indhold sidst i dokumentet. + + + Invalid entity value. + Ugyldig enhedsværdi. + + + Invalid XML character. + Ugyldigt XML-tegn. + + + Sequence ']]>' not allowed in content. + Sekvens ']]>' ikke tilladt i indhold. + + + Namespace prefix '%1' not declared + Navnerumspræfiks '%1' ikke deklareret + + + Attribute redefined. + + + + Unexpected character '%1' in public id literal. + + + + Invalid XML version string. + Ugyldigt XML-versionsstreng. + + + Unsupported XML version. + XML-version understøttes ikke. + + + %1 is an invalid encoding name. + + + + Encoding %1 is unsupported + + + + Standalone accepts only yes or no. + + + + Invalid attribute in XML declaration. + + + + Premature end of document. + + + + Invalid document. + Ugyldigt dokument. + + + Expected + Forventet + + + , but got ' + , men fik ' + + + Unexpected ' + Uventet ' + + + Expected character data. + Forventet tegndata. + + + Recursive entity detected. + + + + Start tag expected. + Start-tag forventet. + + + XML declaration not at start of document. + XML-deklaration ikke i starten af dokumentet. + + + NDATA in parameter entity declaration. + + + + %1 is an invalid processing instruction name. + + + + Invalid processing instruction name. + + + + Illegal namespace declaration. + Ulovligt navnerumsdeklaration. + + + + Invalid XML name. + Ugyldigt XML-navn. + + + Opening and ending tag mismatch. + Åbner og afslutter tag-mismatch. + + + Reference to unparsed entity '%1'. + Reference to ufortolket enhed '%1'. + + + Entity '%1' not declared. + Enheden '%1' ikke deklareret. + + + Reference to external entity '%1' in attribute value. + Reference til ekstern enhed '%1' i attributværdi. + + + Invalid character reference. + Ugyldig tegnreference. + + + Encountered incorrectly encoded content. + + + + The standalone pseudo attribute must appear after the encoding. + + + + + %1 is an invalid PUBLIC identifier. + + + + + QtXmlPatterns + + + An %1-attribute with value %2 has already been declared. + + + + An %1-attribute must have a valid %2 as value, which %3 isn't. + + + + + Network timeout. + + + + + Element %1 can't be serialized because it appears outside the document element. + + + + + Year %1 is invalid because it begins with %2. + + + + Day %1 is outside the range %2..%3. + + + + Month %1 is outside the range %2..%3. + + + + Overflow: Can't represent date %1. + + + + Day %1 is invalid for month %2. + + + + Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; + + + + Time %1:%2:%3.%4 is invalid. + + + + Overflow: Date can't be represented. + + + + At least one component must be present. + + + + At least one time component must appear after the %1-delimiter. + + + + + No operand in an integer division, %1, can be %2. + + + + The first operand in an integer division, %1, cannot be infinity (%2). + + + + The second operand in a division, %1, cannot be zero (%2). + + + + + %1 is not a valid value of type %2. + + + + + When casting to %1 from %2, the source value cannot be %3. + + + + + Integer division (%1) by zero (%2) is undefined. + + + + Division (%1) by zero (%2) is undefined. + + + + Modulus division (%1) by zero (%2) is undefined. + + + + Dividing a value of type %1 by %2 (not-a-number) is not allowed. + + + + Dividing a value of type %1 by %2 or %3 (plus or minus zero) is not allowed. + + + + Multiplication of a value of type %1 by %2 or %3 (plus or minus infinity) is not allowed. + + + + + A value of type %1 cannot have an Effective Boolean Value. + + + + + Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values. + + + + + Value %1 of type %2 exceeds maximum (%3). + + + + Value %1 of type %2 is below minimum (%3). + + + + + A value of type %1 must contain an even number of digits. The value %2 does not. + + + + %1 is not valid as a value of type %2. + + + + + Operator %1 cannot be used on type %2. + + + + Operator %1 cannot be used on atomic values of type %2 and %3. + + + + + The namespace URI in the name for a computed attribute cannot be %1. + + + + The name for a computed attribute cannot have the namespace URI %1 with the local name %2. + + + + + Type error in cast, expected %1, received %2. + + + + When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed. + + + + + No casting is possible with %1 as the target type. + + + + It is not possible to cast from %1 to %2. + + + + Casting to %1 is not possible because it is an abstract type, and can therefore never be instantiated. + + + + It's not possible to cast the value %1 of type %2 to %3 + + + + Failure when casting from %1 to %2: %3 + + + + + A comment cannot contain %1 + + + + A comment cannot end with a %1. + + + + + No comparisons can be done involving the type %1. + + + + Operator %1 is not available between atomic values of type %2 and %3. + + + + + An attribute node cannot be a child of a document node. Therefore, the attribute %1 is out of place. + + + + + A library module cannot be evaluated directly. It must be imported from a main module. + + + + No template by name %1 exists. + + + + + A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type. + + + + A positional predicate must evaluate to a single numeric value. + + + + + The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, is %2 invalid. + + + + %1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3. + + + + + The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two. + + + + + The data of a processing instruction cannot contain the string %1 + + + + + No namespace binding exists for the prefix %1 + + + + + No namespace binding exists for the prefix %1 in %2 + + + + + %1 is an invalid %2 + + + + + %1 takes at most %n argument(s). %2 is therefore invalid. + + + + + + + %1 requires at least %n argument(s). %2 is therefore invalid. + + + + + + + + The first argument to %1 cannot be of type %2. It must be a numeric type, xs:yearMonthDuration or xs:dayTimeDuration. + + + + The first argument to %1 cannot be of type %2. It must be of type %3, %4, or %5. + + + + The second argument to %1 cannot be of type %2. It must be of type %3, %4, or %5. + + + + + %1 is not a valid XML 1.0 character. + + + + + The first argument to %1 cannot be of type %2. + + + + + If both values have zone offsets, they must have the same zone offset. %1 and %2 are not the same. + + + + + %1 was called. + + + + + %1 must be followed by %2 or %3, not at the end of the replacement string. + + + + In the replacement string, %1 must be followed by at least one digit when not escaped. + + + + In the replacement string, %1 can only be used to escape itself or %2, not %3 + + + + + %1 matches newline characters + + + + %1 and %2 match the start and end of a line. + + + + Matches are case insensitive + + + + Whitespace characters are removed, except when they appear in character classes + + + + %1 is an invalid regular expression pattern: %2 + + + + %1 is an invalid flag for regular expressions. Valid flags are: + + + + + If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified. + + + + + It will not be possible to retrieve %1. + + + + + The root node of the second argument to function %1 must be a document node. %2 is not a document node. + + + + + The default collection is undefined + + + + %1 cannot be retrieved + + + + + The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization). + + + + + A zone offset must be in the range %1..%2 inclusive. %3 is out of range. + + + + %1 is not a whole number of minutes. + + + + + Required cardinality is %1; got cardinality %2. + + + + + The item %1 did not match the required type %2. + + + + %1 is an unknown schema type. + + + + Only one %1 declaration can occur in the query prolog. + + + + The initialization of variable %1 depends on itself + + + + No variable by name %1 exists + + + + + The variable %1 is unused + + + + + Version %1 is not supported. The supported XQuery version is 1.0. + + + + The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2. + + + + No function with signature %1 is available + + + + A default namespace declaration must occur before function, variable, and option declarations. + + + + Namespace declarations must occur before function, variable, and option declarations. + + + + Module imports must occur before function, variable, and option declarations. + + + + It is not possible to redeclare prefix %1. + + + + Prefix %1 is already declared in the prolog. + + + + The name of an option must have a prefix. There is no default namespace for options. + + + + The Schema Import feature is not supported, and therefore %1 declarations cannot occur. + + + + The target namespace of a %1 cannot be empty. + + + + The module import feature is not supported + + + + No value is available for the external variable by name %1. + + + + A construct was encountered which only is allowed in XQuery. + + + + A template by name %1 has already been declared. + + + + The keyword %1 cannot occur with any other mode name. + + + + The value of attribute %1 must of type %2, which %3 isn't. + + + + The prefix %1 can not be bound. By default, it is already bound to the namespace %2. + + + + A variable by name %1 has already been declared. + + + + A stylesheet function must have a prefixed name. + + + + The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this) + + + + The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases. + + + + The namespace of a user defined function in a library module must be equivalent to the module namespace. In other words, it should be %1 instead of %2 + + + + A function already exists with the signature %1. + + + + No external functions are supported. All supported functions can be used directly, without first declaring them as external + + + + An argument by name %1 has already been declared. Every argument name must be unique. + + + + When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal. + + + + In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching. + + + + In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching. + + + + In an XSL-T pattern, function %1 cannot have a third argument. + + + + In an XSL-T pattern, only function %1 and %2, not %3, can be used for matching. + + + + In an XSL-T pattern, axis %1 cannot be used, only axis %2 or %3 can. + + + + %1 is an invalid template mode name. + + + + The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide. + + + + The Schema Validation Feature is not supported. Hence, %1-expressions may not be used. + + + + None of the pragma expressions are supported. Therefore, a fallback expression must be present + + + + Each name of a template parameter must be unique; %1 is duplicated. + + + + The %1-axis is unsupported in XQuery + + + + %1 is not a valid name for a processing-instruction. + + + + %1 is not a valid numeric literal. + + + + No function by name %1 is available. + + + + The namespace URI cannot be the empty string when binding to a prefix, %1. + + + + %1 is an invalid namespace URI. + + + + It is not possible to bind to the prefix %1 + + + + Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared). + + + + Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared). + + + + Two namespace declaration attributes have the same name: %1. + + + + The namespace URI must be a constant and cannot use enclosed expressions. + + + + An attribute by name %1 has already appeared on this element. + + + + A direct element constructor is not well-formed. %1 is ended with %2. + + + + The name %1 does not refer to any schema type. + + + + %1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works. + + + + %1 is not an atomic type. Casting is only possible to atomic types. + + + + %1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported. + + + + The name of an extension expression must be in a namespace. + + + + + empty + + + + zero or one + + + + exactly one + + + + one or more + + + + zero or more + + + + + Required type is %1, but %2 was found. + + + + Promoting %1 to %2 may cause loss of precision. + + + + The focus is undefined. + + + + + It's not possible to add attributes after any other kind of node. + + + + An attribute by name %1 has already been created. + + + + + Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported. + + + + + Attribute %1 can't be serialized because it appears at the top level. + + + + + %1 is an unsupported encoding. + + + + %1 contains octets which are disallowed in the requested encoding %2. + + + + The codepoint %1, occurring in %2 using encoding %3, is an invalid XML character. + + + + + Ambiguous rule match. + + + + + In a namespace constructor, the value for a namespace value cannot be an empty string. + + + + The prefix must be a valid %1, which %2 is not. + + + + The prefix %1 cannot be bound. + + + + Only the prefix %1 can be bound to %2 and vice versa. + + + + + Circularity detected + + + + + The parameter %1 is required, but no corresponding %2 is supplied. + + + + The parameter %1 is passed, but no corresponding %2 exists. + + + + + The URI cannot have a fragment + + + + + Element %1 is not allowed at this location. + + + + Text nodes are not allowed at this location. + + + + Parse error: %1 + + + + The value of the XSL-T version attribute must be a value of type %1, which %2 isn't. + + + + Running an XSL-T 1.0 stylesheet with a 2.0 processor. + + + + Unknown XSL-T attribute %1. + + + + Attribute %1 and %2 are mutually exclusive. + + + + In a simplified stylesheet module, attribute %1 must be present. + + + + If element %1 has no attribute %2, it cannot have attribute %3 or %4. + + + + Element %1 must have at least one of the attributes %2 or %3. + + + + At least one mode must be specified in the %1-attribute on element %2. + + + + + Attribute %1 cannot appear on the element %2. Only the standard attributes can appear. + + + + Attribute %1 cannot appear on the element %2. Only %3 is allowed, and the standard attributes. + + + + Attribute %1 cannot appear on the element %2. Allowed is %3, %4, and the standard attributes. + + + + Attribute %1 cannot appear on the element %2. Allowed is %3, and the standard attributes. + + + + XSL-T attributes on XSL-T elements must be in the null namespace, not in the XSL-T namespace which %1 is. + + + + The attribute %1 must appear on element %2. + + + + The element with local name %1 does not exist in XSL-T. + + + + + Element %1 must come last. + + + + At least one %1-element must occur before %2. + + + + Only one %1-element can appear. + + + + At least one %1-element must occur inside %2. + + + + When attribute %1 is present on %2, a sequence constructor cannot be used. + + + + Element %1 must have either a %2-attribute or a sequence constructor. + + + + When a parameter is required, a default value cannot be supplied through a %1-attribute or a sequence constructor. + + + + Element %1 cannot have children. + + + + Element %1 cannot have a sequence constructor. + + + + The attribute %1 cannot appear on %2, when it is a child of %3. + + + + A parameter in a function cannot be declared to be a tunnel. + + + + This processor is not Schema-aware and therefore %1 cannot be used. + + + + Top level stylesheet elements must be in a non-null namespace, which %1 isn't. + + + + The value for attribute %1 on element %2 must either be %3 or %4, not %5. + + + + Attribute %1 cannot have the value %2. + + + + The attribute %1 can only appear on the first %2 element. + + + + At least one %1 element must appear as child of %2. + + + + + VolumeSlider + + + Muted + + + + Volume: %1% + Lydstyrke: %1% + + + diff --git a/translations/qt_help_da.ts b/translations/qt_help_da.ts new file mode 100644 index 0000000..0e4a362 --- /dev/null +++ b/translations/qt_help_da.ts @@ -0,0 +1,354 @@ + + + + + QCLuceneResultWidget + + + Search Results + Søgeresultater + + + + Note: + Bemærk: + + + + The search results may not be complete since the documentation is still being indexed! + Søgeresultaterne kan være ufuldstændige, fordi dokumentationen stadig indekseres! + + + + Your search did not match any documents. + Søgningen matchede ikke nogen dokumenter. + + + + (The reason for this might be that the documentation is still being indexed.) + (Årsagen kan være, at dokumentationen stadig indekseres.) + + + + QHelpCollectionHandler + + + The collection file is not set up yet! + Hjælpesamlingen er ikke konfigureret endnu! + + + + Cannot open collection file: %1 + Kan ikke åbne hjælpesamlingen: %1 + + + + Cannot create tables in file %1! + Kan ikke oprette tabler i filen %1! + + + + The specified collection file already exists! + Den angivne hjælpesamling findes allerede! + + + + Cannot create directory: %1 + Kan ikke oprette kataloget: %1 + + + + Cannot copy collection file: %1 + Kan ikke kopiere hjælpesamling: %1 + + + + Unknown filter! + Ukendt filter! + + + + Cannot register filter %1! + Kan ikke registrere filteret %1! + + + + Cannot open documentation file %1! + Kan ikke åbne dokumentationsfilen %1! + + + + Invalid documentation file! + Ugyldig dokumentationsfil! + + + + The namespace %1 was not registered! + Navnerummet %1 blev ikke registreret! + + + + Namespace %1 already exists! + Navnerummet %1 findes allerede! + + + + Cannot register namespace! + Kan ikke registrere navnerummet! + + + + Cannot open database to optimize! + Kan ikke åbne den database, der skal optimeres! + + + + QHelpDBReader + + + Cannot open DB! + Kan ikke åbne DB! + + + + QHelpEngineCore + + + The specified namespace does not exist! + Det angivne navnerum findes ikke! + + + + QHelpEngineCorePrivate + + + Cannot open collection file %1! + Kan ikke åbne hjælpesamlingen %1! + + + + Cannot open documentation file %1! + Kan ikke åbne dokumentationsfilen %1! + + + + QHelpGenerator + + + Invalid help data! + Ugyldigt hjælpedata! + + + + No output file name specified! + Der er ikke anført et output-filnavn! + + + + The file %1 already exists! + Filen %1 findes allerede! + + + + Building up file structure... + Bygger filstruktur... + + + + Cannot open DB! + Kan ikke åbne DB! + + + + Cannot register namespace %1! + Kan ikke registrere navnerummet %1! + + + + Insert custom filters... + Indsæt brugerdefinerede filtre... + + + + Insert help data for filter section (%1 of %2)... + Indsæt hjælpedata til filtersektion (%1 af %2)... + + + + Documentation successfully generated. + Dokumentationen blev genereret. + + + + Some tables already exist! + Nogle af tabellerne findes allerede! + + + + Cannot create tables! + Kan ikke oprette tabeller! + + + + Cannot register virtual folder! + Kan ikke registrere virtuel mappe! + + + + Insert files... + Indsæt filer... + + + + The file %1 does not exist! Skipping it. + Filen %1 findes ikke, og den springes over. + + + + Cannot open file %1! Skipping it. + Kan ikke åbne filen %1, og den springes over. + + + + Cannot insert file data into database! + Kan ikke indsætte fildata i databasen! + + + + The filter %1 is already registered! + Filtret %1 er allerede registreret! + + + + Cannot register filter %1! + Kan ikke registrere filtret %1! + + + + Insert indices... + Indsæt indeks... + + + + Insert contents... + Indsæt indhold... + + + + Cannot insert contents! + Kan ikke indsætte indhold! + + + + Cannot register contents! + Kan ikke registrere indhold! + + + + QHelpSearchQueryWidget + + + Search for: + Søg efter: + + + + Search + Søg + + + + Advanced search + Avanceret søgning + + + + words <B>similar</B> to: + ord <B>tilsvarende</B>: + + + + <B>without</B> the words: + <B>uden</B> ordene: + + + + with <B>exact phrase</B>: + med den <B>eksakte sætning</B>: + + + + with <B>all</B> of the words: + med <B>alle</B> ordene: + + + + with <B>at least one</B> of the words: + med <B>mindst ét</B> af ordene: + + + + QHelpSearchResultWidget + + + 0 - 0 of 0 Hits + 0 - 0 af 0 Hits + + + + QHelpSearchResultWidgetPrivate + + + %1 - %2 of %3 Hits + %1 - %2 af %3 Hits + + + + QObject + + + Untitled + Ingen titel + + + + Unknown token at line %1. + Ukendt symbol på linie %1. + + + + Unknown token at line %1. Expected "QtHelpProject"! + Ukendt symbol på linie %1. Forventet "QtHelpProject"! + + + + A virtual folder must not contain a '/' character! + En virtuel mappe må ikke indholde tegnet '/'! + + + + A namespace must not contain a '/' character! + Et navnerum må ikke indeholde tegnet '/'! + + + + Missing namespace in QtHelpProject. + Navnerum i +++ mangler. + + + + Missing virtual folder in QtHelpProject + Virtuel mappe i QtHelpProject mangler + + + + Missing attribute in keyword at line %1. + Attribut i nøgleord på linie %1 mangler. + + + + The input file %1 could not be opened! + Input-filen %1 kunne ikke åbnes! + + + -- cgit v0.12 From 88316df0e845ee11b436c8dad9f1a225f52eb08c Mon Sep 17 00:00:00 2001 From: Frederik Schwarzer Date: Fri, 22 May 2009 15:06:49 +0200 Subject: wording: Warnung -> Achtung --- translations/qt_de.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/translations/qt_de.ts b/translations/qt_de.ts index 33f9ea8..7752970 100644 --- a/translations/qt_de.ts +++ b/translations/qt_de.ts @@ -66,15 +66,15 @@ Warning: You do not seem to have the package gstreamer0.10-plugins-good installed. Some video features have been disabled. - Warnung: Das Paket gstreamer0.10-plugins-good ist nicht installiert. -Einige Video-Funktionen stehen nicht zur Verfügung. + Achtung: Das Paket gstreamer0.10-plugins-good ist nicht installiert. +Einige Video-Funktionen stehen nicht zur Verfügung. Warning: You do not seem to have the base GStreamer plugins installed. All audio and video support has been disabled - Warnung: Die grundlegenden GStreamer-plugins sind nicht installiert. -Die Audio- und Video-Unterstützung wurde abgeschaltet + Achtung: Die grundlegenden GStreamer-Plugins sind nicht installiert. +Die Audio- und Video-Unterstützung steht nicht zur Verfügung. @@ -1373,7 +1373,7 @@ nach Warning: - Warnung: + Achtung: -- cgit v0.12 From 0fd48121fc5695b6f526839a3e6c7863bcef0074 Mon Sep 17 00:00:00 2001 From: Frederik Schwarzer Date: Fri, 22 May 2009 15:08:28 +0200 Subject: wording: Voransicht -> Vorschau --- translations/qt_de.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translations/qt_de.ts b/translations/qt_de.ts index 7752970..4fa3027 100644 --- a/translations/qt_de.ts +++ b/translations/qt_de.ts @@ -291,12 +291,12 @@ Bitte prüfen Sie die Gstreamer-Installation und stellen Sie sicher, dass das Pa Preview File Info - Voransicht der Datei-Information + Vorschau der Datei-Informationen Preview File Contents - Voransicht des Datei-Inhalts + Vorschau des Datei-Inhalts -- cgit v0.12 From f00f66b2d2e3d892980f3957eebd7bc36ac315b4 Mon Sep 17 00:00:00 2001 From: Frederik Schwarzer Date: Fri, 22 May 2009 15:10:21 +0200 Subject: wrong translation of the Chinese writing systems The translations for Traditional and Simplified Chinese are Chinesisch (Langzeichen) and Chinesisch (Kurzzeichen) --- translations/qt_de.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translations/qt_de.ts b/translations/qt_de.ts index 4fa3027..b82e9a3 100644 --- a/translations/qt_de.ts +++ b/translations/qt_de.ts @@ -1887,12 +1887,12 @@ Möchten sie die Datei trotzdem löschen? Simplified Chinese - Vereinfachtes Chinesisch + Chinesisch (Kurzzeichen) Traditional Chinese - Traditionelles Chinesisch + Chinesisch (Langzeichen) -- cgit v0.12 From a4662d096c46003df2e3c9e2b3ece294fd134986 Mon Sep 17 00:00:00 2001 From: Frederik Schwarzer Date: Fri, 22 May 2009 15:14:18 +0200 Subject: quite a bunch of fixes and suggenstions If it comes to unification in wording style, there is a long road ahead... --- translations/qt_de.ts | 144 +++++++++++++++++++++++++------------------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/translations/qt_de.ts b/translations/qt_de.ts index b82e9a3..f623925 100644 --- a/translations/qt_de.ts +++ b/translations/qt_de.ts @@ -85,7 +85,7 @@ Die Audio- und Video-Unterstützung steht nicht zur Verfügung. Check your Gstreamer installation and make sure you have libgstreamer-plugins-base installed. - Das Abspielen konnte nicht gestartet werden. + Die Wiedergabe kann nicht gestartet werden. Bitte prüfen Sie die Gstreamer-Installation und stellen Sie sicher, dass das Paket libgstreamer-plugins-base installiert ist. @@ -139,7 +139,7 @@ Bitte prüfen Sie die Gstreamer-Installation und stellen Sie sicher, dass das Pa Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1% - Die Regler wird zur Einstellung der Lautstärke benutzt. Die Position links entspricht 0%; die Position rechts entspricht %1% + Mit diesem Regler stellen Sie die Lautstärke ein. Die Position links entspricht 0%; die Position rechts entspricht %1% @@ -392,7 +392,7 @@ Bitte prüfen Sie die Gstreamer-Installation und stellen Sie sicher, dass das Pa Sort by &Name - Nach &Name sortieren + Nach &Namen sortieren @@ -497,7 +497,7 @@ Bitte prüfen Sie die Gstreamer-Installation und stellen Sie sicher, dass das Pa File not found. Check path and filename. %1 -Datei konnte nicht gefunden werden. +Datei kann nicht gefunden werden. Überprüfen Sie Pfad und Dateinamen. @@ -617,7 +617,7 @@ nach Defaults - Defaults + Voreinstellungen @@ -699,7 +699,7 @@ nach Contains commands to manipulate the window - Enthält Befehle zum Ändern der Fenstergröße + Enthält Befehle zum Ändern der Fenstergröße @@ -772,18 +772,18 @@ nach The protocol `%1' does not support getting files - Das Protokoll `%1' unterstützt nicht das Laden von Files + Das Protokoll `%1' unterstützt nicht das Laden von Dateien The protocol `%1' does not support putting files - Das Protokoll `%1' unterstützt nicht das Speichern von Files + Das Protokoll `%1' unterstützt nicht das Speichern von Dateien The protocol `%1' does not support copying or moving files or directories - Das Protokoll `%1' unterstützt nicht das Kopieren oder Verschieben von Dateien oder Verzeichnissen + Das Protokoll `%1' unterstützt nicht das Kopieren oder Verschieben von Dateien oder Verzeichnissen @@ -847,7 +847,7 @@ nach Operation on socket is not supported - Diese Socketoperation wird nicht unterstützt + Diese Socket-Operation wird nicht unterstützt @@ -899,7 +899,7 @@ nach Incompatible Qt Library Error - Qt Bibliothek ist inkompatibel + Die Qt-Bibliothek ist inkompatibel @@ -909,7 +909,7 @@ nach Activates the program's main window - Aktiviert das Programmhauptfenster + Aktiviert das Hauptfenster der Anwendung @@ -1066,17 +1066,17 @@ nach Unable to commit transaction - Die Transaktion konnte nicht durchgeführt werden (Operation 'commit' fehlgeschlagen) + Die Transaktion kann nicht durchgeführt werden (Operation 'commit' fehlgeschlagen) Unable to rollback transaction - Die Transaktion konnte nicht rückgängig gemacht werden (Operation 'rollback' fehlgeschlagen) + Die Transaktion kann nicht rückgängig gemacht werden (Operation 'rollback' fehlgeschlagen) Unable to set autocommit - 'autocommit' konnte nicht aktiviert werden + 'autocommit' kann nicht aktiviert werden @@ -1085,32 +1085,32 @@ nach Unable to execute statement - Der Befehl konnte nicht ausgeführt werden + Der Befehl kann nicht ausgeführt werden Unable to prepare statement - Der Befehl konnte nicht initialisiert werden + Der Befehl kann nicht initialisiert werden Unable to bind variable - Die Variable konnte nicht gebunden werden + Die Variable kann nicht gebunden werden Unable to fetch record %1 - Der Datensatz %1 konnte nicht abgeholt werden + Der Datensatz %1 kann nicht abgeholt werden Unable to fetch next - Der nächste Datensatz konnte nicht abgeholt werden + Der nächste Datensatz kann nicht abgeholt werden Unable to fetch first - Der erste Datensatz konnte nicht abgeholt werden + Der erste Datensatz kann nicht abgeholt werden @@ -1358,7 +1358,7 @@ nach &Show this message again - Diese Meldung noch einmal an&zeigen + Diese Meldung wieder an&zeigen @@ -1397,12 +1397,12 @@ nach Cannot open %1 for input - %1 konnte nicht zum Lesen geöffnet werden + %1 kann nicht zum Lesen geöffnet werden Cannot open for output - Das Öffnen zum Schreiben schlug fehl + Das Öffnen zum Schreiben ist fehlgeschlagen @@ -1565,12 +1565,12 @@ Stellen Sie sicher, dass der Verzeichnisname richtig ist. '%1' is write protected. Do you want to delete it anyway? '%1' ist schreibgeschützt. -Möchten sie die Datei trotzdem löschen? +Möchten Sie die Datei trotzdem löschen? Are sure you want to delete '%1'? - Sind Sie sicher, dass Sie %1 löschen möchten? + Sind Sie sicher, dass Sie '%1' löschen möchten? @@ -1624,7 +1624,7 @@ Möchten sie die Datei trotzdem löschen? Look in: - Suche in: + Suchen in: @@ -1658,7 +1658,7 @@ Möchten sie die Datei trotzdem löschen? %1 bytes - %1 byte + %1 Byte @@ -2296,7 +2296,7 @@ Möchten sie die Datei trotzdem löschen? SSL handshake failed - Es trat ein Fehler im Ablauf des SSL-Protokolls auf. + Im Ablauf des SSL-Protokolls ist ein Fehler aufgetreten. @@ -2580,7 +2580,7 @@ Möchten sie die Datei trotzdem löschen? The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.) - Das Plugin '%1' verwendet eine inkompatible Qt-Bibliothek. (Im Debug- und Release-Modus erstellte Bibliotheken können nicht zusammen verwendet werden.) + Das Plugin '%1' verwendet eine inkompatible Qt-Bibliothek. (Im Debug- bzw. Release-Modus erstellte Bibliotheken können nicht zusammen verwendet werden.) @@ -2670,7 +2670,7 @@ Möchten sie die Datei trotzdem löschen? %1: Connection refused - %1: Der Aufbau einer Verbindung wurde verweigert + %1: Der Verbindungsaufbau wurde verweigert @@ -2696,13 +2696,13 @@ Möchten sie die Datei trotzdem löschen? %1: Socket resource error - %1: Socketfehler (Ressourcenproblem) + %1: Socket-Fehler (Ressourcenproblem) %1: Socket operation timed out - %1: Zeitüberschreitung bei Socketoperation + %1: Zeitüberschreitung bei Socket-Operation @@ -2721,7 +2721,7 @@ Möchten sie die Datei trotzdem löschen? %1: The socket operation is not supported - %1: Diese Socketoperation wird nicht unterstützt + %1: Diese Socket-Operation wird nicht unterstützt @@ -2740,7 +2740,7 @@ Möchten sie die Datei trotzdem löschen? Unable to open database ' - Die Datenbankverbindung konnte nicht geöffnet werden ' + Die Datenbankverbindung kann nicht geöffnet werden ' @@ -2750,17 +2750,17 @@ Möchten sie die Datei trotzdem löschen? Unable to begin transaction - Es konnte keine Transaktion gestartet werden + Es kann keine Transaktion gestartet werden Unable to commit transaction - Die Transaktion konnte nicht durchgeführt werden (Operation 'commit' fehlgeschlagen) + Die Transaktion kann nicht durchgeführt werden (Operation 'commit' fehlgeschlagen) Unable to rollback transaction - Die Transaktion konnte nicht rückgängig gemacht werden (Operation 'rollback' fehlgeschlagen) + Die Transaktion kann nicht rückgängig gemacht werden (Operation 'rollback' fehlgeschlagen) @@ -3422,7 +3422,7 @@ Möchten sie die Datei trotzdem löschen? Socket error on %1: %2 - Socketfehler bei %1: %2 + Socket-Fehler bei %1: %2 @@ -3815,7 +3815,7 @@ Möchten sie die Datei trotzdem löschen? Print To File ... - In Datei drucken + In Datei drucken ... @@ -4022,12 +4022,12 @@ Bitte wählen Sie einen anderen Dateinamen. Print to File (PDF) - Druck in PDF-Datei + In PDF-Datei drucken Print to File (Postscript) - Druck in Postscript-Datei + In Postscript-Datei drucken @@ -4967,97 +4967,97 @@ Bitte wählen Sie einen anderen Dateinamen. Open URL - Öffne URL + URL öffnen Launch Mail - Start Mail + Mail starten Launch Media - Start Media Player + Medienspieler starten Launch (0) - Start (0) + (0) starten Launch (1) - Start (1) + (1) starten Launch (2) - Start (2) + (2) starten Launch (3) - Start (3) + (3) starten Launch (4) - Start (4) + (4) starten Launch (5) - Start (5) + (5) starten Launch (6) - Start (6) + (6) starten Launch (7) - Start (7) + (7) starten Launch (8) - Start (8) + (8) starten Launch (9) - Start (9) + (9) starten Launch (A) - Start (A) + (A) starten Launch (B) - Start (B) + (B) starten Launch (C) - Start (C) + (C) starten Launch (D) - Start (D) + (D) starten Launch (E) - Start (E) + (E) starten Launch (F) - Start (F) + (F) starten @@ -5385,12 +5385,12 @@ Bitte wählen Sie einen anderen Dateinamen. Error while reading: %1 - Beim Lesen trat ein Fehler auf: %1 + Beim Lesen ist ein Fehler aufgetreten: %1 Error during SSL handshake: %1 - Es trat ein Fehler im Ablauf des SSL-Protokolls auf: %1 + Im Ablauf des SSL-Protokolls ist ein Fehler aufgetreten: %1 @@ -5455,7 +5455,7 @@ Bitte wählen Sie einen anderen Dateinamen. %1: already exists - %1: existiert bereits + %1: Existiert bereits @@ -5469,7 +5469,7 @@ Bitte wählen Sie einen anderen Dateinamen. Unable to open connection - Die Datenbankverbindung konnte nicht geöffnet werden + Die Datenbankverbindung kann nicht geöffnet werden @@ -5495,7 +5495,7 @@ Bitte wählen Sie einen anderen Dateinamen. Operation on socket is not supported - Diese Socketoperation wird nicht unterstützt + Diese Socket-Operation wird nicht unterstützt @@ -7342,7 +7342,7 @@ Bitte wählen Sie einen anderen Dateinamen. %1 is not an atomic type. Casting is only possible to atomic types. - %1 ist kein atomarer Typ. Es können nur "cast"-Operation zu atomaren Typen durchgeführt werden. + %1 ist kein atomarer Typ. "cast"-Operation können nur zu atomaren Typen durchgeführt werden. @@ -7397,17 +7397,17 @@ Bitte wählen Sie einen anderen Dateinamen. Integer division (%1) by zero (%2) is undefined. - Die Ganzzahldivision (%1) durch Null (%2) ist nicht definiert. + Die Ganzzahldivision (%1) durch Null (%2) ist nicht definiert. Division (%1) by zero (%2) is undefined. - Die Division (%1) durch Null (%2) ist nicht definiert. + Die Division (%1) durch Null (%2) ist nicht definiert. Modulus division (%1) by zero (%2) is undefined. - Die Modulo-Division (%1) durch Null (%2) ist nicht definiert. + Die Modulo-Division (%1) durch Null (%2) ist nicht definiert. @@ -7443,13 +7443,13 @@ Bitte wählen Sie einen anderen Dateinamen. The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this) - Der Namensraum einer nutzerdefinierten Funktion darf nicht leer sein (für diesen Zweck gibt es den vordefinierten Präfix %1) + Der Namensraum einer benutzerdefinierten Funktion darf nicht leer sein (für diesen Zweck gibt es den vordefinierten Präfix %1) A default namespace declaration must occur before function, variable, and option declarations. - Die Deklaration des Default-Namensraums muss vor Funktions- Variablen- oder Optionsdeklaration erfolgen. + Die Deklaration des Default-Namensraums muss vor Funktions-, Variablen- oder Optionsdeklaration erfolgen. -- cgit v0.12 From 26302d22f4dbf3482aacad89ad65bf5b7ed6ae53 Mon Sep 17 00:00:00 2001 From: axasia Date: Sat, 23 May 2009 23:33:49 +0900 Subject: Update japanese translation of Qt Assistant 4.5 --- translations/assistant_ja.ts | 395 ++++++++++++++++++++++--------------------- 1 file changed, 203 insertions(+), 192 deletions(-) diff --git a/translations/assistant_ja.ts b/translations/assistant_ja.ts index 1853155..5e4d2c9 100644 --- a/translations/assistant_ja.ts +++ b/translations/assistant_ja.ts @@ -1,12 +1,12 @@ - + AboutDialog &Close - + 閉じる(&C) @@ -14,18 +14,19 @@ Warning - + 警告 Unable to launch external application. - + 外部アプリケーションを起動できません。 + OK - + OK @@ -37,42 +38,42 @@ Bookmarks - + ブックマーク Add Bookmark - + ブックマークの追加 Bookmark: - + ブックマーク: Add in Folder: - + 追加先フォルダ: + - + + New Folder - + 新しいフォルダ Delete Folder - + フォルダを削除 Rename Folder - + フォルダの名前変更 @@ -80,23 +81,23 @@ Bookmarks - + ブックマーク Remove - + 削除 You are going to delete a Folder, this will also<br>remove it's content. Are you sure to continue? - + フォルダを削除すると中身も削除されますが、続けてよろしいですか? New Folder - + 新しいフォルダ @@ -104,47 +105,47 @@ Filter: - + フィルタ: Remove - + 削除 Delete Folder - + フォルダを削除 Rename Folder - + フォルダの名前変更 Show Bookmark - + ブックマークを開く Show Bookmark in New Tab - + ブックマークを新しいタブで開く Delete Bookmark - + ブックマークを削除 Rename Bookmark - + ブックマークの名前変更 Add - + 追加 @@ -152,48 +153,48 @@ Add new page - + 新しいページの追加 Close current page - + 現在のページを閉じる Print Document - + ドキュメントを印刷 unknown - + 不明 Add New Page - + 新しいページの追加 Close This Page - + このページを閉じる Close Other Pages - + 他のページを閉じる Add Bookmark for this Page... - + このページをブックマークに追加... Search - + 検索 @@ -201,12 +202,12 @@ Open Link - + リンクを開く Open Link in New Tab - + リンクを新しいタブで開く @@ -214,12 +215,12 @@ Add Filter Name - + フィルタ名を追加 Filter Name: - + フィルタ名: @@ -227,27 +228,27 @@ Previous - + 戻る Next - + 進む Case Sensitive - + 大文字/小文字を区別する Whole words - + 単語単位で検索する <img src=":/trolltech/assistant/images/wrap.png">&nbsp;Search wrapped - + <img src=":/trolltech/assistant/images/wrap.png">&nbsp;見つからなければ先頭から検索する @@ -255,27 +256,27 @@ Font - + フォント &Writing system - + 文字セット(&W) &Family - + フォント名(&F) &Style - + スタイル(&S) &Point size - + サイズ(&P) @@ -283,38 +284,39 @@ Help - + ヘルプ OK - + OK <title>Error 404...</title><div align="center"><br><br><h1>The page could not be found</h1><br><h3>'%1'</h3></div> - + <title>Error 404...</title><div align="center"><br><br><h1>ページが見つかりませんでした</h1><br><h3>'%1'</h3></div> Copy &Link Location - + リンクのURLをコピー(&L) Open Link in New Tab Ctrl+LMB - + リンクを新しいタブで開く Ctrl+LMB Open Link in New Tab - + リンクを新しいタブで開く Unable to launch external application. - + 外部アプリケーションを起動できません。 + @@ -322,17 +324,17 @@ &Look for: - + 検索文字列(&L): Open Link - + リンクを開く Open Link in New Tab - + リンクを新しいタブで開く @@ -341,97 +343,98 @@ Install Documentation - + ドキュメントのインストール Downloading documentation info... - + ドキュメント情報をダウンロード中... Download canceled. - + ダウンロードを中止しました。 Done. - + 完了. The file %1 already exists. Do you want to overwrite it? - + %1 は既に存在します。上書きしますか? Unable to save the file %1: %2. - + ファイルを保存できません。%1: %2. Downloading %1... - + %1 をダウンロード中... Download failed: %1. - + ダウンロード失敗: %1. Documentation info file is corrupt! - + ドキュメント情報ファイルが不正です! Download failed: Downloaded file is corrupted. - + ダウンロード失敗: ダウンロードしたファイルが不正です。 Installing documentation %1... - + %1 のドキュメントをインストール中... Error while installing documentation: %1 - + ドキュメントのインストール中にエラーが発生しました: +%1 Available Documentation: - + 使用可能なドキュメント: Install - + インストール Cancel - + キャンセル Close - + 閉じる Installation Path: - + インストール先のパス: ... - + ... @@ -440,298 +443,298 @@ Index - + インデックス Contents - + コンテンツ Bookmarks - + ブックマーク Search - + 検索 Qt Assistant - + Qt Assistant Unfiltered - + フィルタなし Page Set&up... - + ページ設定(&U)... Print Preview... - + 印刷プレビュー... &Print... - + 印刷(&P)... New &Tab - + 新しいタブ(&T) &Close Tab - + タブを閉じる(&C) &Quit - + 終了(&Q) CTRL+Q - + CTRL+Q &Copy selected Text - + 選択中の文字をコピー(&C) &Find in Text... - + 検索(&F)... Find &Next - + 次を検索(&N) Find &Previous - + 前を検索(&P) Preferences... - + 設定... Zoom &in - + 拡大(&I) Zoom &out - + 縮小(&O) Normal &Size - + 普通の大きさ(&S) Ctrl+0 - + Ctrl+0 ALT+C - + ALT+C ALT+I - + ALT+I ALT+S - + ALT+S &Home - + ホーム(&H) Ctrl+Home - + Ctrl+Home &Back - + 戻る(&B) &Forward - + 進む(&F) Sync with Table of Contents - + 内容と目次を同期する Next Page - + 次のページ Ctrl+Alt+Right - + Ctrl+Alt+Right Previous Page - + 前のページ Ctrl+Alt+Left - + Ctrl+Alt+Left Add Bookmark... - + ブックマークの追加... About... - + Qt Assistant について... Navigation Toolbar - + ナビゲーション ツールバー Toolbars - + ツールバー Filter Toolbar - + フィルター ツールバー Filtered by: - + フィルタ条件: Address Toolbar - + アドレス ツールバー Address: - + アドレス: Could not find the associated content item. - + 関連付いた内容が見つかりません。 About %1 - + %1 について Updating search index - + 検索インデックスを更新中 Looking for Qt Documentation... - + Qt ドキュメントを探しています... &Window - + ウィンドウ(&W) Minimize - + 最小化 Ctrl+M - + Ctrl+M Zoom - + ズーム &File - + ファイル(&F) &Edit - + 編集(&E) &View - + 表示(&V) &Go - + ジャンプ(&G) &Bookmarks - + ブックマーク(&B) &Help - + ヘルプ(&H) ALT+O - + ALT+O CTRL+D - + CTRL+D @@ -741,47 +744,47 @@ Add Documentation - + ドキュメントの追加 Qt Compressed Help Files (*.qch) - + 圧縮済み Qt ヘルプファイル (*.qch) The specified file is not a valid Qt Help File! - + 指定されたファイルは有効な Qt ヘルプ ファイルではありません! The namespace %1 is already registered! - + ネームスペース %1 は既に登録済みです! Remove Documentation - + ドキュメントの除去 Some documents currently opened in Assistant reference the documentation you are attempting to remove. Removing the documentation will close those documents. - + 除去しようとしているいくつかのドキュメントは Assistant 上で参照されています。除去すると、これらのドキュメントは閉じられます。 Cancel - + キャンセル OK - + OK Use custom settings - + 独自設定を使用する @@ -789,92 +792,92 @@ Preferences - + 設定 Fonts - + フォント Font settings: - + フォント設定: Browser - + ブラウザー Application - + アプリケーション Filters - + フィルタ Filter: - + フィルタ: Attributes: - + 属性: 1 - + 1 Add - + 追加 Remove - + 削除 Documentation - + ドキュメント Registered Documentation: - + 登録済みドキュメント: Add... - + 追加... Options - + オプション Current Page - + 現在のページ Restore to default - + デフォルト設定に戻す Homepage - + ホームページ @@ -882,64 +885,64 @@ The specified collection file does not exist! - + 指定されたコレクションファイルは存在しません! Missing collection file! - + コレクションファイルが見つかりません! Invalid URL! - + 不正なURLです! Missing URL! - + URLが見つかりません! Unknown widget: %1 - + 不明なウィジェット: %1 Missing widget! - + ウィジェットが見つかりません! The specified Qt help file does not exist! - + 指定された Qt ヘルプ ファイルが存在しません! Missing help file! - + ヘルプファイルが見つかりません! Missing filter argument! - + フィルタ引数が不足しています! Unknown option: %1 - + 不明なオプション: %1 Qt Assistant - + Qt Assistant @@ -948,12 +951,16 @@ Reason: %2 - + ドキュメントファイルを登録できませんでした。 +%1 + +原因: +%2 Documentation successfully registered. - + ドキュメントの登録に成功しました。 @@ -962,28 +969,32 @@ Reason: Reason: %2 - + ドキュメントファイルを解除できませんでした。 +%1 + +原因: +%2 Documentation successfully unregistered. - + ドキュメントの解放に成功しました。 Cannot load sqlite database driver! - + SQLite データベース ドライバーをロードできません! The specified collection file could not be read! - + 指定されたコレクションファイルは読み込めません! Bookmark - + ブックマーク @@ -991,12 +1002,12 @@ Reason: Debugging Remote Control - + リモート コントロールをデバッグ中 Received Command: %1 %2 - + 受信したコマンド: %1 %2 @@ -1004,28 +1015,28 @@ Reason: &Copy - + コピー(&C) Copy &Link Location - + リンクのURLをコピー(&L) Open Link in New Tab - + リンクを新しいタブで開く Select All - + すべてを選択 Open Link - + リンクを開く @@ -1033,27 +1044,27 @@ Reason: Choose a topic for <b>%1</b>: - + <b>%1</b> の検索先トピックを選択してください: Choose Topic - + トピックを選択 &Topics - + トピック(&T) &Display - + 表示(&D) &Close - + 閉じる(&C) -- cgit v0.12 From 91be6a182c2c16f9abedbaa9e90e776a7a07e34c Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Sun, 24 May 2009 07:42:45 +0400 Subject: Update Russian translation for Qt libraries (xmlpatterns and statemachine are not translated yet) --- translations/qt_ru.qm | Bin 60815 -> 107081 bytes translations/qt_ru.ts | 3042 ++++++++++++++++++++++++------------------------- 2 files changed, 1519 insertions(+), 1523 deletions(-) diff --git a/translations/qt_ru.qm b/translations/qt_ru.qm index 63b7b8b..6467629 100644 Binary files a/translations/qt_ru.qm and b/translations/qt_ru.qm differ diff --git a/translations/qt_ru.ts b/translations/qt_ru.ts index 28e786b..a27b8c4 100644 --- a/translations/qt_ru.ts +++ b/translations/qt_ru.ts @@ -1,37 +1,30 @@ - + AudioOutput <html>The audio playback device <b>%1</b> does not work.<br/>Falling back to <b>%2</b>.</html> - + <html>Звуковое устройство <b>%1</b> не работает.<br/>Будет использоваться <b>%2</b>.</html> <html>Switching to the audio playback device <b>%1</b><br/>which just became available and has higher preference.</html> - + <html>Переключение на звуковое устройство <b>%1</b><br/>, которое доступно и имеет высший приоритет.</html> Revert back to device '%1' - + Возвращение к устройству '%1' CloseButton - + Close Tab - - - - - PPDOptionsModel - - Name - Имя + Закрыть вкладку @@ -39,32 +32,32 @@ Notifications - + Уведомления Music - + Музыка Video - + Видео Communication - + Общение Games - + Игры Accessibility - + Средства для людей с ограниченными возможностями @@ -73,13 +66,15 @@ Warning: You do not seem to have the package gstreamer0.10-plugins-good installed. Some video features have been disabled. - + Внимание: Похоже, пакет gstreamer0.10-plugins-good не установлен. + Некоторые возможности воспроизведения видео недоступны. Warning: You do not seem to have the base GStreamer plugins installed. All audio and video support has been disabled - + Внимание: Похоже, основной модуль GStreamer не установлен. + Поддержка видео и аудио невозможна @@ -90,12 +85,15 @@ Check your Gstreamer installation and make sure you have libgstreamer-plugins-base installed. - + Невозможно начать воспроизведение. + +Проверьте установку Gstreamer и убедитесь, +что пакет libgstreamer-plugins-base установлен. A required codec is missing. You need to install the following codec(s) to play this content: %0 - + Отсутствует необходимый кодек. Вам нужно установить следующие кодеки для воспроизведения данного содержимого: %0 @@ -107,27 +105,27 @@ have libgstreamer-plugins-base installed. Could not open media source. - + Не удалось открыть источник медиа-данных. Invalid source type. - + Неверный тип источника медиа-данных. Could not locate media source. - + Не удалось найти источник медиа-данных. Could not open audio device. The device is already in use. - + Не удалось открыть звуковое устройство. Устройство уже используется. Could not decode media source. - + Не удалось декодировать источник медиа-данных. @@ -136,14 +134,14 @@ have libgstreamer-plugins-base installed. Volume: %1% - + Громкость: %1% Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1% - + Используйте ползунок для настройки громкости. Крайняя левая позиция соответствует 0%, самая правая - %1% @@ -151,7 +149,7 @@ have libgstreamer-plugins-base installed. %1, %2 not defined - + %1, %2 не определен @@ -164,52 +162,52 @@ have libgstreamer-plugins-base installed. True - True + Да False - False + Нет Insert - Вставить + Вставить Update - Обновить + Обновить Delete - Удалить + Удалить Q3FileDialog - + Copy or Move a File - Копировать или переместить файл + Копировать или переместить файл Read: %1 - Открытие: %1 + Чтение: %1 Write: %1 - Запись: %1 + Запись: %1 - + Cancel - Отмена + Отмена @@ -217,307 +215,307 @@ have libgstreamer-plugins-base installed. All Files (*) - Все файлы (*) + Все файлы (*) Name - Имя + Имя Size - Размер + Размер Type - Тип + Тип Date - Дата + Дата Attributes - Атрибуты + Атрибуты &OK - &OK + &Готово Look &in: - &Смотреть в: + &Папка: File &name: - &Имя файла: + &Имя файла: File &type: - &Тип файла: + &Тип файла: Back - Назад + Назад One directory up - Вверх на один уровень + На один уровень вверх Create New Folder - Создать новый каталог + Создать каталог List View - Список + Список Detail View - Детальный вид + Подробный вид Preview File Info - Предпросмотр информации о файле + Предпросмотр информации о файле Preview File Contents - Предпросмотр содержимого файла + Предпросмотр содержимого файла Read-write - Чтение-запись + Чтение и запись Read-only - Только чтение + Только чтение Write-only - Только запись + Только запись Inaccessible - Нет доступа + Нет доступа Symlink to File - Ссылка на файл + Ссылка на файл Symlink to Directory - Ссылка на каталог + Ссылка на каталог Symlink to Special - Ссылка на спецфайл + Ссылка на спецфайл File - Файл + Файл Dir - Каталог + Каталог Special - Спецфайл + Спецфайл Open - Открыть + Открыть Save As - Сохранить как + Сохранить как &Open - &Открыть + &Открыть &Save - &Сохранить + &Сохранить &Rename - &Переименовать + &Переименовать &Delete - &Удалить + &Удалить R&eload - О&бновить + О&бновить Sort by &Name - По &имени + По &имени Sort by &Size - По &размеру + По &размеру Sort by &Date - По &дате + По &дате &Unsorted - &Не упорядочивать + &Не упорядочивать Sort - Упорядочить + Упорядочить Show &hidden files - Показать &скрытые файлы + Показать скр&ытые файлы the file - файл + файл the directory - каталог + каталог the symlink - ссылку + ссылку Delete %1 - Удалить %1 + Удалить %1 <qt>Are you sure you wish to delete %1 "%2"?</qt> - <qt>Вы действительно хотите удалить %1 "%2"?</qt> + <qt>Вы действительно хотите удалить %1 "%2"?</qt> &Yes - &Да + &Да &No - &Нет + &Нет New Folder 1 - Новый каталог 1 + Новый каталог 1 New Folder - Новый каталог + Новый каталог New Folder %1 - Новый каталог %1 + Новый каталог %1 Find Directory - Найти каталог + Найти каталог Directories - Каталоги + Каталоги Directory: - Каталог: + каталог: Error - Ошибка + Ошибка %1 File not found. Check path and filename. - %1 + %1 Файл не найден. Проверьте правильность пути и имени файла. All Files (*.*) - Все файлы (*.*) + Все файлы (*.*) Open - Открыть + Открыть Select a Directory - Выбрать каталог + Выбрать каталог @@ -527,21 +525,21 @@ Check path and filename. Could not read directory %1 - Невозможно просмотреть каталог + Не удалось прочитать каталог %1 Could not create directory %1 - Невозможно создать каталог + Не удалось создать каталог %1 Could not remove file or directory %1 - Невозможно удалить файл или каталог + Не удалось удалить файл или каталог %1 @@ -550,7 +548,7 @@ Check path and filename. %1 to %2 - Невозможно переименовать + Не удалось переименовать %1 в %2 @@ -559,14 +557,14 @@ to Could not open %1 - Невозможно открыть + Не удалось открыть %1 Could not write %1 - Невозможно записать + Не удалось записать %1 @@ -575,12 +573,12 @@ to Line up - Выровнять + Выровнять Customize... - Настроить... + Настроить... @@ -588,7 +586,7 @@ to Operation stopped by the user - Операция прервана пользователем + Операция прервана пользователем @@ -597,36 +595,36 @@ to Cancel - Отмена + Отмена Q3TabDialog - - + + OK - OK + Готово - + Apply - Применить + Применить Help - Справка + Справка Defaults - По умолчанию + По умолчанию Cancel - Отмена + Отмена @@ -634,38 +632,38 @@ to &Undo - &Отменить + &Отменить действие &Redo - &Повторить + &Повторить действие Cu&t - &Вырезать + &Вырезать &Copy - &Копировать + &Копировать &Paste - &Вставить + В&ставить Clear - Очистить + Очистить Select All - Выделить все + Выделить все @@ -673,67 +671,67 @@ to System - + Системное меню Restore up - + Восстановить Minimize - Свернуть + Минимизировать Restore down - + Восстановить Maximize - Развернуть + Распахнуть Close - Закрыть + Закрыть Contains commands to manipulate the window - + Содержит команды управления окном Puts a minimized back to normal - + Возвращает минимизированное окно в нормальное состояние Moves the window out of the way - + Сворачивает окно Puts a maximized window back to normal - + Возвращает распахнутое окно в нормальное состояние Makes the window full screen - + Разворачивает окно на весь экран Closes the window - + Зыкрывает окно Displays the name of the window and contains controls to manipulate it - + Отображает название окна и содержит команды управления им @@ -741,7 +739,7 @@ to More... - Больше... + Больше... @@ -751,49 +749,49 @@ to The protocol `%1' is not supported - Протокол `%1' не поддерживается + Протокол `%1' не поддерживается The protocol `%1' does not support listing directories - Протокол `%1' не поддерживает просмотр каталогов + Протокол `%1' не поддерживает просмотр каталогов The protocol `%1' does not support creating new directories - Протокол `%1' не поддерживает создание новых каталогов + Протокол `%1' не поддерживает создание каталогов The protocol `%1' does not support removing files or directories - Протокол `%1' не поддерживает удаление файлов или каталогов + Протокол `%1' не поддерживает удаление файлов или каталогов The protocol `%1' does not support renaming files or directories - Протокол `%1' не поддерживает переименование файлов или каталогов + Протокол `%1' не поддерживает переименование файлов или каталогов The protocol `%1' does not support getting files - Протокол `%1' не поддерживает доставку файлов + Протокол `%1' не поддерживает доставку файлов The protocol `%1' does not support putting files - Протокол `%1' не поддерживает отправку файлов + Протокол `%1' не поддерживает отправку файлов The protocol `%1' does not support copying or moving files or directories - Протокол `%1' не поддерживает копирование или перемещение файлов и каталогов + Протокол `%1' не поддерживает копирование или перемещение файлов или каталогов (unknown) - (неизвестно) + (неизвестно) @@ -801,27 +799,27 @@ to &Cancel - &Отмена + &Отмена < &Back - < &Назад + < &Назад &Next > - &Вперед > + &Вперед > &Finish - &Финиш + &Закончить &Help - &Справка + &Справка @@ -832,68 +830,67 @@ to Host not found - + Узел не найден Connection refused - Отказано в соединении + Отказано в соединении Connection timed out - + Время на соединение истекло Operation on socket is not supported - + Операция с сокетом не поддерживается Socket operation timed out - + Время на операцию с сокетом истекло Socket is not connected - + Сокет не подключён Network unreachable - + Сеть недоступна QAbstractSpinBox - + &Step up - + Шаг вв&ерх Step &down - + Шаг вн&из &Select All - + &Выделить все 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 + + Activate + Активировать @@ -906,37 +903,38 @@ to Ошибка совместимости библиотеки Qt - - Activate - + + 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 - + Activates the program's main window - + Активирует главное окно программы QAxSelect - + Select ActiveX Control - + Выберите компоненту ActiveX - + OK - OK + Готово - + &Cancel - &Отмена + &Отмена - + COM &Object: - + COM &Объект: @@ -944,17 +942,17 @@ to Uncheck - + Снять отметку Check - + Отметить Toggle - + Переключить @@ -977,17 +975,17 @@ to &Red: - &Крас: + &Красный: &Green: - &Зел: + &Зелёный: Bl&ue: - С&ин: + С&иний: @@ -997,7 +995,7 @@ to Select Color - + Выберите цвет @@ -1007,28 +1005,12 @@ to &Custom colors - &Собственные цвета - - - &Define Custom Colors >> - &Выбрать собственные цвета >> - - - OK - OK - - - Cancel - Отмена + &Произвольные цвета &Add to Custom Colors - &Добавить к собственным цветам - - - Select color - Выбрать цвет + &Добавить к произвольным цветам @@ -1037,22 +1019,22 @@ to Open - Открыть + Открыть False - False + Нет True - True + Да Close - Закрыть + Закрыть @@ -1061,19 +1043,19 @@ to %1: key is empty QSystemSemaphore - + %1: пустой ключ %1: unable to make key QSystemSemaphore - + %1: невозможно создать ключ %1: ftok failed QSystemSemaphore - + %1: ошибка ftok @@ -1081,22 +1063,22 @@ to Unable to connect - + Невозможно соединиться Unable to commit transaction - + Невозможно выполнить транзакцию Unable to rollback transaction - + Невозможно откатить транзакцию Unable to set autocommit - + Невозможно установить автовыполнение транзакции @@ -1105,32 +1087,32 @@ to Unable to execute statement - + Невозможно выполнить выражение Unable to prepare statement - + Невозможно подготовить выражение Unable to bind variable - + Невозможно привязать значение Unable to fetch record %1 - + Невозможно получить запись %1 Unable to fetch next - + Невозможно получить следующую строку Unable to fetch first - + Невозможно получить первую строку @@ -1184,162 +1166,162 @@ to Done - + Готово QDialogButtonBox - + OK - OK + Готово - - Save - Сохранить + + &OK + &Готово - + &Save - &Сохранить + &Сохранить + + + + Save + Сохранить Open - Открыть + Открыть - Cancel - Отмена + &Cancel + &Отмена - &Cancel - &Отмена + Cancel + Отмена - Close - Закрыть + &Close + &Закрыть - &Close - &Закрыть + Close + Закрыть Apply - Применить + Применить Reset - + Сбросить Help - Справка + Справка Don't Save - + Не сохранять Discard - + Не применять &Yes - &Да + Д&а Yes to &All - + Да для &всех &No - &Нет + &Нет N&o to All - + Н&ет для всех Save All - + Сохранить все Abort - + Прервать Retry - + Попробовать ещё Ignore - + Игнорировать Restore Defaults - + Восстановить значения по умолчанию Close without Saving - - - - - &OK - &OK + Закрыть без сохранения QDirModel - + Name - Имя + Имя Size - Размер + Размер Kind Match OS X Finder - + Вид Type All other platforms - Тип + Тип Date Modified - + Дата изменения @@ -1347,7 +1329,7 @@ to Close - Закрыть + Закрыть @@ -1365,28 +1347,18 @@ to More - + Больше Less - + Меньше QErrorMessage - - &Show this message again - &Показывать это сообщение в дальнейшем - - - - &OK - &OK - - - + Debug Message: Отладочное сообщение: @@ -1400,326 +1372,376 @@ to Fatal Error: Критическая ошибка: + + + &Show this message again + &Показывать это сообщение в дальнейшем + + + + &OK + &Готово + QFile - + Destination file exists - + Файл существует + + + + Will not rename sequential file using block copy + Не будет переименовывать последовательный файл, используя копирование блока - + Cannot remove source file - + Невозможно удалить исходный файл - + Cannot open %1 for input - + Невозможно открыть %1 для ввода Cannot open for output - + Невозможно открыть для вывода Failure to write block - + Сбой записи блока Cannot create %1 for output - + Невозможно создать %1 для вывода QFileDialog - - + + All Files (*) Все файлы (*) - - - Back - Назад - - - - - List View - Список + + Directories + Каталоги - - - Detail View - Детальный вид + + + + + &Open + &Открыть - - - File - Файл + + + &Save + &Сохранить - + Open Открыть - - Save As - Сохранить как - - - - - - - &Open - &Открыть + + %1 already exists. +Do you want to replace it? + %1 уже существует. +Хотите заменить его? - - - &Save - &Сохранить + + %1 +File not found. +Please verify the correct file name was given. + %1 +Файл не найден. +Проверьте правильность заданного имени файла. - - Recent Places - + + My Computer + Мой компьютер - + &Rename - &Переименовать + &Переименовать &Delete - &Удалить + &Удалить Show &hidden files - Показать &скрытые файлы + Показать скр&ытые файлы - - New Folder - Новый каталог + + + Back + Назад - - Find Directory - Найти каталог + + + Parent Directory + Родительский каталог - - Directories - Каталоги + + + List View + Список - - All Files (*.*) - Все файлы (*.*) + + + Detail View + Подробный вид - - - Directory: - Каталог: + + + Files of type: + Типы файлов: - - %1 already exists. -Do you want to replace it? - + + + Directory: + Каталог: - + + %1 -File not found. -Please verify the correct file name was given. - +Directory not found. +Please verify the correct directory name was given. + %1 +Каталог не найден. +Проверьте правильность заданного имени каталога. - - My Computer - + + '%1' is write protected. +Do you want to delete it anyway? + '%1' защищён от записи. +Всё-равно хотите удалить? - - - Parent Directory - - + + Are sure you want to delete '%1'? + Вы уверены, что хотите удалить '%1'? + - - - Files of type: - + + Could not delete directory. + Не удалось удалить каталог. - - - %1 -Directory not found. -Please verify the correct directory name was given. - + + Recent Places + Недавние документы - - '%1' is write protected. -Do you want to delete it anyway? - + + All Files (*.*) + Все файлы (*.*) + + + + Save As + Сохранить как + + + + Drive + Диск + + + + + File + Файл - Are sure you want to delete '%1'? - + File Folder + Match Windows Explorer + Каталог с файлами - - Could not delete directory. - + + Folder + All other platforms + Каталог - - Drive - + + Alias + Mac OS X Finder + Псевдоним - + + Shortcut + All other platforms + Ярлык + + + Unknown - + Неизвестно + + + + Find Directory + Найти каталог - + Show - + Показать - - + + Forward - Вперед + Вперед - + + New Folder + Новый каталог + + + &New Folder - + &Новый каталог - + &Choose - + &Выбрать - + Remove - + Удалить - - + + File &name: - &Имя файла: + &Имя файла: - - + + Look in: - + Перейти к: - - + + Create New Folder - Создать новый каталог + Создать каталог QFileSystemModel - - %1 TB - - - - - %1 GB - - - - - %1 MB - - - - - %1 KB - - - - - %1 bytes - - - - + Invalid filename - + Некорректное имя файла <b>The name "%1" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks. - + <b>Имя "%1" не может быть использовано.</b><p>Попробуйте использовать имя меньшей длины и/или без символов пунктуации. Name - Имя + Имя Size - Размер + Размер Kind Match OS X Finder - + Вид Type All other platforms - Тип + Тип Date Modified - + Дата изменения - + My Computer - + Мой компьютер Computer - + Компьютер + + + + + %1 TB + %1 Тб + + + + + %1 GB + %1 Гб + + + + + %1 MB + %1 Мб + + + + + %1 KB + %1 Кб + + + + + %1 bytes + %1 байт @@ -1728,70 +1750,70 @@ Do you want to delete it anyway? Normal - + Обычный Bold - + Жирный Demi Bold - + Срендней жирности Black - + Чёрный Demi - + Средний Light - + Лёгкий Italic - + Курсив Oblique - + Наклонный Any - + Любая Latin - + Латиница Greek - + Греческий Cyrillic - + Кириллица @@ -1949,7 +1971,7 @@ Do you want to delete it anyway? Font st&yle - &Стиль шрифта + Ст&иль шрифта @@ -1964,12 +1986,12 @@ Do you want to delete it anyway? Stri&keout - &Перечеркивать + Зачёр&кнутый &Underline - П&одчеркивать + П&одчёркнутый @@ -1977,74 +1999,59 @@ Do you want to delete it anyway? Пример - - - Select Font - Выбрать шрифт + + Wr&iting System + &Система письма - - Wr&iting System - + + + Select Font + Выберите шрифт QFtp - - Host %1 found - Обнаружен узел %1 - - - - Host found - Узел обнаружен - - - - - - Connected to host %1 - Установлено соединение с узлом %1 - - - - Connected to host - Соединение с узлом установлено - - - - Connection to %1 closed - Соединение с узлом %1 разорвано - - - - - - Connection closed - Соединение разорвано + + + Not connected + Соединение не установлено - - + + Host %1 not found - Узел %1 не обнаружен + Узел %1 не найден Connection refused to host %1 - Отказано в соединении с узлом %1 + В соединении с узлом %1 отказано Connection timed out to host %1 - + Время на соединение с узлом %1 истекло + + + + + + Connected to host %1 + Установлено соединение с узлом %1 + + + + + Connection refused for data connection + Отказ в соединении для передачи данных - + - + Unknown error Неизвестная ошибка @@ -2054,7 +2061,7 @@ Do you want to delete it anyway? Connecting to host failed: %1 - Ошибка соединения с узлом: + Не удалось соединиться с узлом: %1 @@ -2062,7 +2069,7 @@ Do you want to delete it anyway? Login failed: %1 - Ошибка входа в систему: + Не удалось авторизоваться: %1 @@ -2070,7 +2077,7 @@ Do you want to delete it anyway? Listing directory failed: %1 - Ошибка просмотра каталога: + Не удалось прочитать каталог: %1 @@ -2078,7 +2085,7 @@ Do you want to delete it anyway? Changing directory failed: %1 - Ошибка смены каталога: + Не удалось сменить каталог: %1 @@ -2086,7 +2093,7 @@ Do you want to delete it anyway? Downloading file failed: %1 - Ошибка загрузки файла: + Не удалось загрузить файл: %1 @@ -2094,7 +2101,7 @@ Do you want to delete it anyway? Uploading file failed: %1 - Ошибка отправки файла: + Не удалось отгрузить файл: %1 @@ -2102,7 +2109,7 @@ Do you want to delete it anyway? Removing file failed: %1 - Ошибка удаления файла: + Не удалось удалить файл: %1 @@ -2110,7 +2117,7 @@ Do you want to delete it anyway? Creating directory failed: %1 - Ошибка создания каталога: + Не удалось создать каталог: %1 @@ -2118,20 +2125,35 @@ Do you want to delete it anyway? Removing directory failed: %1 - Ошибка удаления каталога: + Не удалось удалить каталог: %1 - - - Not connected - Нет соединения + + + + Connection closed + Соединение закрыто - - - Connection refused for data connection - Отказано в соединении передачи данных + + Host %1 found + Узел %1 найден + + + + Connection to %1 closed + Соединение с %1 закрыто + + + + Host found + Узел найден + + + + Connected to host + Соединение с узлом @@ -2139,7 +2161,7 @@ Do you want to delete it anyway? Unknown error - Неизвестная ошибка + Неизвестная ошибка @@ -2149,12 +2171,12 @@ Do you want to delete it anyway? - + Host not found - + Узел не найден @@ -2162,331 +2184,331 @@ Do you want to delete it anyway? Unknown address type - + Неизвестный тип адреса Unknown error - Неизвестная ошибка + Неизвестная ошибка QHttp - - - Connection refused - Отказано в соединении - - - - - - Host %1 not found - Узел %1 не обнаружен + + + + + Unknown error + Неизвестная ошибка - - - Wrong content length - Неверная длина данных + + + Request aborted + Запрос прерван - - HTTPS connection requested but SSL support not compiled in - + + + No server set to connect to + Не указан сервер для подключения - - - - - HTTP request failed - Ошибка HTTP-запроса + + + Wrong content length + Неверная длина содержимого - - Host %1 found - Обнаружен узел %1 + + + Server closed connection unexpectedly + Сервер неожиданно разорвал соединение - - Host found - Узел обнаружен + + Unknown authentication method + Неизвестный метод авторизации - - Connected to host %1 - Установлено соединение с узлом %1 + + Error writing response to device + Ошибка записи ответа на устройство - - Connected to host - Соединение с узлом установлено + + + Connection refused + Отказано в соединении - - Connection to %1 closed - Соединение с узлом %1 разорвано + + + + Host %1 not found + Узел %1 не найден - - - Connection closed - Соединение разорвано + + + + + HTTP request failed + HTTP-запрос не удался - - - - - Unknown error - Неизвестная ошибка + + + Invalid HTTP response header + Некорректный HTTP-заголовок ответа - - - Request aborted - Запрос отменен + + + + + Invalid HTTP chunked body + Некорректное HTTP-фрагментирование данных - - - No server set to connect to - Не выбран сервер для подключения + + Host %1 found + Узел %1 найден - - - Server closed connection unexpectedly - Неожиданный разрыв соединения сервером + + Connected to host %1 + Установлено соединение с узлом %1 - - - Invalid HTTP response header - Получен некорректный HTTP-заголовок + + Connection to %1 closed + Соединение с узлом %1 закрыто - - Unknown authentication method - + + Host found + Узел найден - - - - - Invalid HTTP chunked body - Некорректный HTTP-ответ + + Connected to host + Соединение с узлом установлено - - Error writing response to device - + + + Connection closed + Соединение закрыто - + Proxy authentication required - + Требуется авторизация на прокси-сервере Authentication required - + Требуется авторизация Connection refused (or timed out) - + В соединении отказано (или время ожидания истекло) Proxy requires authentication - + Прокси-сервер требует авторизацию Host requires authentication - + Узел требует авторизацию Data corrupted - + Данные повреждены Unknown protocol specified - + Указан неизвестный протокол SSL handshake failed + + + HTTPS connection requested but SSL support not compiled in + Запрошено соединение по протоколу HTTPS, но поддержка SSL не скомпилирована + QHttpSocketEngine Did not receive HTTP response from proxy - + Не получен HTTP-ответ от прокси-сервера Error parsing authentication request from proxy - + Ошибка разбора запроса авторизации от прокси-сервера Authentication required - + Требуется авторизация Proxy denied connection - + Прокси-сервер запретил соединение Error communicating with HTTP proxy - + Ошибка обмена данными с прокси-сервером HTTP Proxy server not found - + Прокси-сервер не найден Proxy connection refused - + В соединении прокси-сервером отказано Proxy server connection timed out - + Время на соединение с прокси-сервером истекло Proxy connection closed prematurely - + Соединение с прокси-сервером неожиданно закрыто QIBaseDriver - + Error opening database - + Невозможно открыть базу данных Could not start transaction - + Не удалось начать транзакцию Unable to commit transaction - + Невозможно выполнить транзакцию Unable to rollback transaction - + Невозможно откатить транзакцию QIBaseResult - + Unable to create BLOB - + Невозможно создать BLOB Unable to write BLOB - + Невозможно записать BLOB Unable to open BLOB - + Невозможно открыть BLOB Unable to read BLOB - + Невозможно прочитать BLOB - + Could not find array - + Не удалось найти массив - + Could not get array data - + Не удалось найти данные массива - + Could not get query info - + Не удалось найти информацию о запросе Could not start transaction - + Не удалось начать транзакцию Unable to commit transaction - + Невозможно выполнить транзакцию Could not allocate statement - + Не удалось получить ресурсы для создания выражения Could not prepare statement - + Не удалось подготовить выражение Could not describe input statement - + Не удалось описать входящее выражение Could not describe statement - + Не удалось описать выражение Unable to close statement - + Невозможно закрыть выражение Unable to execute query - + Невозможно выполнить запрос Could not fetch next item - + Не удалось получить следующий элемент Could not get statement info - + Не удалось найти информацию о выражении @@ -2494,27 +2516,27 @@ Do you want to delete it anyway? Permission denied - + Доступ запрещён Too many open files - + Слишком много открытых файлов No such file or directory - + Файл или каталог не существует No space left on device - + Нет свободного места на устройстве - + Unknown error - Неизвестная ошибка + Неизвестная ошибка @@ -2545,7 +2567,7 @@ Do you want to delete it anyway? Enter a value: - + Укажите значение: @@ -2553,66 +2575,66 @@ Do you want to delete it anyway? Could not mmap '%1': %2 - + Не удалось выполнить mmap '%1': %2 Plugin verification data mismatch in '%1' - + Проверочная информация для модуля '%1' не совпадает Could not unmap '%1': %2 - + Не удалось выполнить unmap '%1': %2 The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5] - + Модуль '%1' использует несоместимую библиотеку Qt. (%2.%3.%4) [%5] The plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3" - + Плагин '%1' использует несоместимую библиотеку Qt. Ожидается ключ "%2", но получен ключ "%3" Unknown error - Неизвестная ошибка + Неизвестная ошибка The shared library was not found. - + Динамическая библиотека не найдена. The file '%1' is not a valid Qt plugin. - + Файл '%1' - не может быть корректным модулем Qt. The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.) - + Плагин '%1' использует несоместимую библиотеку Qt. (Нельзя совмещать релизные и отладочные библиотеки.) Cannot load library %1: %2 - + Невозможно загрузить библиотеку %1: %2 Cannot unload library %1: %2 - + Невозможно выгрузить библиотеку %1: %2 Cannot resolve symbol "%1" in %2: %3 - + Невозможно разрешить символ "%1" в %2: %3 @@ -2620,62 +2642,61 @@ Do you want to delete it anyway? &Undo - &Отменить + &Отменить действие &Redo - &Повторить + &Повторить действие Cu&t - &Вырезать + &Вырезать &Copy - &Копировать + &Копировать &Paste - В&ставить + В&ставить - - Select All - Выделить все + + Delete + Удалить - - Delete - Удалить + + Select All + Выделить все QLocalServer - + %1: Name error - + %1: Некорректное имя %1: Permission denied - + %1: Доступ запрещён %1: Address in use - + %1: Адрес используется - %1: Unknown error %2 - + %1: Неизвестная ошибка %2 @@ -2684,13 +2705,13 @@ Do you want to delete it anyway? %1: Connection refused - + %1: Отказано в соединении %1: Remote closed - + %1: Удалённое закрытие @@ -2698,143 +2719,143 @@ Do you want to delete it anyway? %1: Invalid name - + %1: Некорректное имя %1: Socket access error - + %1: Ошибка обращения к сокету %1: Socket resource error - + %1: Ошибка выделения ресурсов сокета %1: Socket operation timed out - + %1: Время на операцию с сокетом истекло %1: Datagram too large - + %1: Датаграмма слишком большая %1: Connection error - + %1: Ошибка соединения %1: The socket operation is not supported - + %1: Операция с сокетом не поддерживается %1: Unknown error - + %1: Неизвестная ошибка %1: Unknown error %2 - + %1: Неизвестная ошибка %2 QMYSQLDriver - + Unable to open database ' - + Невозможно открыть базу данных ' Unable to connect - + Невозможно соединиться - + Unable to begin transaction - + Невозможно начать транзакцию Unable to commit transaction - + Невозможно выполнить транзакцию Unable to rollback transaction - + Невозможно откатить транзакцию QMYSQLResult - + Unable to fetch data - + Невозможно получить данные - + Unable to execute query - + Невозможно выполнить запрос Unable to store result - + Невозможно сохранить результат - + Unable to prepare statement - + Невозможно подготовить выражение - + Unable to reset statement - + Невозможно сбросить выражение - + Unable to bind value - + Невозможно привязать значение Unable to execute statement - + Невозможно выполнить выражение Unable to bind outvalues - + Невозможно привязать результирующие значения Unable to store statement results - + Невозможно сохранить результат выполнения выражения - + Unable to execute next query - + Невозможно выполнить следующий запрос Unable to store next result - + Невозможно сохранить следующий результат @@ -2842,7 +2863,7 @@ Do you want to delete it anyway? (Untitled) - + (Неозаглавлено) @@ -2850,92 +2871,92 @@ Do you want to delete it anyway? %1 - [%2] - %1 - [%2] + %1 - [%2] Close - Закрыть + Закрыть Minimize - Свернуть + Минимизировать Restore Down - Восстановить + Восстановить &Restore - &Восстановить + &Восстановить &Move - &Переместить + &Переместить &Size - &Размер + &Размер Mi&nimize - &Свернуть + &Минимизировать Ma&ximize - Р&азвернуть + Р&аспахнуть Stay on &Top - Всегда &наверху + Оставаться &сверху &Close - &Закрыть + &Закрыть - [%1] - + - [%1] Maximize - Развернуть + Распахнуть Unshade - + Восстановить из заголовка Shade - + Свернуть в заголовок Restore - + Восстановить Help - Справка + Справка Menu - Меню + Меню @@ -2944,91 +2965,68 @@ Do you want to delete it anyway? Close - Закрыть + Закрыть Open - Открыть + Открыть Execute - + Выполнить - QMenuBar - - About - О программе - - - Config - Конфигурация - - - Preference - Настройки - - - Options - Параметры - - - Setting - Настройки - - - Setup - Настройки - - - Quit - Выход - + QMessageBox - Exit - Выход + + Help + Справка - - - QMessageBox - - + + OK - OK + Готово + + + + <h3>About Qt</h3><p>This program uses Qt version %1.</p><p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://www.qtsoftware.com/products/licensing">www.qtsoftware.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://www.qtsoftware.com/qt/">www.qtsoftware.com/qt</a> for more information.</p> + <h3>О Qt</h3><p>Данная программа использует Qt версии %1.</p><p>Qt - это инструмент для разработки крссплатформенных приложений на C++.</p><p>Qt предоставляет переносимость между MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux и всеми популярными вариантами коммерческой Unix. Также Qt доступна для встраиваемых устройств в виде Qt для Embedded Linux и Qt для Windows CE.</p><p>Qt доступна под тремя различными лицензиями, разработанными для удовлетворения требований различных пользователей.</p>Qt, лицензированая нашей коммерческой лицензией, предназначена для развития проприетарного/коммерческого программного обеспечения, когда Вы не желаете предоставлять исходные коды третьим сторонам; коммерческая лицензия не соответствует условиям лицензий GNU LGPL версии 2.1 или GNU GPL версии 3.0.</p><p>Qt под лицензией GNU LGPL версии 2.1 предназначена для разработки программного обеспечения с открытым исходным кодом или коммерческого программного обеспечения при соблюдении сроков и условий лицензии GNU LGPL версии 2.1.</p><p>Qt под лицензией GNU General Public License версии 3.0 предназначена для разработки программных приложений в тех случаях, когда Вы хотели бы использовать такие приложения в сочетании с программным обеспечением на условиях лицензии GNU GPL с версии 3.0 или если Вы готовы соблюдать условия лицензии GNU GPL версии 3.0.</p><p>Обратитесь к <a href="http://www.qtsoftware.com/products/licensing">www.qtsoftware.com/products/licensing</a> для обзора лицензий Qt.</p><p>Copyright (C) 2009 Корпорация Nokia и/или её дочерние подразделения.</p><p>Qt - продукт Nokia. Обратитесь к <a href="http://www.qtsoftware.com/qt/">www.qtsoftware.com/qt</a> для получения дополнительной информации.</p> - + About Qt - + О Qt - - Help - Справка + <p>This program uses Qt version %1.</p> + <p>Данная программа использует Qt версии %1.</p> - + Show Details... - + Показать подробности... Hide Details... - + Скрыть подробности... - - <h3>About Qt</h3><p>This program uses Qt version %1.</p><p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://www.qtsoftware.com/products/licensing">www.qtsoftware.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://www.qtsoftware.com/qt/">www.qtsoftware.com/qt</a> for more information.</p> - + <h3>About Qt</h3>%1<p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is a Nokia product. See <a href="http://qtsoftware.com/qt/">qtsoftware.com/qt/</a> for more information.</p> + <h3>О Qt</h3>%1<p>Qt - это инструмент для разработчки крссплатформенных приложений на C++.</p><p>Qt предоставляет переносимость между MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux и всеми популярными вариантами коммерческой Unix. Также Qt доступна для встраиваемых устройств в виде Qt for Embedded Linux и Qt for Windows CE.</p><p>Qt - продукт Nokia. Обратитесь к <a href="http://qtsoftware.com/qt/">qtsoftware.com/qt/</a> для получения дополнительной информации.</p> + + + <p>This program uses Qt Open Source Edition version %1.</p><p>Qt Open Source Edition is intended for the development of Open Source applications. You need a commercial Qt license for development of proprietary (closed source) applications.</p><p>Please see <a href="http://qtsoftware.com/company/model/">qtsoftware.com/company/model/</a> for an overview of Qt licensing.</p> + <p>Данная программа использует Qt Open Source Edition версии %1.</p><p>Qt Open Source Edition предназначена для разработки Open Source приложений. Для разработки проприетарных (с закрытым исходным кодом) приложений необходима коммерческая лицензия Qt.</p><p>Обратитесь к официальносй странице <a href="http://qtsoftware.com/company/model/">qtsoftware.com/company/model/</a> для ознакомления с моделями лицензирования Qt.</p> @@ -3057,132 +3055,132 @@ Do you want to delete it anyway? The remote host closed the connection - + Удалённый узел закрыл соединение Network operation timed out - + Время на сетевую операцию истекло Out of resources - + Недостаточно ресурсов Unsupported socket operation - + Операция с сокетом не поддерживается Protocol type not supported - + Протокол не поддерживается Invalid socket descriptor - + Некорректный дескриптор сокета Network unreachable - + Сеть недоступна Permission denied - + Доступ запрещён Connection timed out - + Время на соединение истекло Connection refused - Отказано в соединении + Отказано в соединении The bound address is already in use - + Адрес уже используется The address is not available - + Адрес недоступен The address is protected - + Адрес защищён Unable to send a message - + Невозможно отправить сообщение Unable to receive a message - + Невозможно получить сообщение Unable to write - + Невозможно записать Network error - + Ошибка сети Another socket is already listening on the same port - + Другой сокет уже прослушивает этот порт Unable to initialize non-blocking socket - + Невозможно инициализировать не-блочный сокет Unable to initialize broadcast socket - + Невозможно инициализировать широковещательный сокет Attempt to use IPv6 socket on a platform with no IPv6 support - + Попытка использовать IPv6 на платформе, не поддерживающей IPv6 Host unreachable - + Узел недоступен Datagram was too large to send - + Датаграмма слишком большая для отправки Operation on non-socket - + Операция с не-сокетом Unknown error - Неизвестная ошибка + Неизвестная ошибка The proxy type is invalid for this operation - + Некорректный тип прокси-сервера для данной операции @@ -3190,195 +3188,212 @@ Do you want to delete it anyway? Error opening %1 - + Ошибка открытия %1 + + + + QNetworkAccessDebugPipeBackend + + + Write error writing to %1: %2 + Ошибка записи в %1: %2 QNetworkAccessFileBackend - + Request for opening non-local file %1 - + Запрос на открытие файла вне файловой системы %1 - + Error opening %1: %2 - + Ошибка открытия %1: %2 - + Write error writing to %1: %2 - + Ошибка записи в %1: %2 - + Cannot open %1: Path is a directory - + Невозможно открыть %1: Указан путь к каталогу Read error reading from %1: %2 - + Ошибка чтения из %1: %2 QNetworkAccessFtpBackend - + No suitable proxy found - + Подходящий прокси-сервер не найден Cannot open %1: is a directory - + Невозможно открыть %1: Указан путь к каталогу - + Logging in to %1 failed: authentication required - + Соединение с %1 не удалось: требуется авторизация Error while downloading %1: %2 - + Ошибка в процессе загрузки %1: %2 Error while uploading %1: %2 - + Ошибка в процессе отгрузки %1: %2 QNetworkAccessHttpBackend - + No suitable proxy found - + Подходящий прокси-сервер не найден QNetworkReply - + Error downloading %1 - server replied: %2 - + Ошибка загрузки %1 - ответ сервера: %2 - + Protocol "%1" is unknown - + Неизвестный протокол "%1" QNetworkReplyImpl - + Operation canceled - + Операция отменена QOCIDriver - + Unable to logon - + Невозможно авторизоваться Unable to initialize QOCIDriver - + Невозможно инициализировать Unable to begin transaction - + Невозможно начать транзакцию Unable to commit transaction - + Невозможно выполнить транзакцию Unable to rollback transaction - + Невозможно откатить транзакцию QOCIResult - + Unable to bind column for batch execute - + Невозможно привязать столбец для пакетного выполнения Unable to execute batch statement - + Невозможно выполнить пакетное выражение Unable to goto next - + Невозможно перейти к следующей строке Unable to alloc statement - + Невозможно создать выражение Unable to prepare statement - + Невозможно подготовить выражение - + + Unable to get statement type + Невозможно определить тип выражения + + + Unable to bind value - + Невозможно привязать результирующие значения + + + Unable to execute select statement + Невозможно выполнить утверждение SELECT Unable to execute statement - + Невозможно выполнить выражение QODBCDriver - + Unable to connect - + Невозможно соединиться Unable to connect - Driver doesn't support all needed functionality - + Невозможно соединиться - Драйвер не поддерживает требуемый функционал Unable to disable autocommit - + Невозможно отключить автовыполнение транзакции Unable to commit transaction - + Невозможно выполнить транзакцию Unable to rollback transaction - + Невозможно откатить транзакцию Unable to enable autocommit - + Невозможно установить автовыполнение транзакции @@ -3387,50 +3402,50 @@ Do you want to delete it anyway? QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration - + QODBCResult::reset: Невозможно установить 'SQL_CURSOR_STATIC' атрибутом выражение. Проверьте настройки драйвера ODBC Unable to execute statement - + Невозможно выполнить выражение Unable to fetch next - + Невозможно получить следующую строку Unable to prepare statement - + Невозможно подготовить выражение Unable to bind variable - + Невозможно привязать значение Unable to fetch last - + Невозможно получить последнюю строку Unable to fetch - + Невозможно получить данные Unable to fetch first - + Невозможно получить первую строку Unable to fetch previous - + Невозможно получить предыдущую строку @@ -3438,61 +3453,58 @@ Do you want to delete it anyway? Home - Home + Operation not supported on %1 - + Операция не поддерживается для %1 Invalid URI: %1 - + Некорректный URI: %1 - Write error writing to %1: %2 - + Ошибка записи в %1: %2 - Read error reading from %1: %2 - + Ошибка чтения из %1: %2 - + Socket error on %1: %2 - + Ошика сокета для %1: %2 Remote host closed the connection prematurely on %1 - + Удалённый узел неожиданно прервал соединение для %1 - Protocol error: packet of size 0 received - + Ошибка протокола: получен пакет нулевого размера No host name given - + Имя узла не задано QPPDOptionsModel - + Name - Имя + Имя Value - + Значение @@ -3500,32 +3512,32 @@ Do you want to delete it anyway? Unable to connect - + Невозможно соединиться Could not begin transaction - + Не удалось начать транзакцию Could not commit transaction - + Не удалось выполнить транзакцию Could not rollback transaction - + Не удалось откатить транзакцию Unable to subscribe - + Невозможно подписаться Unable to unsubscribe - + Невозможно отписаться @@ -3533,12 +3545,12 @@ Do you want to delete it anyway? Unable to create query - + Невозможно создать запрос Unable to prepare statement - + Невозможно подготовить выражение @@ -3546,102 +3558,106 @@ Do you want to delete it anyway? Centimeters (cm) - + Сантиметры (cm) Millimeters (mm) - + Миллиметры (mm) Inches (in) - + Дюймы (in) Points (pt) - + Точки (pt) - + Form - + Форма - + Paper - + Бумага - + Page size: - + Размер страницы: - + Width: - + Ширина: - + Height: - + Высота: - + Paper source: - + Источник бумаги: - + Orientation - + Ориентация страницы - + Portrait - Портрет + Книжная - + Landscape - Альбом + Альбомная - + Reverse landscape - + Перевёрнутая альбомная - + Reverse portrait - + Перевёрнутая книжная - + Margins - + Поля - + + top margin - + верхнее поле - + + left margin - + Левое поле - + + right margin - + правое поле - + + bottom margin - + Нижнее поле @@ -3649,12 +3665,12 @@ Do you want to delete it anyway? Unknown error - Неизвестная ошибка + Неизвестная ошибка The plugin was not loaded. - + Модуль не был загружен. @@ -3662,13 +3678,13 @@ Do you want to delete it anyway? locally connected - локальный + соединено локально Aliases: %1 - Алиасы: %1 + Псевдонимы: %1 @@ -3677,54 +3693,7 @@ Do you want to delete it anyway? неизвестно - - OK - OK - - - Cancel - Отмена - - - Print in color if available - Цветная печать - - - Printer - Принтер - - - - Print all - Печатать все - - - - Print range - Печатать диапазон - - - Print last page first - Начать с последней страницы - - - Number of copies: - Число копий: - - - Paper format - Формат бумаги - - - Portrait - Портрет - - - Landscape - Альбом - - - + A0 (841 x 1189 mm) A0 (841 x 1189 мм) @@ -3740,11 +3709,16 @@ Do you want to delete it anyway? - A3 (297 x 420 mm) - A3 (297 x 420 мм) + A3 (297 x 420 mm) + A3 (297 x 420 мм) + + + + A4 (210 x 297 mm, 8.26 x 11.7 inches) + A4 (210 x 297 мм, 8.26 x 11.7 дюймов) - + A5 (148 x 210 mm) A5 (148 x 210 мм) @@ -3794,7 +3768,12 @@ Do you want to delete it anyway? B4 (250 x 353 мм) - + + B5 (176 x 250 mm, 6.93 x 9.84 inches) + B5 (176 x 250 мм, 6.93 x 9.84 дюймов) + + + B6 (125 x 176 mm) B6 (125 x 176 мм) @@ -3829,7 +3808,12 @@ Do you want to delete it anyway? DLE (110 x 220 мм) - + + Executive (7.5 x 10 inches, 191 x 254 mm) + Executive (191 x 254 мм, 7.5 x 10 дюймов) + + + Folio (210 x 330 mm) Folio (210 x 330 мм) @@ -3839,88 +3823,87 @@ Do you want to delete it anyway? Ledger (432 x 279 мм) - - Tabloid (279 x 432 mm) - Tabloid (279 x 432 мм) - - - US Common #10 Envelope (105 x 241 mm) - Конверт US #10 (105x241 мм) - - - - A4 (210 x 297 mm, 8.26 x 11.7 inches) - + Legal (8.5 x 14 inches, 216 x 356 mm) + Legal (216 x 356 мм, 8.5 x 14 дюймов) - - B5 (176 x 250 mm, 6.93 x 9.84 inches) - + + Letter (8.5 x 11 inches, 216 x 279 mm) + Letter (216 x 279 мм, 8.5 x 11 дюймов) - - Executive (7.5 x 10 inches, 191 x 254 mm) - + + Tabloid (279 x 432 mm) + Tabloid (279 x 432 мм) - - Legal (8.5 x 14 inches, 216 x 356 mm) - + + US Common #10 Envelope (105 x 241 mm) + Конверт US #10 (105x241 мм) - - Letter (8.5 x 11 inches, 216 x 279 mm) - + + OK + Готово Print - Print - - - File - Файл + Печатать Print To File ... - + Печатать в файл ... + + + + Print range + Печатать диапазон + + + + Print all + Печатать все - + File %1 is not writable. Please choose a different file name. - + %1 недоступен для записи. +Выберите другое имя файла. %1 already exists. Do you want to overwrite it? - + %1 уже существует. +Хотите заменить его? - + File exists - + Файл существует <qt>Do you want to overwrite it?</qt> - + <qt>Хотите заменить?</qt> Print selection - + Печатать выделенное %1 is a directory. Please choose a different file name. - + %1 - это каталог. +Выберите другое имя файла. @@ -4075,48 +4058,48 @@ Please choose a different file name. Custom - + Произвольный - + &Options >> - + &Параметры >> &Print - + &Печатать &Options << - + &Параметры << Print to File (PDF) - + Печатать в файл (PDF) Print to File (Postscript) - + Печатать в файл (Postscript) - + Local file - + Локальный файл Write %1 file - + Запись %1 файл The 'From' value cannot be greater than the 'To' value. - + Значение 'от' не может быть больше значения 'до'. @@ -4125,345 +4108,333 @@ Please choose a different file name. Page Setup - + Свойства страницы - + %1% - + %1% - + Print Preview - + Просмотр печати - + Next page - + Следующая страница Previous page - + Предыдущая страница First page - + Первая страница Last page - + Последняя страница Fit width - + По ширине Fit page - + На всю страницу Zoom in - + Увеличить Zoom out - + Уменьшить Portrait - Портрет + Книжная Landscape - Альбом + Альбомная Show single page - + Показать одну страницу Show facing pages - + Показать титульные страницы Show overview of all pages - + Показать обзор всех страниц Print - Print + Печатать Page setup - + Свойства страницы - Close - Закрыть + Закрыть - + Export to PDF - + Экспорт в PDF Export to PostScript - - - - - QPrintPropertiesDialog - - Save - Сохранить - - - OK - OK + Экспорт в Postscript QPrintPropertiesWidget - + Form - + Форма - + Page - + Страница - + Advanced - + Дополнительно QPrintSettingsOutput - + Form - + Форма - + Copies - + Копии - + Print range - Печатать диапазон + Печатать диапазон - + Print all - Печатать все + Печатать все - + Pages from - + Страницы от - + to - + до - + Selection - + Выделенные - + Output Settings - + Настройки вывода - + Copies: - + Количество копий: - + Collate - + Разобрать про копиям - + Reverse - + Обратный порядок - + Options - Параметры + Параметры - + Color Mode - + Режим цвета - + Color - + Цвет - + Grayscale - + Оттенки серого - + Duplex Printing - + Двусторонняя печать - + None - + Нет - + Long side - + По длинной стороне - + Short side - + По короткой стороне QPrintWidget - + Form - + Форма - + Printer - Принтер + Принтер - + &Name: - + &Имя: - + P&roperties - + С&войства - + Location: - + Положение: - + Preview - + Предпросмотр - + Type: - + Тип: - + Output &file: - + Выходной &файл: - + ... - + ... QProcess - + Could not open input redirection for reading - + Не удалось открыть перенаправление ввода для чтения Could not open output redirection for writing - + Не удалось открыть перенаправление вывода для записи - + Resource error (fork failure): %1 - + Ошибка выделения ресурсов (fork не удался): %1 - + Process operation timed out - + Время на операцию с процессом истекло - + Error reading from process - + Ошибка получения данных от процесса - + Error writing to process - + Ошибка отправки данных процессу - + Process crashed - + Процесс завершился с ошибкой - + No program defined - + Программа не указана Process failed to start - + Не удалось запустить процесс @@ -4479,7 +4450,7 @@ Please choose a different file name. Open - Открыть + Открыть @@ -4487,7 +4458,7 @@ Please choose a different file name. Check - + Отметить @@ -4500,22 +4471,22 @@ Please choose a different file name. disabled feature used - использовались отключенные возможности + использование отключённых возможностей bad char class syntax - bad char class syntax + неправильный синтаксис класса символов bad lookahead syntax - bad lookahead syntax + неправильный предварительный синтаксис bad repetition syntax - bad repetition syntax + неправильный синтаксис повторения @@ -4543,22 +4514,22 @@ Please choose a different file name. Error to open database - + Невозможно открыть базу данных Unable to begin transaction - + Невозможно начать транзакцию Unable to commit transaction - + Невозможно выполнить транзакцию Unable to rollback Transaction - + Невозможно откатить транзакцию @@ -4566,12 +4537,12 @@ Please choose a different file name. Unable to fetch results - + Невозможно получить результат Unable to execute statement - + Невозможно выполнить выражение @@ -4579,27 +4550,27 @@ Please choose a different file name. Error opening database - + Невозможно открыть базу данных Error closing database - + Невозможно закрыть базу данных Unable to begin transaction - + Невозможно начать транзакцию Unable to commit transaction - + Невозможно выполнить транзакцию Unable to rollback transaction - + Невозможно откатить транзакцию @@ -4609,32 +4580,32 @@ Please choose a different file name. Unable to fetch row - + Невозможно получить строку Unable to execute statement - + Невозможно выполнить выражение Unable to reset statement - + Невозможно сбросить выражение Unable to bind parameters - + Невозможно привязать параметр Parameter count mismatch - + Количество параметров не совпадает No query - + Отсутствует запрос @@ -4642,302 +4613,302 @@ Please choose a different file name. Scroll here - + Прокрутить сюда Left edge - + К левой границе Top - + Вверх Right edge - + К правой границе Bottom - + Вниз Page left - + На страницу влево Page up - + На страницу вверх Page right - + На страницу вправо Page down - + На страницу вниз Scroll left - + Прокрутить влево Scroll up - + Прокрутить вверх Scroll right - + Прокрутить вправо Scroll down - + Прокрутить вниз Line up - Выровнять + На строку вверх Position - + Позиция Line down - + На строку вниз QSharedMemory - + %1: unable to set key on lock - + %1: невозможно установить ключ на блокировку %1: create size is less then 0 - + %1: размер меньше нуля %1: unable to lock - + %1: невозможно заблокировать %1: unable to unlock - + %1: невозможно разблокировать - + %1: permission denied - + %1: доступ запрещён %1: already exists - + %1: уже существует %1: doesn't exists - + %1: не существует %1: out of resources - + %1: недостаточно ресурсов %1: unknown error %2 - + %1: неизвестная ошибка %2 %1: key is empty - + %1: пустой ключ %1: unix key file doesn't exists - + %1: специфический ключ unix не существует %1: ftok failed - + %1: ошибка ftok %1: unable to make key - + %1: невозможно создать ключ %1: system-imposed size restrictions - + %1: системой наложены ограничения на размер %1: not attached - + %1: не приложенный %1: invalid size - + %1: некорректный размер %1: key error - + %1: некорректный ключ %1: size query failed - + %1: не удалось запросить размер QShortcut - + Space - Space + Пробел Esc - Esc + Tab - Tab + Backtab - Backtab + Backspace - Backspace + Return - Return + Enter - Enter + Ins - Ins + Del - Del + Pause - Pause + Пауза Print - Print + Печатать SysReq - SysReq + Home - Home + End - End + Left - Left + Влево Up - Up + Вверх Right - Right + Вправо Down - Down + Вниз PgUp - PgUp + PgDown - PgDown + CapsLock - CapsLock + NumLock - NumLock + ScrollLock - ScrollLock + @@ -4962,7 +4933,7 @@ Please choose a different file name. Stop - Стоп + Остановить @@ -4972,72 +4943,72 @@ Please choose a different file name. Volume Down - Тише + Volume Mute - Выключить звук + Volume Up - Громче + Bass Boost - Bass Boost + Bass Up - Bass Up + Bass Down - Bass Down + Treble Up - Treble Up + Treble Down - Treble Down + Media Play - Воспроизведение + Media Stop - Остановить воспроизведение + Media Previous - Воспроизвести предыдущее + Media Next - Воспроизвести следующее + Media Record - Запись + Favorites - Избранное + @@ -5047,102 +5018,102 @@ Please choose a different file name. Standby - Дежурный режим + Open URL - Открыть URL + Launch Mail - Почта + Launch Media - Проигрыватель + Launch (0) - Запустить (0) + Launch (1) - Запустить (1) + Launch (2) - Запустить (2) + Launch (3) - Запустить (3) + Launch (4) - Запустить (4) + Launch (5) - Запустить (5) + Launch (6) - Запустить (6) + Launch (7) - Запустить (7) + Launch (8) - Запустить (8) + Launch (9) - Запустить (9) + Launch (A) - Запустить (A) + Launch (B) - Запустить (B) + Launch (C) - Запустить (C) + Launch (D) - Запустить (D) + Launch (E) - Запустить (E) + Launch (F) - Запустить (F) + @@ -5182,12 +5153,12 @@ Please choose a different file name. Insert - Вставить + Вставка Delete - Удалить + Удаление @@ -5250,41 +5221,41 @@ Please choose a different file name. - - + + Ctrl - Ctrl + - - + + Shift - Shift + - - + + Alt - Alt + - - + + Meta - Meta + - + + - + + - + F%1 - F%1 + - + Home Page @@ -5294,27 +5265,27 @@ Please choose a different file name. Page left - + Страница влево Page up - + Страница вверх Position - + Позиция Page right - + Страница вправо Page down - + Страница вниз @@ -5322,72 +5293,72 @@ Please choose a different file name. Connection to proxy refused - + В соединении прокси-сервером отказано Connection to proxy closed prematurely - + Соединение с прокси-сервером неожиданно закрыто Proxy host not found - + Прокси-сервер не найден Connection to proxy timed out - + Время на соединение с прокси-сервером истекло Proxy authentication failed - + Не удалось авторизоваться на прокси-сервере Proxy authentication failed: %1 - + Не удалось авторизоваться на прокси-сервере: %1 SOCKS version 5 protocol error - + Ошибка протокола SOCKSv5 General SOCKSv5 server failure - + Ошибка сервере SOCKSv5 Connection not allowed by SOCKSv5 server - + Соединение не разрешено сервером SOCKSv5 TTL expired - + TTL истекло SOCKSv5 command not supported - + Команда SOCKSv5 не поддерживается Address type not supported - + Тип адреса не поддерживается Unknown SOCKSv5 proxy error code 0x%1 - + Неизвестная ошибка SOCKSv5 прокси (код 0x%1) Network operation timed out - + Время на сетевую операцию истекло @@ -5395,12 +5366,12 @@ Please choose a different file name. More - + Больше Less - + Меньше @@ -5413,7 +5384,7 @@ Please choose a different file name. Delete this record? - Удалить эту запись? + Удалить данную запись? @@ -5452,7 +5423,7 @@ Please choose a different file name. Confirm - Подтвердить + Подтверждение @@ -5465,12 +5436,12 @@ Please choose a different file name. Unable to write data: %1 - + Невозможно записать данные: %1 Error while reading: %1 - + Ошибка чтения: %1 @@ -5490,12 +5461,12 @@ Please choose a different file name. Error creating SSL session, %1 - + Ошибка создания SSL-сессии, %1 Error creating SSL session: %1 - + Ошибка создания SSL-сессии: %1 @@ -5505,12 +5476,12 @@ Please choose a different file name. Error loading local certificate, %1 - + Ошибка загрузки локального сертификата, %1 Error loading private key, %1 - + Ошибка загрузки приватного ключа, %1 @@ -5519,34 +5490,57 @@ Please choose a different file name. + QStateMachine + + + Missing initial state in compound state '%1' + + + + + Missing default state in history state '%1' + + + + + No common ancestor for targets and source of transition from state '%1' + + + + + Unknown error + Неизвестная ошибка + + + QSystemSemaphore %1: out of resources - + %1: недостаточно ресурсов %1: permission denied - + %1: доступ запрещён %1: already exists - + %1: уже существует %1: does not exist - + %1: не существует %1: unknown error %2 - + %1: неизвестная ошибка %2 @@ -5554,12 +5548,12 @@ Please choose a different file name. Unable to open connection - + Невозможно открыть соединение Unable to use database - + Невозможно использовать базу данных @@ -5567,12 +5561,12 @@ Please choose a different file name. Scroll Left - + Прокрутить влево Scroll Right - + Прокрутить вправо @@ -5580,7 +5574,7 @@ Please choose a different file name. Operation on socket is not supported - + Операция с сокетом не поддерживается @@ -5588,42 +5582,42 @@ Please choose a different file name. &Undo - &Отменить + &Отменить действие &Redo - &Повторить + &Повторить действие Cu&t - &Вырезать + &Вырезать &Copy - &Копировать + &Копировать Copy &Link Location - + Скопировать &адрес ссылки &Paste - &Вставить + В&ставить Delete - Удалить + Удалить Select All - Выделить все + Выделить все @@ -5632,13 +5626,13 @@ Please choose a different file name. Press - + Нажать Open - Открыть + Открыть @@ -5646,7 +5640,7 @@ Please choose a different file name. This platform does not support IPv6 - + Данная платформа не поддерживает IPv6 @@ -5654,12 +5648,12 @@ Please choose a different file name. Undo - Отменить + Отменить действие Redo - Повторить + Повторить действие @@ -5667,7 +5661,7 @@ Please choose a different file name. <empty> - + <пусто> @@ -5675,12 +5669,12 @@ Please choose a different file name. Undo - Отменить + Отменить действие Redo - Повторить + Повторить действие @@ -5746,160 +5740,160 @@ Please choose a different file name. Request cancelled - + Запрос отменён Request blocked - + Запрос блокирован Cannot show URL - + Невозможно отобразить URL Frame load interruped by policy change - + Загрузка фрэйма прервана изменением политики Cannot show mimetype - + Невозможно отобразить тип MIME File does not exist - + Файл не существует QWebPage - + Bad HTTP request - + Некорректный HTTP-запрос Submit default label for Submit buttons in forms on web pages - + Отправить Submit Submit (input element) alt text for <input> elements with no alt, title, or value - + Отправить Reset default label for Reset buttons in forms on web pages - + Сбросить This is a searchable index. Enter search keywords: text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index' - + Индекс поиска. Введите ключевые слова для поиска: Choose File title for file button used in HTML forms - + Обзор... No file selected text to display in file button used in HTML forms when no file is selected - + Файл не указан Open in New Window Open in New Window context menu item - + Открыть в новом окне Save Link... Download Linked File context menu item - + Сохранить по ссылке как... Copy Link Copy Link context menu item - + Копировать адрес ссылки Open Image Open Image in New Window context menu item - + Открыть изображение Save Image Download Image context menu item - + Сохранить изображение Copy Image Copy Link context menu item - + Копировать изображение в буффер обмена Open Frame Open Frame in New Window context menu item - + Открыть фрэйм Copy Copy context menu item - + Копировать Go Back Back context menu item - + Назад Go Forward Forward context menu item - + Вперед Stop Stop context menu item - Стоп + Остановить Reload Reload context menu item - + Обновить Cut Cut context menu item - + Вырезать Paste Paste context menu item - + Вставить @@ -5911,7 +5905,7 @@ Please choose a different file name. Ignore Ignore Spelling context menu item - + Игнорировать @@ -5935,13 +5929,13 @@ Please choose a different file name. Open Link Open Link context menu item - + Открыть ссылку Ignore Ignore Grammar context menu item - + Игнорировать @@ -5983,97 +5977,97 @@ Please choose a different file name. Fonts Font context sub-menu item - + Шрифты Bold Bold context menu item - + Жирный Italic Italic context menu item - + Курсив Underline Underline context menu item - + Подчёркнутый Outline Outline context menu item - + Перечёркнутый Direction Writing direction context sub-menu item - + Направление Text Direction Text direction context sub-menu item - + Направление текста Default Default writing direction context menu item - + По умолчанию LTR Left to Right context menu item - + Слева направо RTL Right to Left context menu item - + Справа налево Inspect Inspect Element context menu item - + Проверить No recent searches Label for only item in menu that appears when clicking on the search field image, when no searches have been performed - + История поиска пуста Recent searches label for first item in the menu that appears when clicking on the search field image, used as embedded menu title - + История поиска Clear recent searches menu item in Recent Searches menu that empties menu's contents - + Очистить историю поиска Unknown Unknown filesize FTP directory listing item - + Неизвестно %1 (%2x%3 pixels) Title string for images - + %1 (%2x%3 px) @@ -6083,74 +6077,76 @@ Please choose a different file name. Scroll here - + Прокрутить сюда Left edge - + К левой границе Top - + Вверх Right edge - + К правой границе Bottom - + Вниз Page left - + На страницу влево Page up - + На страницу вверх Page right - + На страницу вправо Page down - + На страницу вниз Scroll left - + Прокрутить влево Scroll up - + Прокрутить вверх Scroll right - + Прокрутить вправо Scroll down - + Прокрутить вниз %n file(s) number of chosen file - - + + %n файл(а) + %n файла + %n файлов @@ -6169,149 +6165,149 @@ Please choose a different file name. - + Move the cursor to the next character - + Переместить указатель к следующему символу Move the cursor to the previous character - + Переместить указатель к предыдущему символу Move the cursor to the next word - + Переместить указатель к следующему слову Move the cursor to the previous word - + Переместить указатель к предыдущему слову Move the cursor to the next line - + Переместить указатель на следующую строку Move the cursor to the previous line - + Переместить указатель на предыдущую строку Move the cursor to the start of the line - + Переместить указатель в начало строки Move the cursor to the end of the line - + Переместить указатель в конец строки Move the cursor to the start of the block - + Переместить указатель в начало блока Move the cursor to the end of the block - + Переместить указатель в конец блока Move the cursor to the start of the document - + Переместить указатель в начало документа Move the cursor to the end of the document - + Переместить указатель в конец документа Select all - + Выделить всё Select to the next character - + Выделить до следующего символа Select to the previous character - + Выделить до предыдущего символа Select to the next word - + Выделить до следующего слова Select to the previous word - + Выделить до предыдущего слова Select to the next line - + Выделить до следующей строки Select to the previous line - + Выделить до предыдущей строки Select to the start of the line - + Выделить до начала строки Select to the end of the line - + Выделить до конца строки Select to the start of the block - + Выделить до начала блока Select to the end of the block - + Выделить до конца блока Select to the start of the document - + Выделить до начала документа Select to the end of the document - + Выделить до конца документа Delete to the start of the word - + Удалить до начала слова Delete to the end of the word - + Удалить до конца слова Insert a new paragraph - + Вставить новый параграф Insert a new line - + Вставить новую строку @@ -6319,77 +6315,73 @@ Please choose a different file name. What's This? - Что это? + Что это? QWidget - + * - + * QWizard - < &Back - < &Назад - - - - &Finish - &Финиш - - - - &Help - &Справка - - - Go Back - + Назад Continue - + Продолжить Commit - + Отправить Done - - - - Quit - Выход + Готово Help - Справка + Справка - + + < &Back + < &Назад + + + + &Finish + &Закончить + + + Cancel - Отмена + Отмена + + + + &Help + &Справка - + &Next - + &Вперед &Next > - &Вперед > + &Вперед > @@ -6397,43 +6389,43 @@ Please choose a different file name. &Restore - &Восстановить + &Восстановить &Move - &Переместить + &Переместить &Size - &Размер + &Размер Mi&nimize - &Свернуть + &Минимизировать Ma&ximize - Р&азвернуть + Р&аспахнуть &Close - &Закрыть + &Закрыть Stay on &Top - Всегда &наверху + Оставаться &сверху Sh&ade - Свернуть в за&головок + Св&ернуть в заголовок @@ -6444,22 +6436,22 @@ Please choose a different file name. Minimize - Свернуть + Минимизировать Restore Down - Восстановить + Восстановить Close - Закрыть + Закрыть &Unshade - Восстановить из за&головка + В&осстановить из заголовка @@ -6472,7 +6464,7 @@ Please choose a different file name. error triggered by consumer - ошибка инициирована пользователем + ошибка вызвана пользователем @@ -6482,22 +6474,22 @@ Please choose a different file name. more than one document type definition - определен более, чем один тип документов + указано более одного типа документа error occurred while parsing element - в процессе грамматического разбора элемента произошла ошибка + ошибка разбора элемента tag mismatch - отсутствует тег + тэг не совпадает error occurred while parsing content - в процессе грамматического разбора произошла ошибка + ошибка разбора документа @@ -6507,101 +6499,101 @@ Please choose a different file name. invalid name for processing instruction - некорректное имя директивы + некорректное имя директивы разбора version expected while reading the XML declaration - при чтении XML-тега ожидался параметр version + в объявлении XML ожидается объявление параметра version wrong value for standalone declaration - некорректное значение параметра standalone + некорректное значение объявления standalone encoding declaration or standalone declaration expected while reading the XML declaration - при чтении XML-тега ожидался параметр encoding или параметр standalone + в объявлении XML ожидается объявление параметра encoding или standalone standalone declaration expected while reading the XML declaration - при чтении XML-тега ожидался параметр standalone + в объявлении XML ожидается объявление параметра standalone error occurred while parsing document type definition - в процессе грамматического разбора типа документа произошла ошибка + ошибка разбора объявления типа документа letter is expected - ожидался символ + ожидалась буква error occurred while parsing comment - в процессе грамматического разбора комментария произошла ошибка + ошибка разбора комментария error occurred while parsing reference - в процессе грамматического разбора ссылки произошла ошибка + ошибка разбора ссылки internal general entity reference not allowed in DTD - internal general entity reference not allowed in DTD + внутренняя ссылка на общий объкт недопустима в DTD external parsed general entity reference not allowed in attribute value - external parsed general entity reference not allowed in attribute value + внешняя ссылка на общий объект недопустима в значении атрибута external parsed general entity reference not allowed in DTD - external parsed general entity reference not allowed in DTD + внешняя ссылка на общий объект недопустима в DTD unparsed entity reference in wrong context - unparsed entity reference in wrong context + неразобранная ссылка на объект в неправильном контексте recursive entities - рекурсивные объекты + рекурсия объектов error in the text declaration of an external entity - error in the text declaration of an external entity + ошибка в объявлении внешнего объекта QXmlStream - + Extra content at end of document. Invalid entity value. - + Некорректное значение объекта. Invalid XML character. - + Некорректный символ XML. Sequence ']]>' not allowed in content. - + Последовательность ']]>' не допускается в содержимом. @@ -6626,7 +6618,7 @@ Please choose a different file name. Unsupported XML version. - + Неподдерживаемая версия XML. @@ -6641,37 +6633,37 @@ Please choose a different file name. Standalone accepts only yes or no. - + Псевдоатрибут 'standalone' может принимать только значение yes или no. Invalid attribute in XML declaration. - + Некорректный атрибут в объявлении XML. Premature end of document. - + Неожиданный конец документа. Invalid document. - + Некорректный документ. Expected - + Ожидалось , but got ' - + , получили ' Unexpected ' - + Неожиданное ' @@ -6686,7 +6678,7 @@ Please choose a different file name. Start tag expected. - + Ожидается начало тэга. @@ -6719,12 +6711,12 @@ Please choose a different file name. Invalid XML name. - + Некорректное имя XML. Opening and ending tag mismatch. - + Открывающий тэг не совпадает с закрывающим. @@ -6757,7 +6749,7 @@ Please choose a different file name. The standalone pseudo attribute must appear after the encoding. - + Псевдоатрибут 'standalone' должен находиться после указания кодировки. @@ -6788,11 +6780,6 @@ Please choose a different file name. - - Attribute %1 can't be serialized because it appears at the top level. - - - Year %1 is invalid because it begins with %2. @@ -7070,6 +7057,8 @@ Please choose a different file name. %1 takes at most %n argument(s). %2 is therefore invalid. + + @@ -7077,6 +7066,8 @@ Please choose a different file name. %1 requires at least %n argument(s). %2 is therefore invalid. + + @@ -7165,7 +7156,7 @@ Please choose a different file name. - + It will not be possible to retrieve %1. @@ -7568,6 +7559,11 @@ Please choose a different file name. + + Attribute %1 can't be serialized because it appears at the top level. + + + %1 is an unsupported encoding. @@ -7809,13 +7805,13 @@ Please choose a different file name. Muted - + Без звука Volume: %1% - + Громкость: %1% -- cgit v0.12 From c95384106fc69c2e78db20a10e8bedc14f3c58d5 Mon Sep 17 00:00:00 2001 From: axasia Date: Sun, 24 May 2009 17:11:13 +0900 Subject: Update japanese translation of Qt Linguist. --- translations/linguist_ja.qm | Bin 30494 -> 36145 bytes translations/linguist_ja.ts | 466 ++++++++++++++++++++++---------------------- 2 files changed, 237 insertions(+), 229 deletions(-) diff --git a/translations/linguist_ja.qm b/translations/linguist_ja.qm index cdb7c1c..a377318 100644 Binary files a/translations/linguist_ja.qm and b/translations/linguist_ja.qm differ diff --git a/translations/linguist_ja.ts b/translations/linguist_ja.ts index 7af3ebb..685af88 100644 --- a/translations/linguist_ja.ts +++ b/translations/linguist_ja.ts @@ -6,7 +6,7 @@ (New Entry) - + (新しい項目) @@ -48,74 +48,74 @@ Batch Translation of '%1' - Qt Linguist - + '%1' の一括翻訳 - Qt Linguist Batch translated %n entries - - + + %n 項目が一括翻訳されました Qt Linguist - Batch Translation - Qt Linguist - 一括翻訳 + Qt Linguist - 一括翻訳 Options - オプション + オプション Set translated entries to finished - 翻訳された項目を完了にする + 翻訳された項目を完了にする Retranslate entries with existing translation - + 訳語がある項目を再度翻訳する Note that the modified entries will be reset to unfinished if 'Set translated entries to finished' above is unchecked. - + 注意:'翻訳された項目を完了にする'にチェックがついていない場合、翻訳された項目は未完了になります. Translate also finished entries - + 完了している項目も翻訳する Phrase book preference - フレーズブックの優先度 + フレーズブックの設定 Move up - 上に移動 + 上に移動 Move down - 下に移動 + 下に移動 The batch translator will search through the selected phrase books in the order given above. - + 一括翻訳機能は、上記で選択された順にフレーズブックを検索します。 &Run - 実行(&R) + 実行(&R) Cancel - キャンセル + キャンセル @@ -138,38 +138,39 @@ <qt>Duplicate messages found in '%1': - + <qt>'%1' に重複したメッセージが見つかりました: <p>[more duplicates omitted] - + <p>[さらに重複している部分は省略されました] <p>* Context: %1<br>* Source: %2 - + <p>* コンテキスト: %1<br>* ソーステキスト: %2 <br>* Comment: %3 - + <br>* コメント: %3 Linguist does not know the plural rules for '%1'. Will assume a single universal form. - + Linguist は'%1'の複数のルールを知りません。 +単一の共通形式とみなします。 Cannot create '%2': %1 - + '%2' を作成できません: %1 Universal Form - + 共通形式 @@ -200,37 +201,37 @@ Will assume a single universal form. Accelerator possibly superfluous in translation. - 訳に余分なアクセラレータがついています。 + 訳に余分なアクセラレータがついています。 Accelerator possibly missing in translation. - 訳にアクセラレータが欠けています。 + 訳にアクセラレータが欠けています。 Translation does not end with the same punctuation as the source text. - 訳がソーステキストと同じ句読点で終わっていません。 + 訳がソーステキストと同じ句読点で終わっていません。 A phrase book suggestion for '%1' was ignored. - '%1' についてのフレーズブックの示唆を無視しています。 + '%1' についてのフレーズブックの示唆を無視しています。 Translation does not refer to the same place markers as in the source text. - 訳語にはソーステキストと同じ数の "%" がありません。 + 訳語にはソーステキストと同じ数の "%" がありません。 Translation does not contain the necessary %n place marker. - + 訳語に必要な %n 個のプレースマーカー "%" がありません。 Unknown error - + 未知のエラー @@ -248,37 +249,37 @@ Will assume a single universal form. Find - + 検索 &Find what: - + 検索する文字列(&F): &Source texts - + ソーステキスト(&S) &Translations - + 訳語(&T) &Match case - + 大/小文字の区別(&M) &Comments - + コメント(&C) Ignore &accelerators - + アクセラレータを無視(&A) @@ -388,16 +389,18 @@ Will assume a single universal form. Generated %n translation(s) (%1 finished and %2 unfinished) - - + + %n 件の訳語 (%1 件が完了、 %2 件が未完了) を生成しました + Ignored %n untranslated source text(s) - - + + %n 件の未翻訳のソーステキストを無視しました + @@ -413,12 +416,12 @@ Will assume a single universal form. About Qt - Qt について(&Q) + Qt について About Qt Linguist - Qt Linguist について(&A) + Qt Linguist について @@ -476,7 +479,7 @@ Will assume a single universal form. Create a new phrase book. - 新しいフレーズブックを作成 + 新しいフレーズブックを作成します。 @@ -545,12 +548,12 @@ Will assume a single universal form. Open Read-O&nly... - + 読取専用で開く(&N)... &Save All - + 全て保存(&S) @@ -584,7 +587,7 @@ Will assume a single universal form. Recently Opened &Files - + 最近使ったファイル(&F) @@ -625,7 +628,7 @@ Will assume a single universal form. &Edit Phrase Book - フレーズブックを編集(&E)... + フレーズブックを編集(&E) @@ -696,7 +699,7 @@ Will assume a single universal form. MainWindow - メインウィンドウ + MainWindow @@ -753,7 +756,7 @@ Will assume a single universal form. Open a Qt translation source file (TS file) for editing - Qt 翻訳ソースファイル (TS ファイル) を編集用に開きます。 + Qt 翻訳ソースファイル (TS ファイル) を編集用に開きます &Open Phrase Book @@ -810,7 +813,7 @@ Will assume a single universal form. &Print Phrase Book - フレーズブックを印刷(&P)... + フレーズブックを印刷(&P) Re&cently opened files @@ -856,172 +859,176 @@ Will assume a single universal form. Source text - ソーステキスト + ソーステキスト Index - + インデックス Context - コンテキスト + コンテキスト Items - 項目数 + 項目数 This panel lists the source contexts. - このパネルではソースのコンテキストを一覧表示しています。 + このパネルではソースのコンテキストを一覧表示しています。 Strings - + 文字列 Phrases and guesses - + フレーズと推測 Sources and Forms - + ソースとフォーム Warnings - + 警告 MOD status bar: file(s) modified - + MOD Loading... - ロードしています... + ロードしています... Loading File - Qt Linguist - + ロードしています - Qt Linguist The file '%1' does not seem to be related to the currently open file(s) '%2'. Close the open file(s) first? - + ファイル '%1' は、既に開いているファイル '%2' とは関連していないようです。 + +先に開いたファイルを閉じますか? The file '%1' does not seem to be related to the file '%2' which is being loaded as well. Skip loading the first named file? - + ファイル '%1' は、既にロードされているファイル '%2' とは関連していないようです。 + +ファイルのロードをスキップしますか? %n translation unit(s) loaded. - - + + %n 件の翻訳項目をロードしました。 Related files (%1);; - + %1 に関連したファイル;; Open Translation Files - + 翻訳ファイルを開く File saved. - ファイルが保存されました。 + ファイルが保存されました。 Release - リリース + リリース Qt message files for released applications (*.qm) All files (*) - リリースされたアプリケーション用の Qt メッセージファイル (*.qm) + リリースされたアプリケーション用の Qt メッセージファイル (*.qm) すべてのファイル (*) File created. - ファイルが作成されました。 + ファイルが作成されました。 Printing... - 印刷中... + 印刷中... Context: %1 - コンテキスト: %1 + コンテキスト: %1 finished - 完了 + 完了 unresolved - 未解決 + 未解決 obsolete - このバージョンでは使われていない + このバージョンでは使われていない Printing... (page %1) - 印刷中... (%1 ページ) + 印刷中... (%1 ページ) Printing completed - 印刷完了 + 印刷完了 Printing aborted - 印刷中止 + 印刷中止 Search wrapped. - 検索が一通り終わりました。 + 検索が一通り終わりました。 @@ -1035,13 +1042,13 @@ All files (*) Qt Linguist - Qt Linguist + Qt Linguist Cannot find the string '%1'. - 文字列 '%1' が見つかりません。 + 文字列 '%1' が見つかりません。 Translate @@ -1056,58 +1063,58 @@ All files (*) Search And Translate in '%1' - Qt Linguist - + '%1' 内で検索して翻訳 - Qt Linguist Translate - Qt Linguist - + 翻訳 - Qt Linguist Translated %n entry(s) - - + + %n 項目が翻訳済みです No more occurrences of '%1'. Start over? - + '%1' は、これ以上見つかりません。先頭に戻りますか? Create New Phrase Book - 新しいフレーズブックを作成 + 新しいフレーズブックを作成 Qt phrase books (*.qph) All files (*) - Qt フレーズブック (*.qph) -すべてのファイル (*) + Qt フレーズブック (*.qph) +全てのファイル (*) Phrase book created. - フレーズブックが作成されました。 + フレーズブックが作成されました。 Open Phrase Book - フレーズブックを開く + フレーズブックを開く Qt phrase books (*.qph);;All files (*) - + Qt フレーズブック (*.qph);;すべてのファイル (*) %n phrase(s) loaded. - + %n 項目のフレーズがロードされました。 @@ -1116,32 +1123,32 @@ All files (*) Add to phrase book - + フレーズブックに追加 No appropriate phrasebook found. - + 適切なフレーズブックが見つかりません。 Adding entry to phrasebook %1 - + フレーズブック %1 に項目を追加 Select phrase book to add to - + 追加先のフレーズブックを選択してください Unable to launch Qt Assistant (%1) - + Qt Assistant (%1) を起動できません Version %1 - バージョン %1 + バージョン %1 Open Source Edition @@ -1158,83 +1165,83 @@ All files (*) <center><img src=":/images/splash.png"/></img><p>%1</p></center><p>Qt Linguist is a tool for adding translations to Qt applications.</p><p>%2</p><p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).</p><p>The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.</p> - <center><img src=":/images/splash.png"/></img><p>%1</p></center><p>Qt Linguist は、Qt アプリケーションの翻訳を行うツールです。</p><p>%2</p><p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 全ての権利は保護されています。</p><p>このプログラムは、「設計」、「市場性」および「特定の目的への適合性」も含む、あらゆる種類の「保証がなく」、「そのままで」提供されます。</p> + <center><img src=":/images/splash.png"/></img><p>%1</p></center><p>Qt Linguist は、Qt アプリケーションの翻訳を行うツールです。</p><p>%2</p><p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 全ての権利は保護されています。</p><p>このプログラムは、「設計」、「市場性」および「特定の目的への適合性」も含む、あらゆる種類の「保証がなく」、「そのままで」提供されます。</p> Do you want to save the modified files? - + 変更されたファイルを保存しますか? Do you want to save '%1'? - '%1' を保存しますか? + '%1' を保存しますか? Qt Linguist[*] - + Qt Linguist[*] %1[*] - Qt Linguist - + %1[*] - Qt Linguist No untranslated translation units left. - + 未訳項目は残っていません。 &Window - ウィンドウ(&W) + ウィンドウ(&W) Minimize - 最小化 + 最小化 Ctrl+M - Ctrl+M + Ctrl+M Display the manual for %1. - %1 のマニュアルを表示します。 + %1 のマニュアルを表示します。 Display information about %1. - %1 についての情報を表示します。 + %1 についての情報を表示します。 &Save '%1' - + '%1' を保存する(&S) Save '%1' &As... - + '%1' を名前を付けて保存(&A)... Release '%1' - + '%1' をリリース Release '%1' As... - + '%1' を名前を付けてリリース... &Close '%1' - + '%1' を閉じる(&C) @@ -1253,78 +1260,78 @@ All files (*) &Close - 閉じる(&C) + 閉じる(&C) Save All - + 全て保存 &Release All - + 全てリリース(&R) Close All - すべて閉じる + すべて閉じる Translation File &Settings for '%1'... - + '%1' の翻訳ファイルの設定(&S)... &Batch Translation of '%1'... - + '%1' の一括翻訳(&B)... Search And &Translate in '%1'... - + '%1' 内を検索して翻訳(&T)... Search And &Translate... - + 検索して訳語を置換(&T)... Cannot read from phrase book '%1'. - フレーズブック '%1' から読み出せません。 + フレーズブック '%1' から読み出せません。 Close this phrase book. - このフレーズブックを閉じます。 + このフレーズブックを閉じます。 Enables you to add, modify, or delete entries in this phrase book. - + このフレーズブックで項目の追加、変更、削除ができます。 Print the entries in this phrase book. - + このフレーズブックの項目を印刷します。 Cannot create phrase book '%1'. - フレーズブック '%1' を作成できません。 + フレーズブック '%1' を作成できません。 Do you want to save phrase book '%1'? - + フレーズブック '%1' を保存しますか? All - + すべて @@ -1468,194 +1475,194 @@ All files (*) &Open... - + 開く(&O)... Save - + 保存 &Print... - + 印刷(&P)... Print a list of all the translation units in the current translation source file. - + 現在の Qt 翻訳ソースファイルの全ての訳語の一覧を印刷します。 Undo the last editing operation performed on the current translation. - + 現在の翻訳ファイルで最後に行った編集操作を取り消します。 &Find... - + 検索(&F)... Previous unfinished item. - + 前の未訳の項目へ移動します。 Move to the previous unfinished item. - + 前の未完了の項目へ移動します。 Next unfinished item. - + 次の未訳の項目へ移動します。 Move to the next unfinished item. - + 次の未完了の項目へ移動します。 Move to previous item. - + 前の項目へ移動します。 Move to the previous item. - + 前の項目へ移動します。 Next item. - + 次の項目へ移動します。 Move to the next item. - + 次の項目へ移動します。 Mark item as done and move to the next unfinished item. - + この項目に完了のマークをつけ、次の未完了の項目へ移動します。 Mark this item as done and move to the next unfinished item. - + この項目に完了のマークをつけ、次の未完了の項目へ移動します。 Copy from source text - + ソーステキストからコピー Toggle the validity check of accelerators. - + アクセラレータのチェックを有効にするかどうかを切り替えます。 Toggle the validity check of accelerators, i.e. whether the number of ampersands in the source and translation text is the same. If the check fails, a message is shown in the warnings window. - + ソーステキストと訳語のアクセラレータの個数が同じか否かのチェックを有効にするかどうかを切り替えます。チェックが無効になっていても、警告ウィンドウにメッセージは表示されます。 Toggle the validity check of ending punctuation. - + 末尾の句読点のチェックを有効にするかどうかを切り替えます。 Toggle the validity check of ending punctuation. If the check fails, a message is shown in the warnings window. - + 末尾の句読点のチェックを有効にするかどうかを切り替えます。チェックが無効になっていても、警告ウィンドウにメッセージが表示されます。 Toggle checking that phrase suggestions are used. If the check fails, a message is shown in the warnings window. - + フレーズの示唆を使うかどうかのチェックを切り替えます。チェックが無効になっていても、警告ウィンドウにメッセージが表示されます。 Toggle the validity check of place markers. - + "%" の数や番号のチェックを行うかどうかを切り替えます。 Toggle the validity check of place markers, i.e. whether %1, %2, ... are used consistently in the source text and translation text. If the check fails, a message is shown in the warnings window. - + ソーステキストと訳語の"%1"や"%2"等のプレースマーカーの整合が取れているか否かのチェックを行うかどうかを切り替えます。チェックが無効になっていても、警告ウィンドウにメッセージは表示されます。 &New Phrase Book... - + 新しいフレーズブック(&N)... &Open Phrase Book... - + フレーズブックを開く(&O)... &Reset Sorting - + ソート順序をリセット(&R) Display translation statistics. - + 翻訳の統計を表示します。 &Search And Translate... - + 検索して訳語を置換(&S)... Close - 閉じる + 閉じる &Close All - + 全て閉じる(&C) Ctrl+W - + Ctrl+W &Batch Translation... - + 一括翻訳(&B)... Translation File &Settings... - + 翻訳ファイルの設定(&S)... &Add to Phrase Book - + フレーズブックに追加(&A) Ctrl+T - + Ctrl+T Ctrl+J - + Ctrl+J Ctrl+Shift+J - + Ctrl+Shift+J @@ -1707,82 +1714,82 @@ All files (*) German - + German Japanese - + Japanese French - + French Polish - + Polish Chinese - + Chinese Source text - ソーステキスト + ソーステキスト Source text (Plural) - + ソーステキスト(複数) This area shows the plural form of the source text. - + この領域は複数のソーステキストを表示します。 Developer comments - + 開発者のコメント This area shows a comment that may guide you, and the context in which the text occurs. - この領域は、手助けとなるコメントと、テキストが出てくるコンテキストを表示します。 + この領域は、手助けとなるコメントと、テキストが出てくるコンテキストを表示します。 Here you can enter comments for your own use. They have no effect on the translated applications. - + ここはあなたが自分自身の為にコメントを入力できます。翻訳されたアプリケーションには何の影響も与えません。 %1 translation (%2) - + %1 翻訳 (%2) This is where you can enter or modify the translation of the above source text. - + ソーステキストの訳を入力したり変更したりできるところです。 %1 translation - + %1 訳 %1 translator comments - + %1 翻訳者のコメント This area shows the source text. - この領域はソーステキストを表示します。 + この領域はソーステキストを表示します。 This is where you can enter or modify the translation of some source text. @@ -1801,7 +1808,8 @@ All files (*) '%1' Line: %2 - + '%1' +行番号: %2 @@ -1821,22 +1829,22 @@ Line: %2 Completion status for %1 - + %1 の翻訳完了状況 <file header> - + <ファイル ヘッダー> <context comment> - + <コンテキスト コメント> <unnamed context> - + <無名のコンテキスト> @@ -1871,7 +1879,7 @@ Line: %2 %1[*] - Qt Linguist - + %1[*] - Qt Linguist @@ -1886,27 +1894,27 @@ Line: %2 &New Entry - + 新しい項目(&N) Click here to remove the entry from the phrase book. - + フレーズブックからフレーズを消去するにはここをクリックしてください。 &Remove Entry - + 項目を削除(&R) Settin&gs... - + 設定(&G)... Click here to close this window. - このウィンドウを閉じるにはここをクリックしてください。 + このウィンドウを閉じるにはここをクリックします。 Click here to remove the phrase from the phrase book. @@ -1958,7 +1966,7 @@ Line: %2 This window allows you to add, modify, or delete entries in a phrase book. - + このウィンドウでフレーズブックにフレーズを追加、変更、削除できます。 @@ -2006,7 +2014,7 @@ Line: %2 Translation - + 翻訳 @@ -2014,22 +2022,22 @@ Line: %2 Insert - + 挿入 Edit - 編集 + 編集 Guess (%1) - 推測(%1) + 推測(%1) Guess - 推測 + 推測 @@ -2037,17 +2045,17 @@ Line: %2 Compiled Qt translations - + コンパイル済み Qt 翻訳ファイル Translation files (%1);; - + 翻訳ファイル (%1);; All files (*) - + すべてのファイル (*) @@ -2063,57 +2071,57 @@ Line: %2 C++ source files - + C++ ソースファイル Java source files - + Java ソースファイル GNU Gettext localization files - + GNU Gettext 日本語化ファイル Qt Script source files - + Qt スクリプト ソースファイル Qt translation sources (format 1.1) - + Qt 翻訳ソース (1.1形式) Qt translation sources (format 2.0) - + Qt 翻訳ソース (2.0形式) Qt translation sources (latest format) - + Qt 翻訳ソース (最新の形式) Qt Designer form files - + Qt デザイナ フォームファイル Qt Jambi form files - + Qt Jambi フォームファイル XLIFF localization files - + XLIFF 日本語化ファイル Qt Linguist 'Phrase Book' - + Qt Linguist 'フレーズ ブック' @@ -2147,17 +2155,17 @@ Line: %2 <i>Source code not available</i> - + <i>ソース コードは使用できません</i> <i>File %1 not available</i> - + <i>ファイル %1 が使用できません</i> <i>File %1 not readable</i> - + <i>ファイル %1 が読み込めません</i> @@ -2213,7 +2221,7 @@ Line: %2 Translation - + 翻訳 @@ -2223,7 +2231,7 @@ Line: %2 Close - 閉じる + 閉じる @@ -2656,7 +2664,7 @@ All files (*) Texts such as 'TeX' and 'tex' are considered as different when checked. - これを選択すると、たとえば 'TeX' と 'tex' は異なるものと見なされます。 + 選択すると、たとえば 'TeX' と 'tex' は異なるものと見なされます。 @@ -2714,27 +2722,27 @@ All files (*) Settings for '%1' - Qt Linguist - + '%1' の設定 - Qt Linguist Source language - + 翻訳元の言語 Language - 言語 + 言語 Country/Region - + 国/地域 Target language - 翻訳先の言語 + 翻訳先の言語 -- cgit v0.12 From 531274c741aed51946398a30a7be691ef98999bf Mon Sep 17 00:00:00 2001 From: Lincoln Ramsay Date: Mon, 25 May 2009 15:46:50 +1000 Subject: BT: Clean up Mac -arch handling Instead of the multiple character-string replacements, just check for the discrete -arch values that we want to find. This makes the code clearer and should reduce the chance of subtle errors. Reviewed-by: Jason McDonald --- configure | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 32efd86..4cf7499 100755 --- a/configure +++ b/configure @@ -2703,23 +2703,24 @@ fi if [ "$PLATFORM_MAC" = "yes" ]; then # check -arch arguments for validity. ALLOWED="x86 ppc x86_64 ppc64 i386" - for i in $CFG_MAC_ARCHS + # Save the list so we can re-write it using only valid values + CFG_MAC_ARCHS_IN="$CFG_MAC_ARCHS" + CFG_MAC_ARCHS= + for i in $CFG_MAC_ARCHS_IN do if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64"; exit 2; fi - done - -# replace "i386" with "x86" to support configuring with -arch i386 as an alias for x86. - CFG_MAC_ARCHS="${CFG_MAC_ARCHS/i386/x86}" - -# Build commmand line arguments we can pass to the compiler during configure tests -# by prefixing each arch with "-arch". - CFG_MAC_ARCHS_GCC_FORMAT="${CFG_MAC_ARCHS/x86/i386}" - CFG_MAC_ARCHS_GCC_FORMAT="${CFG_MAC_ARCHS_GCC_FORMAT/i386_64/x86_64}" - for ARCH in $CFG_MAC_ARCHS_GCC_FORMAT; do - MAC_ARCHS_COMMANDLINE="$MAC_ARCHS_COMMANDLINE -arch $ARCH" + if [ "$i" = "i386" -o "$i" = "x86" ]; then + # These are synonymous values + # CFG_MAC_ARCHS requires x86 while GCC requires i386 + CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86" + MAC_ARCHS_COMMANDLINE="$MAC_ARCHS_COMMANDLINE -arch i386" + else + CFG_MAC_ARCHS="$CFG_MAC_ARCHS $i" + MAC_ARCHS_COMMANDLINE="$MAC_ARCHS_COMMANDLINE -arch $i" + fi done fi @@ -4129,14 +4130,14 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ]; EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)" EXTRA_OBJS="qsettings_mac.o qcore_mac.o" EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\"" - if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then + if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then # matches both x86 and x86_64 X86_CFLAGS="-arch i386" X86_LFLAGS="-arch i386" EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS" EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS" EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS" fi - if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then + if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then # matches both ppc and ppc64 PPC_CFLAGS="-arch ppc" PPC_LFLAGS="-arch ppc" EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS" -- cgit v0.12 From 878ccb0645e7f1416daeddd6acdc37fea16b5e25 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 25 May 2009 10:12:27 +0200 Subject: qdoc: Added some missing qdoc comments. Task-number: 252493 --- src/gui/painting/qcolormap_mac.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/painting/qcolormap_mac.cpp b/src/gui/painting/qcolormap_mac.cpp index 96da90f..afe0378 100644 --- a/src/gui/painting/qcolormap_mac.cpp +++ b/src/gui/painting/qcolormap_mac.cpp @@ -55,11 +55,17 @@ public: }; static QColormap *qt_mac_global_map = 0; +/*! + Creates the class's internal colormap. + */ void QColormap::initialize() { qt_mac_global_map = new QColormap; } +/*! + Deletes the class's internal colormap. + */ void QColormap::cleanup() { delete qt_mac_global_map; -- cgit v0.12 From fa2371e705621b95307f0dbc1988ba048cec6520 Mon Sep 17 00:00:00 2001 From: axasia Date: Sat, 23 May 2009 23:33:49 +0900 Subject: Update japanese translation of Qt Assistant 4.5 --- translations/assistant_ja.ts | 395 ++++++++++++++++++++++--------------------- 1 file changed, 203 insertions(+), 192 deletions(-) diff --git a/translations/assistant_ja.ts b/translations/assistant_ja.ts index 1853155..5e4d2c9 100644 --- a/translations/assistant_ja.ts +++ b/translations/assistant_ja.ts @@ -1,12 +1,12 @@ - + AboutDialog &Close - + 閉じる(&C) @@ -14,18 +14,19 @@ Warning - + 警告 Unable to launch external application. - + 外部アプリケーションを起動できません。 + OK - + OK @@ -37,42 +38,42 @@ Bookmarks - + ブックマーク Add Bookmark - + ブックマークの追加 Bookmark: - + ブックマーク: Add in Folder: - + 追加先フォルダ: + - + + New Folder - + 新しいフォルダ Delete Folder - + フォルダを削除 Rename Folder - + フォルダの名前変更 @@ -80,23 +81,23 @@ Bookmarks - + ブックマーク Remove - + 削除 You are going to delete a Folder, this will also<br>remove it's content. Are you sure to continue? - + フォルダを削除すると中身も削除されますが、続けてよろしいですか? New Folder - + 新しいフォルダ @@ -104,47 +105,47 @@ Filter: - + フィルタ: Remove - + 削除 Delete Folder - + フォルダを削除 Rename Folder - + フォルダの名前変更 Show Bookmark - + ブックマークを開く Show Bookmark in New Tab - + ブックマークを新しいタブで開く Delete Bookmark - + ブックマークを削除 Rename Bookmark - + ブックマークの名前変更 Add - + 追加 @@ -152,48 +153,48 @@ Add new page - + 新しいページの追加 Close current page - + 現在のページを閉じる Print Document - + ドキュメントを印刷 unknown - + 不明 Add New Page - + 新しいページの追加 Close This Page - + このページを閉じる Close Other Pages - + 他のページを閉じる Add Bookmark for this Page... - + このページをブックマークに追加... Search - + 検索 @@ -201,12 +202,12 @@ Open Link - + リンクを開く Open Link in New Tab - + リンクを新しいタブで開く @@ -214,12 +215,12 @@ Add Filter Name - + フィルタ名を追加 Filter Name: - + フィルタ名: @@ -227,27 +228,27 @@ Previous - + 戻る Next - + 進む Case Sensitive - + 大文字/小文字を区別する Whole words - + 単語単位で検索する <img src=":/trolltech/assistant/images/wrap.png">&nbsp;Search wrapped - + <img src=":/trolltech/assistant/images/wrap.png">&nbsp;見つからなければ先頭から検索する @@ -255,27 +256,27 @@ Font - + フォント &Writing system - + 文字セット(&W) &Family - + フォント名(&F) &Style - + スタイル(&S) &Point size - + サイズ(&P) @@ -283,38 +284,39 @@ Help - + ヘルプ OK - + OK <title>Error 404...</title><div align="center"><br><br><h1>The page could not be found</h1><br><h3>'%1'</h3></div> - + <title>Error 404...</title><div align="center"><br><br><h1>ページが見つかりませんでした</h1><br><h3>'%1'</h3></div> Copy &Link Location - + リンクのURLをコピー(&L) Open Link in New Tab Ctrl+LMB - + リンクを新しいタブで開く Ctrl+LMB Open Link in New Tab - + リンクを新しいタブで開く Unable to launch external application. - + 外部アプリケーションを起動できません。 + @@ -322,17 +324,17 @@ &Look for: - + 検索文字列(&L): Open Link - + リンクを開く Open Link in New Tab - + リンクを新しいタブで開く @@ -341,97 +343,98 @@ Install Documentation - + ドキュメントのインストール Downloading documentation info... - + ドキュメント情報をダウンロード中... Download canceled. - + ダウンロードを中止しました。 Done. - + 完了. The file %1 already exists. Do you want to overwrite it? - + %1 は既に存在します。上書きしますか? Unable to save the file %1: %2. - + ファイルを保存できません。%1: %2. Downloading %1... - + %1 をダウンロード中... Download failed: %1. - + ダウンロード失敗: %1. Documentation info file is corrupt! - + ドキュメント情報ファイルが不正です! Download failed: Downloaded file is corrupted. - + ダウンロード失敗: ダウンロードしたファイルが不正です。 Installing documentation %1... - + %1 のドキュメントをインストール中... Error while installing documentation: %1 - + ドキュメントのインストール中にエラーが発生しました: +%1 Available Documentation: - + 使用可能なドキュメント: Install - + インストール Cancel - + キャンセル Close - + 閉じる Installation Path: - + インストール先のパス: ... - + ... @@ -440,298 +443,298 @@ Index - + インデックス Contents - + コンテンツ Bookmarks - + ブックマーク Search - + 検索 Qt Assistant - + Qt Assistant Unfiltered - + フィルタなし Page Set&up... - + ページ設定(&U)... Print Preview... - + 印刷プレビュー... &Print... - + 印刷(&P)... New &Tab - + 新しいタブ(&T) &Close Tab - + タブを閉じる(&C) &Quit - + 終了(&Q) CTRL+Q - + CTRL+Q &Copy selected Text - + 選択中の文字をコピー(&C) &Find in Text... - + 検索(&F)... Find &Next - + 次を検索(&N) Find &Previous - + 前を検索(&P) Preferences... - + 設定... Zoom &in - + 拡大(&I) Zoom &out - + 縮小(&O) Normal &Size - + 普通の大きさ(&S) Ctrl+0 - + Ctrl+0 ALT+C - + ALT+C ALT+I - + ALT+I ALT+S - + ALT+S &Home - + ホーム(&H) Ctrl+Home - + Ctrl+Home &Back - + 戻る(&B) &Forward - + 進む(&F) Sync with Table of Contents - + 内容と目次を同期する Next Page - + 次のページ Ctrl+Alt+Right - + Ctrl+Alt+Right Previous Page - + 前のページ Ctrl+Alt+Left - + Ctrl+Alt+Left Add Bookmark... - + ブックマークの追加... About... - + Qt Assistant について... Navigation Toolbar - + ナビゲーション ツールバー Toolbars - + ツールバー Filter Toolbar - + フィルター ツールバー Filtered by: - + フィルタ条件: Address Toolbar - + アドレス ツールバー Address: - + アドレス: Could not find the associated content item. - + 関連付いた内容が見つかりません。 About %1 - + %1 について Updating search index - + 検索インデックスを更新中 Looking for Qt Documentation... - + Qt ドキュメントを探しています... &Window - + ウィンドウ(&W) Minimize - + 最小化 Ctrl+M - + Ctrl+M Zoom - + ズーム &File - + ファイル(&F) &Edit - + 編集(&E) &View - + 表示(&V) &Go - + ジャンプ(&G) &Bookmarks - + ブックマーク(&B) &Help - + ヘルプ(&H) ALT+O - + ALT+O CTRL+D - + CTRL+D @@ -741,47 +744,47 @@ Add Documentation - + ドキュメントの追加 Qt Compressed Help Files (*.qch) - + 圧縮済み Qt ヘルプファイル (*.qch) The specified file is not a valid Qt Help File! - + 指定されたファイルは有効な Qt ヘルプ ファイルではありません! The namespace %1 is already registered! - + ネームスペース %1 は既に登録済みです! Remove Documentation - + ドキュメントの除去 Some documents currently opened in Assistant reference the documentation you are attempting to remove. Removing the documentation will close those documents. - + 除去しようとしているいくつかのドキュメントは Assistant 上で参照されています。除去すると、これらのドキュメントは閉じられます。 Cancel - + キャンセル OK - + OK Use custom settings - + 独自設定を使用する @@ -789,92 +792,92 @@ Preferences - + 設定 Fonts - + フォント Font settings: - + フォント設定: Browser - + ブラウザー Application - + アプリケーション Filters - + フィルタ Filter: - + フィルタ: Attributes: - + 属性: 1 - + 1 Add - + 追加 Remove - + 削除 Documentation - + ドキュメント Registered Documentation: - + 登録済みドキュメント: Add... - + 追加... Options - + オプション Current Page - + 現在のページ Restore to default - + デフォルト設定に戻す Homepage - + ホームページ @@ -882,64 +885,64 @@ The specified collection file does not exist! - + 指定されたコレクションファイルは存在しません! Missing collection file! - + コレクションファイルが見つかりません! Invalid URL! - + 不正なURLです! Missing URL! - + URLが見つかりません! Unknown widget: %1 - + 不明なウィジェット: %1 Missing widget! - + ウィジェットが見つかりません! The specified Qt help file does not exist! - + 指定された Qt ヘルプ ファイルが存在しません! Missing help file! - + ヘルプファイルが見つかりません! Missing filter argument! - + フィルタ引数が不足しています! Unknown option: %1 - + 不明なオプション: %1 Qt Assistant - + Qt Assistant @@ -948,12 +951,16 @@ Reason: %2 - + ドキュメントファイルを登録できませんでした。 +%1 + +原因: +%2 Documentation successfully registered. - + ドキュメントの登録に成功しました。 @@ -962,28 +969,32 @@ Reason: Reason: %2 - + ドキュメントファイルを解除できませんでした。 +%1 + +原因: +%2 Documentation successfully unregistered. - + ドキュメントの解放に成功しました。 Cannot load sqlite database driver! - + SQLite データベース ドライバーをロードできません! The specified collection file could not be read! - + 指定されたコレクションファイルは読み込めません! Bookmark - + ブックマーク @@ -991,12 +1002,12 @@ Reason: Debugging Remote Control - + リモート コントロールをデバッグ中 Received Command: %1 %2 - + 受信したコマンド: %1 %2 @@ -1004,28 +1015,28 @@ Reason: &Copy - + コピー(&C) Copy &Link Location - + リンクのURLをコピー(&L) Open Link in New Tab - + リンクを新しいタブで開く Select All - + すべてを選択 Open Link - + リンクを開く @@ -1033,27 +1044,27 @@ Reason: Choose a topic for <b>%1</b>: - + <b>%1</b> の検索先トピックを選択してください: Choose Topic - + トピックを選択 &Topics - + トピック(&T) &Display - + 表示(&D) &Close - + 閉じる(&C) -- cgit v0.12 From e5615b9cf4c981bb8d0fec48eacd6c11c124a3b0 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 25 May 2009 11:57:30 +0200 Subject: qdoc: Added some missing qdoc comments. Task-number: 252491 --- src/corelib/io/qfsfileengine.cpp | 2 +- src/gui/painting/qcolor.cpp | 8 +++++++ src/gui/painting/qcolormap_mac.cpp | 6 ----- src/gui/painting/qcolormap_x11.cpp | 4 ---- src/opengl/qgl.cpp | 48 +++++++++++++++++++++++++++++++++----- src/opengl/qgl_win.cpp | 16 +++---------- src/opengl/qgl_wince.cpp | 3 --- src/opengl/qgl_x11.cpp | 30 +++++------------------- 8 files changed, 60 insertions(+), 57 deletions(-) diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp index e79d867..07f3c9c 100644 --- a/src/corelib/io/qfsfileengine.cpp +++ b/src/corelib/io/qfsfileengine.cpp @@ -948,7 +948,7 @@ bool QFSFileEngine::supportsExtension(Extension extension) const For Windows, -2 is always returned. */ -/*! \fn QString QFSFileEngine::owner() const +/*! \fn QString QFSFileEngine::owner(FileOwner own) const \reimp */ diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp index 1723a19..c50004e 100644 --- a/src/gui/painting/qcolor.cpp +++ b/src/gui/painting/qcolor.cpp @@ -2241,4 +2241,12 @@ QDataStream &operator>>(QDataStream &stream, QColor &color) \sa QColor::rgb(), QColor::rgba() */ +/*! \fn void QColormap::initialize() + \internal +*/ + +/*! \fn void QColormap::cleanup() + \internal +*/ + QT_END_NAMESPACE diff --git a/src/gui/painting/qcolormap_mac.cpp b/src/gui/painting/qcolormap_mac.cpp index afe0378..96da90f 100644 --- a/src/gui/painting/qcolormap_mac.cpp +++ b/src/gui/painting/qcolormap_mac.cpp @@ -55,17 +55,11 @@ public: }; static QColormap *qt_mac_global_map = 0; -/*! - Creates the class's internal colormap. - */ void QColormap::initialize() { qt_mac_global_map = new QColormap; } -/*! - Deletes the class's internal colormap. - */ void QColormap::cleanup() { delete qt_mac_global_map; diff --git a/src/gui/painting/qcolormap_x11.cpp b/src/gui/painting/qcolormap_x11.cpp index ccf6955..c9186b1 100644 --- a/src/gui/painting/qcolormap_x11.cpp +++ b/src/gui/painting/qcolormap_x11.cpp @@ -337,8 +337,6 @@ static void init_direct(QColormapPrivate *d, bool ownColormap) static QColormap **cmaps = 0; -/*! \internal -*/ void QColormap::initialize() { Display *display = QX11Info::display(); @@ -578,8 +576,6 @@ void QColormap::initialize() } } -/*! \internal -*/ void QColormap::cleanup() { Display *display = QX11Info::display(); diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 8f963f8..ca5c732 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -2504,6 +2504,42 @@ const QGLContext* QGLContext::currentContext() visual. On other platforms it may work differently. */ +/*! \fn int QGLContext::choosePixelFormat(void* dummyPfd, HDC pdc) + + \bold{Win32 only:} This virtual function chooses a pixel format + that matches the OpenGL \link setFormat() format\endlink. + Reimplement this function in a subclass if you need a custom + context. + + \warning The \a dummyPfd pointer and \a pdc are used as a \c + PIXELFORMATDESCRIPTOR*. We use \c void to avoid using + Windows-specific types in our header files. + + \sa chooseContext() +*/ + +/*! \fn void *QGLContext::chooseVisual() + + \bold{X11 only:} This virtual function tries to find a visual that + matches the format, reducing the demands if the original request + cannot be met. + + The algorithm for reducing the demands of the format is quite + simple-minded, so override this method in your subclass if your + application has spcific requirements on visual selection. + + \sa chooseContext() +*/ + +/*! \fn void *QGLContext::tryVisual(const QGLFormat& f, int bufDepth) + \internal + + \bold{X11 only:} This virtual function chooses a visual that matches + the OpenGL \link format() format\endlink. Reimplement this function + in a subclass if you need a custom visual. + + \sa chooseContext() +*/ /*! \fn void QGLContext::reset() @@ -3020,11 +3056,10 @@ void QGLWidget::setFormat(const QGLFormat &format) */ /* - \obsolete - \fn void QGLWidget::setContext(QGLContext *context, - const QGLContext* shareContext, - bool deleteOldContext) + const QGLContext* shareContext, + bool deleteOldContext) + \obsolete Sets a new context for this widget. The QGLContext \a context must be created using \e new. QGLWidget will delete \a context when @@ -3174,9 +3209,10 @@ void QGLWidget::resizeOverlayGL(int, int) { } - +/*! \fn bool QGLWidget::event(QEvent *e) + \reimp +*/ #if !defined(Q_OS_WINCE) && !defined(Q_WS_QWS) -/*! \reimp */ bool QGLWidget::event(QEvent *e) { Q_D(QGLWidget); diff --git a/src/opengl/qgl_win.cpp b/src/opengl/qgl_win.cpp index bd8569a..217b0fc 100644 --- a/src/opengl/qgl_win.cpp +++ b/src/opengl/qgl_win.cpp @@ -884,19 +884,9 @@ static bool qLogEq(bool a, bool b) return (((!a) && (!b)) || (a && b)); } -/*! - \bold{Win32 only:} This virtual function chooses a pixel - format that matches the OpenGL \link setFormat() format\endlink. - Reimplement this function in a subclass if you need a custom - context. - - \warning The \a dummyPfd pointer and \a pdc are used as a \c - PIXELFORMATDESCRIPTOR*. We use \c void to avoid using - Windows-specific types in our header files. - - \sa chooseContext() -*/ - +/* + See qgl.cpp for qdoc comment. + */ int QGLContext::choosePixelFormat(void* dummyPfd, HDC pdc) { Q_D(QGLContext); diff --git a/src/opengl/qgl_wince.cpp b/src/opengl/qgl_wince.cpp index cb51598..7429071 100644 --- a/src/opengl/qgl_wince.cpp +++ b/src/opengl/qgl_wince.cpp @@ -552,9 +552,6 @@ void QGLWidgetPrivate::updateColormap() ReleaseDC(q->winId(), hdc); } -/*! - \reimp -\*/ bool QGLWidget::event(QEvent *e) { Q_D(QGLWidget); diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp index 28c34de..7ed7a23 100644 --- a/src/opengl/qgl_x11.cpp +++ b/src/opengl/qgl_x11.cpp @@ -443,19 +443,9 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) return true; } - -/*! - \bold{X11 only:} This virtual function tries to find a - visual that matches the format, reducing the demands if the original - request cannot be met. - - The algorithm for reducing the demands of the format is quite - simple-minded, so override this method in your subclass if your - application has spcific requirements on visual selection. - - \sa chooseContext() -*/ - +/* + See qgl.cpp for qdoc comment. + */ void *QGLContext::chooseVisual() { Q_D(QGLContext); @@ -519,17 +509,9 @@ void *QGLContext::chooseVisual() return vis; } - -/*! - \internal - - \bold{X11 only:} This virtual function chooses a visual - that matches the OpenGL \link format() format\endlink. Reimplement this - function in a subclass if you need a custom visual. - - \sa chooseContext() -*/ - +/* + See qgl.cpp for qdoc comment. + */ void *QGLContext::tryVisual(const QGLFormat& f, int bufDepth) { Q_D(QGLContext); -- cgit v0.12 From 44d992ca150d9448cb7b9114b2bc489b441c7b76 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 25 May 2009 12:25:28 +0200 Subject: qdoc: Added some missing qdoc comments. Task-number: 252489 --- src/gui/text/qfont.cpp | 14 ++++++++++++++ src/gui/text/qfont_x11.cpp | 11 ----------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index f73ffb5..c5096bf 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -1897,6 +1897,20 @@ void QFont::insertSubstitutions(const QString &familyName, } } +/*! \fn void QFont::initialize() + \internal + + Internal function that initializes the font system. The font cache + and font dict do not alloc the keys. The key is a QString which is + shared between QFontPrivate and QXFontName. +*/ + +/*! \fn void QFont::cleanup() + \internal + + Internal function that cleans up the font system. +*/ + // ### mark: should be called removeSubstitutions() /*! Removes all the substitutions for \a familyName. diff --git a/src/gui/text/qfont_x11.cpp b/src/gui/text/qfont_x11.cpp index 710792c..6b0e46c 100644 --- a/src/gui/text/qfont_x11.cpp +++ b/src/gui/text/qfont_x11.cpp @@ -129,13 +129,6 @@ Q_GUI_EXPORT void qt_x11_set_fallback_font_family(int script, const QString &fam int QFontPrivate::defaultEncodingID = -1; -/*! - Internal function that initializes the font system. - - \internal - The font cache and font dict do not alloc the keys. The key is a QString - which is shared between QFontPrivate and QXFontName. -*/ void QFont::initialize() { extern int qt_encoding_id_for_mib(int mib); // from qfontdatabase_x11.cpp @@ -184,10 +177,6 @@ void QFont::initialize() QFontPrivate::defaultEncodingID = qt_encoding_id_for_mib(mib); } -/*! \internal - - Internal function that cleans up the font system. -*/ void QFont::cleanup() { QFontCache::cleanup(); -- cgit v0.12 From 58253fafc6d3c0a535833e674d8930a46138c25f Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Mon, 25 May 2009 09:30:20 +0200 Subject: BT: Mac: Crash when using QFontDialog If creating a native QFontDialog and delete it, the native dialog will still show. And worse, it will call the deleted QDialog counterpart. This fix will clean up (and close the native dialog) when the QDialog is deleted. Task-number: 254397 Reviewed-by: Trenton Schulz --- src/gui/dialogs/qfontdialog.cpp | 8 ++++++++ src/gui/dialogs/qfontdialog_mac.mm | 1 + 2 files changed, 9 insertions(+) diff --git a/src/gui/dialogs/qfontdialog.cpp b/src/gui/dialogs/qfontdialog.cpp index 4c5bf4f..aa1c553 100644 --- a/src/gui/dialogs/qfontdialog.cpp +++ b/src/gui/dialogs/qfontdialog.cpp @@ -337,6 +337,14 @@ void QFontDialogPrivate::init() QFontDialog::~QFontDialog() { +#ifdef Q_WS_MAC + Q_D(QFontDialog); + if (d->delegate) { + QFontDialogPrivate::closeCocoaFontPanel(d->delegate); + QFontDialogPrivate::sharedFontPanelAvailable = true; + return; + } +#endif } /*! diff --git a/src/gui/dialogs/qfontdialog_mac.mm b/src/gui/dialogs/qfontdialog_mac.mm index 50917a1..13f7149 100644 --- a/src/gui/dialogs/qfontdialog_mac.mm +++ b/src/gui/dialogs/qfontdialog_mac.mm @@ -566,6 +566,7 @@ void *QFontDialogPrivate::openCocoaFontPanel(const QFont &initial, void QFontDialogPrivate::closeCocoaFontPanel(void *delegate) { + QMacCocoaAutoReleasePool pool; QCocoaFontPanelDelegate *theDelegate = static_cast(delegate); NSWindow *ourPanel = [theDelegate actualPanel]; [ourPanel close]; -- cgit v0.12 From 230357435d35a5b379c697723302108dd114585d Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 25 May 2009 14:05:27 +0200 Subject: qdoc: Moved some qdoc comments to a common cpp file. Task-number: 252488 --- src/gui/image/qpixmap.cpp | 95 +++++++++++++++++++++++++++++++++++++++++++ src/gui/image/qpixmap_qws.cpp | 14 ------- src/gui/image/qpixmap_win.cpp | 45 -------------------- src/gui/image/qpixmap_x11.cpp | 28 ------------- 4 files changed, 95 insertions(+), 87 deletions(-) diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index 0f6b649..7fcb2b9 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -2014,4 +2014,99 @@ QPixmapData* QPixmap::pixmapData() const return data; } +/*! + \enum QPixmap::HBitmapFormat + + \bold{Win32 only:} This enum defines how the conversion between \c + HBITMAP and QPixmap is performed. + + \warning This enum is only available on Windows. + + \value NoAlpha The alpha channel is ignored and always treated as + being set to fully opaque. This is preferred if the \c HBITMAP is + used with standard GDI calls, such as \c BitBlt(). + + \value PremultipliedAlpha The \c HBITMAP is treated as having an + alpha channel and premultiplied colors. This is preferred if the + \c HBITMAP is accessed through the \c AlphaBlend() GDI function. + + \value Alpha The \c HBITMAP is treated as having a plain alpha + channel. This is the preferred format if the \c HBITMAP is going + to be used as an application icon or systray icon. + + \sa fromWinHBITMAP(), toWinHBITMAP() +*/ + +/*! \fn HBITMAP QPixmap::toWinHBITMAP(HBitmapFormat format) const + \bold{Win32 only:} Creates a \c HBITMAP equivalent to the QPixmap, + based on the given \a format. Returns the \c HBITMAP handle. + + It is the caller's responsibility to free the \c HBITMAP data + after use. + + \warning This function is only available on Windows. + + \sa fromWinHBITMAP() +*/ + +/*! \fn QPixmap QPixmap::fromWinHBITMAP(HBITMAP bitmap, HBitmapFormat format) + \bold{Win32 only:} Returns a QPixmap that is equivalent to the + given \a bitmap. The conversion is based on the specified \a + format. + + \warning This function is only available on Windows. + + \sa toWinHBITMAP(), {QPixmap#Pixmap Conversion}{Pixmap Conversion} + +*/ + +/*! \fn const QX11Info &QPixmap::x11Info() const + \bold{X11 only:} Returns information about the configuration of + the X display used to display the widget. + + \warning This function is only available on X11. + + \sa {QPixmap#Pixmap Information}{Pixmap Information} +*/ + +/*! \fn Qt::HANDLE QPixmap::x11PictureHandle() const + \bold{X11 only:} Returns the X11 Picture handle of the pixmap for + XRender support. + + This function will return 0 if XRender support is not compiled + into Qt, if the XRender extension is not supported on the X11 + display, or if the handle could not be created. Use of this + function is not portable. + + \warning This function is only available on X11. + + \sa {QPixmap#Pixmap Information}{Pixmap Information} +*/ + +/*! \fn int QPixmap::x11SetDefaultScreen(int screen) + \internal +*/ + +/*! \fn void QPixmap::x11SetScreen(int screen) + \internal +*/ + +/*! \fn QRgb* QPixmap::clut() const + \internal +*/ + +/*! \fn int QPixmap::numCols() const + \internal +*/ + +/*! \fn const uchar* QPixmap::qwsBits() const + \internal + \since 4.1 +*/ + +/*! \fn int QPixmap::qwsBytesPerLine() const + \internal + \since 4.1 +*/ + QT_END_NAMESPACE diff --git a/src/gui/image/qpixmap_qws.cpp b/src/gui/image/qpixmap_qws.cpp index 6cc7981..7e383ab 100644 --- a/src/gui/image/qpixmap_qws.cpp +++ b/src/gui/image/qpixmap_qws.cpp @@ -109,9 +109,6 @@ QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h) return QPixmap::fromImage(img); } -/*! - \internal -*/ QRgb* QPixmap::clut() const { if (data->classId() == QPixmapData::RasterClass) { @@ -122,9 +119,6 @@ QRgb* QPixmap::clut() const return 0; } -/*! - \internal -*/ int QPixmap::numCols() const { if (data->classId() == QPixmapData::RasterClass) { @@ -135,10 +129,6 @@ int QPixmap::numCols() const return 0; } -/*! - \internal - \since 4.1 -*/ const uchar* QPixmap::qwsBits() const { if (data->classId() == QPixmapData::RasterClass) { @@ -149,10 +139,6 @@ const uchar* QPixmap::qwsBits() const return 0; } -/*! - \internal - \since 4.1 -*/ int QPixmap::qwsBytesPerLine() const { if (data->classId() == QPixmapData::RasterClass) { diff --git a/src/gui/image/qpixmap_win.cpp b/src/gui/image/qpixmap_win.cpp index cbe9004..6a8b38a 100644 --- a/src/gui/image/qpixmap_win.cpp +++ b/src/gui/image/qpixmap_win.cpp @@ -119,42 +119,6 @@ QPixmap QPixmap::grabWindow(WId winId, int x, int y, int w, int h ) return pixmap; } - - -/*! - \enum QPixmap::HBitmapFormat - - This enum defines how the conversion between \c HBITMAP - and QPixmap is performed. - - \warning This enum is only available on Windows. - - \value NoAlpha The alpha channel is ignored and always treated as - being set to fully opaque. This is preferred if the \c HBITMAP is - used with standard GDI calls, such as \c BitBlt(). - - \value PremultipliedAlpha The \c HBITMAP is treated as having an - alpha channel and premultiplied colors. This is preferred if the - \c HBITMAP is accessed through the \c AlphaBlend() GDI function. - - \value Alpha The \c HBITMAP is treated as having a plain alpha - channel. This is the preferred format if the \c HBITMAP is going - to be used as an application icon or systray icon. - - \sa fromWinHBITMAP(), toWinHBITMAP() -*/ - -/*! - Creates a \c HBITMAP equivalent to the QPixmap, based on the given - \a format. Returns the \c HBITMAP handle. - - It is the caller's responsibility to free the \c HBITMAP data - after use. - - \warning This function is only available on Windows. - - \sa fromWinHBITMAP() -*/ HBITMAP QPixmap::toWinHBITMAP(HBitmapFormat format) const { HBITMAP bitmap = 0; @@ -209,15 +173,6 @@ HBITMAP QPixmap::toWinHBITMAP(HBitmapFormat format) const return bitmap; } -/*! - Returns a QPixmap that is equivalent to the given \a bitmap. The - conversion is based on the specified \a format. - - \warning This function is only available on Windows. - - \sa toWinHBITMAP(), {QPixmap#Pixmap Conversion}{Pixmap Conversion} - -*/ QPixmap QPixmap::fromWinHBITMAP(HBITMAP bitmap, HBitmapFormat format) { // Verify size diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp index 38916c7..d2e8d84 100644 --- a/src/gui/image/qpixmap_x11.cpp +++ b/src/gui/image/qpixmap_x11.cpp @@ -1914,9 +1914,6 @@ QPixmap QX11PixmapData::transformed(const QTransform &transform, } } -/*! - \internal -*/ int QPixmap::x11SetDefaultScreen(int screen) { int old = defaultScreen; @@ -1924,9 +1921,6 @@ int QPixmap::x11SetDefaultScreen(int screen) return old; } -/*! - \internal -*/ void QPixmap::x11SetScreen(int screen) { if (paintingActive()) { @@ -2034,14 +2028,6 @@ bool QX11PixmapData::hasAlphaChannel() const return d == 32; } -/*! - Returns information about the configuration of the X display used to display - the widget. - - \warning This function is only available on X11. - - \sa {QPixmap#Pixmap Information}{Pixmap Information} -*/ const QX11Info &QPixmap::x11Info() const { if (data->classId() == QPixmapData::X11Class) @@ -2098,20 +2084,6 @@ QPaintEngine* QX11PixmapData::paintEngine() const return that->pengine; } -/*! - Returns the X11 Picture handle of the pixmap for XRender - support. - - This function will return 0 if XRender support is not compiled - into Qt, if the XRender extension is not supported on the X11 - display, or if the handle could not be created. Use of this - function is not portable. - - \warning This function is only available on X11. - - \sa {QPixmap#Pixmap Information}{Pixmap Information} -*/ - Qt::HANDLE QPixmap::x11PictureHandle() const { #ifndef QT_NO_XRENDER -- cgit v0.12 From 1a477dcad1171d2d195422072fce62fc936e56cb Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 25 May 2009 14:46:20 +0200 Subject: Changed qdoc program to display version from QT_VERSION_STR. Task-number: 251486 --- tools/qdoc3/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp index 3e6f832..5c247fa 100644 --- a/tools/qdoc3/main.cpp +++ b/tools/qdoc3/main.cpp @@ -43,6 +43,7 @@ main.cpp */ +#include #include #include #include "apigenerator.h" @@ -136,7 +137,8 @@ static void printHelp() */ static void printVersion() { - Location::information(tr("qdoc version 4.4.1")); + QString s = QString(tr("qdoc version ")) + QString(QT_VERSION_STR); + Location::information(s); } /*! -- cgit v0.12 From e77f2e595d9b9a6f078f37894733c52bbcfeb695 Mon Sep 17 00:00:00 2001 From: Norwegian Rock Cat Date: Mon, 25 May 2009 14:55:33 +0200 Subject: BT: Prevent crash in Designer when using a scroll wheel to change a property. There was some strangeness happening here with parents, but the main problem was the fact that wheel was getting sent to the focusframe and not to the widget below. However, the focusframe has the "transparent for mouse events" flag set and wheel events probably should be transparent as well. Task-number: 253539 Reviewed-by: Richard Moe Gustavsen --- src/gui/kernel/qcocoaview_mac.mm | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index 4ceae3f..f1a7f39 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -789,10 +789,22 @@ extern "C" { bool wheelOK = false; Qt::KeyboardModifiers keyMods = qt_cocoaModifiers2QtModifiers([theEvent modifierFlags]); + QWidget *widgetToGetMouse = qwidget; + if (widgetToGetMouse->testAttribute(Qt::WA_TransparentForMouseEvents)) { + // Simulate passing the event through since Cocoa doesn't do that for us. + // Start by building a tree up. + NSView *candidateView = [self viewUnderTransparentForMouseView:self + widget:widgetToGetMouse + withWindowPoint:windowPoint]; + if (candidateView != nil) { + widgetToGetMouse = QWidget::find(WId(candidateView)); + } + } + // Mouse wheel deltas seem to tick in at increments of 0.1. Qt widgets - // expect the delta to be a multiple of 120. + // expect the delta to be a multiple of 120. const int ScrollFactor = 10 * 120; - // The qMax(...) factor reduces the + // The qMax(...) factor reduces the // acceleration for large wheel deltas. int deltaX = [theEvent deltaX] * ScrollFactor * qMax(0.6, 1.1 - qAbs([theEvent deltaX])); int deltaY = [theEvent deltaY] * ScrollFactor * qMax(0.6, 1.1 - qAbs([theEvent deltaY])); @@ -800,10 +812,10 @@ extern "C" { if (deltaX != 0) { QWheelEvent qwe(qlocal, qglobal, deltaX, buttons, keyMods, Qt::Horizontal); - qt_sendSpontaneousEvent(qwidget, &qwe); + qt_sendSpontaneousEvent(widgetToGetMouse, &qwe); wheelOK = qwe.isAccepted(); if (!wheelOK && QApplicationPrivate::focus_widget - && QApplicationPrivate::focus_widget != qwidget) { + && QApplicationPrivate::focus_widget != widgetToGetMouse) { QWheelEvent qwe2(QApplicationPrivate::focus_widget->mapFromGlobal(qglobal), qglobal, deltaX, buttons, keyMods, Qt::Horizontal); qt_sendSpontaneousEvent(QApplicationPrivate::focus_widget, &qwe2); @@ -813,10 +825,10 @@ extern "C" { if (deltaY) { QWheelEvent qwe(qlocal, qglobal, deltaY, buttons, keyMods, Qt::Vertical); - qt_sendSpontaneousEvent(qwidget, &qwe); + qt_sendSpontaneousEvent(widgetToGetMouse, &qwe); wheelOK = qwe.isAccepted(); if (!wheelOK && QApplicationPrivate::focus_widget - && QApplicationPrivate::focus_widget != qwidget) { + && QApplicationPrivate::focus_widget != widgetToGetMouse) { QWheelEvent qwe2(QApplicationPrivate::focus_widget->mapFromGlobal(qglobal), qglobal, deltaY, buttons, keyMods, Qt::Vertical); qt_sendSpontaneousEvent(QApplicationPrivate::focus_widget, &qwe2); @@ -828,10 +840,10 @@ extern "C" { // Qt doesn't explicitly support wheels with a Z component. In a misguided attempt to // try to be ahead of the pack, I'm adding this extra value. QWheelEvent qwe(qlocal, qglobal, deltaZ, buttons, keyMods, (Qt::Orientation)3); - qt_sendSpontaneousEvent(qwidget, &qwe); + qt_sendSpontaneousEvent(widgetToGetMouse, &qwe); wheelOK = qwe.isAccepted(); if (!wheelOK && QApplicationPrivate::focus_widget - && QApplicationPrivate::focus_widget != qwidget) { + && QApplicationPrivate::focus_widget != widgetToGetMouse) { QWheelEvent qwe2(QApplicationPrivate::focus_widget->mapFromGlobal(qglobal), qglobal, deltaZ, buttons, keyMods, (Qt::Orientation)3); qt_sendSpontaneousEvent(QApplicationPrivate::focus_widget, &qwe2); -- cgit v0.12 From b57d3f8169c6f1a1aab7203d79043a5f691b7e3e Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 25 May 2009 15:06:49 +0200 Subject: Changed qdoc to simplify the output for overloaded functions. Task-number: 249222 --- tools/qdoc3/doc.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp index 61d0ed6..397fbfa 100644 --- a/tools/qdoc3/doc.cpp +++ b/tools/qdoc3/doc.cpp @@ -1265,9 +1265,7 @@ void DocParser::parse(const QString& source, } else { append(Atom::ParaLeft); - append(Atom::String, - "This is an overloaded member function, " - "provided for convenience."); + append(Atom::String,"This is an overloaded function."); append(Atom::ParaRight); x = getMetaCommandArgument(cmdStr); } -- cgit v0.12 From 46bb023374dfd8684cefbe1d1c4ffc37f64f1239 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Mon, 25 May 2009 16:25:41 +0200 Subject: Adding details to QSettings functions Adding details to the documentation of custom storage format and related functions. Task-number: 207865 Rev-by: David Boddie Rev-by: Marius Storm-Olsen --- src/corelib/io/qsettings.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp index 14fc2d4..6152518 100644 --- a/src/corelib/io/qsettings.cpp +++ b/src/corelib/io/qsettings.cpp @@ -3468,7 +3468,7 @@ void QSettings::setPath(Format format, Scope scope, const QString &path) \typedef QSettings::SettingsMap Typedef for QMap. - + \sa registerFormat() */ @@ -3479,6 +3479,11 @@ void QSettings::setPath(Format format, Scope scope, const QString &path) \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 27 + \c ReadFunc is used in \c registerFormat() as a pointer to a function + that reads a set of key/value pairs. \c ReadFunc should read all the + options in one pass, and return all the settings in the \c SettingsMap + container, which is initially empty. + \sa WriteFunc, registerFormat() */ @@ -3489,6 +3494,10 @@ void QSettings::setPath(Format format, Scope scope, const QString &path) \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 28 + \c WriteFunc is used in \c registerFormat() as a pointer to a function + that writes a set of key/value pairs. \c WriteFunc is only called once, + so you need to output the settings in one go. + \sa ReadFunc, registerFormat() */ @@ -3504,7 +3513,7 @@ void QSettings::setPath(Format format, Scope scope, const QString &path) extension associated to the format (without the '.'). The \a readFunc and \a writeFunc parameters are pointers to - functions that read and write a set of (key, value) pairs. The + functions that read and write a set of key/value pairs. The QIODevice parameter to the read and write functions is always opened in binary mode (i.e., without the QIODevice::Text flag). -- cgit v0.12 From 9021113c583cc6b54b3b764e8e74d1448474c773 Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Mon, 25 May 2009 16:32:25 +0200 Subject: startup crash on WinCE need to deploy the sqlite plugin, otherwise no model gets created, but referenced causing a crash. Task-number: 254435 Reviewed-by: joerg BT: yes --- examples/sql/sqlwidgetmapper/sqlwidgetmapper.pro | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/sql/sqlwidgetmapper/sqlwidgetmapper.pro b/examples/sql/sqlwidgetmapper/sqlwidgetmapper.pro index 1881fce..c216a30 100644 --- a/examples/sql/sqlwidgetmapper/sqlwidgetmapper.pro +++ b/examples/sql/sqlwidgetmapper/sqlwidgetmapper.pro @@ -8,3 +8,6 @@ target.path = $$[QT_INSTALL_EXAMPLES]/sql/sqlwidgetmapper sources.files = $$SOURCES $$HEADERS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/sql/sqlwidgetmapper INSTALLS += target sources + +wince*: DEPLOYMENT_PLUGIN += qsqlite + -- cgit v0.12 From 3d560a498803fadfec9163d7a9695aee60cca8d4 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 25 May 2009 16:26:13 +0200 Subject: BT: fix systray balloon crash bug on Windows CE Its the context menu handling code... again. Problem is, that during execution of translateMouseEvent, the widget is closed and a modal message box is shown. After that, there's no widget at globalPos and thus, alienWidget is null. This patch just adds a null check for alienWidget. Task-number: 254425 Reviewed-by: mauricek BT: yes --- src/gui/kernel/qapplication_win.cpp | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index f14ad6f..239ee14 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -1675,20 +1675,23 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam // send the context menu event is a different one if (!alienWidget->testAttribute(Qt::WA_NativeWindow) && !alienWidget->testAttribute(Qt::WA_PaintOnScreen)) { alienWidget = QApplication::widgetAt(globalPos); - pos = alienWidget->mapFromGlobal(globalPos); + if (alienWidget) + pos = alienWidget->mapFromGlobal(globalPos); } - SHRGINFO shrg; - shrg.cbSize = sizeof(shrg); - shrg.hwndClient = hwnd; - shrg.ptDown.x = GET_X_LPARAM(lParam); - shrg.ptDown.y = GET_Y_LPARAM(lParam); - shrg.dwFlags = SHRG_RETURNCMD | SHRG_NOANIMATION; - resolveAygLibs(); - if (ptrRecognizeGesture && (ptrRecognizeGesture(&shrg) == GN_CONTEXTMENU)) { - if (qApp->activePopupWidget()) - qApp->activePopupWidget()->close(); - QContextMenuEvent e(QContextMenuEvent::Mouse, pos, globalPos); - result = qt_sendSpontaneousEvent(alienWidget, &e); + if (alienWidget) { + SHRGINFO shrg; + shrg.cbSize = sizeof(shrg); + shrg.hwndClient = hwnd; + shrg.ptDown.x = GET_X_LPARAM(lParam); + shrg.ptDown.y = GET_Y_LPARAM(lParam); + shrg.dwFlags = SHRG_RETURNCMD | SHRG_NOANIMATION; + resolveAygLibs(); + if (ptrRecognizeGesture && (ptrRecognizeGesture(&shrg) == GN_CONTEXTMENU)) { + if (qApp->activePopupWidget()) + qApp->activePopupWidget()->close(); + QContextMenuEvent e(QContextMenuEvent::Mouse, pos, globalPos); + result = qt_sendSpontaneousEvent(alienWidget, &e); + } } } } -- cgit v0.12 From 0f0fc963a7f1691038ee36a27bb63ff3165eefba Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Mon, 25 May 2009 16:45:57 +0200 Subject: BT:Fix a clipping issue in tabbar tabs On XP and Vista where tabs use taboverlap, the currently dragged would loose the outline. We need to compensate for the taboverlap when creating the draggable widget, otherwise the outline will be clipped. Task-number: 254453 Reviewed-by: nrc --- src/gui/widgets/qtabbar.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp index 69221ba..785d772 100644 --- a/src/gui/widgets/qtabbar.cpp +++ b/src/gui/widgets/qtabbar.cpp @@ -1536,9 +1536,10 @@ void QTabBar::paintEvent(QPaintEvent *) } if (!d->dragInProgress) p.drawControl(QStyle::CE_TabBarTab, tab); - else - d->movingTab->setGeometry(tab.rect); - + else { + int taboverlap = style()->pixelMetric(QStyle::PM_TabBarTabOverlap, 0, this); + d->movingTab->setGeometry(tab.rect.adjusted(-taboverlap, 0, taboverlap, 0)); + } } // Only draw the tear indicator if necessary. Most of the time we don't need too. @@ -1805,7 +1806,9 @@ void QTabBarPrivate::setupMovableTab() if (!movingTab) movingTab = new QWidget(q); + int taboverlap = q->style()->pixelMetric(QStyle::PM_TabBarTabOverlap, 0 ,q); QRect grabRect = q->tabRect(pressedIndex); + grabRect.adjust(-taboverlap, 0, taboverlap, 0); QPixmap grabImage(grabRect.size()); grabImage.fill(Qt::transparent); @@ -1813,7 +1816,7 @@ void QTabBarPrivate::setupMovableTab() QStyleOptionTabV3 tab; q->initStyleOption(&tab, pressedIndex); - tab.rect.moveTopLeft(QPoint(0, 0)); + tab.rect.moveTopLeft(QPoint(taboverlap, 0)); p.drawControl(QStyle::CE_TabBarTab, tab); p.end(); -- cgit v0.12 From 313e2719ac75eb6c6ff2d84f5cef9f70433d5943 Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Mon, 25 May 2009 16:57:43 +0200 Subject: add deployment rules... WinCE needs those files to be able to do something useful Task-number: 254430 Task-number: 254437 Task-number: 254428 Reviewed-by: joerg BT: yes --- examples/itemviews/puzzle/puzzle.pro | 5 +++++ examples/qtconcurrent/imagescaling/imagescaling.pro | 2 ++ examples/widgets/movie/movie.pro | 8 ++++++++ 3 files changed, 15 insertions(+) diff --git a/examples/itemviews/puzzle/puzzle.pro b/examples/itemviews/puzzle/puzzle.pro index deed112..4f5aaad 100644 --- a/examples/itemviews/puzzle/puzzle.pro +++ b/examples/itemviews/puzzle/puzzle.pro @@ -12,3 +12,8 @@ target.path = $$[QT_INSTALL_EXAMPLES]/itemviews/puzzle sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.jpg sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/puzzle INSTALLS += target sources + +wince* { + DEPLOYMENT_PLUGIN += qjpeg qgif qtiff +} + diff --git a/examples/qtconcurrent/imagescaling/imagescaling.pro b/examples/qtconcurrent/imagescaling/imagescaling.pro index fbf864a..0a25efb 100644 --- a/examples/qtconcurrent/imagescaling/imagescaling.pro +++ b/examples/qtconcurrent/imagescaling/imagescaling.pro @@ -11,3 +11,5 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent/imagescaling sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png sources.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent/imagescaling INSTALLS += target sources + +wince*: DEPLOYMENT_PLUGIN += qgif qjpeg qtiff diff --git a/examples/widgets/movie/movie.pro b/examples/widgets/movie/movie.pro index 1c7cbae..6aa5780 100644 --- a/examples/widgets/movie/movie.pro +++ b/examples/widgets/movie/movie.pro @@ -7,3 +7,11 @@ target.path = $$[QT_INSTALL_EXAMPLES]/widgets/movie sources.files = $$SOURCES $$HEADERS $$RESOURCES movie.pro animation.mng sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/movie INSTALLS += target sources + +wince*: { + addFiles.sources += *.mng + addFiles.path = . + DEPLOYMENT += addFiles + DEPLOYMENT_PLUGIN += qmng +} + -- cgit v0.12 From a731cb5c1765bc3ab71469e86ec0533e5a5c18a5 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 25 May 2009 17:40:35 +0200 Subject: don't build examples/qtconcurrent/qtconcurrent.pro by default on Win CE This examples doesn't make much sense on most Windows CE devices. Task-number: 254433 Reviewed-by: mauricek BT: yes --- examples/qtconcurrent/qtconcurrent.pro | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/qtconcurrent/qtconcurrent.pro b/examples/qtconcurrent/qtconcurrent.pro index 53008f0..5d73533 100644 --- a/examples/qtconcurrent/qtconcurrent.pro +++ b/examples/qtconcurrent/qtconcurrent.pro @@ -1,10 +1,13 @@ TEMPLATE = subdirs SUBDIRS = imagescaling \ map \ - progressdialog \ runfunction \ wordcount +!wince* { + SUBDIRS += progressdialog +} + # install target.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS qtconcurrent.pro README -- cgit v0.12 From 305ce9ea67c11826d91c032ead55edfd5e15462f Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 25 May 2009 18:10:08 +0200 Subject: fix warning in QtSvg if qreal == float Reviewed-by: mauricek --- src/svg/qsvggenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/svg/qsvggenerator.cpp b/src/svg/qsvggenerator.cpp index e822da5..fd4c875 100644 --- a/src/svg/qsvggenerator.cpp +++ b/src/svg/qsvggenerator.cpp @@ -261,7 +261,7 @@ public: constantAlpha &= (stops.at(i).second.alpha() == alpha); if (!constantAlpha) { - const qreal spacing = 0.02; + const qreal spacing = qreal(0.02); QGradientStops newStops; QRgb fromColor = PREMUL(stops.at(0).second.rgba()); QRgb toColor; -- cgit v0.12 From 3868c7dacde57c3e929ad72b9c9c42f8ddf4dc62 Mon Sep 17 00:00:00 2001 From: Norwegian Rock Cat Date: Mon, 25 May 2009 18:42:16 +0200 Subject: BT: Namespace compile fixes. This broke again. I Need to get a way to automate this, I'll discuss with QA. --- src/gui/kernel/qcocoaapplicationdelegate_mac.mm | 2 +- src/gui/kernel/qcocoaview_mac_p.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm index 9a24645..2ca6a3d 100644 --- a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm +++ b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm @@ -90,6 +90,7 @@ QT_BEGIN_NAMESPACE extern void onApplicationChangedActivation(bool); // qapplication_mac.mm +extern void qt_release_apple_event_handler(); //qapplication_mac.mm QT_END_NAMESPACE QT_FORWARD_DECLARE_CLASS(QDesktopWidgetImplementation) @@ -207,7 +208,6 @@ static void cleanupCocoaApplicationDelegate() { Q_UNUSED(aNotification); inLaunch = false; - extern void qt_release_apple_event_handler(); //qapplication_mac.mm qt_release_apple_event_handler(); } diff --git a/src/gui/kernel/qcocoaview_mac_p.h b/src/gui/kernel/qcocoaview_mac_p.h index 983c762..527b1a6 100644 --- a/src/gui/kernel/qcocoaview_mac_p.h +++ b/src/gui/kernel/qcocoaview_mac_p.h @@ -59,6 +59,7 @@ QT_FORWARD_DECLARE_CLASS(QWidgetPrivate); QT_FORWARD_DECLARE_CLASS(QWidget); QT_FORWARD_DECLARE_CLASS(QEvent); QT_FORWARD_DECLARE_CLASS(QCocoaDropData); +QT_FORWARD_DECLARE_CLASS(QStringList); QT_BEGIN_NAMESPACE struct DnDParams -- cgit v0.12 From b94416a8fe3fae0e9ab01dea9d5a78a21c4affc0 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 25 May 2009 19:43:12 +0200 Subject: Doc: Fixed terminology. Reviewed-by: Trust Me --- src/corelib/tools/qcryptographichash.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qcryptographichash.cpp b/src/corelib/tools/qcryptographichash.cpp index 7232626..e438179 100644 --- a/src/corelib/tools/qcryptographichash.cpp +++ b/src/corelib/tools/qcryptographichash.cpp @@ -74,7 +74,7 @@ public: QCryptographicHash can be used to generate cryptographic hashes of binary or text data. - Currently MD4, MD5, and SHA1 are supported. + Currently MD4, MD5, and SHA-1 are supported. */ /*! -- cgit v0.12 From 4bee6cac20b52761f39b139c61d5861fe7b68c6f Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 25 May 2009 19:52:30 +0200 Subject: Doc: Fixed links to resources on the qtsoftware.com Web site. Task-number: 254463 Reviewed-by: Denis Dzyubenko --- doc/src/index.qdoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc index 4ead9e4..5bf3661 100644 --- a/doc/src/index.qdoc +++ b/doc/src/index.qdoc @@ -207,10 +207,10 @@ -- cgit v0.12 From 152d5fb2d97432d92b6b84e6e81c0236d278ac5d Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 25 May 2009 20:00:12 +0200 Subject: Doc: Removed documentation about the non-existent QKeyEvent::standardKey() function. Task-number: 254074 Reviewed-by: Trust Me --- src/gui/kernel/qkeysequence.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp index 352d26a..3bcf9e3 100644 --- a/src/gui/kernel/qkeysequence.cpp +++ b/src/gui/kernel/qkeysequence.cpp @@ -629,8 +629,6 @@ const uint QKeySequencePrivate::numberOfKeyBindings = sizeof(QKeySequencePrivate This enum represent standard key bindings. They can be used to assign platform dependent keyboard shortcuts to a QAction. - QKeyEvent also provides the function QKeyEvent::standardKey() to - query if it matches an existing key binding. Note that the key bindings are platform dependent. The currently bound shortcuts can be queried using keyBindings(). -- cgit v0.12 From 8b34bd541c6aa201c4d872210228bce8217a5e03 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 25 May 2009 20:10:25 +0200 Subject: Doc: Miscellaneous documentation fixes for Qt 4.5.x and later. Reviewed-by: Trust Me --- doc/src/snippets/picture/picture.cpp | 2 +- src/corelib/tools/qstringlist.cpp | 2 -- src/gui/painting/qpainterpath.cpp | 8 ++++---- src/gui/text/qfontmetrics.cpp | 12 ++++++------ src/network/ssl/qsslcertificate.cpp | 2 +- 5 files changed, 12 insertions(+), 14 deletions(-) diff --git a/doc/src/snippets/picture/picture.cpp b/doc/src/snippets/picture/picture.cpp index 07cedbf..be171c6 100644 --- a/doc/src/snippets/picture/picture.cpp +++ b/doc/src/snippets/picture/picture.cpp @@ -66,7 +66,7 @@ int main() QPicture picture; picture.load("drawing.pic"); // load picture QPainter painter; - painter.begin(&myWidget); // paint in myWidget + painter.begin(&myImage); // paint in myImage painter.drawPicture(0, 0, picture); // draw the picture at (0,0) painter.end(); // painting done //! [1] diff --git a/src/corelib/tools/qstringlist.cpp b/src/corelib/tools/qstringlist.cpp index e22f122..cf1bff8 100644 --- a/src/corelib/tools/qstringlist.cpp +++ b/src/corelib/tools/qstringlist.cpp @@ -621,8 +621,6 @@ int QtPrivate::QStringList_lastIndexOf(const QStringList *that, QRegExp &rx, int the list, searching forward from index position \a from. Returns -1 if no item matched. - By default, this function is case sensitive. - \sa lastIndexOf(), contains(), QList::indexOf() */ diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp index 9ce16d3..1b2c4e3 100644 --- a/src/gui/painting/qpainterpath.cpp +++ b/src/gui/painting/qpainterpath.cpp @@ -2695,7 +2695,7 @@ qreal QPainterPath::length() const /*! Returns percentage of the whole path at the specified length \a len. - Note that similarly to other percent methods, the percentage measurment + Note that similarly to other percent methods, the percentage measurement is not linear with regards to the length, if curves are present in the path. When curves are present the percentage argument is mapped to the t parameter of the Bezier equations. @@ -2812,7 +2812,7 @@ static inline QBezier bezierAtT(const QPainterPath &path, qreal t, qreal *starti Returns the point at at the percentage \a t of the current path. The argument \a t has to be between 0 and 1. - Note that similarly to other percent methods, the percentage measurment + Note that similarly to other percent methods, the percentage measurement is not linear with regards to the length, if curves are present in the path. When curves are present the percentage argument is mapped to the t parameter of the Bezier equations. @@ -2843,7 +2843,7 @@ QPointF QPainterPath::pointAtPercent(qreal t) const Positive values for the angles mean counter-clockwise while negative values mean the clockwise direction. Zero degrees is at the 3 o'clock position. - Note that similarly to the other percent methods, the percentage measurment + Note that similarly to the other percent methods, the percentage measurement is not linear with regards to the length if curves are present in the path. When curves are present the percentage argument is mapped to the t parameter of the Bezier equations. @@ -2875,7 +2875,7 @@ qreal QPainterPath::angleAtPercent(qreal t) const Returns the slope of the path at the percentage \a t. The argument \a t has to be between 0 and 1. - Note that similarly to other percent methods, the percentage measurment + Note that similarly to other percent methods, the percentage measurement is not linear with regards to the length, if curves are present in the path. When curves are present the percentage argument is mapped to the t parameter of the Bezier equations. diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp index 88d0610..87da628 100644 --- a/src/gui/text/qfontmetrics.cpp +++ b/src/gui/text/qfontmetrics.cpp @@ -670,8 +670,8 @@ QRect QFontMetrics::boundingRect(const QString &text) const Returns the rectangle that is covered by ink if character \a ch were to be drawn at the origin of the coordinate system. - Note that the bounding rectangle may extend to the left of (0, 0), - e.g. for italicized fonts, and that the text output may cover \e + Note that the bounding rectangle may extend to the left of (0, 0) + (e.g., for italicized fonts), and that the text output may cover \e all pixels in the bounding rectangle. For a space character the rectangle will usually be empty. @@ -724,7 +724,7 @@ QRect QFontMetrics::boundingRect(QChar ch) const \o Qt::AlignCenter (== \c{Qt::AlignHCenter | Qt::AlignVCenter}) \o Qt::TextSingleLine ignores newline characters in the text. \o Qt::TextExpandTabs expands tabs (see below) - \o Qt::TextShowMnemonic interprets "&x" as \underline{x}, i.e. underlined. + \o Qt::TextShowMnemonic interprets "&x" as \underline{x}; i.e., underlined. \o Qt::TextWordWrap breaks the text to fit the rectangle. \endlist @@ -781,7 +781,7 @@ QRect QFontMetrics::boundingRect(const QRect &rect, int flags, const QString &te \list \o Qt::TextSingleLine ignores newline characters. \o Qt::TextExpandTabs expands tabs (see below) - \o Qt::TextShowMnemonic interprets "&x" as \underline{x}, i.e. underlined. + \o Qt::TextShowMnemonic interprets "&x" as \underline{x}; i.e., underlined. \o Qt::TextWordBreak breaks the text to fit the rectangle. \endlist @@ -1500,7 +1500,7 @@ QRectF QFontMetricsF::boundingRect(QChar ch) const \o Qt::AlignCenter (== \c{Qt::AlignHCenter | Qt::AlignVCenter}) \o Qt::TextSingleLine ignores newline characters in the text. \o Qt::TextExpandTabs expands tabs (see below) - \o Qt::TextShowMnemonic interprets "&x" as \underline{x}, i.e. underlined. + \o Qt::TextShowMnemonic interprets "&x" as \underline{x}; i.e., underlined. \o Qt::TextWordWrap breaks the text to fit the rectangle. \endlist @@ -1559,7 +1559,7 @@ QRectF QFontMetricsF::boundingRect(const QRectF &rect, int flags, const QString& \list \o Qt::TextSingleLine ignores newline characters. \o Qt::TextExpandTabs expands tabs (see below) - \o Qt::TextShowMnemonic interprets "&x" as \underline{x}, i.e. underlined. + \o Qt::TextShowMnemonic interprets "&x" as \underline{x}; i.e., underlined. \o Qt::TextWordBreak breaks the text to fit the rectangle. \endlist diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp index a2ba644..7b554dc 100644 --- a/src/network/ssl/qsslcertificate.cpp +++ b/src/network/ssl/qsslcertificate.cpp @@ -267,7 +267,7 @@ QByteArray QSslCertificate::serialNumber() const /*! Returns a cryptographic digest of this certificate. By default, - and MD5 digest will be generated, but you can also specify a + an MD5 digest will be generated, but you can also specify a custom \a algorithm. */ QByteArray QSslCertificate::digest(QCryptographicHash::Algorithm algorithm) const -- cgit v0.12 From 23820c30052ea23ecf2226c300fc4819dd294306 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 25 May 2009 20:13:34 +0200 Subject: Doc: Fixed custom graphics item snippet. As reported on qt-interest: http://lists.trolltech.com/pipermail/qt-interest/2009-May/007036.html Reviewed-by: Trust Me --- doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp index a57de9d..d9e38ed 100644 --- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp +++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp @@ -6,7 +6,7 @@ public: { qreal penWidth = 1; return QRectF(-10 - penWidth / 2, -10 - penWidth / 2, - 20 + penWidth / 2, 20 + penWidth / 2); + 20 + penWidth, 20 + penWidth); } void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, -- cgit v0.12 From bbefe9e67366151e2286a2ff6bee0d1009b2a12c Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 25 May 2009 20:24:22 +0200 Subject: Doc: Removed the incorrect figures for Thumb builds of libraries. We need to resolve the issues around the use of Thumb code in Qt and automate the building and comparison of libraries. Reviewed-by: Trust Me --- doc/src/installation.qdoc | 2 -- 1 file changed, 2 deletions(-) diff --git a/doc/src/installation.qdoc b/doc/src/installation.qdoc index 925a195..6a689f9 100644 --- a/doc/src/installation.qdoc +++ b/doc/src/installation.qdoc @@ -738,8 +738,6 @@ in the \l{Qt for Windows CE Requirements} document. \header \o Minimal \o Normal \o Minimal \o Normal \o Minimal \o Normal \o Minimal \o Normal \row \o linux-x86-g++ \o GCC 4.2.4 \o 1.7M \o 2.7M \o 3.3M \o 9.9M \o 653K \o 1.1M \o N/A \o 17M \row \o linux-arm-g++ \o GCC 4.1.1 \o 1.9M \o 3.2M \o 4.1M \o 11M \o 507K \o 1.0M \o N/A \o 17M - \row \o linux-arm-g++ (thumb) - \o GCC 4.1.1 \o 1.7M \o 2.8M \o 4.0M \o 9.8M \o 409K \o 796K \o N/A \o 17M \row \o linux-mips-g++ (MIPS32) \o GCC 4.2.4 \o 2.0M \o 3.2M \o 4.5M \o 12M \o 505K \o 1003K \o N/A \o 21M \endtable -- cgit v0.12 From a4ca38bab521e1f0095b9c90c4623ca9d41d219b Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 25 May 2009 20:27:19 +0200 Subject: Doc: Clarified what close(), abort() and disconnectFromHost() really do to the socket connection. (Reviewed - see below.) Also included corrections to the description of how to send SocketError and SocketState values via signals. (Trust me - as part of an earlier revision of the custom types documentation.) Task-number: 222907 Reviewed-by: Andy Shaw --- src/network/socket/qabstractsocket.cpp | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp index 336a7e7..4bb12e6 100644 --- a/src/network/socket/qabstractsocket.cpp +++ b/src/network/socket/qabstractsocket.cpp @@ -99,7 +99,7 @@ the client has read the data). Note that Qt does not limit the write buffer size. You can monitor its size by listening to this signal. - + The readyRead() signal is emitted every time a new chunk of data has arrived. bytesAvailable() then returns the number of bytes that are available for reading. Typically, you would connect the @@ -199,9 +199,10 @@ parameter describes the type of error that occurred. QAbstractSocket::SocketError is not a registered metatype, so for queued - connections, you will have to register it with Q_REGISTER_METATYPE. + connections, you will have to register it with Q_DECLARE_METATYPE() and + qRegisterMetaType(). - \sa error(), errorString() + \sa error(), errorString(), {Creating Custom Qt Types} */ /*! @@ -211,9 +212,10 @@ The \a socketState parameter is the new state. QAbstractSocket::SocketState is not a registered metatype, so for queued - connections, you will have to register it with Q_REGISTER_METATYPE. + connections, you will have to register it with Q_REGISTER_METATYPE() and + qRegisterMetaType(). - \sa state() + \sa state(), {Creating Custom Qt Types} */ /*! @@ -1864,9 +1866,9 @@ bool QAbstractSocket::waitForDisconnected(int msecs) } /*! - Aborts the current connection and resets the socket. Unlike - disconnectFromHost(), this function immediately closes the socket, discarding - any pending data in the write buffer. + Aborts the current connection and resets the socket. Unlike disconnectFromHost(), + this function immediately closes the socket, discarding any pending data in the + write buffer. \sa disconnectFromHost(), close() */ @@ -2163,7 +2165,12 @@ void QAbstractSocket::setPeerName(const QString &name) } /*! - Disconnects the socket's connection with the host. + Closes the I/O device for the socket, disconnects the socket's connection with the + host, closes the socket, and resets the name, address, port number and underlying + socket descriptor. + + See QIODevice::close() for a description of the actions that occur when an I/O + device is closed. \sa abort() */ @@ -2456,7 +2463,8 @@ QNetworkProxy QAbstractSocket::proxy() const #endif // QT_NO_NETWORKPROXY #ifdef QT3_SUPPORT -/*! \enum QAbstractSocket::Error +/*! + \enum QAbstractSocket::Error \compat Use QAbstractSocket::SocketError instead. -- cgit v0.12 From 2248d63c1a32ae84bb6d0bde9021a8074db1b4c9 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Tue, 26 May 2009 10:46:54 +1000 Subject: Fixed qmake writing targets into the root of the current drive when DESTDIR=./ and using Windows, nmake and shadow builds. qmake would canonicalize the DESTDIR of "./" to "". Then it would check if the original DESTDIR ended with "/", and if so, append it to the new DESTDIR, resulting in a DESTDIR of "/" - the root of the current drive. Don't do that. This bug doesn't occur with in-source builds because qmake detects that the source and build directories are the same directory and replaces the DESTDIR of "./" with "" before it reaches the buggy code. Autotest: included Reviewed-by: Lincoln Ramsay --- qmake/generators/win32/winmakefile.cpp | 2 +- tests/auto/qmake/tst_qmake.cpp | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 87f55cf..c7f00dd 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -626,7 +626,7 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t) // do this here so we can set DEST_TARGET to be the complete path to the final target if it is needed. QString orgDestDir = var("DESTDIR"); QString destDir = Option::fixPathToTargetOS(orgDestDir, false); - if (orgDestDir.endsWith('/') || orgDestDir.endsWith(Option::dir_sep)) + if (!destDir.isEmpty() && (orgDestDir.endsWith('/') || orgDestDir.endsWith(Option::dir_sep))) destDir += Option::dir_sep; QString target = QString(project->first("TARGET")+project->first("TARGET_EXT")); target.remove("\""); diff --git a/tests/auto/qmake/tst_qmake.cpp b/tests/auto/qmake/tst_qmake.cpp index 70f1f3c..1178c81 100644 --- a/tests/auto/qmake/tst_qmake.cpp +++ b/tests/auto/qmake/tst_qmake.cpp @@ -63,6 +63,7 @@ public slots: private slots: void simple_app(); + void simple_app_shadowbuild(); void simple_lib(); void simple_dll(); void subdirs(); @@ -143,6 +144,21 @@ void tst_qmake::simple_app() QVERIFY( test_compiler.removeMakefile( workDir ) ); } +void tst_qmake::simple_app_shadowbuild() +{ + QString workDir = base_path + "/testdata/simple_app"; + QString buildDir = base_path + "/testdata/simple_app_build"; + + QVERIFY( test_compiler.qmake( workDir, "simple_app", buildDir )); + QVERIFY( test_compiler.make( buildDir )); + QVERIFY( test_compiler.exists( buildDir, "simple_app", Exe, "1.0.0" )); + QVERIFY( test_compiler.makeClean( buildDir )); + QVERIFY( test_compiler.exists( buildDir, "simple_app", Exe, "1.0.0" )); // Should still exist after a make clean + QVERIFY( test_compiler.makeDistClean( buildDir )); + QVERIFY( !test_compiler.exists( buildDir, "simple_app", Exe, "1.0.0" )); // Should not exist after a make distclean + QVERIFY( test_compiler.removeMakefile( buildDir ) ); +} + void tst_qmake::simple_dll() { QString workDir = base_path + "/testdata/simple_dll"; -- cgit v0.12 From 682b854872c26d7408d79131217825fb8ddace6a Mon Sep 17 00:00:00 2001 From: Michael Goddard Date: Tue, 26 May 2009 10:39:36 +1000 Subject: BT:Fix access of deleted memory with a static QCursor. If a QCursor with a predefined shape is declared static, it could be destroyed after the application dtor has already cleaned up QCursor memory. Task-number: 254467 Reviewed-by: Rhys Weatherley --- src/gui/kernel/qcursor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qcursor.cpp b/src/gui/kernel/qcursor.cpp index ed7e020..598f4ba 100644 --- a/src/gui/kernel/qcursor.cpp +++ b/src/gui/kernel/qcursor.cpp @@ -375,7 +375,9 @@ void QCursorData::cleanup() return; for (int shape = 0; shape <= Qt::LastCursor; ++shape) { - delete qt_cursorTable[shape]; + // In case someone has a static QCursor defined with this shape + if (!qt_cursorTable[shape]->ref.deref()) + delete qt_cursorTable[shape]; qt_cursorTable[shape] = 0; } QCursorData::initialized = false; -- cgit v0.12 From 02b49e3bf1556c76cd59d205529f04a390cfa433 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Tue, 26 May 2009 09:48:09 +0200 Subject: Fix doc warnings for Phonon --- doc/src/phonon-api.qdoc | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/doc/src/phonon-api.qdoc b/doc/src/phonon-api.qdoc index dd37fe2..5deb64e 100644 --- a/doc/src/phonon-api.qdoc +++ b/doc/src/phonon-api.qdoc @@ -1032,6 +1032,7 @@ \value Stream The MediaSource object describes a data stream. This is the type used for \l{QIODevice}s. Note that a stream opened with a QUrl, will still be of the Url type. + \value Empty The media source doesn't have a source. \sa MediaSource::type() */ @@ -2026,6 +2027,15 @@ */ /*! + \fn void Phonon::MediaObject::clear() + + Stops and removes all playing and enqueued media sources. + + \sa setCurrentSource() +*/ + + +/*! \fn void Phonon::MediaObject::stateChanged(Phonon::State newstate, Phonon::State oldstate) This signal is emitted when the state of the MediaObject has changed. @@ -3027,6 +3037,12 @@ */ /*! + \typedef Phonon::AudioOutputInterface + \inmodule Phonon + \internal +*/ + +/*! \class Phonon::AudioOutputInterface40 \inmodule Phonon \since 4.4 @@ -3251,7 +3267,19 @@ /*! \fn bool Phonon::Path::operator!=(const Path &p) const; - Returns true if this Path is not equal to \a p; otherwise returns false; + Returns true if this Path is not equal to \a p; otherwise returns false. +*/ + +/*! + \fn MediaNode *Phonon::Path::source() const; + + Returns the source MediaNode used by the path. +*/ + +/*! + \fn MediaNode *Phonon::Path::sink() const; + + Returns the sink MediaNode used by the path. */ /*! @@ -4878,7 +4906,7 @@ */ /*! - \typedef typedef void (*CleanUpFunction)() + \typedef Phonon::CleanUpFunction \inmodule Phonon \internal */ -- cgit v0.12 From 5839b16a73c36ff7636c13f841d26e6a5e0c5435 Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Tue, 28 Apr 2009 17:37:52 +0200 Subject: fix double slash prepending causing troubles on WinCE Before adding a / to the path one should check if it doesn't end with one already. Otherwise one might get paths like //My Documents on WinCE causing the native call to crash the filesystem service on that system. Reviewed-by: alexis --- src/gui/dialogs/qfilesystemmodel_p.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/gui/dialogs/qfilesystemmodel_p.h b/src/gui/dialogs/qfilesystemmodel_p.h index 0a1265a..61e8b4c 100644 --- a/src/gui/dialogs/qfilesystemmodel_p.h +++ b/src/gui/dialogs/qfilesystemmodel_p.h @@ -164,9 +164,12 @@ public: QHash::const_iterator iterator; for(iterator = children.constBegin() ; iterator != children.constEnd() ; ++iterator) { //On windows the root (My computer) has no path so we don't want to add a / for nothing (e.g. /C:/) - if (!path.isEmpty()) - iterator.value()->updateIcon(iconProvider, path + QLatin1Char('/') + iterator.value()->fileName); - else + if (!path.isEmpty()) { + if (path.endsWith(QLatin1Char('/'))) + iterator.value()->updateIcon(iconProvider, path + iterator.value()->fileName); + else + iterator.value()->updateIcon(iconProvider, path + QLatin1Char('/') + iterator.value()->fileName); + } else iterator.value()->updateIcon(iconProvider, iterator.value()->fileName); } } @@ -177,9 +180,12 @@ public: QHash::const_iterator iterator; for(iterator = children.constBegin() ; iterator != children.constEnd() ; ++iterator) { //On windows the root (My computer) has no path so we don't want to add a / for nothing (e.g. /C:/) - if (!path.isEmpty()) - iterator.value()->retranslateStrings(iconProvider, path + QLatin1Char('/') + iterator.value()->fileName); - else + if (!path.isEmpty()) { + if (path.endsWith(QLatin1Char('/'))) + iterator.value()->retranslateStrings(iconProvider, path + iterator.value()->fileName); + else + iterator.value()->retranslateStrings(iconProvider, path + QLatin1Char('/') + iterator.value()->fileName); + } else iterator.value()->retranslateStrings(iconProvider, iterator.value()->fileName); } } -- cgit v0.12 From e7a607f0f1f7837a26bf95248504497b0534e357 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 26 May 2009 10:19:02 +0200 Subject: qdoc: Indicate that qAbs(T& v) compares v to a 0 of type T. Task-number: 246789 --- doc/src/index.qdoc | 1 + src/corelib/global/qglobal.cpp | 49 +++++++++++++++++++++++++++++++----------- 2 files changed, 38 insertions(+), 12 deletions(-) diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc index 4ead9e4..9846ac4 100644 --- a/doc/src/index.qdoc +++ b/doc/src/index.qdoc @@ -153,6 +153,7 @@
  • All Overviews and HOWTOs
  • Qt Widget Gallery
  • Class Chart
  • +
  • Qt Global Declarations
  • diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 8324d05..f767bb9 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -125,7 +125,8 @@ QT_BEGIN_NAMESPACE If you want to use QFlags for your own enum types, use the Q_DECLARE_FLAGS() and Q_DECLARE_OPERATORS_FOR_FLAGS(). - For example: + + Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 1 @@ -442,14 +443,18 @@ QT_BEGIN_NAMESPACE function. You can retrieve the minimum and maximum of two given objects using qMin() and qMax() respectively. All these functions return a corresponding template type; the template types can be - replaced by any other type. For example: + replaced by any other type. + + Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 3 also contains functions that generate messages from the given string argument: qCritical(), qDebug(), qFatal() and qWarning(). These functions call the message handler with the - given message. For example: + given message. + + Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 4 @@ -694,7 +699,9 @@ QT_BEGIN_NAMESPACE \relates Wraps the signed 64-bit integer \a literal in a - platform-independent way. For example: + platform-independent way. + + Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 8 @@ -705,7 +712,9 @@ QT_BEGIN_NAMESPACE \relates Wraps the unsigned 64-bit integer \a literal in a - platform-independent way. For example: + platform-independent way. + + Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 9 @@ -734,7 +743,11 @@ QT_BEGIN_NAMESPACE /*! \fn const T &qAbs(const T &value) \relates - Returns the absolute value of \a value. For example: + Compares \a value to the 0 of type T and returns the absolute + value. Thus if T is \e {double}, then \a value is compared to + \e{(double) 0}. + + Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 10 */ @@ -742,7 +755,9 @@ QT_BEGIN_NAMESPACE /*! \fn int qRound(qreal value) \relates - Rounds \a value to the nearest integer. For example: + Rounds \a value to the nearest integer. + + Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 11 */ @@ -750,7 +765,9 @@ QT_BEGIN_NAMESPACE /*! \fn qint64 qRound64(qreal value) \relates - Rounds \a value to the nearest 64-bit integer. For example: + Rounds \a value to the nearest 64-bit integer. + + Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 12 */ @@ -758,7 +775,9 @@ QT_BEGIN_NAMESPACE /*! \fn const T &qMin(const T &value1, const T &value2) \relates - Returns the minimum of \a value1 and \a value2. For example: + Returns the minimum of \a value1 and \a value2. + + Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 13 @@ -768,7 +787,9 @@ QT_BEGIN_NAMESPACE /*! \fn const T &qMax(const T &value1, const T &value2) \relates - Returns the maximum of \a value1 and \a value2. For example: + Returns the maximum of \a value1 and \a value2. + + Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 14 @@ -779,7 +800,9 @@ QT_BEGIN_NAMESPACE \relates Returns \a value bounded by \a min and \a max. This is equivalent - to qMax(\a min, qMin(\a value, \a max)). For example: + to qMax(\a min, qMin(\a value, \a max)). + + Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 15 @@ -925,7 +948,9 @@ QT_BEGIN_NAMESPACE 4.1.2, the QT_VERSION macro will expand to 0x040102. You can use QT_VERSION to use the latest Qt features where - available. For example: + available. + + Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 16 -- cgit v0.12 From 2a390bb481a2433a239a9198e463c9337a26db59 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 25 May 2009 18:32:46 +0200 Subject: Fixed: QSortFilterProxyModel setDynamicSortFilter doesn't works when setting the model initially This was caused by two different bug: - In the QSortFilterProxyModel, we need to re-sort when setting the source model change the sorting column (happen when setting a model initially) - In the treeview, we need to activate the sorting even if there is no column yet (because the initial model is empty Task-number: 254234 Reviewed-by: Thierry BT: --- src/gui/itemviews/qheaderview.cpp | 4 ++- src/gui/itemviews/qsortfilterproxymodel.cpp | 3 ++- src/gui/itemviews/qtreeview.cpp | 8 +++--- .../tst_qsortfilterproxymodel.cpp | 10 ++++++++ tests/auto/qtreeview/tst_qtreeview.cpp | 29 +++++++++++++++++++++- 5 files changed, 48 insertions(+), 6 deletions(-) diff --git a/src/gui/itemviews/qheaderview.cpp b/src/gui/itemviews/qheaderview.cpp index dc63b25..86ece40 100644 --- a/src/gui/itemviews/qheaderview.cpp +++ b/src/gui/itemviews/qheaderview.cpp @@ -1267,8 +1267,10 @@ void QHeaderView::setSortIndicator(int logicalIndex, Qt::SortOrder order) d->sortIndicatorSection = logicalIndex; d->sortIndicatorOrder = order; - if (logicalIndex >= d->sectionCount) + if (logicalIndex >= d->sectionCount) { + emit sortIndicatorChanged(logicalIndex, order); return; // nothing to do + } if (old != logicalIndex && ((logicalIndex >= 0 && resizeMode(logicalIndex) == ResizeToContents) diff --git a/src/gui/itemviews/qsortfilterproxymodel.cpp b/src/gui/itemviews/qsortfilterproxymodel.cpp index 43feda8..92dfd19 100644 --- a/src/gui/itemviews/qsortfilterproxymodel.cpp +++ b/src/gui/itemviews/qsortfilterproxymodel.cpp @@ -1518,7 +1518,8 @@ void QSortFilterProxyModel::setSourceModel(QAbstractItemModel *sourceModel) d->clear_mapping(); reset(); - d->update_source_sort_column(); + if (d->update_source_sort_column() && d->dynamic_sortfilter) + d->sort(); } /*! diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp index 62c1277..1070648 100644 --- a/src/gui/itemviews/qtreeview.cpp +++ b/src/gui/itemviews/qtreeview.cpp @@ -246,7 +246,7 @@ void QTreeView::setModel(QAbstractItemModel *model) connect(d->model, SIGNAL(modelAboutToBeReset()), SLOT(_q_modelAboutToBeReset())); if (d->sortingEnabled) - sortByColumn(header()->sortIndicatorSection(), header()->sortIndicatorOrder()); + d->_q_sortIndicatorChanged(header()->sortIndicatorSection(), header()->sortIndicatorOrder()); } /*! @@ -846,17 +846,19 @@ void QTreeView::setExpanded(const QModelIndex &index, bool expanded) void QTreeView::setSortingEnabled(bool enable) { Q_D(QTreeView); - d->sortingEnabled = enable; header()->setSortIndicatorShown(enable); header()->setClickable(enable); if (enable) { + //sortByColumn has to be called before we connect or set the sortingEnabled flag + // because otherwise it will not call sort on the model. + sortByColumn(header()->sortIndicatorSection(), header()->sortIndicatorOrder()); connect(header(), SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)), this, SLOT(_q_sortIndicatorChanged(int, Qt::SortOrder))); - sortByColumn(header()->sortIndicatorSection(), header()->sortIndicatorOrder()); } else { disconnect(header(), SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)), this, SLOT(_q_sortIndicatorChanged(int, Qt::SortOrder))); } + d->sortingEnabled = enable; } bool QTreeView::isSortingEnabled() const diff --git a/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp index bd66fdf..80d90a6 100644 --- a/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp +++ b/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp @@ -2585,6 +2585,16 @@ void tst_QSortFilterProxyModel::task248868_dynamicSorting() QModelIndex index = proxy1.index(row, 0, QModelIndex()); QCOMPARE(proxy1.data(index, Qt::DisplayRole).toString(), expected.at(row)); } + + //set up the sorting before seting the model up + QSortFilterProxyModel proxy2; + proxy2.setDynamicSortFilter(true); + proxy2.sort(0); + proxy2.setSourceModel(&model2); + for (int row = 0; row < proxy2.rowCount(QModelIndex()); ++row) { + QModelIndex index = proxy2.index(row, 0, QModelIndex()); + QCOMPARE(proxy2.data(index, Qt::DisplayRole).toString(), expected.at(row)); + } } class QtTestModel: public QAbstractItemModel diff --git a/tests/auto/qtreeview/tst_qtreeview.cpp b/tests/auto/qtreeview/tst_qtreeview.cpp index 655ea4e..54d6619 100644 --- a/tests/auto/qtreeview/tst_qtreeview.cpp +++ b/tests/auto/qtreeview/tst_qtreeview.cpp @@ -225,6 +225,7 @@ private slots: void task238873_avoidAutoReopening(); void task244304_clickOnDecoration(); void task246536_scrollbarsNotWorking(); + void task254234_proxySort(); }; class QtTestModel: public QAbstractItemModel @@ -2493,7 +2494,6 @@ void tst_QTreeView::sortByColumn() QCOMPARE(view.header()->sortIndicatorSection(), 0); QCOMPARE(view.model()->data(view.model()->index(0,0)).toString(), QString::fromLatin1("a")); QCOMPARE(view.model()->data(view.model()->index(1,0)).toString(), QString::fromLatin1("b")); - } /* @@ -3272,5 +3272,32 @@ void tst_QTreeView::task246536_scrollbarsNotWorking() QVERIFY(o.count > 0); } +void tst_QTreeView::task254234_proxySort() +{ + //based on tst_QTreeView::sortByColumn + // it used not to work when setting the source of a proxy after enabling sorting + QTreeView view; + QStandardItemModel model(4,2); + model.setItem(0,0,new QStandardItem("b")); + model.setItem(1,0,new QStandardItem("d")); + model.setItem(2,0,new QStandardItem("c")); + model.setItem(3,0,new QStandardItem("a")); + model.setItem(0,1,new QStandardItem("e")); + model.setItem(1,1,new QStandardItem("g")); + model.setItem(2,1,new QStandardItem("h")); + model.setItem(3,1,new QStandardItem("f")); + + view.sortByColumn(1); + view.setSortingEnabled(true); + + QSortFilterProxyModel proxy; + proxy.setDynamicSortFilter(true); + view.setModel(&proxy); + proxy.setSourceModel(&model); + QCOMPARE(view.header()->sortIndicatorSection(), 1); + QCOMPARE(view.model()->data(view.model()->index(0,1)).toString(), QString::fromLatin1("h")); + QCOMPARE(view.model()->data(view.model()->index(1,1)).toString(), QString::fromLatin1("g")); +} + QTEST_MAIN(tst_QTreeView) #include "tst_qtreeview.moc" -- cgit v0.12 From e33415a700a7d1de706633970ed69936e3b2145e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Tue, 26 May 2009 10:18:46 +0200 Subject: Fix the previous fix. The previous fix fails on msvc-2005, since QString::setNum() does not handle rounding of numbers such as 0.015625 consistently. --- tests/auto/qeasingcurve/tst_qeasingcurve.cpp | 182 +-------------------------- 1 file changed, 5 insertions(+), 177 deletions(-) diff --git a/tests/auto/qeasingcurve/tst_qeasingcurve.cpp b/tests/auto/qeasingcurve/tst_qeasingcurve.cpp index 8fe15b1..b25cdc7 100644 --- a/tests/auto/qeasingcurve/tst_qeasingcurve.cpp +++ b/tests/auto/qeasingcurve/tst_qeasingcurve.cpp @@ -371,182 +371,6 @@ void tst_QEasingCurve::valueForProgress_data() << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) << (RealList() << 0.5 << 0.7939 << 0.9755 << 0.9755 << 0.7939 << 0.5 << 0.2061 << 0.02447 << 0.02447 << 0.2061 << 0.5); - /* - QTest::newRow("InQuad") << int(QEasingCurve::InQuad) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (RealList() << 0 << 0.01 << 0.04 << 0.09 << 0.16 << 0.25 << 0.36 << 0.49 << 0.64 << 0.81 << 1); - QTest::newRow("OutQuad") << int(QEasingCurve::OutQuad) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 0.19 << 0.36 << 0.51 << 0.64 << 0.75 << 0.84 << 0.91 << 0.96 << 0.99 << 1); - - QTest::newRow("InOutQuad") << int(QEasingCurve::InOutQuad) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 2 << 8 << 18 << 32 << 50 << 68 << 82 << 92 << 98 << 100); - - QTest::newRow("OutInQuad") << int(QEasingCurve::OutInQuad) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 18 << 32 << 42 << 48 << 50 << 52 << 57 << 68 << 82 << 100); - - QTest::newRow("InCubic") << int(QEasingCurve::InCubic) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 0 << 0 << 2 << 6 << 12 << 21 << 34 << 51 << 72 << 100); - - QTest::newRow("OutCubic") << int(QEasingCurve::OutCubic) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 27 << 48 << 65 << 78 << 87 << 93 << 97 << 99 << 99 << 100); - - QTest::newRow("InOutCubic") << int(QEasingCurve::InOutCubic) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 0 << 3 << 10 << 25 << 50 << 74 << 89 << 96 << 99 << 100); - - QTest::newRow("OutInCubic") << int(QEasingCurve::OutInCubic) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 24 << 39 << 46 << 49 << 50 << 50 << 53 << 60 << 75 << 100); - - QTest::newRow("InQuart") << int(QEasingCurve::InQuart) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 0 << 0 << 0 << 2 << 6 << 12 << 24 << 40 << 65 << 100); - - QTest::newRow("OutQuart") << int(QEasingCurve::OutQuart) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 34 << 59 << 75 << 87 << 93 << 97 << 99 << 99 << 99 << 100); - - QTest::newRow("InOutQuart") << int(QEasingCurve::InOutQuart) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 0 << 1 << 6 << 20 << 50 << 79 << 93 << 98 << 99 << 100); - - QTest::newRow("OutInQuart") << int(QEasingCurve::OutInQuart) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 29 << 43 << 48 << 49 << 50 << 50 << 51 << 56 << 70 << 100); - - QTest::newRow("InQuint") << int(QEasingCurve::InQuint) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 0 << 0 << 0 << 1 << 3 << 7 << 16 << 32 << 59 << 100); - - QTest::newRow("OutQuint") << int(QEasingCurve::OutQuint) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 40 << 67 << 83 << 92 << 96 << 98 << 99 << 99 << 99 << 100); - - QTest::newRow("InOutQuint") << int(QEasingCurve::InOutQuint) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 0 << 0 << 3 << 16 << 50 << 83 << 96 << 99 << 99 << 100); - - QTest::newRow("OutInQuint") << int(QEasingCurve::OutInQuint) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 33 << 46 << 49 << 49 << 50 << 50 << 50 << 53 << 66 << 100); - - QTest::newRow("InSine") << int(QEasingCurve::InSine) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 1 << 4 << 10 << 19 << 29 << 41 << 54 << 69 << 84 << 100); - - QTest::newRow("OutSine") << int(QEasingCurve::OutSine) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 15 << 30 << 45 << 58 << 70 << 80 << 89 << 95 << 98 << 100); - - QTest::newRow("InOutSine") << int(QEasingCurve::InOutSine) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 2 << 9 << 20 << 34 << 49 << 65 << 79 << 90 << 97 << 100); - - QTest::newRow("OutInSine") << int(QEasingCurve::OutInSine) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 15 << 29 << 40 << 47 << 50 << 52 << 59 << 70 << 84 << 100); - - QTest::newRow("InExpo") << int(QEasingCurve::InExpo) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 0 << 0 << 0 << 1 << 3 << 6 << 12 << 24 << 49 << 100); - - QTest::newRow("OutExpo") << int(QEasingCurve::OutExpo) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 50 << 75 << 87 << 93 << 96 << 98 << 99 << 99 << 99 << 100); - - QTest::newRow("InOutExpo") << int(QEasingCurve::InOutExpo) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 0 << 0 << 3 << 12 << 50 << 87 << 96 << 99 << 99 << 100); - - QTest::newRow("OutInExpo") << int(QEasingCurve::OutInExpo) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 37 << 46 << 49 << 49 << 50 << 50 << 50 << 53 << 62 << 100); - - QTest::newRow("InCirc") << int(QEasingCurve::InCirc) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 0 << 2 << 4 << 8 << 13 << 19 << 28 << 40 << 56 << 100); - - QTest::newRow("OutCirc") << int(QEasingCurve::OutCirc) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 43 << 59 << 71 << 80 << 86 << 91 << 95 << 97 << 99 << 100); - - QTest::newRow("InOutCirc") << int(QEasingCurve::InOutCirc) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 1 << 4 << 9 << 20 << 50 << 80 << 89 << 95 << 98 << 100); - - QTest::newRow("OutInCirc") << int(QEasingCurve::OutInCirc) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 29 << 40 << 45 << 48 << 50 << 51 << 54 << 60 << 70 << 100); - - QTest::newRow("InElastic") << int(QEasingCurve::InElastic) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 0 << 0 << 0 << 1 << -1 << -3 << 12 << -12 << -25 << 100); - - QTest::newRow("OutElastic") << int(QEasingCurve::OutElastic) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 125 << 112 << 87 << 103 << 101 << 98 << 100 << 100 << 99 << 100); - - QTest::newRow("InOutElastic") << int(QEasingCurve::InOutElastic) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 0 << 0 << -1 << -6 << 50 << 106 << 101 << 99 << 100 << 100); - - QTest::newRow("OutInElastic") << int(QEasingCurve::OutInElastic) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 37 << 56 << 49 << 49 << 50 << 49 << 50 << 53 << 24 << 100); - - QTest::newRow("InBack") << int(QEasingCurve::InBack) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << -1 << -4 << -8 << -9 << -8 << -2 << 9 << 29 << 59 << 100); - - QTest::newRow("OutBack") << int(QEasingCurve::OutBack) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 40 << 70 << 90 << 102 << 108 << 109 << 108 << 104 << 101 << 100); - - QTest::newRow("InOutBack") << int(QEasingCurve::InOutBack) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << -3 << -9 << -7 << 8 << 50 << 91 << 107 << 109 << 103 << 100); - - QTest::newRow("OutInBack") << int(QEasingCurve::OutInBack) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 35 << 51 << 54 << 52 << 50 << 47 << 45 << 48 << 64 << 100); - - QTest::newRow("InBounce") << int(QEasingCurve::InBounce) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 1 << 6 << 6 << 22 << 23 << 9 << 31 << 69 << 92 << 100); - - QTest::newRow("OutBounce") << int(QEasingCurve::OutBounce) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 7 << 30 << 68 << 90 << 76 << 77 << 93 << 94 << 98 << 100); - - QTest::newRow("InOutBounce") << int(QEasingCurve::InOutBounce) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 3 << 11 << 4 << 34 << 50 << 65 << 95 << 88 << 97 << 100); - - QTest::newRow("OutInBounce") << int(QEasingCurve::OutInBounce) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 15 << 40 << 27 << 43 << 50 << 56 << 72 << 58 << 84 << 100); - - QTest::newRow("InCurve") << int(QEasingCurve::InCurve) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 2 << 10 << 23 << 37 << 50 << 60 << 70 << 80 << 90 << 100); - - QTest::newRow("OutCurve") << int(QEasingCurve::OutCurve) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 10 << 20 << 30 << 39 << 50 << 62 << 76 << 89 << 97 << 100); - - QTest::newRow("SineCurve") << int(QEasingCurve::SineCurve) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 9 << 34 << 65 << 90 << 100 << 90 << 65 << 34 << 9 << 0); - - QTest::newRow("CosineCurve") << int(QEasingCurve::CosineCurve) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 50 << 79 << 97 << 97 << 79 << 50 << 20 << 2 << 2 << 20 << 49); -*/ } @@ -590,7 +414,11 @@ void tst_QEasingCurve::valueForProgress() // converting ease to 4 precision qreal to match the generated samples qreal easeConv = qreal(QString().setNum(ease, 'g', 4).toDouble()); qreal ex = expected.at(i); - QVERIFY(qFuzzyCompare(easeConv, ex)); + + // the least significant digit it is still subject to rounding errors + qreal error = easeConv - ex; + // accept the potential rounding error in the least significant digit + QVERIFY(error <= 0.00001 ); } #endif } -- cgit v0.12 From 86598234d8c055fe8dbc474d292619d453cc9f56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Tue, 26 May 2009 11:03:24 +0200 Subject: BT: Google suggest example not launching from the Qt Demo app. The example was installed in the wrong directory. Task-number: 254452 Reviewed-by: Kim --- examples/network/googlesuggest/googlesuggest.pro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/network/googlesuggest/googlesuggest.pro b/examples/network/googlesuggest/googlesuggest.pro index afd600f..33b79de 100644 --- a/examples/network/googlesuggest/googlesuggest.pro +++ b/examples/network/googlesuggest/googlesuggest.pro @@ -3,7 +3,7 @@ SOURCES = main.cpp searchbox.cpp googlesuggest.cpp HEADERS = searchbox.h googlesuggest.h # install -target.path = $$[QT_INSTALL_EXAMPLES]/webkit/googlesuggest +target.path = $$[QT_INSTALL_EXAMPLES]/network/googlesuggest sources.files = $$SOURCES $$HEADERS *.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/webkit/googlesuggest +sources.path = $$[QT_INSTALL_EXAMPLES]/network/googlesuggest INSTALLS += target sources -- cgit v0.12 From 7733f81af953a1ddaa7debc12bb29b101c5bc101 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Tue, 26 May 2009 10:40:26 +0200 Subject: Fixed keywords signals and slots to Q_SIGNALS and Q_SLOTS --- src/corelib/io/qfilesystemwatcher.cpp | 2 +- src/corelib/io/qnoncontiguousbytedevice_p.h | 2 +- src/corelib/io/qtextstream.cpp | 2 +- src/corelib/kernel/qtimer.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/corelib/io/qfilesystemwatcher.cpp b/src/corelib/io/qfilesystemwatcher.cpp index e073a08..65cfb71 100644 --- a/src/corelib/io/qfilesystemwatcher.cpp +++ b/src/corelib/io/qfilesystemwatcher.cpp @@ -118,7 +118,7 @@ public: void stop(); -private slots: +private Q_SLOTS: void timeout(); }; diff --git a/src/corelib/io/qnoncontiguousbytedevice_p.h b/src/corelib/io/qnoncontiguousbytedevice_p.h index 2a7e40b..acfc6eb 100644 --- a/src/corelib/io/qnoncontiguousbytedevice_p.h +++ b/src/corelib/io/qnoncontiguousbytedevice_p.h @@ -77,7 +77,7 @@ protected: virtual ~QNonContiguousByteDevice(); bool resetDisabled; -signals: +Q_SIGNALS: void readyRead(); void readProgress(qint64 current, qint64 total); }; diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp index 4563e84..7c925f1 100644 --- a/src/corelib/io/qtextstream.cpp +++ b/src/corelib/io/qtextstream.cpp @@ -333,7 +333,7 @@ public: this->stream = stream; } -public slots: +public Q_SLOTS: inline void flushStream() { stream->flush(); } private: diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp index 4b3feb0..08821d4 100644 --- a/src/corelib/kernel/qtimer.cpp +++ b/src/corelib/kernel/qtimer.cpp @@ -269,7 +269,7 @@ class QSingleShotTimer : public QObject public: ~QSingleShotTimer(); QSingleShotTimer(int msec, QObject *r, const char * m); -signals: +Q_SIGNALS: void timeout(); protected: void timerEvent(QTimerEvent *); -- cgit v0.12 From 5345306c9a0a3b10dbf640253b8b2287c762b081 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Tue, 26 May 2009 11:36:16 +0200 Subject: Fixed a bug in animation when you set a start value that doesn't have the same type as the property For example, if you set a start value of 0 (integer) for a qreal animation, it would not work. Reviewed-by: janarve --- src/corelib/animation/qvariantanimation.cpp | 10 ++- .../qpropertyanimation/tst_qpropertyanimation.cpp | 77 ++++++++++++++++------ 2 files changed, 65 insertions(+), 22 deletions(-) diff --git a/src/corelib/animation/qvariantanimation.cpp b/src/corelib/animation/qvariantanimation.cpp index 4542a86..239add9 100644 --- a/src/corelib/animation/qvariantanimation.cpp +++ b/src/corelib/animation/qvariantanimation.cpp @@ -179,10 +179,14 @@ void QVariantAnimationPrivate::convertValues(int t) //this ensures that all the keyValues are of type t for (int i = 0; i < keyValues.count(); ++i) { QVariantAnimation::KeyValue &pair = keyValues[i]; - if (pair.second.userType() != t) - pair.second.convert(static_cast(t)); + pair.second.convert(static_cast(t)); } - interpolator = 0; // if the type changed we need to update the interpolator + //we also need update to the current interval if needed + currentInterval.start.second.convert(static_cast(t)); + currentInterval.end.second.convert(static_cast(t)); + + //... and the interpolator + interpolator = 0; } /*! diff --git a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp index 7e910d4..0aeac91 100644 --- a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp +++ b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp @@ -63,6 +63,18 @@ protected: } }; +class MyObject : public QObject +{ + Q_OBJECT + Q_PROPERTY(qreal x READ x WRITE setX) +public: + MyObject() : m_x(0) { } + qreal x() const { return m_x; } + void setX(qreal x) { m_x = x; } +private: + qreal m_x; +}; + class tst_QPropertyAnimation : public QObject { Q_OBJECT @@ -92,6 +104,7 @@ private slots: void startWithoutStartValue(); void playForwardBackward(); void interpolated(); + void setStartEndValues_data(); void setStartEndValues(); void zeroDurationStart(); void operationsInStates_data(); @@ -283,7 +296,7 @@ void tst_QPropertyAnimation::statesAndSignals() void tst_QPropertyAnimation::deletion1() { QObject *object = new QWidget; - QPointer anim = new QPropertyAnimation(object,"minimumWidth"); + QPointer anim = new QPropertyAnimation(object, "minimumWidth"); //test that the animation is deleted correctly depending of the deletion flag passed in start() QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); @@ -686,52 +699,78 @@ void tst_QPropertyAnimation::interpolated() } } +Q_DECLARE_METATYPE(QVariant) + +void tst_QPropertyAnimation::setStartEndValues_data() +{ + QTest::addColumn("propertyName"); + QTest::addColumn("initialValue"); + QTest::addColumn("startValue"); + QTest::addColumn("endValue"); + + QTest::newRow("dynamic property") << QByteArray("ole") << QVariant(42) << QVariant(0) << QVariant(10); + QTest::newRow("real property, with unmatching types") << QByteArray("x") << QVariant(42.) << QVariant(0) << QVariant(10.); +} + void tst_QPropertyAnimation::setStartEndValues() { + MyObject object; + QFETCH(QByteArray, propertyName); + QFETCH(QVariant, initialValue); + QFETCH(QVariant, startValue); + QFETCH(QVariant, endValue); + //this tests the start value, end value and default start value - QObject o; - o.setProperty("ole", 42); - QPropertyAnimation anim(&o, "ole"); + object.setProperty(propertyName, initialValue); + QPropertyAnimation anim(&object, propertyName); QVariantAnimation::KeyValues values; QCOMPARE(anim.keyValues(), values); //let's add a start value - anim.setStartValue(0); - values << QVariantAnimation::KeyValue(0, 0); + anim.setStartValue(startValue); + values << QVariantAnimation::KeyValue(0, startValue); QCOMPARE(anim.keyValues(), values); - anim.setEndValue(10); - values << QVariantAnimation::KeyValue(1, 10); + anim.setEndValue(endValue); + values << QVariantAnimation::KeyValue(1, endValue); QCOMPARE(anim.keyValues(), values); //now we can play with objects - QCOMPARE(o.property("ole").toInt(), 42); - QCOMPARE(o.property("ole").toInt(), 42); + QCOMPARE(object.property(propertyName).toDouble(), initialValue.toDouble()); anim.start(); QVERIFY(anim.startValue().isValid()); - QCOMPARE(o.property("ole"), anim.startValue()); + QCOMPARE(object.property(propertyName), anim.startValue()); + anim.setCurrentTime(anim.duration()/2); + QCOMPARE(object.property(propertyName).toDouble(), (startValue.toDouble() + endValue.toDouble())/2 ); //just in the middle of the animation + anim.setCurrentTime(anim.duration()); //we go to the end of the animation + QCOMPARE(anim.state(), QAnimationGroup::Stopped); //it should have stopped + QVERIFY(anim.endValue().isValid()); + QCOMPARE(object.property(propertyName), anim.endValue()); //end of the animations //now we remove the explicit start value and test the implicit one anim.stop(); - o.setProperty("ole", 42); + object.setProperty(propertyName, initialValue); + + //let's reset the start value values.remove(0); - anim.setStartValue(QVariant()); //reset the start value + anim.setStartValue(QVariant()); QCOMPARE(anim.keyValues(), values); QVERIFY(!anim.startValue().isValid()); + anim.start(); - QCOMPARE(o.property("ole").toInt(), 42); + QCOMPARE(object.property(propertyName), initialValue); anim.setCurrentTime(anim.duration()/2); - QCOMPARE(o.property("ole").toInt(), 26); //just in the middle of the animation - anim.setCurrentTime(anim.duration()); + QCOMPARE(object.property(propertyName).toDouble(), (initialValue.toDouble() + endValue.toDouble())/2 ); //just in the middle of the animation + anim.setCurrentTime(anim.duration()); //we go to the end of the animation QCOMPARE(anim.state(), QAnimationGroup::Stopped); //it should have stopped QVERIFY(anim.endValue().isValid()); - QCOMPARE(o.property("ole"), anim.endValue()); //end of the animations + QCOMPARE(object.property(propertyName), anim.endValue()); //end of the animations //now we set back the startValue - anim.setStartValue(5); + anim.setStartValue(startValue); QVERIFY(anim.startValue().isValid()); anim.start(); - QCOMPARE(o.property("ole").toInt(), 5); + QCOMPARE(object.property(propertyName), startValue); } void tst_QPropertyAnimation::zeroDurationStart() -- cgit v0.12 From 72ecfb3eb9b65ed2617942510fa0c9af5075f209 Mon Sep 17 00:00:00 2001 From: Kavindra Devi Palaraja Date: Tue, 26 May 2009 12:03:13 +0200 Subject: Doc - more screenshots and adding better description Details: Work in progress --- doc/src/designer-manual.qdoc | 28 ++++++++++++++------------- doc/src/images/designer-choosing-form.png | Bin 38078 -> 39080 bytes doc/src/images/rgbController-arrangement.png | Bin 0 -> 10813 bytes 3 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 doc/src/images/rgbController-arrangement.png diff --git a/doc/src/designer-manual.qdoc b/doc/src/designer-manual.qdoc index 03b74e6..77b208b 100644 --- a/doc/src/designer-manual.qdoc +++ b/doc/src/designer-manual.qdoc @@ -235,6 +235,7 @@ \page designer-to-know.html \contentspage {Qt Designer Manual}{Contents} + \title Getting to Know Qt Designer \tableofcontents @@ -408,6 +409,7 @@ \page designer-quick-start.html \contentspage {Qt Designer Manual}{Contents} + \title A Quick Start to Qt Designer Using \QD involves \bold four basic steps: @@ -419,16 +421,14 @@ \o Preview the form \endlist - \omit \image rgbController-screenshot.png - \endomit - Suppose you would like to design a small widget (see screenshot above) - that contains the controls needed to manipulate Red, Green and Blue (RGB) - values -- a type of widget that can be seen everywhere in image - manipulation programs. + Suppose you would like to design a small widget (see screenshot above) that + contains the controls needed to manipulate Red, Green and Blue (RGB) values + -- a type of widget that can be seen everywhere in image manipulation + programs. - \table + \table \row \i \inlineimage designer-choosing-form.png \i \bold{Choosing a Form} @@ -436,20 +436,22 @@ You start by choosing \gui Widget from the \gui{New Form} dialog. \endtable - Then you drag three labels, three spin boxes and three vertical sliders - on to your form. You can roughly arrange them according to how you would - like them to be laid out. + Then you drag three labels, three spin boxes and three vertical sliders on + to your form. To change the label's default text, simply double-click on + it. The screenshot below shows the form after all three labels have been + renamed. + + You can roughly arrange them according to how you would like them to be + laid out. - \omit \table \row \o \inlineimage rgbController-widgetBox.png \o \inlineimage rgbController-arrangement.png \endtable - \endomit To ensure that they are laid out exactly like this in your program, you need to place these widgets into a layout. We will do this in groups of - three. Select the "RED" label. Then, hold down \key Shift while you select + three. Select the "RED" label. Then, hold down \key Ctrl while you select its corresponding spin box and slider. In the \gui{Form} menu, select \gui{Lay Out in a Grid}. diff --git a/doc/src/images/designer-choosing-form.png b/doc/src/images/designer-choosing-form.png index fa6e470..bee4b29 100644 Binary files a/doc/src/images/designer-choosing-form.png and b/doc/src/images/designer-choosing-form.png differ diff --git a/doc/src/images/rgbController-arrangement.png b/doc/src/images/rgbController-arrangement.png new file mode 100644 index 0000000..d9e8bab Binary files /dev/null and b/doc/src/images/rgbController-arrangement.png differ -- cgit v0.12 From 57df8bc3ddd2bc5aaf5c25cf3e311fe56ad50ffb Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 26 May 2009 12:07:01 +0200 Subject: qdoc: Indicate what iterator_categor means for container classes. Task-number: 245501 --- doc/src/qset.qdoc | 9 +++++---- src/corelib/tools/qlistdata.cpp | 6 ++++-- src/corelib/tools/qmap.cpp | 6 ++++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/doc/src/qset.qdoc b/doc/src/qset.qdoc index afbedc3..6326219 100644 --- a/doc/src/qset.qdoc +++ b/doc/src/qset.qdoc @@ -685,11 +685,12 @@ */ /*! - \typedef QSet::iterator::iterator_category - \typedef QSet::const_iterator::iterator_category + \typedef QSet::iterator::iterator_category + \typedef QSet::const_iterator::iterator_category - \internal -*/ + Synonyms for \e {std::bidirectional_iterator_tag} indicating + these iterators are bidirectional iterators. + */ /*! \typedef QSet::iterator::difference_type diff --git a/src/corelib/tools/qlistdata.cpp b/src/corelib/tools/qlistdata.cpp index d40b6b6..34a5d80 100644 --- a/src/corelib/tools/qlistdata.cpp +++ b/src/corelib/tools/qlistdata.cpp @@ -1173,7 +1173,8 @@ void **QListData::erase(void **xi) /*! \typedef QList::iterator::iterator_category - \internal + A synonym for \e {std::random_access_iterator_tag} indicating + this iterator is a random access iterator. */ /*! \typedef QList::iterator::difference_type @@ -1432,7 +1433,8 @@ void **QListData::erase(void **xi) /*! \typedef QList::const_iterator::iterator_category - \internal + A synonym for \e {std::random_access_iterator_tag} indicating + this iterator is a random access iterator. */ /*! \typedef QList::const_iterator::difference_type diff --git a/src/corelib/tools/qmap.cpp b/src/corelib/tools/qmap.cpp index 0699400..07df28d 100644 --- a/src/corelib/tools/qmap.cpp +++ b/src/corelib/tools/qmap.cpp @@ -902,7 +902,8 @@ void QMapData::dump() /*! \typedef QMap::iterator::iterator_category - \internal + A synonym for \e {std::bidirectional_iterator_tag} indicating + this iterator is a bidirectional iterator. */ /*! \typedef QMap::iterator::pointer @@ -1123,7 +1124,8 @@ void QMapData::dump() /*! \typedef QMap::const_iterator::iterator_category - \internal + A synonym for \e {std::bidirectional_iterator_tag} indicating + this iterator is a bidirectional iterator. */ /*! \typedef QMap::const_iterator::pointer -- cgit v0.12 From 337ffb38e35ca43e4119ac0634499b226137692e Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 26 May 2009 12:08:45 +0200 Subject: Doc: Removed irrelevant links from the Qt for Windows CE documentation. Reviewed-by: Maurice Kalinowski --- doc/src/topics.qdoc | 2 -- 1 file changed, 2 deletions(-) diff --git a/doc/src/topics.qdoc b/doc/src/topics.qdoc index 301f0d4..6ef3a89 100644 --- a/doc/src/topics.qdoc +++ b/doc/src/topics.qdoc @@ -286,11 +286,9 @@ including ARM, Intel x86, MIPS and SH-4. \o \l {Qt for Windows CE Requirements} \o \l {Installing Qt on Windows CE} \o \l {Windows CE - Introduction to using Qt}{Introduction to using Qt} - \o \l {Qt Examples#Qt for Embedded Linux}{Examples} \endlist \o \list - \o \l {Qt for Embedded Linux Classes}{Classes} \o \l {Windows CE - Using shadow builds}{Using shadow builds} \o \l {Windows CE - Working with Custom SDKs}{Working with Custom SDKs} \endlist -- cgit v0.12 From 3037e466ebf21aa4a47a722a1e2ff497690cbef5 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Tue, 26 May 2009 12:31:23 +0200 Subject: Fix a crash in Phonon::EffectWidget When creating a UI based on double types we only assigned the control pointer in certain cases. This would crash because the tooltip did not check for the pointer, but the real issue was that we didnt assign the control in the first place. Task-number: 249710 Reviewed-by: Richard Moe Gustavsen --- src/3rdparty/phonon/phonon/effectwidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/3rdparty/phonon/phonon/effectwidget.cpp b/src/3rdparty/phonon/phonon/effectwidget.cpp index da5a51a..d5c6c81 100644 --- a/src/3rdparty/phonon/phonon/effectwidget.cpp +++ b/src/3rdparty/phonon/phonon/effectwidget.cpp @@ -165,6 +165,7 @@ void EffectWidgetPrivate::autogenerateUi() if (minValue == -1. && maxValue == 1.) { //Special case values between -1 and 1.0 to use a slider for improved usability QSlider *slider = new QSlider(Qt::Horizontal, q); + control = slider; slider->setRange(-SLIDER_RANGE, +SLIDER_RANGE); slider->setValue(int(SLIDER_RANGE * value.toDouble())); slider->setTickPosition(QSlider::TicksBelow); @@ -188,10 +189,10 @@ void EffectWidgetPrivate::autogenerateUi() break; } + if (control) { #ifndef QT_NO_TOOLTIP control->setToolTip(para.description()); #endif - if (control) { #ifndef QT_NO_SHORTCUT label->setBuddy(control); #endif -- cgit v0.12 From c666b88abcb2c5c120054ac3b0d304cd8225ded7 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 26 May 2009 12:34:03 +0200 Subject: Windows CE compile fix QFileInfo doesn't have a constructor for QLatin1Char and implicit conversion didn't work. Reviewed-by: Thierry --- src/corelib/io/qfsfileengine_win.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp index aee9fde..82cde8b 100644 --- a/src/corelib/io/qfsfileengine_win.cpp +++ b/src/corelib/io/qfsfileengine_win.cpp @@ -1298,7 +1298,7 @@ QFileInfoList QFSFileEngine::drives() } return ret; #else - ret.append(QLatin1Char('/')); + ret.append(QFileInfo(QLatin1Char('/'))); return ret; #endif } -- cgit v0.12 From 54f92419b23b425e32ad573db17f608a67936df1 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Tue, 26 May 2009 12:40:02 +0200 Subject: Clearifying QWebFrame docs Adding docs to toHtml() and toPlainText() Task-number: 253088 Rev-by: Ariya Hidayat Rev-by: David Boddie --- src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp index 5dc6363..e565476 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp @@ -268,7 +268,7 @@ void QWebFrame::addToJavaScriptWindowObject(const QString &name, QObject *object } /*! - Returns the frame's content, converted to HTML. + Returns the frame's content as HTML, enclosed in HTML and BODY tags. \sa setHtml(), toPlainText() */ @@ -280,7 +280,8 @@ QString QWebFrame::toHtml() const } /*! - Returns the content of this frame converted to plain text. + Returns the content of this frame converted to plain text, completely + stripped of all HTML formatting. \sa toHtml() */ -- cgit v0.12 From f640eca34f63631f938817b1254d0caf92cc9143 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Tue, 26 May 2009 10:04:53 +0200 Subject: Carbon, QFontDialog::getFont() ignore the "initial" parameter Seems like no code was written to handle other font engines than CoreText. Unfortunatly the engine on Carbon is ATSUI. This patch adds general code for converting a QFont to an NSFont so the dialog can support other engines than CoreText Task-number: 251957 Reviewed-by: Trenton Schulz --- src/gui/dialogs/qfontdialog_mac.mm | 39 ++++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/gui/dialogs/qfontdialog_mac.mm b/src/gui/dialogs/qfontdialog_mac.mm index 13f7149..3be53db 100644 --- a/src/gui/dialogs/qfontdialog_mac.mm +++ b/src/gui/dialogs/qfontdialog_mac.mm @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #import @@ -123,16 +124,16 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont) QFont newFont; if (cocoaFont) { int pSize = qRound([cocoaFont pointSize]); - QString family(QCFString::toQString(reinterpret_cast([cocoaFont familyName]))); - QString typeface(QCFString::toQString(reinterpret_cast([cocoaFont fontName]))); -// qDebug() << "original family" << family << "typeface" << typeface << "psize" << pSize; + QString family(qt_mac_NSStringToQString([cocoaFont familyName])); + QString typeface(qt_mac_NSStringToQString([cocoaFont fontName])); + int hyphenPos = typeface.indexOf(QLatin1Char('-')); if (hyphenPos != -1) { typeface.remove(0, hyphenPos + 1); } else { typeface = QLatin1String("Normal"); } -// qDebug() << " massaged family" << family << "typeface" << typeface << "psize" << pSize; + newFont = QFontDatabase().font(family, typeface, pSize); newFont.setUnderline(resolveFont.underline()); newFont.setStrikeOut(resolveFont.strikeOut()); @@ -598,15 +599,37 @@ QFont QFontDialogPrivate::execCocoaFontPanel(bool *ok, const QFont &initial, } } -void QFontDialogPrivate::setFont(void * delegate, const QFont &font) +void QFontDialogPrivate::setFont(void *delegate, const QFont &font) { + QMacCocoaAutoReleasePool pool; QFontEngine *fe = font.d->engineForScript(QUnicodeTables::Common); + NSFontManager *mgr = [NSFontManager sharedFontManager]; + NSFont *nsFont = 0; + #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 if (qstrcmp(fe->name(), "CoreText") == 0) { - const NSFont *nsFont = reinterpret_cast(static_cast(fe)->ctfont); - [[NSFontManager sharedFontManager] setSelectedFont:nsFont isMultiple:NO]; - } + nsFont = reinterpret_cast(static_cast(fe)->ctfont); + } else #endif + { + int weight = 5; + NSFontTraitMask mask = 0; + if (font.style() == QFont::StyleItalic) { + mask |= NSItalicFontMask; + } + if (font.weight() == QFont::Bold) { + weight = 9; + mask |= NSBoldFontMask; + } + + NSFontManager *mgr = [NSFontManager sharedFontManager]; + nsFont = [mgr fontWithFamily:qt_mac_QStringToNSString(font.family()) + traits:mask + weight:weight + size:font.pointSize()]; + } + + [mgr setSelectedFont:nsFont isMultiple:NO]; [static_cast(delegate) setQtFont:font]; } -- cgit v0.12 From f552dc200d857505df500b3ce0b99d5f7c74c951 Mon Sep 17 00:00:00 2001 From: Alexis Menard Date: Tue, 26 May 2009 13:26:14 +0200 Subject: We first remove the pixmap from the cache and then release the key If we don't remove the pixmap from QCache first then the key is invalid and the removal failed Reviewed-by: sroedal --- src/gui/image/qpixmapcache.cpp | 4 +++- tests/auto/qpixmapcache/tst_qpixmapcache.cpp | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp index 3cfc191..82b42b4 100644 --- a/src/gui/image/qpixmapcache.cpp +++ b/src/gui/image/qpixmapcache.cpp @@ -342,8 +342,10 @@ bool QPMCache::remove(const QString &key) bool QPMCache::remove(const QPixmapCache::Key &key) { + bool result = QCache::remove(key); + //We release the key after we removed it from the cache releaseKey(key); - return QCache::remove(key); + return result; } void QPMCache::resizeKeyArray(int size) diff --git a/tests/auto/qpixmapcache/tst_qpixmapcache.cpp b/tests/auto/qpixmapcache/tst_qpixmapcache.cpp index 405ac34..fb5998a 100644 --- a/tests/auto/qpixmapcache/tst_qpixmapcache.cpp +++ b/tests/auto/qpixmapcache/tst_qpixmapcache.cpp @@ -369,6 +369,14 @@ void tst_QPixmapCache::remove() key = QPixmapCache::insert(p1); QCOMPARE(getPrivate(key)->key, 1); + //Test if pixmaps are correctly deleted + QPixmapCache::clear(); + key = QPixmapCache::insert(p1); + QCOMPARE(getPrivate(key)->key, 1); + QVERIFY(QPixmapCache::find(key, &p1) != 0); + QPixmapCache::remove(key); + QCOMPARE(p1.isDetached(), true); + //We mix both part of the API QPixmapCache::clear(); p1.fill(Qt::red); -- cgit v0.12 From c37c8370e4897d2e6191df2d1ccde43830ffb8d0 Mon Sep 17 00:00:00 2001 From: Kavindra Devi Palaraja Date: Tue, 26 May 2009 13:42:33 +0200 Subject: Doc - more screenshots and better description --- doc/src/designer-manual.qdoc | 35 ++++++++--------------- doc/src/images/rgbController-final-layout.png | Bin 0 -> 11275 bytes doc/src/images/rgbController-form-gridLayout.png | Bin 0 -> 11235 bytes doc/src/images/rgbController-selectForLayout.png | Bin 0 -> 20981 bytes 4 files changed, 12 insertions(+), 23 deletions(-) create mode 100644 doc/src/images/rgbController-final-layout.png create mode 100644 doc/src/images/rgbController-form-gridLayout.png create mode 100644 doc/src/images/rgbController-selectForLayout.png diff --git a/doc/src/designer-manual.qdoc b/doc/src/designer-manual.qdoc index 77b208b..452782f 100644 --- a/doc/src/designer-manual.qdoc +++ b/doc/src/designer-manual.qdoc @@ -436,41 +436,32 @@ You start by choosing \gui Widget from the \gui{New Form} dialog. \endtable - Then you drag three labels, three spin boxes and three vertical sliders on - to your form. To change the label's default text, simply double-click on - it. The screenshot below shows the form after all three labels have been - renamed. - - You can roughly arrange them according to how you would like them to be - laid out. \table - \row \o \inlineimage rgbController-widgetBox.png - \o \inlineimage rgbController-arrangement.png - \endtable + \row + \i \inlineimage rgbController-arrangement.png + \i \bold{Placing Widgets on a Form} + Drag three labels, three spin boxes and three vertical sliders on to your + form. To change the label's default text, simply double-click on it. You + can arrange them according to how you would like them to be laid out. + \endtable + To ensure that they are laid out exactly like this in your program, you need to place these widgets into a layout. We will do this in groups of three. Select the "RED" label. Then, hold down \key Ctrl while you select its corresponding spin box and slider. In the \gui{Form} menu, select \gui{Lay Out in a Grid}. - \omit \table \row \i \inlineimage rgbController-form-gridLayout.png \i \inlineimage rgbController-selectForLayout.png \endtable - \endomit Repeat the step for the other two labels along with their corresponding - spin boxes and sliders as well. Your form will now look similar to the - screenshot below. - - \omit - \image rgbController-almostLaidOut.png - \endomit + spin boxes and sliders as well. The next step is to combine all three layouts into one \bold{main layout}. It is important that your form has a main layout; otherwise, the widgets @@ -478,7 +469,9 @@ layout, \gui{Right click} anywhere on your form, outside of the three separate layouts, and select \gui{Lay Out Horizontally}. Alternatively, you could also select \gui{Lay Out in a Grid} -- you will still see the same - arrangement. + arrangement (shown below). + + \image rgbController-final-layout.png \note Main layouts cannot be seen on the form. To check if you have a main layout installed, try resizing your form; your widgets should resize @@ -495,7 +488,6 @@ pressing \key{F4} or something \gui{Edit Signals/Slots} from the \gui{Edit} menu. - \omit \table \row \i \inlineimage rgbController-signalsAndSlots.png @@ -505,11 +497,8 @@ \gui{Configure Connection} dialog, shown below, will pop up. Select the correct signal and slot and click \gui OK. \endtable - \endomit - \omit \image rgbController-configureConnection.png - \endomit Repeat the step (in reverse order), clicking on the spin box and dragging the cursor towards the slider, to connect the spin box's diff --git a/doc/src/images/rgbController-final-layout.png b/doc/src/images/rgbController-final-layout.png new file mode 100644 index 0000000..d32a93e Binary files /dev/null and b/doc/src/images/rgbController-final-layout.png differ diff --git a/doc/src/images/rgbController-form-gridLayout.png b/doc/src/images/rgbController-form-gridLayout.png new file mode 100644 index 0000000..c8f3dcf Binary files /dev/null and b/doc/src/images/rgbController-form-gridLayout.png differ diff --git a/doc/src/images/rgbController-selectForLayout.png b/doc/src/images/rgbController-selectForLayout.png new file mode 100644 index 0000000..7a8e184 Binary files /dev/null and b/doc/src/images/rgbController-selectForLayout.png differ -- cgit v0.12 From aec18b0eea741da58a02f7ad95ab5ee9dccfce6c Mon Sep 17 00:00:00 2001 From: Kavindra Devi Palaraja Date: Tue, 26 May 2009 13:44:35 +0200 Subject: Doc - whitespace cleaning --- doc/src/designer-manual.qdoc | 48 ++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/doc/src/designer-manual.qdoc b/doc/src/designer-manual.qdoc index 452782f..9c13d79 100644 --- a/doc/src/designer-manual.qdoc +++ b/doc/src/designer-manual.qdoc @@ -299,12 +299,12 @@ \row \i \inlineimage designer-widget-box.png \i \bold{Qt Designer's Widget Box} - + The widget box provides a selection of standard Qt widgets, layouts, and other objects that can be used to create user interfaces on forms. Each of the categories in the widget box contain widgets with similar uses or related features. - + \note Since Qt 4.4, new widgets have been included, e.g., QPlainTextEdit, QCommandLinkButton, QScrollArea, QMdiArea, and QWebView. @@ -358,7 +358,7 @@ using a grid. The coordinates on the screenshot show the position of each widget within the grid. - \image addressbook-tutorial-part3-labeled-layout.png + \image addressbook-tutorial-part3-labeled-layout.png \note Inside the grid, the QPushButton objects are actually nested. The buttons on the right are first placed in a QVBoxLayout; the buttons at the @@ -367,7 +367,7 @@ To visualize, imagine the layout as a box that shrinks as much as possible, attempting to \e squeeze your widgets in a neat arrangement, and, at the - same time, maximize the use of available space. + same time, maximize the use of available space. Qt's layouts help when you: @@ -446,7 +446,7 @@ form. To change the label's default text, simply double-click on it. You can arrange them according to how you would like them to be laid out. \endtable - + To ensure that they are laid out exactly like this in your program, you need to place these widgets into a layout. We will do this in groups of three. Select the "RED" label. Then, hold down \key Ctrl while you select @@ -779,11 +779,11 @@ have a \c text property that can also be edited by double-clicking on the widget or by pressing \gui F2. \QD interprets the backslash (\\) character specially, enabling newline (\\n) characters to be - inserted into the text; the \\\\ character sequence is used to + inserted into the text; the \\\\ character sequence is used to insert a single backslash into the text. A context menu can also be opened while editing, providing another way to insert special characters and newlines into the text. - \endlist + \endlist \section2 Dynamic Properties @@ -795,12 +795,12 @@ \image designer-property-editor-toolbar.png - To add a dynamic property, clcik on the \gui Add button + To add a dynamic property, clcik on the \gui Add button \inlineimage designer-property-editor-add-dynamic.png - . To remove it, click on the \gui Remove button + . To remove it, click on the \gui Remove button \inlineimage designer-property-editor-remove-dynamic.png instead. You can also sort the properties alphabetically and change the - color groups by clickinig on the \gui Configure button + color groups by clickinig on the \gui Configure button \inlineimage designer-property-editor-configure.png . @@ -902,7 +902,7 @@ \section2 Horizontal and Vertical Layouts - + The simplest way to arrange objects on a form is to place them in a horizontal or vertical layout. Horizontal layouts ensure that the widgets within are aligned horizontally; vertical layouts ensure that they are @@ -1129,7 +1129,7 @@ spacers just provide spacing hints to layouts, so they cannot be connected to other objects. - + \target HighlightedObjects \table \row @@ -1168,7 +1168,7 @@ \image designer-connection-dialog.png - To complete the connection, select a signal from the source object and a + To complete the connection, select a signal from the source object and a slot from the destination object, then click \key OK. Click \key Cancel if you wish to abandon the connection. @@ -1711,22 +1711,22 @@ \i \bold{Resource Files} Within the resource browser, you can open existing resource files or - create new ones. Click the \gui{Edit Resources} button + create new ones. Click the \gui{Edit Resources} button \inlineimage designer-edit-resources-button.png to edit your resources. To reload resources, click on the \gui Reload - button + button \inlineimage designer-reload-resources-button.png . \endtable Once a resource file is loaded, you can create or remove entries in it - using the given \gui{Add Files} - \inlineimage designer-add-resource-entry-button.png - and \gui{Remove Files} + using the given \gui{Add Files} + \inlineimage designer-add-resource-entry-button.png + and \gui{Remove Files} \inlineimage designer-remove-resource-entry-button.png buttons, and specify resources (e.g., images) using the \gui{Add Files} - button + button \inlineimage designer-add-files-button.png . Note that these resources must reside within the current resource file's directory or one of its subdirectories. @@ -1738,15 +1738,15 @@ \i \inlineimage designer-edit-resource.png \i \bold{Editing Resource Files} - Press the + Press the \inlineimage designer-add-resource-entry-button.png button to add a new resource entry to the file. Then use the - \gui{Add Files} button + \gui{Add Files} button \inlineimage designer-add-files-button.png to specify the resource. You can remove resources by selecting the corresponding entry in the - resource editor, and pressing the + resource editor, and pressing the \inlineimage designer-remove-resource-entry-button.png button. \endtable @@ -2554,7 +2554,7 @@ pixmap property in the property editor. QDesignerTaskMenuExtension is useful for custom widgets. It provides an extension that allows you to add custom menu entries to \QD's task menu. - + The \l{designer/taskmenuextension}{Task Menu Extension} example illustrates how to use this class. @@ -2655,7 +2655,7 @@ pixmap property in the property editor. function, making it able to create your extension, such as a \l{designer/containerextension}{MultiPageWidget} container extension. - You can either create a new QExtensionFactory and reimplement the + You can either create a new QExtensionFactory and reimplement the QExtensionFactory::createExtension() function: \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 8 -- cgit v0.12 From 2c8348f5ccf62be31479dcd78282395a98eed76f Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 26 May 2009 14:13:21 +0200 Subject: BT: opening datetimepicker in a cell in spreadsheet demo resets the date That was a bug in the exemple. Reviewed-by: Kavindra Palaraja --- demos/spreadsheet/spreadsheetdelegate.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/demos/spreadsheet/spreadsheetdelegate.cpp b/demos/spreadsheet/spreadsheetdelegate.cpp index 465c92f..2916757 100644 --- a/demos/spreadsheet/spreadsheetdelegate.cpp +++ b/demos/spreadsheet/spreadsheetdelegate.cpp @@ -51,7 +51,7 @@ QWidget *SpreadSheetDelegate::createEditor(QWidget *parent, { if (index.column() == 1) { QDateTimeEdit *editor = new QDateTimeEdit(parent); - editor->setDisplayFormat("dd/M/yyy"); + editor->setDisplayFormat("dd/M/yyyy"); editor->setCalendarPopup(true); return editor; } @@ -93,7 +93,7 @@ void SpreadSheetDelegate::setEditorData(QWidget *editor, if (dateEditor) { dateEditor->setDate(QDate::fromString( index.model()->data(index, Qt::EditRole).toString(), - "d/M/yy")); + "d/M/yyyy")); } } } @@ -107,7 +107,7 @@ void SpreadSheetDelegate::setModelData(QWidget *editor, } else { QDateTimeEdit *dateEditor = qobject_cast(editor); if (dateEditor) { - model->setData(index, dateEditor->date().toString("dd/M/yyy")); + model->setData(index, dateEditor->date().toString("dd/M/yyyy")); } } } -- cgit v0.12 From 1536b02ed1633555e306bec02398a2a7c1bdabf7 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 26 May 2009 14:19:27 +0200 Subject: Test for QDate::fromDate with string format. Note that two digit years are always in the year 19xx This is excepted for compatibility reason as discussed with Peter --- tests/auto/qdate/tst_qdate.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/auto/qdate/tst_qdate.cpp b/tests/auto/qdate/tst_qdate.cpp index d4273d0..4d6c80c 100644 --- a/tests/auto/qdate/tst_qdate.cpp +++ b/tests/auto/qdate/tst_qdate.cpp @@ -82,6 +82,8 @@ private slots: void operator_gt_eq(); void fromString_data(); void fromString(); + void fromString_format_data(); + void fromString_format(); void toString_format_data(); void toString_format(); void isLeapYear(); @@ -618,6 +620,30 @@ void tst_QDate::fromString() QCOMPARE( QDate::fromString( str2, Qt::ISODate ), d1 ); } +void tst_QDate::fromString_format_data() +{ + QTest::addColumn("string"); + QTest::addColumn("format"); + QTest::addColumn("date"); + + //year with yy is always 19xx for compatibility + QTest::newRow( "data0" ) << QString("21052006") << QString("ddMMyyyy") << QDate(2006,5,21); + QTest::newRow( "data1" ) << QString("210506") << QString("ddMMyy") << QDate(1906,5,21); + QTest::newRow( "data2" ) << QString("21/5/2006") << QString("d/M/yyyy") << QDate(2006,5,21); + QTest::newRow( "data3" ) << QString("21/5/06") << QString("d/M/yy") << QDate(1906,5,21); + QTest::newRow( "data4" ) << QString("20060521") << QString("yyyyMMdd") << QDate(2006,5,21); + QTest::newRow( "data5" ) << QString("060521") << QString("yyMMdd") << QDate(1906,5,21); +} + +void tst_QDate::fromString_format() +{ + QFETCH( QString, string ); + QFETCH( QString, format ); + QFETCH( QDate, date ); + + QCOMPARE( QDate::fromString( string, format ), date ); +} + void tst_QDate::toString_format_data() { QTest::addColumn("t"); -- cgit v0.12 From 8a2ca9b0d8ed23cec44e40f61c0f4983fbc55282 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Tue, 26 May 2009 14:06:56 +0200 Subject: Correcting bugs in classic.css Correcting invalid padding values. none is not a valid padding value. Rev-by: David Boddie --- tools/qdoc3/test/classic.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/qdoc3/test/classic.css b/tools/qdoc3/test/classic.css index 6cf7377..f22a77a 100644 --- a/tools/qdoc3/test/classic.css +++ b/tools/qdoc3/test/classic.css @@ -77,10 +77,10 @@ table.annotated td { table tr pre { - padding-top: none; - padding-bottom: none; - padding-left: none; - padding-right: none; + padding-top: 0px; + padding-bottom: 0px; + padding-left: 0px; + padding-right: 0px; border: none; background: none } -- cgit v0.12 From 871b730da203cef773e159960532888522f16a0b Mon Sep 17 00:00:00 2001 From: Trond Kjernaasen Date: Tue, 26 May 2009 14:20:34 +0200 Subject: BT: Fixed GL textdrawing in the Boxes demo. Reworked the 85f98acaa3a38079071bea711e43c9a86edec1f6 fix, since it broke glyph positioning in the GL engine under Windows. Instead of changing the glyph cache margin, which impacts where the glyph is positioned, we just make the image the glyph is drawn into 4 pixels bigger in width/heigth. The margin in QImageTextureGlyphCache needs to be reworked.. Task-number: 254450 Reviewed-by: Eskil --- src/gui/painting/qtextureglyphcache.cpp | 8 ++++++-- src/gui/text/qfontengine_win.cpp | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp index 3fd1ffb..89df869 100644 --- a/src/gui/painting/qtextureglyphcache.cpp +++ b/src/gui/painting/qtextureglyphcache.cpp @@ -92,8 +92,8 @@ void QTextureGlyphCache::populate(const QTextItemInt &ti, int glyph_height = metrics.height.ceil().toInt(); if (glyph_height == 0 || glyph_width == 0) continue; - glyph_width += margin * 2 + 2; - glyph_height += margin * 2 + 2; + glyph_width += margin * 2 + 4; + glyph_height += margin * 2 + 4; // align to 8-bit boundary if (m_type == QFontEngineGlyphCache::Raster_Mono) glyph_width = (glyph_width+7)&~7; @@ -189,7 +189,11 @@ void QImageTextureGlyphCache::createTextureData(int width, int height) int QImageTextureGlyphCache::glyphMargin() const { +#ifdef Q_WS_MAC return 2; +#else + return m_type == QFontEngineGlyphCache::Raster_RGBMask ? 2 : 0; +#endif } void QImageTextureGlyphCache::fillTexture(const Coord &c, glyph_t g) diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp index bf3a176..7341665 100644 --- a/src/gui/text/qfontengine_win.cpp +++ b/src/gui/text/qfontengine_win.cpp @@ -1406,8 +1406,8 @@ QNativeImage *QFontEngineWin::drawGDIGlyph(HFONT font, glyph_t glyph, int margin #endif #endif - QNativeImage *ni = new QNativeImage(iw + 2 * margin + 2, - ih + 2 * margin + 2, + QNativeImage *ni = new QNativeImage(iw + 2 * margin + 4, + ih + 2 * margin + 4, QNativeImage::systemFormat(), true); ni->image.fill(0xffffffff); @@ -1449,7 +1449,7 @@ QImage QFontEngineWin::alphaMapForGlyph(glyph_t glyph, const QTransform &xform) font = CreateFontIndirectW(&lf); } - QNativeImage *mask = drawGDIGlyph(font, glyph, 2, xform); + QNativeImage *mask = drawGDIGlyph(font, glyph, 0, xform); if (mask == 0) return QImage(); -- cgit v0.12 From c17f27a9a14c353c6149f2c15f6a0ff6afe3dedd Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Tue, 26 May 2009 13:22:00 +0200 Subject: SSL: Remove broken system certificate loading code Task-number: 254365 Reviewed-by: Peter Hartmann --- src/network/ssl/qsslsocket_openssl.cpp | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index 6f8cf42..cb101af 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -482,30 +482,7 @@ void QSslSocketPrivate::resetDefaultCiphers() QList QSslSocketPrivate::systemCaCertificates() { -#ifdef QQ_OS_UNIX - // Check known locations for the system's default bundle. ### On Windows, - // we should use CAPI to find the bundle, and not rely on default unix - // locations. - const char *standardLocations[] = {"/etc/ssl/certs/", -#if 0 - // KDE uses KConfig for its SSL store, - // but it also stores the bundle at - // this location - "$HOME/.kde/share/apps/kssl/ca-bundle.crt", -#endif - 0}; - const char **it = standardLocations; - QStringList nameFilter; - nameFilter << QLatin1String("*.pem") << QLatin1String("*.crt"); - while (*it) { - if (QDirIterator(QLatin1String(*it), nameFilter).hasNext()) - return certificatesFromPath(QLatin1String(*it)); - ++it; - } -#endif - - // Qt provides a default bundle when we cannot detect the system's default - // bundle. + // Qt provides a default bundle of certificates QFile caBundle(QLatin1String(":/trolltech/network/ssl/qt-ca-bundle.crt")); if (caBundle.open(QIODevice::ReadOnly | QIODevice::Text)) return QSslCertificate::fromDevice(&caBundle); -- cgit v0.12 From a670315152bf0914b8661b584d20752fd4da5b95 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 26 May 2009 14:40:40 +0200 Subject: A GLint is converted to int for passing to qBound(). --- src/opengl/qglframebufferobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp index 2b7ad4f..338ce1f 100644 --- a/src/opengl/qglframebufferobject.cpp +++ b/src/opengl/qglframebufferobject.cpp @@ -395,7 +395,7 @@ void QGLFramebufferObjectPrivate::init(const QSize &sz, QGLFramebufferObject::At GLint maxSamples; glGetIntegerv(GL_MAX_SAMPLES_EXT, &maxSamples); - samples = qBound(1, samples, int(maxSamples)); + samples = qBound(1, int(samples), int(maxSamples)); glGenRenderbuffers(1, &color_buffer); glBindRenderbuffer(GL_RENDERBUFFER_EXT, color_buffer); -- cgit v0.12 From 7c383fc79510276439deeb706d48ad5543fb54e7 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Tue, 26 May 2009 14:46:15 +0200 Subject: Fix a painting issue in the QGtkStyle statusbar We should use the "statusbar" string when we draw the sizegrip. Since gtkstatusbar is the only gtk widget using the paint_resize_grip and it uses the "statusbar" string itself it should be safe to assume this. Task-number: 254535 Reviewed-by: rosch --- src/gui/styles/qgtkstyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index 86653df..14be518 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -2344,7 +2344,7 @@ void QGtkStyle::drawControl(ControlElement element, case CE_SizeGrip: { GtkWidget *gtkStatusbar = QGtk::gtkWidget(QLS("GtkStatusbar.GtkFrame")); QRect gripRect = option->rect.adjusted(0, 0, -gtkStatusbar->style->xthickness, -gtkStatusbar->style->ythickness); - gtkPainter.paintResizeGrip( gtkStatusbar, "window", gripRect, GTK_STATE_NORMAL, + gtkPainter.paintResizeGrip( gtkStatusbar, "statusbar", gripRect, GTK_STATE_NORMAL, GTK_SHADOW_OUT, QApplication::isRightToLeft() ? GDK_WINDOW_EDGE_SOUTH_WEST : GDK_WINDOW_EDGE_SOUTH_EAST, gtkStatusbar->style); -- cgit v0.12 From 0ae04e9d7872d170974d15e8fbae8da1949c94df Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Tue, 26 May 2009 15:33:47 +0200 Subject: Mac: Prefix sat in qt.conf is ignored on Mac Fix: Make sure to add the prefix to the value we return in QLibraryInfo Task-number: 254545 Reviewed-by: Trenton Schulz --- src/corelib/global/qlibraryinfo.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index 29e356e..7f6ff20 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -434,14 +434,14 @@ QLibraryInfo::location(LibraryLocation loc) #else if (QCoreApplication::instance()) { #ifdef Q_OS_MAC - CFBundleRef bundleRef = CFBundleGetMainBundle(); - if (bundleRef) { - QCFType urlRef = CFBundleCopyBundleURL(bundleRef); - if (urlRef) { - QCFString path = CFURLCopyFileSystemPath(urlRef, kCFURLPOSIXPathStyle); - return QDir::cleanPath(path + QLatin1String("/Contents")); - } - } + CFBundleRef bundleRef = CFBundleGetMainBundle(); + if (bundleRef) { + QCFType urlRef = CFBundleCopyBundleURL(bundleRef); + if (urlRef) { + QCFString path = CFURLCopyFileSystemPath(urlRef, kCFURLPOSIXPathStyle); + return QDir::cleanPath(path + QLatin1String("/Contents/") + ret); + } + } #endif return QDir(QCoreApplication::applicationDirPath()).absoluteFilePath(ret); } else { -- cgit v0.12 From 1164e61393349fc3d6bf06d0789fa6ea2cfb5909 Mon Sep 17 00:00:00 2001 From: Kavindra Devi Palaraja Date: Tue, 26 May 2009 15:37:45 +0200 Subject: Doc - more images and additional description --- doc/src/designer-manual.qdoc | 24 +++++++++++---------- .../images/rgbController-configure-connection1.png | Bin 0 -> 29210 bytes .../images/rgbController-configure-connection2.png | Bin 0 -> 28655 bytes doc/src/images/rgbController-property-editing.png | Bin 0 -> 9158 bytes doc/src/images/rgbController-screenshot.png | Bin 0 -> 8995 bytes doc/src/images/rgbController-signalsAndSlots.png | Bin 0 -> 10050 bytes 6 files changed, 13 insertions(+), 11 deletions(-) create mode 100644 doc/src/images/rgbController-configure-connection1.png create mode 100644 doc/src/images/rgbController-configure-connection2.png create mode 100644 doc/src/images/rgbController-property-editing.png create mode 100644 doc/src/images/rgbController-screenshot.png create mode 100644 doc/src/images/rgbController-signalsAndSlots.png diff --git a/doc/src/designer-manual.qdoc b/doc/src/designer-manual.qdoc index 9c13d79..58d0f71 100644 --- a/doc/src/designer-manual.qdoc +++ b/doc/src/designer-manual.qdoc @@ -478,11 +478,12 @@ accordingly. When you click on the slider and drag it to a certain value, you want the - spin box to display the slider's position. To do this, you need to connect - the slider's \l{QAbstractSlider::}{valueChanged()} signal to the spin box's - \l{QSpinBox::}{setValue()} slot. You also need to make the reverse - connections, e.g., connect the spin box's \l{QSpinBox::}{valueChanged()} - signal to the slider's \l{QAbstractSlider::value()}{setValue()} slot. + spin box to display the slider's position. To accomplish this behavior, you + need to connect the slider's \l{QAbstractSlider::}{valueChanged()} signal + to the spin box's \l{QSpinBox::}{setValue()} slot. You also need to make + the reverse connections, e.g., connect the spin box's \l{QSpinBox::} + {valueChanged()} signal to the slider's \l{QAbstractSlider::value()} + {setValue()} slot. To do this, you have to switch to \gui{Edit Signals/Slots} mode, either by pressing \key{F4} or something \gui{Edit Signals/Slots} from the \gui{Edit} @@ -498,13 +499,18 @@ correct signal and slot and click \gui OK. \endtable - \image rgbController-configureConnection.png + \image rgbController-configureConnection1.png Repeat the step (in reverse order), clicking on the spin box and dragging the cursor towards the slider, to connect the spin box's \l{QSpinBox::}{valueChanged()} signal to the slider's \l{QAbstractSlider::value()}{setValue()} slot. + You can use the screenshot below as a guide to selecting the correct signal + and slot. + + \image rgbController-configure-connection2.png + Now that you have successfully connected the objects for the "RED" component of the RGB Controller, do the same for the "GREEN" and "BLUE" components as well. @@ -512,7 +518,6 @@ Since RGB values range between 0 and 255, we need to limit the spin box and slider to that particular range. - \omit \table \row \i \inlineimage rgbController-property-editing.png @@ -523,17 +528,14 @@ \l{QSpinBox::}{maximum} property. Then, click on the first vertical slider, you will see \l{QAbstractSlider}'s properties. Enter "255" for the \l{QAbstractSlider::}{maximum} property as well. Repeat this - process for the remaining spin boxes and sliders. + process for the remaining spin boxes and sliders. \endtable - \endomit Now, we preview your form to see how it would look in your application. To preview your form, press \key{Ctrl + R} or select \gui Preview from the \gui Form menu. - \omit \image rgbController-preview.png - \endomit Try dragging the slider - the spin box will mirror its value too (and vice versa). Also, you can resize it to see how the layouts used to manage the diff --git a/doc/src/images/rgbController-configure-connection1.png b/doc/src/images/rgbController-configure-connection1.png new file mode 100644 index 0000000..0798184 Binary files /dev/null and b/doc/src/images/rgbController-configure-connection1.png differ diff --git a/doc/src/images/rgbController-configure-connection2.png b/doc/src/images/rgbController-configure-connection2.png new file mode 100644 index 0000000..f3fcc62 Binary files /dev/null and b/doc/src/images/rgbController-configure-connection2.png differ diff --git a/doc/src/images/rgbController-property-editing.png b/doc/src/images/rgbController-property-editing.png new file mode 100644 index 0000000..64fc500 Binary files /dev/null and b/doc/src/images/rgbController-property-editing.png differ diff --git a/doc/src/images/rgbController-screenshot.png b/doc/src/images/rgbController-screenshot.png new file mode 100644 index 0000000..6019233 Binary files /dev/null and b/doc/src/images/rgbController-screenshot.png differ diff --git a/doc/src/images/rgbController-signalsAndSlots.png b/doc/src/images/rgbController-signalsAndSlots.png new file mode 100644 index 0000000..2ba3aba Binary files /dev/null and b/doc/src/images/rgbController-signalsAndSlots.png differ -- cgit v0.12 From a088a3e5698881b0466cd072380fc7347ea68fba Mon Sep 17 00:00:00 2001 From: kh Date: Tue, 26 May 2009 15:53:52 +0200 Subject: Fix broken search inside search results. Reviewed-by: kh --- tools/assistant/tools/assistant/centralwidget.cpp | 131 ++++++++++------------ tools/assistant/tools/assistant/centralwidget.h | 5 +- 2 files changed, 66 insertions(+), 70 deletions(-) diff --git a/tools/assistant/tools/assistant/centralwidget.cpp b/tools/assistant/tools/assistant/centralwidget.cpp index b78f346..98245c0 100644 --- a/tools/assistant/tools/assistant/centralwidget.cpp +++ b/tools/assistant/tools/assistant/centralwidget.cpp @@ -848,60 +848,64 @@ void CentralWidget::keyPressEvent(QKeyEvent *e) QWidget::keyPressEvent(e); } -void CentralWidget::find(QString ttf, bool forward, bool backward) +void CentralWidget::find(const QString &ttf, bool forward, bool backward) { - QTextCursor cursor; - QTextDocument *doc = 0; - QTextBrowser *browser = 0; - - HelpViewer *viewer = currentHelpViewer(); QPalette p = findWidget->editFind->palette(); p.setColor(QPalette::Active, QPalette::Base, Qt::white); -#if !defined(QT_NO_WEBKIT) - Q_UNUSED(forward) - Q_UNUSED(doc) - Q_UNUSED(browser) - - if (viewer) { - QWebPage::FindFlags options; - if (backward) - options |= QWebPage::FindBackward; + if (!ttf.isEmpty()) { + HelpViewer *viewer = currentHelpViewer(); - if (findWidget->checkCase->isChecked()) - options |= QWebPage::FindCaseSensitively; + bool found = false; +#if !defined(QT_NO_WEBKIT) + if (viewer) { + QWebPage::FindFlags options; + if (backward) + options |= QWebPage::FindBackward; - bool found = viewer->findText(ttf, options); - findWidget->labelWrapped->hide(); + if (findWidget->checkCase->isChecked()) + options |= QWebPage::FindCaseSensitively; - if (!found) { - options |= QWebPage::FindWrapsAroundDocument; found = viewer->findText(ttf, options); + findWidget->labelWrapped->hide(); if (!found) { - p.setColor(QPalette::Active, QPalette::Base, QColor(255, 102, 102)); - } else { - findWidget->labelWrapped->show(); + options |= QWebPage::FindWrapsAroundDocument; + found = viewer->findText(ttf, options); + if (found) + findWidget->labelWrapped->show(); } + } else if (tabWidget->currentWidget() == m_searchWidget) { + QTextBrowser *browser = qFindChild(m_searchWidget); + found = findInTextBrowser(browser, ttf, forward, backward); } - } #else - if (viewer) { - doc = viewer->document(); - cursor = viewer->textCursor(); - browser = qobject_cast(viewer); - } + QTextBrowser *browser = qobject_cast(viewer); + if (tabWidget->currentWidget() == m_searchWidget) + browser = qFindChild(m_searchWidget); + found = findInTextBrowser(browser, ttf, forward, backward); +#endif - if (tabWidget->currentWidget() == m_searchWidget) { - QTextBrowser *browser = qFindChild(m_searchWidget); - if (browser) { - doc = browser->document(); - cursor = browser->textCursor(); - } + if (!found) + p.setColor(QPalette::Active, QPalette::Base, QColor(255, 102, 102)); } - if (!browser || !doc || cursor.isNull()) - return; + if (!findWidget->isVisible()) + findWidget->show(); + findWidget->editFind->setPalette(p); +} + +bool CentralWidget::findInTextBrowser(QTextBrowser* browser, const QString &ttf, + bool forward, bool backward) +{ + if (!browser) + return false; + + QTextDocument *doc = browser->document(); + QTextCursor cursor = browser->textCursor(); + + if (!doc || cursor.isNull()) + return false; QTextDocument::FindFlags options; @@ -910,44 +914,33 @@ void CentralWidget::find(QString ttf, bool forward, bool backward) QTextCursor::MoveAnchor); } - QTextCursor newCursor = cursor; + if (backward) + options |= QTextDocument::FindBackward; - if (!ttf.isEmpty()) { - if (backward) - options |= QTextDocument::FindBackward; - - if (findWidget->checkCase->isChecked()) - options |= QTextDocument::FindCaseSensitively; + if (findWidget->checkCase->isChecked()) + options |= QTextDocument::FindCaseSensitively; - if (findWidget->checkWholeWords->isChecked()) - options |= QTextDocument::FindWholeWords; + if (findWidget->checkWholeWords->isChecked()) + options |= QTextDocument::FindWholeWords; - newCursor = doc->find(ttf, cursor, options); - findWidget->labelWrapped->hide(); + findWidget->labelWrapped->hide(); + bool found = true; + QTextCursor newCursor = doc->find(ttf, cursor, options); + if (newCursor.isNull()) { + QTextCursor ac(doc); + ac.movePosition(options & QTextDocument::FindBackward + ? QTextCursor::End : QTextCursor::Start); + newCursor = doc->find(ttf, ac, options); if (newCursor.isNull()) { - QTextCursor ac(doc); - ac.movePosition(options & QTextDocument::FindBackward - ? QTextCursor::End : QTextCursor::Start); - newCursor = doc->find(ttf, ac, options); - if (newCursor.isNull()) { - p.setColor(QPalette::Active, QPalette::Base, QColor(255, 102, 102)); - newCursor = cursor; - } else { - findWidget->labelWrapped->show(); - } + found = false; + newCursor = cursor; + } else { + findWidget->labelWrapped->show(); } } -#endif - - if (!findWidget->isVisible()) - findWidget->show(); - -#if defined(QT_NO_WEBKIT) - if (browser) - browser->setTextCursor(newCursor); -#endif - findWidget->editFind->setPalette(p); + browser->setTextCursor(newCursor); + return found; } void CentralWidget::updateBrowserFont() diff --git a/tools/assistant/tools/assistant/centralwidget.h b/tools/assistant/tools/assistant/centralwidget.h index e3ce200..1342a75 100644 --- a/tools/assistant/tools/assistant/centralwidget.h +++ b/tools/assistant/tools/assistant/centralwidget.h @@ -55,6 +55,7 @@ class QLabel; class QAction; class QCheckBox; class QLineEdit; +class QTextBrowser; class QToolButton; class HelpViewer; @@ -176,7 +177,9 @@ private slots: private: void connectSignals(); bool eventFilter(QObject *object, QEvent *e); - void find(QString ttf, bool forward, bool backward); + void find(const QString &ttf, bool forward, bool backward); + bool findInTextBrowser(QTextBrowser* browser, const QString &ttf, + bool forward, bool backward); void initPrinter(); QString quoteTabTitle(const QString &title) const; void highlightSearchTerms(); -- cgit v0.12 From b03f598df2aa4037815eab9249ba1213236216c5 Mon Sep 17 00:00:00 2001 From: kh Date: Tue, 26 May 2009 15:57:45 +0200 Subject: Workaround the palette issue, set it only when we search is open. --- tools/assistant/tools/assistant/centralwidget.cpp | 35 +++++++++++++++++++++-- tools/assistant/tools/assistant/centralwidget.h | 5 ++++ 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/tools/assistant/tools/assistant/centralwidget.cpp b/tools/assistant/tools/assistant/centralwidget.cpp index 98245c0..52d48d5 100644 --- a/tools/assistant/tools/assistant/centralwidget.cpp +++ b/tools/assistant/tools/assistant/centralwidget.cpp @@ -87,6 +87,7 @@ namespace { FindWidget::FindWidget(QWidget *parent) : QWidget(parent) + , appPalette(qApp->palette()) { QHBoxLayout *hboxLayout = new QHBoxLayout(this); QString resourcePath = QLatin1String(":/trolltech/assistant/images/"); @@ -148,6 +149,34 @@ FindWidget::~FindWidget() { } +void FindWidget::hideEvent(QHideEvent* event) +{ +#if !defined(QT_NO_WEBKIT) + // TODO: remove this once webkit supports setting the palette + if (!event->spontaneous()) + qApp->setPalette(appPalette); +#else + Q_UNUSED(event); +#endif +} + +void FindWidget::showEvent(QShowEvent* event) +{ +#if !defined(QT_NO_WEBKIT) + // TODO: remove this once webkit supports setting the palette + if (!event->spontaneous()) { + QPalette p = appPalette; + p.setColor(QPalette::Inactive, QPalette::Highlight, + p.color(QPalette::Active, QPalette::Highlight)); + p.setColor(QPalette::Inactive, QPalette::HighlightedText, + p.color(QPalette::Active, QPalette::HighlightedText)); + qApp->setPalette(p); + } +#else + Q_UNUSED(event); +#endif +} + void FindWidget::updateButtons() { if (editFind->text().isEmpty()) { @@ -245,12 +274,14 @@ CentralWidget::CentralWidget(QHelpEngine *engine, MainWindow *parent) SLOT(showTabBarContextMenu(QPoint))); } - QPalette p = qApp->palette(); +#if defined(QT_NO_WEBKIT) + QPalette p = palette(); p.setColor(QPalette::Inactive, QPalette::Highlight, p.color(QPalette::Active, QPalette::Highlight)); p.setColor(QPalette::Inactive, QPalette::HighlightedText, p.color(QPalette::Active, QPalette::HighlightedText)); - qApp->setPalette(p); + setPalette(p); +#endif } CentralWidget::~CentralWidget() diff --git a/tools/assistant/tools/assistant/centralwidget.h b/tools/assistant/tools/assistant/centralwidget.h index 1342a75..d59dbe5 100644 --- a/tools/assistant/tools/assistant/centralwidget.h +++ b/tools/assistant/tools/assistant/centralwidget.h @@ -80,6 +80,10 @@ signals: void findNext(); void findPrevious(); +protected: + void hideEvent(QHideEvent* event); + void showEvent(QShowEvent * event); + private slots: void updateButtons(); @@ -95,6 +99,7 @@ private: QToolButton *toolPrevious; QCheckBox *checkWholeWords; + QPalette appPalette; friend class CentralWidget; }; -- cgit v0.12 From f61056a556259c12a6de23f12756e45737345111 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 26 May 2009 16:08:59 +0200 Subject: Doc: Updated the list of tools to include makeqpf and qvfb. Reviewed-by: Marcel Schuette --- doc/src/emb-fonts.qdoc | 2 +- doc/src/emb-makeqpf.qdoc | 9 ++++++--- doc/src/tools-list.qdoc | 6 ++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/doc/src/emb-fonts.qdoc b/doc/src/emb-fonts.qdoc index 3ed23c3..86e169d 100644 --- a/doc/src/emb-fonts.qdoc +++ b/doc/src/emb-fonts.qdoc @@ -131,7 +131,7 @@ The Qt Prerendered Font (QPF2) is an architecture-independent, light-weight and non-scalable font format specific to \l{Qt for Embedded Linux}. - Nokia provides the cross-platform \c makeqpf tool, included in the + Nokia provides the cross-platform \l makeqpf tool, included in the \c tools directory of both \l {Qt} and \l{Qt for Embedded Linux}, which allows generation of QPF2 files from system fonts. diff --git a/doc/src/emb-makeqpf.qdoc b/doc/src/emb-makeqpf.qdoc index ca33eda..8f5d10b 100644 --- a/doc/src/emb-makeqpf.qdoc +++ b/doc/src/emb-makeqpf.qdoc @@ -44,7 +44,10 @@ \title makeqpf \ingroup qt-embedded-linux - \c makeqpf is not part of Qt 4. However, Qt 4 can still read QPF - files generated by Qt 2 or 3. To generate QPF files, use makeqpf from Qt 2 - or 3. + \c makeqpf is a tool to generate pre-rendered fonts in QPF2 format for use on Embedded Linux. + + Qt 4 can read files in QPF2 format in addition to QPF files generated by older versions of + \c makeqpf from Qt 2 or 3. + + \sa {Qt for Embedded Linux Fonts} */ diff --git a/doc/src/tools-list.qdoc b/doc/src/tools-list.qdoc index 7af9936..caef268 100644 --- a/doc/src/tools-list.qdoc +++ b/doc/src/tools-list.qdoc @@ -58,12 +58,10 @@ \o Translate applications to reach international markets. \row \o \l{qmake Manual}{qmake} \o Create makefiles from simple platform-independent project files (\c .pro files). - \omit - \row \o \l{emb-qvfb.html}{qvfb} + \row \o \l{The Virtual Framebuffer}{qvfb} \o Run and test embedded applications on the desktop. - \row \o \l{emb-makeqpf.html}{makeqpf} + \row \o \l{makeqpf} \o Create pre-rendered fonts for embedded devices. - \endomit \row \o \l{moc}{Meta-Object Compiler (moc)} \o Generate meta-object information for QObject subclasses. \row \o \l{User Interface Compiler (uic)} -- cgit v0.12 From bcd23411c8e22e15b863212a544bd64b78fe04b9 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Tue, 26 May 2009 17:13:57 +0200 Subject: some cleanups on private exported symbols --- src/gui/accessible/qaccessiblewidget.cpp | 19 +------------------ src/gui/image/qpixmapdatafactory_p.h | 2 +- src/gui/kernel/qapplication_win.cpp | 2 +- src/gui/kernel/qdnd_p.h | 2 +- src/gui/kernel/qkeysequence.cpp | 2 +- src/gui/painting/qgraphicssystemfactory_p.h | 2 +- src/gui/painting/qgraphicssystemplugin_p.h | 2 +- src/gui/text/qfontengine.cpp | 6 ------ src/gui/text/qfontengine_p.h | 6 ++++-- src/gui/text/qtextcontrol_p.h | 2 +- src/gui/text/qtextimagehandler_p.h | 4 ++-- src/opengl/qpaintengine_opengl.cpp | 1 - src/qt3support/other/q3dragobject.cpp | 5 ----- 13 files changed, 14 insertions(+), 41 deletions(-) diff --git a/src/gui/accessible/qaccessiblewidget.cpp b/src/gui/accessible/qaccessiblewidget.cpp index 753ac57..1c2fcef 100644 --- a/src/gui/accessible/qaccessiblewidget.cpp +++ b/src/gui/accessible/qaccessiblewidget.cpp @@ -102,24 +102,7 @@ static QString buddyString(const QWidget *widget) QString Q_GUI_EXPORT qt_accStripAmp(const QString &text) { - if (text.isEmpty()) - return text; - - const QChar *ch = text.unicode(); - int length = text.length(); - QString str; - while (length > 0) { - if (*ch == QLatin1Char('&')) { - ++ch; - --length; - if (!ch) - --ch; - } - str += *ch; - ++ch; - --length; - } - return str; + return QString(text).remove(QLatin1Char('&')); } QString Q_GUI_EXPORT qt_accHotKey(const QString &text) diff --git a/src/gui/image/qpixmapdatafactory_p.h b/src/gui/image/qpixmapdatafactory_p.h index 65e3f11..9604346 100644 --- a/src/gui/image/qpixmapdatafactory_p.h +++ b/src/gui/image/qpixmapdatafactory_p.h @@ -65,7 +65,7 @@ QT_MODULE(Gui) class QPixmapData; -class Q_GUI_EXPORT QPixmapDataFactory +class QPixmapDataFactory { public: static QPixmapDataFactory* instance(int screen = 0); diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index 77625de..f264d12 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -1106,7 +1106,7 @@ void qWinRequestConfig(WId id, int req, int x, int y, int w, int h) configRequests->append(r); // store request in queue } -Q_GUI_EXPORT void qWinProcessConfigRequests() // perform requests in queue +static void qWinProcessConfigRequests() // perform requests in queue { if (!configRequests) return; diff --git a/src/gui/kernel/qdnd_p.h b/src/gui/kernel/qdnd_p.h index 7a0cb7a..9871658 100644 --- a/src/gui/kernel/qdnd_p.h +++ b/src/gui/kernel/qdnd_p.h @@ -202,7 +202,7 @@ public: #endif }; -class Q_GUI_EXPORT QDragManager: public QObject { +class QDragManager: public QObject { Q_OBJECT QDragManager(); diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp index d1cb572..21f8859 100644 --- a/src/gui/kernel/qkeysequence.cpp +++ b/src/gui/kernel/qkeysequence.cpp @@ -145,7 +145,7 @@ static int qtkeyForMacSymbol(const QChar ch) #else static bool qt_sequence_no_mnemonics = false; #endif -void Q_GUI_EXPORT qt_set_sequence_auto_mnemonic(bool b) { qt_sequence_no_mnemonics = !b; } +void Q_AUTOTEST_EXPORT qt_set_sequence_auto_mnemonic(bool b) { qt_sequence_no_mnemonics = !b; } /*! \class QKeySequence diff --git a/src/gui/painting/qgraphicssystemfactory_p.h b/src/gui/painting/qgraphicssystemfactory_p.h index 9e95324..523b908 100644 --- a/src/gui/painting/qgraphicssystemfactory_p.h +++ b/src/gui/painting/qgraphicssystemfactory_p.h @@ -63,7 +63,7 @@ QT_MODULE(Gui) class QGraphicsSystem; -class Q_GUI_EXPORT QGraphicsSystemFactory +class QGraphicsSystemFactory { public: static QStringList keys(); diff --git a/src/gui/painting/qgraphicssystemplugin_p.h b/src/gui/painting/qgraphicssystemplugin_p.h index 2e70333..ea7aa2d 100644 --- a/src/gui/painting/qgraphicssystemplugin_p.h +++ b/src/gui/painting/qgraphicssystemplugin_p.h @@ -64,7 +64,7 @@ QT_MODULE(Gui) class QGraphicsSystem; -struct Q_GUI_EXPORT QGraphicsSystemFactoryInterface : public QFactoryInterface +struct QGraphicsSystemFactoryInterface : public QFactoryInterface { virtual QGraphicsSystem *create(const QString &key) = 0; }; diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index 97cb1ed..6e8adcf 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -1646,12 +1646,6 @@ bool QFontEngineMulti::canRender(const QChar *string, int len) return allExist; } -QFontEngine *QFontEngineMulti::engine(int at) const -{ - Q_ASSERT(at < engines.size()); - return engines.at(at); -} - QImage QFontEngineMulti::alphaMapForGlyph(glyph_t) { Q_ASSERT(false); diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h index 92efb6c..0f8d81c 100644 --- a/src/gui/text/qfontengine_p.h +++ b/src/gui/text/qfontengine_p.h @@ -353,7 +353,7 @@ private: int _size; }; -class Q_GUI_EXPORT QFontEngineMulti : public QFontEngine +class QFontEngineMulti : public QFontEngine { public: explicit QFontEngineMulti(int engineCount); @@ -389,7 +389,9 @@ public: inline virtual const char *name() const { return "Multi"; } - QFontEngine *engine(int at) const; + QFontEngine *engine(int at) const + {Q_ASSERT(at < engines.size()); return engines.at(at); } + protected: friend class QPSPrintEnginePrivate; diff --git a/src/gui/text/qtextcontrol_p.h b/src/gui/text/qtextcontrol_p.h index e50540a..4dac4f7 100644 --- a/src/gui/text/qtextcontrol_p.h +++ b/src/gui/text/qtextcontrol_p.h @@ -83,7 +83,7 @@ class QAbstractScrollArea; class QEvent; class QTimerEvent; -class Q_GUI_EXPORT QTextControl : public QObject +class Q_AUTOTEST_EXPORT QTextControl : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(QTextControl) diff --git a/src/gui/text/qtextimagehandler_p.h b/src/gui/text/qtextimagehandler_p.h index f5426b5..1f29642 100644 --- a/src/gui/text/qtextimagehandler_p.h +++ b/src/gui/text/qtextimagehandler_p.h @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE class QTextImageFormat; -class Q_GUI_EXPORT QTextImageHandler : public QObject, +class QTextImageHandler : public QObject, public QTextObjectInterface { Q_OBJECT @@ -72,7 +72,7 @@ public: virtual void drawObject(QPainter *p, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format); typedef QImage (*ExternalImageLoaderFunction)(const QString &name, const QString &context); - static ExternalImageLoaderFunction externalLoader; + static Q_GUI_EXPORT ExternalImageLoaderFunction externalLoader; //this is needed by Qt3Support }; QT_END_NAMESPACE diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp index 6f7078a..d98cd7c 100644 --- a/src/opengl/qpaintengine_opengl.cpp +++ b/src/opengl/qpaintengine_opengl.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ -#include #include #include #include diff --git a/src/qt3support/other/q3dragobject.cpp b/src/qt3support/other/q3dragobject.cpp index fb57220..50b75a4 100644 --- a/src/qt3support/other/q3dragobject.cpp +++ b/src/qt3support/other/q3dragobject.cpp @@ -208,11 +208,6 @@ void Q3DragObject::setPixmap(QPixmap pm, const QPoint& hotspot) Q_D(Q3DragObject); d->pixmap = pm; d->hot = hotspot; -#if 0 - QDragManager *manager = QDragManager::self(); - if (manager && manager->object == d->data) - manager->updatePixmap(); -#endif } /*! -- cgit v0.12 From 702a50367b13a137a9a87b499e4ab397be61383a Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Tue, 26 May 2009 16:26:33 +0200 Subject: doc update no more warnings while generating the docs --- src/gui/graphicsview/qgraphicsitem.cpp | 176 ++++++++++++++++++++++++------- src/gui/graphicsview/qgraphicswidget.cpp | 50 ++++++++- 2 files changed, 186 insertions(+), 40 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 0398fac..58b01cb 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -130,7 +130,7 @@ \img graphicsview-parentchild.png - \section Transformation + \section1 Transformation QGraphicsItem supports affine transformations in addition to its base position, pos(). To change the item's transformation, you can either pass @@ -166,7 +166,7 @@ .shear(horizontalShear, verticalShear).scale(xScale, yScale).translate(-xOrigin, -yOrigin); \endcode - \section Painting + \section1 Painting The paint() function is called by QGraphicsView to paint the item's contents. The item has no background or default fill of its own; whatever @@ -183,7 +183,7 @@ high z-values. Stacking order applies to sibling items; parents are always drawn before their children. - \section Events + \section1 Events QGraphicsItem receives events from QGraphicsScene through the virtual function sceneEvent(). This function distributes the most common events @@ -210,7 +210,7 @@ by the virtual function sceneEventFilter(). You can remove item event filters by calling removeSceneEventFilter(). - \section Custom Data + \section1 Custom Data Sometimes it's useful to register custom data with an item, be it a custom item, or a standard item. You can call setData() on any item to store data @@ -2614,24 +2614,32 @@ QTransform QGraphicsItem::transform() const } /*! - \property QGraphicsItem::xRotation - \since 4.6 - This property holds the rotation angle in degrees around the X axis + Returns the rotation around the X axis. The default is 0 \warning setting this property is conflicting with calling setTransform. If a transform has been set, this function return the default value. - \sa {Transformations} + \sa setXRotation(), {Transformations} */ qreal QGraphicsItem::xRotation() const { return d_ptr->decomposedTransform()->xRotation; } +/*! + \since 4.6 + + Sets the rotation around the X axis to \a angle degrees. + + \warning setting this property is conflicting with calling setTransform. + If a transform has been set, it will be overwritten. + + \sa xRotation(), {Transformations} +*/ void QGraphicsItem::setXRotation(qreal angle) { if (!d_ptr->dirtyTransform) { @@ -2647,24 +2655,32 @@ void QGraphicsItem::setXRotation(qreal angle) } /*! - \property QGraphicsItem::yRotation - \since 4.6 - This property holds the rotation angle in degrees around the Y axis + Returns the rotation around the Y axis. The default is 0 \warning setting this property is conflicting with calling setTransform. If a transform has been set, this function return the default value. - \sa {Transformations} + \sa setYRotation(), {Transformations} */ qreal QGraphicsItem::yRotation() const { return d_ptr->decomposedTransform()->yRotation; } +/*! + \since 4.6 + + Sets the rotation around the Y axis to \a angle degrees. + + \warning setting this property is conflicting with calling setTransform. + If a transform has been set, it will be overwritten. + + \sa yRotation(), {Transformations} +*/ void QGraphicsItem::setYRotation(qreal angle) { if (!d_ptr->dirtyTransform) { @@ -2680,24 +2696,32 @@ void QGraphicsItem::setYRotation(qreal angle) } /*! - \property QGraphicsItem::zRotation - \since 4.6 - This property holds the rotation angle in degrees around the Z axis + Returns the rotation around the Z axis. The default is 0 \warning setting this property is conflicting with calling setTransform. If a transform has been set, this function return the default value. - \sa {Transformations} + \sa setZRotation(), {Transformations} */ qreal QGraphicsItem::zRotation() const { return d_ptr->decomposedTransform()->zRotation; } +/*! + \since 4.6 + + Sets the rotation around the Z axis to \a angle degrees. + + \warning setting this property is conflicting with calling setTransform. + If a transform has been set, it will be overwritten. + + \sa zRotation(), {Transformations} +*/ void QGraphicsItem::setZRotation(qreal angle) { if (!d_ptr->dirtyTransform) { @@ -2712,6 +2736,14 @@ void QGraphicsItem::setZRotation(qreal angle) d_ptr->hasTransform = 1; } +/*! + \since 4.6 + + This convenience function set the rotation angles around the 3 axes + to \a x, \a y and \a z. + + \sa setXRotation(), setYRotation(), setZRotation() +*/ void QGraphicsItem::setRotation(qreal x, qreal y, qreal z) { setXRotation(x); @@ -2720,24 +2752,32 @@ void QGraphicsItem::setRotation(qreal x, qreal y, qreal z) } /*! - \property QGraphicsItem::xScale - \since 4.6 - This property holds the scale factor on the X axis. + Returns the scale factor on the X axis. The default is 1 \warning setting this property is conflicting with calling setTransform. If a transform has been set, this function return the default value. - \sa {Transformations} + \sa setXScale(), {Transformations} */ qreal QGraphicsItem::xScale() const { return d_ptr->decomposedTransform()->xScale; } +/*! + \since 4.6 + + Sets the scale factor on the X axis to \a factor. + + \warning setting this property is conflicting with calling setTransform. + If a transform has been set, it will be overwritten. + + \sa xScale(), {Transformations} +*/ void QGraphicsItem::setXScale(qreal factor) { if (!d_ptr->dirtyTransform) { @@ -2753,24 +2793,32 @@ void QGraphicsItem::setXScale(qreal factor) } /*! - \property QGraphicsItem::yScale - \since 4.6 - This property holds the scale factor on the Y axis. + Returns the scale factor on the Y axis. The default is 1 \warning setting this property is conflicting with calling setTransform. If a transform has been set, this function return the default value. - \sa {Transformations} + \sa setYScale(), {Transformations} */ qreal QGraphicsItem::yScale() const { return d_ptr->decomposedTransform()->yScale; } +/*! + \since 4.6 + + Sets the scale factor on the Y axis to \a factor. + + \warning setting this property is conflicting with calling setTransform. + If a transform has been set, it will be overwritten. + + \sa yScale(), {Transformations} +*/ void QGraphicsItem::setYScale(qreal factor) { if (!d_ptr->dirtyTransform) { @@ -2785,6 +2833,13 @@ void QGraphicsItem::setYScale(qreal factor) d_ptr->hasTransform = 1; } +/*! + \since 4.6 + + This convenience function set the scaling factors on X and Y axis to \a sx and \a sy. + + \sa setXScale(), setYScale() +*/ void QGraphicsItem::setScale(qreal sx, qreal sy) { setXScale(sx); @@ -2792,24 +2847,32 @@ void QGraphicsItem::setScale(qreal sx, qreal sy) } /*! - \property QGraphicsItem::horizontalShear - \since 4.6 - This property holds the horizontal shear. + Returns the horizontal shear. - The default is 0. + The default is 0 \warning setting this property is conflicting with calling setTransform. If a transform has been set, this function return the default value. - \sa {Transformations} + \sa setHorizontalShear(), {Transformations} */ qreal QGraphicsItem::horizontalShear() const { return d_ptr->decomposedTransform()->horizontalShear; } +/*! + \since 4.6 + + Sets the horizontal shear to \a shear. + + \warning setting this property is conflicting with calling setTransform. + If a transform has been set, it will be overwritten. + + \sa horizontalShear(), {Transformations} +*/ void QGraphicsItem::setHorizontalShear(qreal shear) { if (!d_ptr->dirtyTransform) { @@ -2825,24 +2888,32 @@ void QGraphicsItem::setHorizontalShear(qreal shear) } /*! - \property QGraphicsItem::verticalShear - \since 4.6 - This property holds the vertical shear. + Returns the vertical shear. - The default is 0. + The default is 0 \warning setting this property is conflicting with calling setTransform. If a transform has been set, this function return the default value. - \sa {Transformations} + \sa setHorizontalShear(), {Transformations} */ qreal QGraphicsItem::verticalShear() const { return d_ptr->decomposedTransform()->verticalShear; } +/*! + \since 4.6 + + Sets the vertical shear to \a shear. + + \warning setting this property is conflicting with calling setTransform. + If a transform has been set, it will be overwritten. + + \sa verticalShear(), {Transformations} +*/ void QGraphicsItem::setVerticalShear(qreal shear) { if (!d_ptr->dirtyTransform) { @@ -2857,6 +2928,13 @@ void QGraphicsItem::setVerticalShear(qreal shear) d_ptr->hasTransform = 1; } +/*! + \since 4.6 + + This convenience function sets the horizontal shear to \a sh and the vertical shear to \a sv. + + \sa setHorizontalShear(), setVerticalShear() +*/ void QGraphicsItem::setShear(qreal sh, qreal sv) { setHorizontalShear(sh); @@ -2864,19 +2942,16 @@ void QGraphicsItem::setShear(qreal sh, qreal sv) } /*! - \property QGraphicsItem::transformOrigin - \since 4.6 - This property holds the transformation origin for the transformation properties. - This does not apply to the transformation set by setTransform. + Returns the transformation origin for the transformation properties. The default is QPointF(0,0). \warning setting this property is conflicting with calling setTransform. If a transform has been set, this function return the default value. - \sa {Transformations} + \sa setTransformOrigin(), {Transformations} */ QPointF QGraphicsItem::transformOrigin() const { @@ -2884,6 +2959,29 @@ QPointF QGraphicsItem::transformOrigin() const return QPointF(decomposed->xOrigin, decomposed->yOrigin); } +/*! + \fn inline void setTransformOrigin(qreal x, qreal y) + + \since 4.6 + + This is an overloaded member function, provided for convenience. + Sets the transformation origin for the transformation + properties to the point(\a x, \a y). + + \sa setTransformOrigin(), {Transformations} +*/ + +/*! + \since 4.6 + + Sets the transformation origin for the transformation properties to \a origin. + This does not apply to the transformation set by setTransform. + + \warning setting this property is conflicting with calling setTransform. + If a transform has been set, it will be overwritten. + + \sa transformOrigin(), {Transformations} +*/ void QGraphicsItem::setTransformOrigin(const QPointF &origin) { if (!d_ptr->dirtyTransform) { diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp index a2e55e1..341f9a2 100644 --- a/src/gui/graphicsview/qgraphicswidget.cpp +++ b/src/gui/graphicsview/qgraphicswidget.cpp @@ -200,7 +200,55 @@ QT_BEGIN_NAMESPACE /*! \property QGraphicsWidget::pos \brief the position of the widget -*/ +*/ + +/*! + \property QGraphicsWidget::xRotation + \since 4.6 + \brief the rotation angle in degrees around the X axis +*/ + +/*! + \property QGraphicsWidget::yRotation + \since 4.6 + \brief the rotation angle in degrees around the Y axis +*/ + +/*! + \property QGraphicsWidget::zRotation + \since 4.6 + \brief the rotation angle in degrees around the Z axis +*/ + +/*! + \property QGraphicsWidget::xScale + \since 4.6 + \brief the scale factor on the X axis. +*/ + +/*! + \property QGraphicsWidget::yScale + \since 4.6 + \brief the scale factor on the Y axis. +*/ + +/*! + \property QGraphicsWidget::horizontalShear + \since 4.6 + \brief the horizontal shear. +*/ + +/*! + \property QGraphicsWidget::verticalShear + \since 4.6 + \brief the vertical shear. +*/ + +/*! + \property QGraphicsWidget::transformOrigin + \since 4.6 + \brief the transformation origin for the transformation properties. +*/ /*! Constructs a QGraphicsWidget instance. The optional \a parent argument is -- cgit v0.12 From 8bf5a6986db852525582713cc2f2a760df4fdc60 Mon Sep 17 00:00:00 2001 From: Alexis Menard Date: Tue, 26 May 2009 16:50:48 +0200 Subject: QFileDialog selection bug when calling it multiple times. The problem was that we don't clear the selection model if the previous selection was valid. Task-number:251341 Reviewed-by:jasplin --- src/gui/dialogs/qfiledialog.cpp | 11 +++++----- tests/auto/qfiledialog/tst_qfiledialog.cpp | 33 ++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp index eeb2743..d42775a 100644 --- a/src/gui/dialogs/qfiledialog.cpp +++ b/src/gui/dialogs/qfiledialog.cpp @@ -776,6 +776,7 @@ void QFileDialog::selectFile(const QString &filename) } QModelIndex index = d->model->index(filename); + QString file; if (!index.isValid()) { // save as dialog where we want to input a default value QString text = filename; @@ -790,13 +791,13 @@ void QFileDialog::selectFile(const QString &filename) ) text = text.remove(0,1); } - if (!isVisible() || !d->lineEdit()->hasFocus()) - d->lineEdit()->setText(text); + file = text; } else { - d->qFileDialogUi->listView->selectionModel()->clear(); - if (!isVisible() || !d->lineEdit()->hasFocus()) - d->lineEdit()->setText(index.data().toString()); + file = index.data().toString(); } + d->qFileDialogUi->listView->selectionModel()->clear(); + if (!isVisible() || !d->lineEdit()->hasFocus()) + d->lineEdit()->setText(file); } /** diff --git a/tests/auto/qfiledialog/tst_qfiledialog.cpp b/tests/auto/qfiledialog/tst_qfiledialog.cpp index 689f73d..16c84d8 100644 --- a/tests/auto/qfiledialog/tst_qfiledialog.cpp +++ b/tests/auto/qfiledialog/tst_qfiledialog.cpp @@ -159,6 +159,7 @@ private slots: void task218353_relativePaths(); void task251321_sideBarHiddenEntries(); void task251341_sideBarRemoveEntries(); + void task254490_selectFileMultipleTimes(); private: QByteArray userSettings; @@ -1981,5 +1982,37 @@ void tst_QFiledialog::task251341_sideBarRemoveEntries() current.rmdir("testDir"); } +void tst_QFiledialog::task254490_selectFileMultipleTimes() +{ + QString tempPath = QDir::tempPath(); + QTemporaryFile *t; + t = new QTemporaryFile; + t->open(); + QNonNativeFileDialog fd(0, "TestFileDialog"); + + fd.setDirectory(tempPath); + fd.setViewMode(QFileDialog::List); + fd.setAcceptMode(QFileDialog::AcceptSave); + fd.setFileMode(QFileDialog::AnyFile); + + //This should select the file in the QFileDialog + fd.selectFile(t->fileName()); + + //This should clear the selection and write it into the filename line edit + fd.selectFile("new_file.txt"); + + fd.show(); + QTest::qWait(250); + + QLineEdit *lineEdit = qFindChild(&fd, "fileNameEdit"); + QVERIFY(lineEdit); + QCOMPARE(lineEdit->text(),QLatin1String("new_file.txt")); + QListView *list = qFindChild(&fd, "listView"); + QVERIFY(list); + QCOMPARE(list->selectionModel()->selectedRows(0).count(), 0); + + t->deleteLater(); +} + QTEST_MAIN(tst_QFiledialog) #include "tst_qfiledialog.moc" -- cgit v0.12 From 639557d7e2df5fc1b3ffdc76188b3084c13a8fc3 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 26 May 2009 17:23:22 +0200 Subject: Fixed crash when encountering invalid forms. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Crash when replacing the QDockWidget contents widget by a widget using a container extension. Task-number: 254553 --- tools/designer/src/components/formeditor/formwindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/designer/src/components/formeditor/formwindow.cpp b/tools/designer/src/components/formeditor/formwindow.cpp index 07d785a..66bab9b 100644 --- a/tools/designer/src/components/formeditor/formwindow.cpp +++ b/tools/designer/src/components/formeditor/formwindow.cpp @@ -2136,7 +2136,10 @@ void FormWindow::layoutContainer(QWidget *w, int type) bool FormWindow::hasInsertedChildren(QWidget *widget) const // ### move { if (QDesignerContainerExtension *container = qt_extension(core()->extensionManager(), widget)) { - widget = container->widget(container->currentIndex()); + const int index = container->currentIndex(); + if (index < 0) + return false; + widget = container->widget(index); } const QWidgetList l = widgets(widget); -- cgit v0.12 From cfe54548131d78db9d58366e35e9b29e5d3ba238 Mon Sep 17 00:00:00 2001 From: Thomas Sondergaard Date: Fri, 22 May 2009 20:26:46 +0200 Subject: Updated danish translations. Added them to relevant project files. --- tools/assistant/translations/qt_help.pro | 3 +- tools/assistant/translations/translations.pro | 3 +- translations/assistant_da.ts | 606 ++++---- translations/qt_da.ts | 1978 +++++++++++++++++++++---- translations/qt_help_da.ts | 177 ++- translations/translations.pri | 2 +- 6 files changed, 2132 insertions(+), 637 deletions(-) diff --git a/tools/assistant/translations/qt_help.pro b/tools/assistant/translations/qt_help.pro index efad6bf..e6208a6 100644 --- a/tools/assistant/translations/qt_help.pro +++ b/tools/assistant/translations/qt_help.pro @@ -44,5 +44,6 @@ TRANSLATIONS=$$[QT_INSTALL_TRANSLATIONS]/qt_help_de.ts \ $$[QT_INSTALL_TRANSLATIONS]/qt_help_pl.ts \ $$[QT_INSTALL_TRANSLATIONS]/qt_help_untranslated.ts \ $$[QT_INSTALL_TRANSLATIONS]/qt_help_zh_CN.ts \ - $$[QT_INSTALL_TRANSLATIONS]/qt_help_zh_TW.ts + $$[QT_INSTALL_TRANSLATIONS]/qt_help_zh_TW.ts \ + $$[QT_INSTALL_TRANSLATIONS]/qt_help_da.ts error("This is a dummy profile to be used for translations ONLY.") diff --git a/tools/assistant/translations/translations.pro b/tools/assistant/translations/translations.pro index 58de554..8572123 100644 --- a/tools/assistant/translations/translations.pro +++ b/tools/assistant/translations/translations.pro @@ -45,4 +45,5 @@ TRANSLATIONS=$$[QT_INSTALL_TRANSLATIONS]/assistant_de.ts \ $$[QT_INSTALL_TRANSLATIONS]/assistant_pl.ts \ $$[QT_INSTALL_TRANSLATIONS]/assistant_untranslated.ts \ $$[QT_INSTALL_TRANSLATIONS]/assistant_zh_CN.ts \ - $$[QT_INSTALL_TRANSLATIONS]/assistant_zh_TW.ts + $$[QT_INSTALL_TRANSLATIONS]/assistant_zh_TW.ts \ + $$[QT_INSTALL_TRANSLATIONS]/assistant_da.ts diff --git a/translations/assistant_da.ts b/translations/assistant_da.ts index d039248..8d134fc 100644 --- a/translations/assistant_da.ts +++ b/translations/assistant_da.ts @@ -1,58 +1,77 @@ - AboutDialog - + &Close &Luk + AboutLabel + + + Warning + Advarsel + + + + Unable to launch external application. + + Kunne ikke starte ekstern applikation. + + + + + OK + + + + BookmarkDialog - - - - - + + + + + Bookmarks Favoritter - + Add Bookmark Føj til Favoritter - + Bookmark: Favorit: - + Add in Folder: Føj til mappen: - + + - + New Folder Ny mappe - + Delete Folder Slet mappe - + Rename Folder Omdøb mappe @@ -60,75 +79,79 @@ BookmarkManager - + Bookmarks Favoritter - + Remove Fjern + You are going to delete a Folder, this will also<br>remove it's content. Are you sure to continue? - Ved at slette denne mappe fjernes hele mappens<br>indhold. Ønsker du alligevel at slette? + Ved at slette denne mappe fjernes hele mappens<br>indhold. Ønsker du alligevel at slette? - - + + New Folder Ny mappe - You are about to delete a folder which means that its content<br>will also be removed. Do you want to continue? - Ved at slette denne mappe fjernes hele mappens indhold.<br>Ønsker du alligevel at slette? + Ved at slette denne mappe fjernes hele mappens indhold.<br>Ønsker du alligevel at slette? BookmarkWidget - + + Filter: + Filter: + + + Remove Fjern - + Delete Folder Slet mappe - + Rename Folder Omdøb mappe - + Show Bookmark Vis favorit - + Show Bookmark in New Tab Vis favorit på ny fane - + Delete Bookmark Slet favorit - + Rename Bookmark Omdøb favorit - Search for: - Søg efter: + Søg efter: - + Add Tilføj @@ -136,48 +159,48 @@ CentralWidget - + Add new page Tilføj ny side - + Close current page Luk nuværende side - + Print Document Udskriv dokument - - + + unknown ukendt - + Add New Page Tilføj ny side - + Close This Page Luk denne side - + Close Other Pages Luk de andre sider - + Add Bookmark for this Page... Føj denne side til Favoritter... - + Search Søg @@ -185,12 +208,12 @@ ContentWindow - + Open Link Åbn link - + Open Link in New Tab Åbn link på ny fane @@ -198,69 +221,77 @@ FilterNameDialogClass - FilterNameDialog - FilterNavnDialog + FilterNavnDialog - + Filter Name: Filternavn: + + + Add Filter Name + Tilføj filternavn + FindWidget - + + <img src=":/trolltech/assistant/images/wrap.png">&nbsp;Search wrapped + <img src=":/trolltech/assistant/images/wrap.png">&nbsp;Søgning gentaget fra start + + + Previous Forrige - + Next Næste - + Case Sensitive Der skelnes mellem store og små bogstaver - + Whole words Hele ord - <img src="%1">&nbsp;Search wrapped <img src=":/trolltech/assistant/images/wrap.png">&nbsp;Search wrapped - <img src="%1">&nbsp;Søgning startet forfra + <img src="%1">&nbsp;Søgning startet forfra FontPanel - + Font Skrifttype - + &Writing system &Skrivesystem - + &Family &Familie - + &Style &Stil - + &Point size &Punktstørrelse @@ -268,42 +299,41 @@ HelpViewer - + Help Hjælp - + OK - + <title>Error 404...</title><div align="center"><br><br><h1>The page could not be found</h1><br><h3>'%1'</h3></div> <title>Fejl 404...</title><div align="center"><br><br><h1>Siden blev ikke fundet</h1><br><h3>'%1'</h3></div> - + Copy &Link Location Kopiér &linkets placering - + Open Link in New Tab Ctrl+LMB Åbn link på ny fane Ctrl+LMB - + Open Link in New Tab Åbn link på ny fane - <b>Page not found:<p>%1.</p></b> - <b>Kunne ikke finde siden:<p>%1.</p></b> + <b>Kunne ikke finde siden:<p>%1.</p></b> - + Unable to launch external application. Kunne ikke starte ekstern applikation. @@ -313,17 +343,17 @@ IndexWindow - + &Look for: &Søg efter: - + Open Link Åbn link - + Open Link in New Tab Åbn link på ny fane @@ -331,99 +361,99 @@ InstallDialog - - + + Install Documentation Installér dokumentation - + Downloading documentation info... Downloader dokumentationsinformation... - + Download canceled. Download blev annulleret. - - - + + + Done. Færdig. - + The file %1 already exists. Do you want to overwrite it? Filen %1 findes allerede. Ønsker du at overskrive? - + Unable to save the file %1: %2. Kunne ikke gemme filen %1: %2. - + Downloading %1... Downloader %1... - - - + + + Download failed: %1. Download mislykkedes: %1. - + Documentation info file is corrupt! Dokumentationsinformationsfilen er ødelagt! - + Download failed: Downloaded file is corrupted. Download mislykkedes: Den downloadede fil er ødelagt. - + Installing documentation %1... Installerer dokumentation %1... - + Error while installing documentation: %1 Der opstod fejl under installation af dokumentation: %1 - + Available Documentation: Tilgængeligt dokumentation: - + Install Installér - + Cancel Annuller - + Close Luk - + Installation Path: Installationssti: - + ... @@ -431,60 +461,62 @@ MainWindow - - + + Index Indeks - - + + Contents Indhold - - + + Bookmarks Favoritter - - + Search Søg - - - + + + Qt Assistant - - + + Unfiltered Ufiltreret + Page Set&up... - Side&opsætning... + Side&opsætning... + Print Preview... - Vis udskrift... + Vis udskrift... + &Print... - &Udskriv... + &Udskriv... CTRL+P Ctrl+U - + New &Tab &Ny Fane @@ -493,7 +525,7 @@ Ctrl+N - + &Close Tab &Luk fane @@ -502,340 +534,326 @@ Ctrl+L - + &Quit &Afslut + CTRL+Q - Ctrl+A + Ctrl+A + &Copy selected Text - &Kopiér markeret tekst + &Kopiér markeret tekst Ctrl+C Ctrl+K - + &Find in Text... &Find i tekst... - - Ctrl+F - - - - + Find &Next Find N&æste - - F3 - - - - + Find &Previous Find fo&rrige - - Shift+F3 - - - - + Preferences... Indstillinger... - + Zoom &in Zoom &ind - - Ctrl++ - - - - + Zoom &out Zoom u&d - - Ctrl+- - - - - + Normal &Size Normal &størrelse - + Ctrl+0 - + + ALT+C + + + + + ALT+I + + + + + ALT+S + + + + &Home &Hjem - + Ctrl+Home - + &Back &Tilbage - + &Forward Fr&em + Sync with Table of Contents - Synkronisér med Indholdsfortegnelse + Synkronisér med Indholdsfortegnelse - + Next Page Næste side - + Ctrl+Alt+Right Ctrl+Alt+Højre - + Previous Page Forrige side - + Ctrl+Alt+Left Ctrl+Alt+Venstre - + Add Bookmark... Føj til Favoritter... - + About... Om... - + Navigation Toolbar Navigationsværktøjslinie - + Toolbars Værktøjslinier - + Filter Toolbar Filtrer værktøjslinie - + Filtered by: Filtreret efter: - + Address Toolbar Adresseværktøjslinie - + Address: Adresse: - + Could not find the associated content item. Det tilhørende indholdselement kunne ikke findes. - - Open Source Edition - - - - This version of Qt Assistant is part of the Qt Open Source Edition, for use in the development of Open Source applications. Qt is a comprehensive C++ framework for cross-platform application development. - Denne version af Qt Assistant er en del af Qt Open Source Edition til brug med henblik på udvikling af Open Source-applikationer. Qt er et omfattende C++ framework for cross-platform applikationsudvikling. + Denne version af Qt Assistant er en del af Qt Open Source Edition til brug med henblik på udvikling af Open Source-applikationer. Qt er et omfattende C++ framework for cross-platform applikationsudvikling. - This program is licensed to you under the terms of the Qt Commercial License Agreement. For details, see the file LICENSE that came with this software distribution. - Dette program er omfattet af Qt Commercial License Agreement. Se filen LICENCE, der var vedlagt denne software-distribution, for yderligere detaljer. + Dette program er omfattet af Qt Commercial License Agreement. Se filen LICENCE, der var vedlagt denne software-distribution, for yderligere detaljer. - + About %1 Om %1 - + Updating search index Opdaterer søgeindeks - + Looking for Qt Documentation... Søger efter Qt-dokumentation... - + &Window &Vindue - + Minimize Minimér - + Ctrl+M Ctrl+M - + Zoom - + &File &Filer - + &Edit &Redigér - + &View &Vis - + &Go &Gå til - + &Bookmarks F&avoritter - + &Help &Hjælp - - You need a commercial Qt license for development of proprietary (closed source) applications. Please see <a href="http://trolltech.com/company/about/businessmodel">http://trolltech.com/company/about/businessmodel</a> for an overview of Qt licensing. - - - + ALT+O - Alt+F + Alt+F + CTRL+D - Ctrl+Ø + Ctrl+Ø Ctrl+P Ctrl+U - Ctrl+T - Ctrl+N + Ctrl+N - Ctrl+W - Ctrl+L + Ctrl+L - Ctrl+Q - Ctrl+A + Ctrl+A - Alt+C - Alt+L - - - - Alt+I - + Alt+L - Alt+O - Alt+F - - - - Alt+S - + Alt+F - Ctrl+D - Ctrl+Ø + Ctrl+Ø PreferencesDialog - - - + + Add Documentation Tilføj dokumentation - + Qt Compressed Help Files (*.qch) Qt komprimeret hjælpefil (*.qch) - + The specified file is not a valid Qt Help File! Den anførte fil er ikke en gyldig Qt hjælpefil! - + The namespace %1 is already registered! Navnerummet %1 er allerede registreret! - + + Remove Documentation + Fjern dokumentation + + + + Some documents currently opened in Assistant reference the documentation you are attempting to remove. Removing the documentation will close those documents. + Nogle dokumenter der pt er åbne i Assistant refererer til den dokumentation du prøver at fjerne. Fjernelse af dokumentation vil resultere i lukning af disse dokumenter. + + + + Cancel + Annuller + + + + OK + + + + Use custom settings Benyt brugerdefineret opsætning @@ -843,158 +861,170 @@ PreferencesDialogClass - + Preferences Indstillinger - + Fonts Skrifttyper - + Font settings: Indstillinger for skrifttype: - + Browser - + Application Applikation - + Filters Filtre - + Filter: Filter: - + Attributes: Attributter: - + 1 - + Add Tilføj - - + Remove Fjern - + Documentation Dokumentation - + Registered Documentation: Registreret dokumentation: - + Add... Tilføj... - Network - Netværk + Netværk - Use Http Proxy - Benyt Http Proxy + Benyt Http Proxy - - Http Proxy: - + + Options + Indstillinger - - Port: - + + Homepage + Hjemmeside + + + + Current Page + Nuværende side + + + + Restore to default + Nulstil til default QObject - + The specified collection file does not exist! Den angivne hjælpesamling findes ikke! - + Missing collection file! Hjælpesamling mangler! - + Invalid URL! Ugyldig URL! - + Missing URL! URL mangler! - - - + + + Unknown widget: %1 Ukendt widget: %1 - - - + + + Missing widget! Widget mangler! - - + + The specified Qt help file does not exist! Den angivne Qt-hjælpefil findes ikke! - - + + Missing help file! Hjælpefilen mangler! - + + Missing filter argument! + Manglende filterargument! + + + Unknown option: %1 Ukendt parameter: %1 - - + + Qt Assistant - + Could not register documentation file %1 @@ -1007,12 +1037,12 @@ Reason: %2 - + Documentation successfully registered. Dokumentationen blev registreret. - + Could not unregister documentation file %1 @@ -1025,18 +1055,23 @@ Reason: %2 - + Documentation successfully unregistered. Dokumentationen blev afregistreret. - + + Cannot load sqlite database driver! + Kan ikke indlæse sqlite database-driver! + + + The specified collection file could not be read! Den angivne hjælpesamling kunne ikke læses! - - + + Bookmark Favorit @@ -1044,11 +1079,10 @@ Reason: QtDocInstaller - The file %1 could not be registered successfully! Reason: %2 - Filen %1 kunne ikke registreres! + Filen %1 kunne ikke registreres! Årsag: %2 @@ -1056,12 +1090,12 @@ Reason: %2 RemoteControl - + Debugging Remote Control - + Received Command: %1 %2 Modtaget kommando: %1 %2 @@ -1069,56 +1103,54 @@ Reason: %2 SearchWidget - + &Copy &Kopiér - + Copy &Link Location Kopiér &linkets placering - - + Open Link in New Tab Åbn link på ny fane - + Select All Markér alt - Open Link - Åbn link + Åbn link TopicChooser - + Choose a topic for <b>%1</b>: Vælg et emne for <b>%1</b>: - + Choose Topic Vælg emne - + &Topics &Emner - + &Display &Vis - + &Close &Luk diff --git a/translations/qt_da.ts b/translations/qt_da.ts index 9350687..105b572 100644 --- a/translations/qt_da.ts +++ b/translations/qt_da.ts @@ -4,15 +4,17 @@ AudioOutput - + <html>The audio playback device <b>%1</b> does not work.<br/>Falling back to <b>%2</b>.</html> <html>Audio-playback-enheden<b>%1</b> virker ikke.<br/>Falder tilbage til <b>%2</b>.</html> + <html>Switching to the audio playback device <b>%1</b><br/>which just became available and has higher preference.</html> - <html>Skifter til audio-playback-enheden, <b>%1</b><br/>der lige er blevet tilgængeligt og har en højere præference.</html> + <html>Skifter til audio-playback-enheden, <b>%1</b><br/>der lige er blevet tilgængelig og har en højere præference.</html> + Revert back to device '%1' Gå tilbage til enheden '%1' @@ -20,7 +22,7 @@ CloseButton - + Close Tab Luk fane @@ -28,27 +30,32 @@ Phonon:: - + Notifications Meddelelser + Music Musik + Video + Communication Kommunikation + Games Spil + Accessibility Tilgængelighed @@ -56,13 +63,14 @@ Phonon::Gstreamer::Backend - + Warning: You do not seem to have the package gstreamer0.10-plugins-good installed. Some video features have been disabled. Advarsel: Det ser ikke ud til, at gstreamer0.10-plugins-good pakken er installeret. Nogle videofunktioner er deaktiveret. + Warning: You do not seem to have the base GStreamer plugins installed. All audio and video support has been disabled Advarsel: Det ser ikke ud til, at base GStreamer plugins er installeret. @@ -72,7 +80,7 @@ Phonon::Gstreamer::MediaObject - + Cannot start playback. Check your Gstreamer installation and make sure you @@ -83,26 +91,39 @@ Tjek Gstreamer-installationen og kontrollér, at libgstreamer-plugins-base er installeret. + A required codec is missing. You need to install the following codec(s) to play this content: %0 Der mangler et codec. Følgende codecs skal installeres for at afspille dette indhold: %0 + + + + + + + + Could not open media source. Kunne ikke åbne mediekilden. + Invalid source type. Ugyldig kilde. + Could not locate media source. Kunne ikke lokalisere mediekilden. + Could not open audio device. The device is already in use. Kunne ikke åbne lydenheden. Enheden er allerede i brug. + Could not decode media source. Kunne ikke afkode mediekilden. @@ -110,10 +131,15 @@ libgstreamer-plugins-base er installeret. Phonon::VolumeSlider + + Volume: %1% + + + Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1% Anvend denne skyder til at indstille lydstyrken. Længst til venstre er 0% og længst til højre er %1% @@ -121,11 +147,12 @@ libgstreamer-plugins-base er installeret. Q3Accel - + %1, %2 not defined %1, %2 ikke definerede + Ambiguous %1 not handled Tvetydig %1 ikke behandlet @@ -133,23 +160,27 @@ libgstreamer-plugins-base er installeret. Q3DataTable - + True Sandt + False Falsk + Insert Indsæt + Update Opdater + Delete Slet @@ -157,242 +188,313 @@ libgstreamer-plugins-base er installeret. Q3FileDialog - + Copy or Move a File Kopiér eller flyt en fil + Read: %1 Læs: %1 + + Write: %1 Skriv: %1 + + Cancel Annuller - + + + + All Files (*) Alle filer (*) + Name Navn + Size Størrelse + Type + Date Dato + Attributes Attributter + + &OK &OK + Look &in: Kig &i: + + + File &name: Fil&navn: + File &type: Fil&type: + Back Tilbage + One directory up En mappe op + Create New Folder Opret ny folder + List View Listevisning + Detail View Detaljevisning + Preview File Info Vis filinformation + Preview File Contents Vis filindhold + Read-write Læs-skriv + Read-only Skrivebeskyttet + Write-only Write-only + Inaccessible Utilgængelig + Symlink to File Symlink til Fil + Symlink to Directory Symlink til katalog + Symlink to Special Symlink til Speciel + File Fil + Dir Katalog + Special Speciel - + + + Open Åbn - + + Save As Gem som + + + &Open &Åbn + + &Save &Gem + &Rename &Omdøb + &Delete &Slet + R&eload Gen&indlæs + Sort by &Name Sortér efter n&avn + Sort by &Size Sortér efter s&tørrelse + Sort by &Date Sortér efter &dato + &Unsorted &Usorteret + Sort Sortér + Show &hidden files Vis s&kjulte filer + the file filen + the directory kataloget + the symlink symlinket + Delete %1 Slet %1 + <qt>Are you sure you wish to delete %1 "%2"?</qt> <qt>Er du sikker på, at du vil slette %1 "%2"?</qt> + &Yes &Ja + &No &Nej + New Folder 1 Ny folder 1 + New Folder Ny folder + New Folder %1 Ny folder %1 + Find Directory Find katalog + + Directories Kataloger + Directory: Katalog: + + Error Fejl + %1 File not found. Check path and filename. @@ -401,14 +503,17 @@ Filen blev ikke fundet. Kontrollér sti og filnavn. + All Files (*.*) Alle filer (*.*) + Open Åbn + Select a Directory Vælg et katalog @@ -416,24 +521,29 @@ Kontrollér sti og filnavn. Q3LocalFs + + Could not read directory %1 Kunne ikke læse katalog %1 + Could not create directory %1 Kunne ikke oprette katalog %1 + Could not remove file or directory %1 Kunne ikke fjerne fil eller katalog %1 + Could not rename %1 to @@ -444,12 +554,14 @@ to %2 + Could not open %1 Kunne ikke åbne %1 + Could not write %1 Kunne ikke skrive @@ -459,11 +571,12 @@ to Q3MainWindow - + Line up Linie op + Customize... Tilpas... @@ -471,7 +584,7 @@ to Q3NetworkProtocol - + Operation stopped by the user Brugeren stoppede handlingen @@ -479,6 +592,8 @@ to Q3ProgressDialog + + Cancel Annuller @@ -486,22 +601,28 @@ to Q3TabDialog + + OK + Apply Udfør + Help Hjælp + Defaults Standarder + Cancel Annuller @@ -509,31 +630,38 @@ to Q3TextEdit - + &Undo &Fortryd + &Redo &Gendan + Cu&t &Klip + &Copy K&opiér + &Paste &Sæt ind + Clear Ryd + + Select All Markér alt @@ -541,55 +669,67 @@ to Q3TitleBar - + System + Restore up Gendan op + Minimize Minimer + Restore down Gendan ned + Maximize Maksimér + Close Luk + Contains commands to manipulate the window Indeholder kommandoer til indstilling af vinduet + Puts a minimized back to normal Sætter et minimeret vindue til normal størrelse + Moves the window out of the way Flytter vinduet væk + Puts a maximized window back to normal Sætter et maksimeret vindue til normal størrelse + Makes the window full screen Gør vinduet til fuld skærm + Closes the window Lukker vinduet + Displays the name of the window and contains controls to manipulate it Viser vinduets navn og indeholder kontroller til indstilling af vinduet @@ -597,7 +737,7 @@ to Q3ToolBar - + More... Mere... @@ -605,38 +745,51 @@ to Q3UrlOperator + + + The protocol `%1' is not supported Protokollen '%1' understøttes ikke + The protocol `%1' does not support listing directories Protokollen '%1' understøtter ikke opremsning af kataloger + The protocol `%1' does not support creating new directories Protokollen '%1' understøtter ikke oprettelse af nye kataloger + The protocol `%1' does not support removing files or directories Protokollen '%1' understøtter ikke, at filer eller kataloger fjernes + The protocol `%1' does not support renaming files or directories Protokollen '%1' understøtter ikke, at filer eller kataloger omdøbes + The protocol `%1' does not support getting files Protokollen '%1' understøtter ikke hentning af filer + The protocol `%1' does not support putting files Protokollen '%1' understøtter ikke upload af filer + + The protocol `%1' does not support copying or moving files or directories Protokollen '%1' understøtter ikke kopiering eller flytning af filer eller kataloger + + (unknown) (ukendt) @@ -644,23 +797,27 @@ to Q3Wizard - + &Cancel &Annuller + < &Back < &Tilbage + &Next > &Næste > + &Finish &Udfør + &Help &Hjælp @@ -668,31 +825,44 @@ to QAbstractSocket + + + + Host not found Host blev ikke fundet - + + + Connection refused Forbindelse afvist + Connection timed out Forbindelsen timed out + + + Operation on socket is not supported Socket-operation ikke understøttet + Socket operation timed out Socket-operation timed out + Socket is not connected Socket ikke forbundet + Network unreachable Netværket er ikke tilgængeligt @@ -700,15 +870,17 @@ to QAbstractSpinBox - + &Step up &Trin op + Step &down Trin &ned + &Select All &Vælg alle @@ -716,27 +888,28 @@ to QApplication - + Activate Aktivér - + Executable '%1' requires Qt %2, found Qt %3. Eksekverbar '%1' kræver Qt %2, ikke fundet Qt %3. + Incompatible Qt Library Error Inkompatibel Qt Library fejl - + 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. - + Activates the program's main window Aktiverer programmets hovedvindue @@ -744,18 +917,22 @@ to QAxSelect + Select ActiveX Control Vælg ActiveX-kontrol + OK + &Cancel &Annuller + COM &Object: COM &Objekt: @@ -763,15 +940,17 @@ to QCheckBox - + Uncheck Fjern markering + Check Kryds af + Toggle Slå til/fra @@ -779,47 +958,57 @@ to QColorDialog - + Hu&e: Ton&e: + &Sat: &Mæt: + &Val: &Vær: + &Red: &Rød: + &Green: &Grøn: + Bl&ue: Bl&å: + A&lpha channel: Al&fa-kanal: + Select Color Vælg farve + &Basic colors &Basisfarver + &Custom colors &Egne farver + &Add to Custom Colors &Føj til egne farver @@ -827,20 +1016,23 @@ to QComboBox + + Open Åbn - + False Falsk + True Sandt - + Close Luk @@ -848,17 +1040,19 @@ to QCoreApplication - + %1: key is empty QSystemSemaphore %1: nøgle er tom + %1: unable to make key QSystemSemaphore %1: kunne ikke lave nøgle + %1: ftok failed QSystemSemaphore %1: ftok mislykkedes @@ -867,19 +1061,22 @@ to QDB2Driver - + Unable to connect Kunne ikke skabe forbindelse + Unable to commit transaction Kunne ikke gennemføre transaktion + Unable to rollback transaction Kunne ikke tilbagetrække transaktion + Unable to set autocommit Kunne ikke aktivere autocommit @@ -887,26 +1084,33 @@ to QDB2Result + + Unable to execute statement Kunne ikke udføre statement + Unable to prepare statement Kunne ikke forberede udsagn + Unable to bind variable Kunne ikke binde variabel + Unable to fetch record %1 Kunne ikke hente post %1 + Unable to fetch next Kunne ikke hente næste + Unable to fetch first Kunne ikke hente første @@ -914,19 +1118,22 @@ to QDateTimeEdit - + AM + am + PM + pm @@ -934,15 +1141,17 @@ to QDial - + QDial + SpeedoMeter Speedometer + SliderHandle @@ -950,11 +1159,12 @@ to QDialog - + What's This? Hvad er dette? + Done Udført @@ -962,100 +1172,124 @@ to QDialogButtonBox - + + + OK - + &OK + &Save &Gem + Save Gem + Open Åbn + &Cancel &Annuller + Cancel Annuller + &Close &Luk + Close Luk + Apply Udfør + Reset Nulstil + Help Hjælp + Don't Save Gem ikke + Discard Kassér + &Yes &Ja + Yes to &All Ja til &alle + &No &Nej + N&o to All Ne&j til alle + Save All Gem alle + Abort Afbryd + Retry Prøv igen + Ignore Ignorer + Restore Defaults Gendan standardværdier + Close without Saving Luk uden at gemme @@ -1063,25 +1297,29 @@ to QDirModel - + Name Navn + Size Størrelse + Kind Match OS X Finder Type + Type All other platforms + Date Modified Ændringsdato @@ -1089,15 +1327,17 @@ to QDockWidget - + Close Luk + Dock Låst + Float Flydende @@ -1105,10 +1345,12 @@ to QDoubleSpinBox + More Mere + Less Mindre @@ -1116,23 +1358,27 @@ to QErrorMessage - + Debug Message: Debug-besked: + Warning: Advarsel: + Fatal Error: Fatal fejl: + &Show this message again &Vis denne besked igen + &OK @@ -1140,22 +1386,33 @@ to QFile + + Destination file exists Destinationsfil findes + + Cannot remove source file + Kan ikke fjerne kildefil + + + Cannot open %1 for input Kan ikke åbne %1 til input + Cannot open for output Kan ikke åbne til output + Failure to write block Kunne ikke skrive blok + Cannot create %1 for output Kunne ikke oprette %1 til output @@ -1163,32 +1420,44 @@ to QFileDialog + + All Files (*) Alle filer (*) + Directories Kataloger + + + + &Open &Åbn + + &Save &Gem + Open Åbn + %1 already exists. Do you want to replace it? %1 findes allerede. Ønsker du at erstatte den? + %1 File not found. Please verify the correct file name was given. @@ -1197,47 +1466,64 @@ Filen kunne ikke findes. Kontrollér, at det rigtige filnavn er indtastet. - + My Computer Min computer + &Rename &Omdøb + &Delete &Slet + Show &hidden files Vis s&kjulte filer + + Back Tilbage + + Parent Directory Ovenliggende katalog + + List View Listevisning + + Detail View Detaljevisning + + Files of type: Filer af typen: + + Directory: Katalog: + + %1 Directory not found. Please verify the correct directory name was given. @@ -1246,84 +1532,105 @@ Katalog kunne ikke findes. Kontrollér, at det rigtige katalognavn er indtastet. + '%1' is write protected. Do you want to delete it anyway? '%1' er skrivebeskyttet. Ønsker du alligevel at slette? + Are sure you want to delete '%1'? Er du sikker på, at '%1' skal slettes? + Could not delete directory. Kunne ikke slette kataloget. + Recent Places Aktuelle steder - + All Files (*.*) Alle filer (*.*) + Save As Gem som - + Drive Drev + + File Fil + Unknown Ukendt + Find Directory Find katalog + Show Vis + + Forward Frem - + New Folder Ny folder + &New Folder &Ny folder + + &Choose &Vælg - + Remove Fjern + + File &name: &Filnavn: + + Look in: Søg i: + + Create New Folder Opret ny folder @@ -1331,62 +1638,74 @@ Do you want to delete it anyway? QFileSystemModel - + Invalid filename Ugyldigt filnavn + <b>The name "%1" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks. <b>Navnet, %1, kan ikke benyttes.</b><p>Brug et andet navn med færre tegn og ingen kommatering. + Name Navn + Size Størrelse + Kind Match OS X Finder Type + Type All other platforms + Date Modified Ændringsdato - + My Computer Min computer + Computer + %1 TB %1 TB + %1 GB %1 GB + %1 MB %1 MB + %1 KB %1 KB' + %1 bytes %1 bytes @@ -1394,166 +1713,216 @@ Do you want to delete it anyway? QFontDatabase + + Normal + + + Bold Fed + + Demi Bold + + + Black Sort + Demi + + Light Lys + + Italic Kursiv + + Oblique Skråt + Any Alle + Latin + Greek Græsk + Cyrillic Kyrillisk + Armenian Armensk + Hebrew Hebræisk + Arabic Arabisk + Syriac Syrisk + Thaana + Devanagari + Bengali Bengalsk + Gurmukhi + Gujarati + Oriya + Tamil + Telugu + Kannada + Malayalam + Sinhala + Thai Thailandsk + Lao + Tibetan Tibetansk + Myanmar + Georgian georgisk + Khmer + Simplified Chinese Forenklet kinesisk + Traditional Chinese Traditionelt kinesisk + Japanese Japansk + Korean Koreansk + Vietnamese Vietnamesisk + Symbol + Ogham + Runic @@ -1561,39 +1930,48 @@ Do you want to delete it anyway? QFontDialog - + &Font S&krifttype + Font st&yle S&til + &Size &Størrelse + Effects Effekter + Stri&keout &Overstreget + &Underline &Understreg + Sample Eksempel + Wr&iting System Skr&ivesystem + + Select Font Vælg skrifttype @@ -1601,116 +1979,145 @@ Do you want to delete it anyway? QFtp - + + Not connected Ingen forbindelse - + + Host %1 not found Vært %1 ikke fundet - + + Connection refused to host %1 Forbindelse til vært %1 afvist + Connection timed out to host %1 Forbindelsen timed out til host %1 + + + Connected to host %1 Tilsluttet vært %1 + + Connection refused for data connection Dataforbindelse afvist + + + + Unknown error Ukendt fejl - + + Connecting to host failed: %1 Forbindelse til vært mislykkedes: %1 - + + Login failed: %1 Login mislykkedes: %1 - + + Listing directory failed: %1 Opremsning af katalogindhold mislykkedes: %1 - + + Changing directory failed: %1 Ændring af katalog mislykkedes: %1 - + + Downloading file failed: %1 Downloading af fil mislykkedes: %1 - + + Uploading file failed: %1 Uploading af fil mislykkedes: %1 - + + Removing file failed: %1 Det mislykkedes at fjerne fil: %1 - + + Creating directory failed: %1 Oprettelse af katalog mislykkedes: %1 - + + Removing directory failed: %1 Det mislykkedes at fjerne katalog: %1 + + + Connection closed Forbindelse lukket + Host %1 found Vært %1 fundet + Connection to %1 closed Forbindelse til %1 lukket + Host found Vært fundet + Connected to host Tilsluttet vært @@ -1718,7 +2125,7 @@ Do you want to delete it anyway? QHostInfo - + Unknown error Ukendt fejl @@ -1726,14 +2133,29 @@ Do you want to delete it anyway? QHostInfoAgent + + + + + + + + Host not found Vært ikke fundet + + + + Unknown address type Ukendt adressetype + + + Unknown error Ukendt fejl @@ -1741,116 +2163,155 @@ Do you want to delete it anyway? QHttp + + + + Unknown error Ukendt fejl + + Request aborted Forespørgsel blev annulleret - + + No server set to connect to Ingen server at forbinde til - + + Wrong content length Forkert indholdslængde - + + Server closed connection unexpectedly Serveren afsluttede uventet forbindelsen + + Unknown authentication method + Ukendt autentifikationsmetode + + + Error writing response to device Skrivefejl mens der blev skrevet til enheden - + + Connection refused Forbindelse afvist - + + + Host %1 not found Vært %1 ikke fundet - + + + + HTTP request failed HTTP anmodning mislykkedes - + + Invalid HTTP response header Ugyldig HTTP-svar-header + + + + Invalid HTTP chunked body Ugyldig HTTP chunked body - + Host %1 found Vært %1 fundet + Connected to host %1 Tilsluttet vært %1 + Connection to %1 closed Forbindelse til %1 lukket + Host found Vært fundet + Connected to host Tilsluttet vært - + + Connection closed Forbindelse lukket + Proxy authentication required Kræver proxy-autentificering + Authentication required Autentificering påkrævet + Connection refused (or timed out) Forbindelse blev afvist (eller tid udløb) - + Proxy requires authentication Proxy kræver autentificering + Host requires authentication Vært kræver autentificering + Data corrupted Data er ødelagt + Unknown protocol specified En ukendt protokol blev angivet + SSL handshake failed SSL handshake mislykkedes + HTTPS connection requested but SSL support not compiled in Der blevet anmodet om en HTTPS-forbindelse, men SSL understøttelse er ikke kompileret ind @@ -1858,38 +2319,47 @@ Do you want to delete it anyway? QHttpSocketEngine + Did not receive HTTP response from proxy Modtog ikke HTTP-svar fra proxy + Error parsing authentication request from proxy Fejl under fortolking af autentificeringsanmodning fra proxy + Authentication required Autentificering påkrævet + Proxy denied connection Proxy nægtede forbindelse + Error communicating with HTTP proxy Fejl under kommunikation med HTTP-proxy + Proxy server not found Proxy-server kunne ikke findes + Proxy connection refused Proxy-forbindelse nægtede + Proxy server connection timed out Proxy-serverforbindelse timed out + Proxy connection closed prematurely Proxy-forbindelse afsluttede i utide @@ -1897,19 +2367,22 @@ Do you want to delete it anyway? QIBaseDriver - + Error opening database Der opstod fejl ved åbning af database + Could not start transaction Kunne ikke påbegynde transaktionen + Unable to commit transaction Kunne ikke gennemføre transaktionen + Unable to rollback transaction Kunne ikke tilbagetrække transaktionen @@ -1917,70 +2390,89 @@ Do you want to delete it anyway? QIBaseResult + Unable to create BLOB Kunne ikke oprette BLOB + Unable to write BLOB Kunne ikke skrive BLOB + Unable to open BLOB Kunne ikke åbne BLOB + Unable to read BLOB Kunne ikke læse BLOB + + Could not find array Kunne ikke finde array + Could not get array data Kunne ikke hente arraydata + Could not get query info Kunne ikke hente forespørgselsinfo + Could not start transaction Kunne ikke påbegynde transaktionen + Unable to commit transaction Kunne ikke gennemføre transaktionen + Could not allocate statement Kunne ikke allokere statement + Could not prepare statement Kunne ikke forberede udsagn + + Could not describe input statement Kunne ikke beskrive input-statement + Could not describe statement Kunne ikke beskrive statement + Unable to close statement Kunne ikke lukke udsagn + Unable to execute query Kunne ikke udføre forespørgsel + Could not fetch next item Kunne ikke hente næste element + Could not get statement info Kunne ikke hente udsagnsinformation @@ -1988,24 +2480,27 @@ Do you want to delete it anyway? QIODevice - + Permission denied Tilladelse nægtet + Too many open files Der er for mange åbne filer + No such file or directory Fil eller katalog findes ikke + No space left on device Ingen plads tilbage på enheden - + Unknown error Ukendt fejl @@ -2013,19 +2508,22 @@ Do you want to delete it anyway? QInputContext - + XIM + XIM input method XIM input-metode + Windows input method Windows input-metode + Mac OS X input method Mac OS X input-metode @@ -2033,7 +2531,7 @@ Do you want to delete it anyway? QInputDialog - + Enter a value: Indtast en værdi: @@ -2041,55 +2539,66 @@ Do you want to delete it anyway? QLibrary - + Could not mmap '%1': %2 + Plugin verification data mismatch in '%1' Plugin-verifikationsdata er sat forkert sammen i '%1' + Could not unmap '%1': %2 Der var ikke muligt at lave unmap på '%1': %2 + The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5] Plugin '%1' bruger inkompatibelt Qt-bibliotek. (%2.%3.%4) [%5] + The plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3" Plugin '%1' bruger inkompatibelt Qt-bibliotek. Forventet build key "%2", hentede "%3"' + Unknown error Ukendt fejl' - + + The shared library was not found. DSO blev ikke fundet. + The file '%1' is not a valid Qt plugin. Filen '%1' er ikke et gyldigt Qt-plugin. + The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.) Plugin '%1' bruger inkompatibelt Qt-bibliotek. (Ikke muligt at mikse debug og release-biblioteker) - + + Cannot load library %1: %2 Kan ikke indlæse bibliotek %1: %2 - + + Cannot unload library %1: %2 Kan ikke afregistrere bibliotek %1: %2 - + + Cannot resolve symbol "%1" in %2: %3 Kan ikke løse symbol "%1" i %2: %3 @@ -2097,31 +2606,37 @@ Do you want to delete it anyway? QLineEdit - + &Undo &Fortryd + &Redo &Gendan + Cu&t K&lip + &Copy &Kopiér + &Paste &Sæt ind + Delete Slet + Select All Markér alt @@ -2129,20 +2644,24 @@ Do you want to delete it anyway? QLocalServer - + + %1: Name error %1: Navnefejl + %1: Permission denied %1: Tilladelse nægtet + %1: Address in use %1: Adresse i brug - + + %1: Unknown error %2 %1: Ukendt fejl %2 @@ -2150,54 +2669,70 @@ Do you want to delete it anyway? QLocalSocket - + + %1: Connection refused %1: Forbindelse afvist - + + %1: Remote closed %1: Den anden ende lukkede + + + + %1: Invalid name %1: Ugyldigt navn - + + %1: Socket access error %1: Fejl i socket-adgang - + + %1: Socket resource error %1: Fejl i socket-ressource - + + %1: Socket operation timed out %1: Socket-handling timed out - + + %1: Datagram too large %1: Datagram er for stort + + + %1: Connection error %1: Forbindelsesfejl - + + %1: The socket operation is not supported %1: Socket-handlingen understøttes ikke + %1: Unknown error %1: Ukendt fejl - + + %1: Unknown error %2 %1: Ukendt fejl %2 @@ -2205,23 +2740,27 @@ Do you want to delete it anyway? QMYSQLDriver - + Unable to open database ' Kunne ikke åbne databasen ' + Unable to connect Kunne ikke forbinde + Unable to begin transaction Kunne ikke påbegynde transaktionen + Unable to commit transaction Kunne ikke gennemføre transaktionen + Unable to rollback transaction Kunne ikke tilbagetrække transaktionen @@ -2229,46 +2768,59 @@ Do you want to delete it anyway? QMYSQLResult + Unable to fetch data Kunne ikke hente data + Unable to execute query Kunne ikke udføre forespørgsel + Unable to store result Kunne ikke gemme resultatet + + Unable to prepare statement Kunne ikke forberede udsagn + Unable to reset statement Kunne ikke nulstille udsagn + Unable to bind value Kunne ikke tildele værdi + Unable to execute statement Kunne ikke udføre udsagn + + Unable to bind outvalues Kunne ikke binde udværdier + Unable to store statement results Kunne ikke gemme udsagnsresultater + Unable to execute next query Kunne ikke udføre næste forespørgsel + Unable to store next result Kunne ikke gemme næste resultat @@ -2276,7 +2828,7 @@ Do you want to delete it anyway? QMdiArea - + (Untitled) (Uden titel) @@ -2284,75 +2836,92 @@ Do you want to delete it anyway? QMdiSubWindow - + %1 - [%2] + Close Luk + Minimize Minimér + Restore Down Gendan Ned + &Restore &Gendan + &Move &Flyt + &Size &Størrelse + Mi&nimize Mi&nimér + Ma&ximize Ma&ksimér + Stay on &Top Bliv &oppe + &Close &Luk + - [%1] + Maximize Maksimér + Unshade Fjern skygge + Shade Skygge + Restore Gendan + Help Hjælp + Menu @@ -2360,14 +2929,21 @@ Do you want to delete it anyway? QMenu + + Close Luk + + Open Åbn + + + Execute Udfør @@ -2375,42 +2951,55 @@ Do you want to delete it anyway? QMessageBox + Help Hjælp + + + + OK + + <h3>About Qt</h3><p>This program uses Qt version %1.</p><p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://www.qtsoftware.com/products/licensing">www.qtsoftware.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://www.qtsoftware.com/qt/">www.qtsoftware.com/qt</a> for more information.</p> + <h3>Om Qt</h3><p>Dette program anvender Qt version %1.</p><p>Qt er et C++ toolkit til cross-platform applikationsudvikling.</p><p>Qt tilbyder single-source portabilitet til MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, og alle større kommercielle Unix-varianter. Qt er også tilgængeligt til indlejrede systemer som Qt for Embedded Linux and Qt for Windows CE.</p>Qt er tilgængeligt under tre forskellige licenser skabt med henblik på at imødekomme forskellige brugeres behov.</p><p>Qt licenseret under vores kommercielle licensaftale er passende for udvikling af proprietær/kommerciel software, hvor du ikke ønsker at dele sourcekode med tredie part, eller på anden vis ikke kan tiltræde vilkårerne i GNU LGPL version 2.1 eller GNU GPL version 3.0</p><p>Qt licenseret under GLU General Public License version 3.0 er passende for udvikling af Qt applikationer, hvor du ønsker at bruge softwaren i kombination med software under vilkårerne i GNU GPL version 3.0, eller hvor du ellers er villig til at overholde vilkårerne i GNU GPL version 3.0</p><p>See venligst <a href="http://www.qtsoftware.com/products/licensing">www.qtsoftware.com/products/licensing</a> for et overblik over Qt licensforhold.</p><p>Qt er et Nokia produkt. Se <a href="http://qtsoftware.com/qt/">qtsoftware.com/qt/</a> for yderligere information.</p> + + + About Qt Om Qt <p>This program uses Qt version %1.</p> - <p>Dette program bruger Qt-version %1.</p> + <p>Dette program bruger Qt-version %1.</p> + Show Details... Vis detaljer... + Hide Details... Skjul detaljer... <h3>About Qt</h3>%1<p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is a Nokia product. See <a href="http://qtsoftware.com/qt/">qtsoftware.com/qt/</a> for more information.</p> - <h3>Om Qt</h3>%1<p>Qt er et C++ toolkit til cross-platform applikationsudvikling.</p><p>Qt tilbyder single-source portabilitet til MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, og alle større kommercielle Unix-varianter. Qt er også tilgængeligt til indlejrede systemer som Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt er et Nokia produkt. Se <a href="http://qtsoftware.com/qt/">qtsoftware.com/qt/</a> for yderligere information.</p> + <h3>Om Qt</h3>%1<p>Qt er et C++ toolkit til cross-platform applikationsudvikling.</p><p>Qt tilbyder single-source portabilitet til MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, og alle større kommercielle Unix-varianter. Qt er også tilgængeligt til indlejrede systemer som Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt er et Nokia produkt. Se <a href="http://qtsoftware.com/qt/">qtsoftware.com/qt/</a> for yderligere information.</p> <p>This program uses Qt Open Source Edition version %1.</p><p>Qt Open Source Edition is intended for the development of Open Source applications. You need a commercial Qt license for development of proprietary (closed source) applications.</p><p>Please see <a href="http://qtsoftware.com/company/model/">qtsoftware.com/company/model/</a> for an overview of Qt licensing.</p> - <p>Dette program bruger Qt Open Source Edition version %1.</p><p>Qt Open Source Edition er beregnet til udvikling af Open Source applikationer. En kommerciel Qt licens er nødvendig til udvikling af proprietære (lukket sourcekode) applikationer.</p><p>Se venligst <a href="http://qtsoftware.com/company/model/">qtsoftware.com/company/model/</a> for et overblik over Qt licensforhold.</p> + <p>Dette program bruger Qt Open Source Edition version %1.</p><p>Qt Open Source Edition er beregnet til udvikling af Open Source applikationer. En kommerciel Qt licens er nødvendig til udvikling af proprietære (lukket sourcekode) applikationer.</p><p>Se venligst <a href="http://qtsoftware.com/company/model/">qtsoftware.com/company/model/</a> for et overblik over Qt licensforhold.</p> QMultiInputContext - + Select IM Markér IM @@ -2418,11 +3007,12 @@ Do you want to delete it anyway? QMultiInputContextPlugin - + Multiple input method switcher Multiple input metode-switcher + Multiple input method switcher that uses the context menu of the text widgets Multiple input metode-switcher, der benytter tekstkontrollernes kontekstmenuer @@ -2430,107 +3020,132 @@ Do you want to delete it anyway? QNativeSocketEngine - + The remote host closed the connection Fjern-hosten lukkede forbindelsen + Network operation timed out Netværksoperationen timed out + Out of resources Ikke flere ressourcer + Unsupported socket operation Socket-operation ikke understøttet + Protocol type not supported Protokoltypen understøttes ikke + Invalid socket descriptor Ugyldig socket-deskriptor + Network unreachable Netværket er ikke tilgængeligt + Permission denied Tilladelse nægtet + Connection timed out Forbindelsen timed out + Connection refused Forbindelse afvist + The bound address is already in use Den bundne adresse er allerede i brug + The address is not available Adressen er ikke tilgængelig + The address is protected Adressen er beskyttet + Unable to send a message Kunne ikke sende en besked + Unable to receive a message Kunne ikke modtage en besked + Unable to write Kunne ikke skrive + Network error Netværksfejl + Another socket is already listening on the same port En anden socket lytter allerede på samme port + Unable to initialize non-blocking socket Kunne ikke initialisere non-blocking socket + Unable to initialize broadcast socket Kunne ikke initialisere broadcast-socket + Attempt to use IPv6 socket on a platform with no IPv6 support Forsøg på at bruge IPv6-socket på en platform uden IPv6-support + Host unreachable Vært er ikke tilgængelig + Datagram was too large to send Datagrammet var for stort til at blive sendt + Operation on non-socket Handling på non-socket + Unknown error Ukendt fejl + The proxy type is invalid for this operation Proxytypen er ugyldig til denne handling @@ -2538,7 +3153,7 @@ Do you want to delete it anyway? QNetworkAccessCacheBackend - + Error opening %1 Der opstod fejl i at åbne %1 @@ -2546,23 +3161,27 @@ Do you want to delete it anyway? QNetworkAccessFileBackend - + Request for opening non-local file %1 Anmodning om at åbne ikke-lokal fil %1 + Error opening %1: %2 Der opstod fejl i at åbne %1: %2 + Write error writing to %1: %2 Skrivefejl mens der blev skrevet til %1: %2 + Cannot open %1: Path is a directory Kan ikke åbne %1: Stien er et katalog + Read error reading from %1: %2 Læsefejl mens der blev læst fra %1: %2 @@ -2570,23 +3189,27 @@ Do you want to delete it anyway? QNetworkAccessFtpBackend - + No suitable proxy found Ingen passende proxy blev fundet + Cannot open %1: is a directory Kan ikke åbne %1: Er et katalog + Logging in to %1 failed: authentication required Der opstod fejl i at logge på %1: Autentificering kræves + Error while downloading %1: %2 Der opstod fejl i at downloade %1: %2 + Error while uploading %1: %2 Der opstod fejl i at uploade %1: %2 @@ -2594,7 +3217,7 @@ Do you want to delete it anyway? QNetworkAccessHttpBackend - + No suitable proxy found Ingen passende proxy blev fundet @@ -2602,11 +3225,12 @@ Do you want to delete it anyway? QNetworkReply + Error downloading %1 - server replied: %2 Der opstod fejl i at downloade %1 - serveren svarede: %2 - + Protocol "%1" is unknown Protokollen "%1" er ukendt @@ -2614,6 +3238,8 @@ Do you want to delete it anyway? QNetworkReplyImpl + + Operation canceled Handling blev annulleret @@ -2621,24 +3247,28 @@ Do you want to delete it anyway? QOCIDriver - + Unable to logon Kunne ikke logge på + Unable to initialize QOCIDriver Kunne ikke initialisere + Unable to begin transaction Kunne ikke påbegynde transaktionen + Unable to commit transaction Kunne ikke gennemføre transaktionen + Unable to rollback transaction Kunne ikke tilbagetrække transaktionen @@ -2646,34 +3276,43 @@ Do you want to delete it anyway? QOCIResult + + + Unable to bind column for batch execute Kunne ikke tildele kolonne til batch-udførsel + Unable to execute batch statement Kunne ikke udføre batch-udsagn + Unable to goto next Kunne ikke gå til den næste + Unable to alloc statement Kunne ikke allokere udsagn + Unable to prepare statement Kunne ikke forberede udsagn + Unable to bind value Kunne ikke tildele værdi Unable to execute select statement - Kunne ikke udføre det valgte udsagn + Kunne ikke udføre det valgte udsagn + Unable to execute statement Kunne ikke udføre udsagn @@ -2681,27 +3320,32 @@ Do you want to delete it anyway? QODBCDriver - + Unable to connect Kunne ikke forbinde + Unable to connect - Driver doesn't support all needed functionality Kunne ikke forbinde. Driveren understøtter ikke alle de nødvendige funktionaliteter + Unable to disable autocommit Kunne ikke slå auto-udfør fra + Unable to commit transaction Kunne ikke gennemføre transaktionen + Unable to rollback transaction Kunne ikke tilbagetrække transaktionen + Unable to enable autocommit Kunne ikke slå auto-udfør til @@ -2709,38 +3353,51 @@ Do you want to delete it anyway? QODBCResult + + QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration QODBCResult::reset: Kunne ikke indstille 'SQL_CURSOR_STATIC' til udsagnsattribut. Kontrollér ODBC-driver-konfigurationen + + Unable to execute statement Kunne ikke udføre udsagn + Unable to fetch next Kunne ikke hente den næste + Unable to prepare statement Kunne ikke forberede udsagn + Unable to bind variable Kunne ikke tildele variabel + + + Unable to fetch last Kunne ikke hente den sidste + Unable to fetch Kunne ikke hente + Unable to fetch first Kunne ikke hente den første + Unable to fetch previous Kunne ikke hente den forrige @@ -2748,41 +3405,48 @@ Do you want to delete it anyway? QObject - + Home Hjem - + Operation not supported on %1 Handling blev ikke understøttet på %1 + Invalid URI: %1 Ugyldig URI: %1 - + Write error writing to %1: %2 Skrivefejl mens der blev skrevet til %1: %2 + Read error reading from %1: %2 Læsefejl mens der blev læst fra %1: %2 + Socket error on %1: %2 Socket-fejl på %1: %2 + Remote host closed the connection prematurely on %1 Fjern-host lukkede forbindelsen for tidligt på %1 + Protocol error: packet of size 0 received Protokolfejl: Pakke på størrelsen 0 modtaget + + No host name given Hostnavn mangler @@ -2790,11 +3454,12 @@ Do you want to delete it anyway? QPPDOptionsModel - + Name Navn + Value Værdi @@ -2802,27 +3467,32 @@ Do you want to delete it anyway? QPSQLDriver - + Unable to connect Kunne ikke skabe forbindelse + Could not begin transaction Kunne ikke påbegynde transaktion + Could not commit transaction Kunne ikke gennemføre transaktion + Could not rollback transaction Kunne ikke tilbagetrække transaktion + Unable to subscribe Kunne ikke tilmelde + Unable to unsubscribe Kunne ikke afmelde @@ -2830,10 +3500,12 @@ Do you want to delete it anyway? QPSQLResult + Unable to create query Kunne ikke oprette forespørgsel + Unable to prepare statement Kunne ikke forberede udsagn @@ -2841,83 +3513,102 @@ Do you want to delete it anyway? QPageSetupWidget - + Centimeters (cm) Centimeter (cm) + Millimeters (mm) Millimeter (mm) + Inches (in) + Points (pt) Point (pt) + Form + Paper Papir + Page size: Sidestørrelse: + Width: Vidde: + Height: Højde: + Paper source: Papirkilde: + Orientation + Portrait Portræt + Landscape Landskab + Reverse landscape Omvendt landskab + Reverse portrait Omvendt portræt + Margins Margener + top margin Margen - øverst + left margin Margen - venstre + right margin Margen - højre + bottom margin Margen - bund @@ -2925,11 +3616,12 @@ Do you want to delete it anyway? QPluginLoader - + Unknown error Ukendt fejl + The plugin was not loaded. Plugin blev ikke indlæst. @@ -2937,346 +3629,428 @@ Do you want to delete it anyway? QPrintDialog - + locally connected lokalt forbundet + + Aliases: %1 Aliasser: %1 + + unknown Ukendt - + A0 (841 x 1189 mm) + A1 (594 x 841 mm) + A2 (420 x 594 mm) + A3 (297 x 420 mm) + A4 (210 x 297 mm, 8.26 x 11.7 inches) + A5 (148 x 210 mm) + A6 (105 x 148 mm) + A7 (74 x 105 mm) + A8 (52 x 74 mm) + A9 (37 x 52 mm) + B0 (1000 x 1414 mm) + B1 (707 x 1000 mm) + B2 (500 x 707 mm) + B3 (353 x 500 mm) + B4 (250 x 353 mm) + B5 (176 x 250 mm, 6.93 x 9.84 inches) + B6 (125 x 176 mm) + B7 (88 x 125 mm) + B8 (62 x 88 mm) + B9 (44 x 62 mm) + B10 (31 x 44 mm) + C5E (163 x 229 mm) + DLE (110 x 220 mm) + Executive (7.5 x 10 inches, 191 x 254 mm) + Folio (210 x 330 mm) + Ledger (432 x 279 mm) + Legal (8.5 x 14 inches, 216 x 356 mm) + Letter (8.5 x 11 inches, 216 x 279 mm) + Tabloid (279 x 432 mm) + US Common #10 Envelope (105 x 241 mm) - + OK + + + Print Udskriv + Print To File ... Udskriv til fil... - + Print range Udskriftsområde + Print all Udskriv alle - + File %1 is not writable. Please choose a different file name. Filen %1 kan ikke skrives. Vælg et andet filnavn. + %1 already exists. Do you want to overwrite it? %1 findes allerede. Ønsker du at overskrive? + File exists Fil findes + <qt>Do you want to overwrite it?</qt> <qt>Ønsker du at overskrive?</qt> + Print selection Udskriv markerede + %1 is a directory. Please choose a different file name. %1 er et katalog. Vælg et andet filnavn. + A0 + A1 + A2 + A3 + A4 + A5 + A6 + A7 + A8 + A9 + B0 + B1 + B2 + B3 + B4 + B5 + B6 + B7 + B8 + B9 + B10 + C5E + DLE + Executive + Folio + Ledger + Legal + Letter + Tabloid + US Common #10 Envelope + Custom Brugerdefineret + + &Options >> &Indstillinger>> + &Print &Udskriv + &Options << &Indstillinger<< + Print to File (PDF) Udskriv til fil (PDF) + Print to File (Postscript) Udskriv til fil (Postscript) + Local file Lokal fil + Write %1 file Skriv %1 fil - + The 'From' value cannot be greater than the 'To' value. 'Fra'-værdien kan ikke være større end 'til'-værdien. @@ -3284,87 +4058,108 @@ Vælg et andet filnavn. QPrintPreviewDialog + + Page Setup Sideopsætning - + %1% + Print Preview Vis udskrift + Next page Næste side + Previous page Forrige side + First page Første side + Last page Sidste side + Fit width Tilpas bredde + Fit page Tilpas siden + Zoom in Zoom ind + Zoom out Zoom ud + Portrait Portræt + Landscape Landskab + Show single page Vis enkelt side + Show facing pages Vis sideopslag + Show overview of all pages Vis oversigt af alle sider + Print Udskriv + Page setup Sideopsætning + Close Luk + Export to PDF Eksportér til PDF + Export to PostScript Eksportér til PostScript @@ -3372,14 +4167,17 @@ Vælg et andet filnavn. QPrintPropertiesWidget + Form Form + Page Side + Advanced Avanceret @@ -3387,78 +4185,97 @@ Vælg et andet filnavn. QPrintSettingsOutput + Form + Copies Kopier + Print range Udskriv sider + Print all Udskriv alle + Pages from Sider fra + to til + Selection Valg + Output Settings Udskriftsindstillinger + Copies: Kopier: + Collate Samordne + Reverse Omvendt + Options Valgmuligheder + Color Mode Farvetilstand + Color Farve + Grayscale Gråskala + Duplex Printing Dobbelsidet + None Ingen + Long side Bog + Short side Tavle @@ -3466,38 +4283,47 @@ Vælg et andet filnavn. QPrintWidget + Form + Printer ' + &Name: &Navn: + P&roperties &Egenskaber + Location: Placering: + Preview Vis udskrift + Type: + Output &file: Udskrifts&fil: + ... @@ -3505,37 +4331,62 @@ Vælg et andet filnavn. QProcess - + + Could not open input redirection for reading Kunne ikke åbne input redirection for læsning - + + Could not open output redirection for writing Kunne ikke åbne output redirection for skrivning + Resource error (fork failure): %1 Ressource fejl (fork fejl): %1 + + + + + + + + + Process operation timed out Proces-operation time out + + + + Error reading from process Fejl ved læsning fra proces - + + + Error writing to process Fejl ved skrivning til proces + Process crashed Proces crashede + + No program defined + Intet program defineret + + + Process failed to start Processen kunne ikke starte @@ -3543,7 +4394,7 @@ Vælg et andet filnavn. QProgressDialog - + Cancel Annuller @@ -3551,6 +4402,7 @@ Vælg et andet filnavn. QPushButton + Open Åbn @@ -3558,6 +4410,7 @@ Vælg et andet filnavn. QRadioButton + Check Kontrollér @@ -3565,39 +4418,47 @@ Vælg et andet filnavn. QRegExp - + no error occurred der opstod ingen fejl + disabled feature used deaktiveret funktion blev brugt + bad char class syntax dårlig char class syntaks + bad lookahead syntax dårlig lookahead syntaks + bad repetition syntax dårlig gentagelsessyntaks + invalid octal value ugyldigt oktal-tal + missing left delim Manglende venstre delimiter + unexpected end uventet afslutning + met internal limit nåede interne grænse @@ -3605,19 +4466,22 @@ Vælg et andet filnavn. QSQLite2Driver - + Error to open database Der opstod fejl ved åbning af database + Unable to begin transaction Kunne ikke påbegynde transaktionen + Unable to commit transaction Kunne ikke gennemføre transaktionen + Unable to rollback Transaction Kunne ikke tilbagetrække transaktion @@ -3625,10 +4489,12 @@ Vælg et andet filnavn. QSQLite2Result + Unable to fetch results Kunne ikke hente resultater + Unable to execute statement Kunne ikke udføre statement @@ -3636,23 +4502,27 @@ Vælg et andet filnavn. QSQLiteDriver - + Error opening database Der opstod fejl ved åbning af database + Error closing database Der opstod fejl ved lukning af database + Unable to begin transaction Kunne ikke påbegynde transaktionen + Unable to commit transaction Kunne ikke gennemføre transaktion + Unable to rollback transaction Kunne ikke tilbagetrække transaktion @@ -3660,26 +4530,34 @@ Vælg et andet filnavn. QSQLiteResult + + + Unable to fetch row Kunne ikke hente række + Unable to execute statement Kunne ikke udføre udsagn + Unable to reset statement Kunne ikke nulstille udsagn + Unable to bind parameters Unable to bind parameters + Parameter count mismatch Misforhold i parametertælling + No query Ingen forespørgesel @@ -3687,69 +4565,84 @@ Vælg et andet filnavn. QScrollBar - + Scroll here Scroll her + Left edge Venstre kant + Top Øverst + Right edge Højre kant + Bottom Bund + Page left Side venstre - + + Page up Side øverst + Page right Side højre - + + Page down Side ned + Scroll left Scroll til venstre + Scroll up Scroll op + Scroll right Scroll til højre + Scroll down Scroll ned + Line up Linie op + Position Placering + Line down Linie ned @@ -3757,81 +4650,99 @@ Vælg et andet filnavn. QSharedMemory - + %1: unable to set key on lock %1: Kunne ikke oprette nøgle + %1: create size is less then 0 %1: create size is less then 0 - + + %1: unable to lock %1: Kunne ikke låse + %1: unable to unlock %1: Kunne ikke oprette nøgle - + + %1: permission denied %1: Tilladelse nægtet + + %1: already exists %1: Findes allerede - + + %1: doesn't exists %1: Findes ikke - + + %1: out of resources %1: Ikke flere ressourcer - + + %1: unknown error %2 %1: ukendt fejl %2 + %1: key is empty %1: nøgle er tom + %1: unix key file doesn't exists %1: Kunne ikke oprette nøgle + %1: ftok failed %1: ftok mislykkedes - + + %1: unable to make key %1: Kunne ikke oprette nøgle + %1: system-imposed size restrictions %1: System-pålagte størrelsesrestriktioner + %1: not attached %1: Ikke vedhæftet + %1: invalid size %1: Ugyldig størrelse + %1: key error %1: Nøglefejl + %1: size query failed %1: Størrelsesforespørgsel mislykkedes @@ -3839,371 +4750,466 @@ Vælg et andet filnavn. QShortcut - + Space + Esc + Tab + Backtab Tilbage-tabulator + Backspace Tilbage + Return + Enter + Ins + Del + Pause + Print Udskriv + SysReq + Home + End + Left Venstre + Up Op + Right Højre + Down Ned + PgUp + PgDown + CapsLock ' + NumLock + ScrollLock + Menu + Help Hjælp + Back Tilbage + Forward Frem + Stop + Refresh Opdater + Volume Down Lydstyrke ned + Volume Mute Lydstyrke mute + Volume Up Lydstyrke op + Bass Boost + Bass Up Bass op + Bass Down Bass ned + Treble Up Diskant op + Treble Down Diskant ned + Media Play + Media Stop + Media Previous Media forrige + Media Next Media næste + Media Record + Favorites + Search Søg + Standby + Open URL Åbn URL + Launch Mail Start mail + Launch Media Start Media + Launch (0) Start (0) + Launch (1) Start (1) + Launch (2) Start (2) + Launch (3) Start (3) + Launch (4) Start (4) + Launch (5) Start (5) + Launch (6) Start (6) + Launch (7) Start (7) + Launch (8) Start (8) + Launch (9) Start (9) + Launch (A) Start (A) + Launch (B) Start (B) + Launch (C) Start (C) + Launch (D) Start (D) + Launch (E) Start (E) + Launch (F) Start (F) + Print Screen + Page Up + Page Down + Caps Lock + Num Lock + Number Lock + Scroll Lock + Insert + Delete + Escape + System Request + Select Væg + Yes Ja + No Nej + Context1 Kontekst1 + Context2 Kontekst2 + Context3 Kontekst3 + Context4 Kontekst4 + Call Ring til + Hangup Læg på + Flip Vend + + Ctrl + + Shift + + Alt + + Meta + + + F%1 + Home Page Startside @@ -4211,23 +5217,27 @@ Vælg et andet filnavn. QSlider - + Page left Side venstre + Page up Side op + Position Placering + Page right Side højre + Page down Side ned @@ -4235,58 +5245,72 @@ Vælg et andet filnavn. QSocks5SocketEngine + Connection to proxy refused Proxy-forbindelse nægtede + Connection to proxy closed prematurely Proxy-forbindelse afsluttede i utide + Proxy host not found Proxy-host kunne ikke findes + Connection to proxy timed out Proxy-serverforbindelse timed out + Proxy authentication failed Proxy autentificering mislykkedes + Proxy authentication failed: %1 Proxy autentificering mislykkedes: %1 + SOCKS version 5 protocol error SOCKS version 5 protokolfejl + General SOCKSv5 server failure General SOCKSv5 serverfejl + Connection not allowed by SOCKSv5 server Forbindelse ikke tilladt a SOCKSv5-server + TTL expired TTL udløbet + SOCKSv5 command not supported SOCKSv5-kommando ikke understøttet + Address type not supported Adressetype understøttes ikke + Unknown SOCKSv5 proxy error code 0x%1 Ukendt SOCKSv5 proxy fejlkode 0x%1 + Network operation timed out Netværksoperationen timed out @@ -4294,10 +5318,12 @@ Vælg et andet filnavn. QSpinBox + More Mere + Less Mindre @@ -4305,43 +5331,56 @@ Vælg et andet filnavn. QSql - + Delete Slet + Delete this record? Slet denne post? + + + Yes Ja + + + No Nej + Insert Indsæt + Update Opdater + Save edits? Gem ændringer? + Cancel Annuller + Confirm Bekræft + Cancel your edits? Skal dine ændringer annulleres? @@ -4349,47 +5388,57 @@ Vælg et andet filnavn. QSslSocket - + Unable to write data: %1 Kunne ikke skrive data: %1 + Error while reading: %1 Der opstod en fejl under læsning af: %1 + Error during SSL handshake: %1 Der opstod en fejl under SSL handshake: %1 + Error creating SSL context (%1) Der opstod fejl under oprettelse af SSL-kontekst (%1) + Invalid or empty cipher list (%1) Ugyldig eller tom chifferliste (%1) + Error creating SSL session, %1 Der opstod fejl under oprettelse af SSL-session, %1 + Error creating SSL session: %1 Der opstod fejl under oprettelse af SSL-session, %1 + Cannot provide a certificate with no key, %1 Kan ikke give et certifikat uden nøgle, %1 + Error loading local certificate, %1 Der opstod fejl under indlæsning af lokalt certifikat, %1 + Error loading private key, %1 Der opstod fejl under indlæsning af privat nøgle, %1 + Private key does not certificate public key, %1 Privat-nøgle autoriserer ikke offentlig-nøgle, %1 @@ -4397,25 +5446,30 @@ Vælg et andet filnavn. QSystemSemaphore - + + %1: out of resources %1: Ikke flere ressourcer - + + %1: permission denied %1: Tilladelse nægtet + %1: already exists %1: Findes allerede + %1: does not exist %1: Findes ikke - + + %1: unknown error %2 %1: Ukendt fejl %2 @@ -4423,11 +5477,12 @@ Vælg et andet filnavn. QTDSDriver - + Unable to open connection Kunne ikke etablere forbindelsen + Unable to use database Kunne ikke bruge databasen @@ -4435,10 +5490,12 @@ Vælg et andet filnavn. QTabBar + Scroll Left Scroll til venstre + Scroll Right Scroll til højre @@ -4446,7 +5503,7 @@ Vælg et andet filnavn. QTcpServer - + Operation on socket is not supported Socket-operation ikke understøttet @@ -4454,35 +5511,42 @@ Vælg et andet filnavn. QTextControl - + &Undo &Fortryd + &Redo &Gendan + Cu&t K&lip + &Copy &Kopiér + Copy &Link Location Kopiér l&ink + &Paste &Sæt ind + Delete Slet + Select All Markér alt @@ -4490,10 +5554,14 @@ Vælg et andet filnavn. QToolButton + + Press Tryk på + + Open Åbn @@ -4501,7 +5569,7 @@ Vælg et andet filnavn. QUdpSocket - + This platform does not support IPv6 Denne platform understøtter ikke IPv6 @@ -4509,11 +5577,12 @@ Vælg et andet filnavn. QUndoGroup - + Undo Fortryd + Redo Gendan @@ -4521,7 +5590,7 @@ Vælg et andet filnavn. QUndoModel - + <empty> <tom> @@ -4529,11 +5598,12 @@ Vælg et andet filnavn. QUndoStack - + Undo Fortryd + Redo Gendan @@ -4541,47 +5611,57 @@ Vælg et andet filnavn. QUnicodeControlCharacterMenu - + LRM Left-to-right mark + RLM Right-to-left mark + ZWJ Zero width joiner + ZWNJ Zero width non-joiner + ZWSP Zero width space + LRE Start of left-to-right embedding + RLE Start of right-to-left embedding + LRO Start of left-to-right override + RLO Start of right-to-left override + PDF Pop directional formatting + Insert Unicode control character @@ -4589,27 +5669,32 @@ Vælg et andet filnavn. QWebFrame - + Request cancelled Anmodning annulleret + Request blocked Anmodning blokeret + Cannot show URL Kan ikke vise URL + Frame load interruped by policy change Billedindlæsning afbrudt af ændringer i retningslinier + Cannot show mimetype Kan ikke vise MIME-type + File does not exist Filen findes ikke @@ -4617,316 +5702,376 @@ Vælg et andet filnavn. QWebPage - + Bad HTTP request Dårlig HTTP-anmodning - + Submit default label for Submit buttons in forms on web pages Send + Submit Submit (input element) alt text for <input> elements with no alt, title, or value Send + Reset default label for Reset buttons in forms on web pages Nulstil + This is a searchable index. Enter search keywords: text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index' Dette er et søgeindeks. Indtast søgeord: + Choose File title for file button used in HTML forms Vælg fil + No file selected text to display in file button used in HTML forms when no file is selected Der er ikke valgt en fil + Open in New Window Open in New Window context menu item Åbn i nyt vindue + Save Link... Download Linked File context menu item Gem link... + Copy Link Copy Link context menu item Kopiér link + Open Image Open Image in New Window context menu item Åbn billede + Save Image Download Image context menu item Gem billede + Copy Image Copy Link context menu item Kopiér billede + Open Frame Open Frame in New Window context menu item Åbn faneblad + Copy Copy context menu item Kopiér + Go Back Back context menu item Gå tilbage + Go Forward Forward context menu item Gå frem + Stop Stop context menu item Stop + Reload Reload context menu item Genindlæs + Cut Cut context menu item Klip + Paste Paste context menu item Sæt ind + No Guesses Found No Guesses Found context menu item Der er ikke fundet nogen gæt + Ignore Ignore Spelling context menu item Ignorér + Add To Dictionary Learn Spelling context menu item Tilføj til ordbog + Search The Web Search The Web context menu item Søg på nettet + Look Up In Dictionary Look Up in Dictionary context menu item Slå op i ordbog + Open Link Open Link context menu item Åbn link + Ignore Ignore Grammar context menu item Ignorér + Spelling Spelling and Grammar context sub-menu item Stavekontrol + Show Spelling and Grammar menu item title Vis stave- og grammatikkontrol + Hide Spelling and Grammar menu item title Skjul stave- og grammatikkontrol + Check Spelling Check spelling context menu item Kør stavekontrol + Check Spelling While Typing Check spelling while typing context menu item Kør stavekontrol mens der tastes + Check Grammar With Spelling Check grammar with spelling context menu item Kør grammatikkontrol sammen med stavekontrol + Fonts Font context sub-menu item Skrifttyper + Bold Bold context menu item Fed + Italic Italic context menu item Kursiv + Underline Underline context menu item Understreget + Outline Outline context menu item Kontur + Direction Writing direction context sub-menu item Retning + Text Direction Text direction context sub-menu item Tekstretning + Default Default writing direction context menu item Standard + LTR Left to Right context menu item + RTL Right to Left context menu item + Inspect Inspect Element context menu item Inspicér + No recent searches Label for only item in menu that appears when clicking on the search field image, when no searches have been performed Ingen aktuelle søgninger + Recent searches label for first item in the menu that appears when clicking on the search field image, used as embedded menu title Aktuelle søgninger + Clear recent searches menu item in Recent Searches menu that empties menu's contents Ryd aktuelle søgninger + Unknown Unknown filesize FTP directory listing item Ukendt + %1 (%2x%3 pixels) Title string for images %1 (%2x%3 pixels) - + Web Inspector - %2 Web-inspektør - %2 - + Scroll here Scroll her + Left edge Venstre kant + Top + Right edge Højre kant + Bottom Bund + Page left Side venstre + Page up Side øverst + Page right Side højre + Page down Side ned + Scroll left Scroll til venstre + Scroll up Scroll op + Scroll right Scroll til højre + Scroll down Scroll ned - + %n file(s) number of chosen file @@ -4935,127 +6080,170 @@ Vælg et andet filnavn. - + JavaScript Alert - %1 JavaScript alert - %1 + JavaScript Confirm - %1 JavaScript Bekræft - %1 + JavaScript Prompt - %1 JavaScript Prompt - %1 + Move the cursor to the next character Flyt markør til næste tegn + Move the cursor to the previous character Flyt markør til forrige tegn + Move the cursor to the next word Flyt markør til næste ord + Move the cursor to the previous word Flyt markør til forrige ord + Move the cursor to the next line Flyt markør til næste linie + Move the cursor to the previous line Flyt markør til forrige linie + Move the cursor to the start of the line Flyt markør til starten af linien + Move the cursor to the end of the line Flyt markør til slutningen af linien + Move the cursor to the start of the block Flyt markør til starten af sektionen + Move the cursor to the end of the block Flyt markør til slutningen af sektionen + Move the cursor to the start of the document Flyt markør til starten af dokumentet + Move the cursor to the end of the document Flyt markør til slutningen af dokumentet + + Select all + Markér alt + + + Select to the next character Vælg til næste tegn + Select to the previous character Vælg til forrige tegn + Select to the next word Vælg til næste ord + Select to the previous word Vælg til forrige ord + Select to the next line Vælg til næste linie + Select to the previous line Vælg til forrige linie + Select to the start of the line Vælg til starten af linien + Select to the end of the line Vælg til slutningen af linien + Select to the start of the block Vælg til starten af sektionen + Select to the end of the block Vælg til slutningen af sektionen + Select to the start of the document Vælg til starten af dokumentet + Select to the end of the document Vælg til slutningen af dokumentet + Delete to the start of the word Slet til starten af ordet + Delete to the end of the word Slet til slutningen af ordet + + + Insert a new paragraph + Indsæt et nyt afsnit + + + + Insert a new line + Insert ny linie + QWhatsThisAction - + What's This? Hvad er dette? @@ -5063,7 +6251,7 @@ Vælg et andet filnavn. QWidget - + * @@ -5071,47 +6259,57 @@ Vælg et andet filnavn. QWizard - + Go Back Gå tilbage + Continue Fortsæt + Commit Udfør + Done Færdig + Help Hjælp + < &Back < &Tilbage + &Finish &Afslut + Cancel Annuller + &Help &Hjælp + &Next &Næste + &Next > &Næste > @@ -5119,55 +6317,69 @@ Vælg et andet filnavn. QWorkspace - + &Restore &Gendan + &Move &Flyt + &Size &Størrelse + Mi&nimize Mi&nimér + Ma&ximize Ma&ksimér + &Close &Luk + Stay on &Top Bliv på &toppen + + Sh&ade Sk&ygge + + %1 - [%2] + Minimize Minimer + Restore Down Gendan ned + Close Luk + &Unshade &Fjern skygge @@ -5175,95 +6387,117 @@ Vælg et andet filnavn. QXml - + no error occurred der opstod ingen fejl + error triggered by consumer - + Fejltilstand rejst af datamodtager + unexpected end of file uventet afslutning på fil + more than one document type definition mere end én definition på dokumenttype + error occurred while parsing element der opstod fejl under fortolking af element + tag mismatch + error occurred while parsing content der opstod fejl under fortolking af indhold + unexpected character uventet tegn + invalid name for processing instruction - + Ugyldigt navn for processing instruction + version expected while reading the XML declaration version forventet under læsning af XML-deklaration + wrong value for standalone declaration - + Forkert værdi for fri deklaration + encoding declaration or standalone declaration expected while reading the XML declaration - + Enkodningsdeklaration eller fri deklaration forventet ved læsning af XML-deklaration + standalone declaration expected while reading the XML declaration - + fri deklaration forventet ved læsning af XML-deklaration + error occurred while parsing document type definition der opstod fejl under fortolking af dokumenttypedefinition + letter is expected - + bogstav forventet + error occurred while parsing comment der opstod fejl under fortolking af kommentar + error occurred while parsing reference der opstod fejl under fortolking af reference + internal general entity reference not allowed in DTD - + intern generel entitetsreference ikke tilladt i DTD + external parsed general entity reference not allowed in attribute value - + Eksternt parset generel entitetsreference ikke tilladt i attributværdi + external parsed general entity reference not allowed in DTD - + Eksternt parset generel entitetsreference ikke tilladt i DTD + unparsed entity reference in wrong context ufortolket enhedsreference i forkert kontekst + recursive entities - + rekursive entiteter + error in the text declaration of an external entity fejl i tekstdeklaration på en ekstern enhed @@ -5271,412 +6505,485 @@ Vælg et andet filnavn. QXmlStream - + + Extra content at end of document. Ekstra indhold sidst i dokumentet. + Invalid entity value. Ugyldig enhedsværdi. + Invalid XML character. Ugyldigt XML-tegn. + Sequence ']]>' not allowed in content. Sekvens ']]>' ikke tilladt i indhold. + Namespace prefix '%1' not declared Navnerumspræfiks '%1' ikke deklareret + Attribute redefined. - + Attribut redefineret. + Unexpected character '%1' in public id literal. - + Uventet tegn '%1' i public id værdi. + Invalid XML version string. Ugyldigt XML-versionsstreng. + Unsupported XML version. XML-version understøttes ikke. + %1 is an invalid encoding name. - + %1 er et ugyldigt enkodningsnavn. + Encoding %1 is unsupported - + Enkodning %1 er ikke understøttet + Standalone accepts only yes or no. + Invalid attribute in XML declaration. - + Ugyldig attribut i XML-deklaration. + Premature end of document. - + Dokument sluttede for tidligt. + Invalid document. Ugyldigt dokument. + Expected Forventet + , but got ' , men fik ' + Unexpected ' Uventet ' + Expected character data. Forventet tegndata. + Recursive entity detected. - + Rekursiv entitet opdaget. + Start tag expected. Start-tag forventet. + XML declaration not at start of document. XML-deklaration ikke i starten af dokumentet. + NDATA in parameter entity declaration. - + NDATA i parameterentitetsdeklaration. + %1 is an invalid processing instruction name. - + %1 er et ugyldigt processing-instruction-navn. + Invalid processing instruction name. - + Ugyldigt processing-instruction-navn. + + + + Illegal namespace declaration. Ulovligt navnerumsdeklaration. - + Invalid XML name. Ugyldigt XML-navn. + Opening and ending tag mismatch. Åbner og afslutter tag-mismatch. + Reference to unparsed entity '%1'. Reference to ufortolket enhed '%1'. + + + Entity '%1' not declared. Enheden '%1' ikke deklareret. + Reference to external entity '%1' in attribute value. Reference til ekstern enhed '%1' i attributværdi. + Invalid character reference. Ugyldig tegnreference. + + Encountered incorrectly encoded content. - + Indhold med forkert enkodning læst. + The standalone pseudo attribute must appear after the encoding. - + Den frie pseudo-attribut skal optræde efter enkodningen. - + %1 is an invalid PUBLIC identifier. - + %1 er en ugyldig PUBLIC identifier. QtXmlPatterns - + An %1-attribute with value %2 has already been declared. - + En %1-attribut med værdi %2 er allerede erklæret. + An %1-attribute must have a valid %2 as value, which %3 isn't. - + En %1-attribut skal have en gyldig %2 som værdi, hvilket %3 ikke er. - + Network timeout. - + Netværk timeout. - + Element %1 can't be serialized because it appears outside the document element. - + Element %1 kan ikke serialiseres fordi det optræder udenfor dokument-elementet. - + Year %1 is invalid because it begins with %2. - + År %1 er ugyldigt da det begynder med %2. + Day %1 is outside the range %2..%3. - + Dag %1 er udenfor intervallet %2..%3. + Month %1 is outside the range %2..%3. - + Måned %1 er udenfor intervallet %2..%3. + Overflow: Can't represent date %1. - + Overflow: Kan ikke repræsentere dato %1. + Day %1 is invalid for month %2. - + Dag %1 er ugyldig for månet %2. + Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; - + Tidspunkt 24:%1:%2.%3 er ugyldigt. Timetal er 24, men minutter, sekunder og millisekunder er ikke alle 0; + Time %1:%2:%3.%4 is invalid. - + Tidspunkt %1:%2:%3.%4 er ugyldigt. + Overflow: Date can't be represented. - + Overflow: Dato kan ikke repræsenteres. + + At least one component must be present. - + Mindst en komponent skal være tilstede. + At least one time component must appear after the %1-delimiter. - + Mindst en tidskomponent skal optræde efter %1-skillemærket. - + No operand in an integer division, %1, can be %2. - + Ingen operand i en heltalsdivision, %1, kan være %2. + The first operand in an integer division, %1, cannot be infinity (%2). - + Den første operand i en heltalsdivision, %1, kan ikke være uendeligt (%2). + The second operand in a division, %1, cannot be zero (%2). - + Den anden operand i en division, %1, kan ikke være nul (%2). - + %1 is not a valid value of type %2. - + %1 er ikke en gyldig værdi af typen %2. - + When casting to %1 from %2, the source value cannot be %3. - + Ved cast til %1 fra %2, kan kildeværdien ikke være %3. - + Integer division (%1) by zero (%2) is undefined. - + Heltalsdivision (%1) med nul (%2) er udefineret. + Division (%1) by zero (%2) is undefined. - + Division (%1) med nul (%2) er udefineret. + Modulus division (%1) by zero (%2) is undefined. - + Modulusdivision (%1) med nul (%2) er udefineret. + + Dividing a value of type %1 by %2 (not-a-number) is not allowed. - + Division af værdi af typen %1 med %2 (ikke et tal) er ikke tilladt. + Dividing a value of type %1 by %2 or %3 (plus or minus zero) is not allowed. + Multiplication of a value of type %1 by %2 or %3 (plus or minus infinity) is not allowed. - + A value of type %1 cannot have an Effective Boolean Value. - + Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values. - + Value %1 of type %2 exceeds maximum (%3). + Value %1 of type %2 is below minimum (%3). - + A value of type %1 must contain an even number of digits. The value %2 does not. + %1 is not valid as a value of type %2. - + Operator %1 cannot be used on type %2. + Operator %1 cannot be used on atomic values of type %2 and %3. - + The namespace URI in the name for a computed attribute cannot be %1. + The name for a computed attribute cannot have the namespace URI %1 with the local name %2. - + Type error in cast, expected %1, received %2. + When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed. - + No casting is possible with %1 as the target type. + It is not possible to cast from %1 to %2. + Casting to %1 is not possible because it is an abstract type, and can therefore never be instantiated. + It's not possible to cast the value %1 of type %2 to %3 + Failure when casting from %1 to %2: %3 - + A comment cannot contain %1 + A comment cannot end with a %1. - + No comparisons can be done involving the type %1. + Operator %1 is not available between atomic values of type %2 and %3. - + An attribute node cannot be a child of a document node. Therefore, the attribute %1 is out of place. - + A library module cannot be evaluated directly. It must be imported from a main module. + No template by name %1 exists. - + A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type. + A positional predicate must evaluate to a single numeric value. - + The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, is %2 invalid. + %1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3. - + The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two. - + The data of a processing instruction cannot contain the string %1 - + No namespace binding exists for the prefix %1 - + No namespace binding exists for the prefix %1 in %2 - + + %1 is an invalid %2 - + %1 takes at most %n argument(s). %2 is therefore invalid. @@ -5684,6 +6991,7 @@ Vælg et andet filnavn. + %1 requires at least %n argument(s). %2 is therefore invalid. @@ -5691,613 +6999,731 @@ Vælg et andet filnavn. - + The first argument to %1 cannot be of type %2. It must be a numeric type, xs:yearMonthDuration or xs:dayTimeDuration. + The first argument to %1 cannot be of type %2. It must be of type %3, %4, or %5. + The second argument to %1 cannot be of type %2. It must be of type %3, %4, or %5. - + %1 is not a valid XML 1.0 character. - + The first argument to %1 cannot be of type %2. - + If both values have zone offsets, they must have the same zone offset. %1 and %2 are not the same. - + %1 was called. - + %1 must be followed by %2 or %3, not at the end of the replacement string. + In the replacement string, %1 must be followed by at least one digit when not escaped. + In the replacement string, %1 can only be used to escape itself or %2, not %3 - + %1 matches newline characters + %1 and %2 match the start and end of a line. + Matches are case insensitive + Whitespace characters are removed, except when they appear in character classes + %1 is an invalid regular expression pattern: %2 + %1 is an invalid flag for regular expressions. Valid flags are: - + If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified. - + It will not be possible to retrieve %1. - + The root node of the second argument to function %1 must be a document node. %2 is not a document node. - + The default collection is undefined + %1 cannot be retrieved - + The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization). - + A zone offset must be in the range %1..%2 inclusive. %3 is out of range. + %1 is not a whole number of minutes. - + Required cardinality is %1; got cardinality %2. - + The item %1 did not match the required type %2. + + %1 is an unknown schema type. + Only one %1 declaration can occur in the query prolog. + The initialization of variable %1 depends on itself + No variable by name %1 exists - + The variable %1 is unused - + Version %1 is not supported. The supported XQuery version is 1.0. + The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2. + No function with signature %1 is available + + A default namespace declaration must occur before function, variable, and option declarations. + Namespace declarations must occur before function, variable, and option declarations. + Module imports must occur before function, variable, and option declarations. + It is not possible to redeclare prefix %1. + Prefix %1 is already declared in the prolog. + The name of an option must have a prefix. There is no default namespace for options. + The Schema Import feature is not supported, and therefore %1 declarations cannot occur. + The target namespace of a %1 cannot be empty. + The module import feature is not supported + No value is available for the external variable by name %1. + A construct was encountered which only is allowed in XQuery. + A template by name %1 has already been declared. + The keyword %1 cannot occur with any other mode name. + The value of attribute %1 must of type %2, which %3 isn't. + The prefix %1 can not be bound. By default, it is already bound to the namespace %2. + A variable by name %1 has already been declared. + A stylesheet function must have a prefixed name. + The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this) + The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases. + The namespace of a user defined function in a library module must be equivalent to the module namespace. In other words, it should be %1 instead of %2 + A function already exists with the signature %1. + No external functions are supported. All supported functions can be used directly, without first declaring them as external + An argument by name %1 has already been declared. Every argument name must be unique. + When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal. + In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching. + In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching. + In an XSL-T pattern, function %1 cannot have a third argument. + In an XSL-T pattern, only function %1 and %2, not %3, can be used for matching. + In an XSL-T pattern, axis %1 cannot be used, only axis %2 or %3 can. + %1 is an invalid template mode name. + The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide. + The Schema Validation Feature is not supported. Hence, %1-expressions may not be used. + None of the pragma expressions are supported. Therefore, a fallback expression must be present + Each name of a template parameter must be unique; %1 is duplicated. + The %1-axis is unsupported in XQuery + %1 is not a valid name for a processing-instruction. + %1 is not a valid numeric literal. + No function by name %1 is available. + The namespace URI cannot be the empty string when binding to a prefix, %1. + %1 is an invalid namespace URI. + It is not possible to bind to the prefix %1 + Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared). + Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared). + Two namespace declaration attributes have the same name: %1. + The namespace URI must be a constant and cannot use enclosed expressions. + An attribute by name %1 has already appeared on this element. + A direct element constructor is not well-formed. %1 is ended with %2. + The name %1 does not refer to any schema type. + %1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works. + %1 is not an atomic type. Casting is only possible to atomic types. + + %1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported. + The name of an extension expression must be in a namespace. - + empty + zero or one + exactly one + one or more + zero or more - + Required type is %1, but %2 was found. + Promoting %1 to %2 may cause loss of precision. + The focus is undefined. - + It's not possible to add attributes after any other kind of node. + An attribute by name %1 has already been created. - + Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported. - + Attribute %1 can't be serialized because it appears at the top level. - + %1 is an unsupported encoding. + %1 contains octets which are disallowed in the requested encoding %2. + The codepoint %1, occurring in %2 using encoding %3, is an invalid XML character. - + Ambiguous rule match. - - In a namespace constructor, the value for a namespace value cannot be an empty string. + + In a namespace constructor, the value for a namespace cannot be an empty string. + The prefix must be a valid %1, which %2 is not. + The prefix %1 cannot be bound. + Only the prefix %1 can be bound to %2 and vice versa. - + Circularity detected - + The parameter %1 is required, but no corresponding %2 is supplied. + The parameter %1 is passed, but no corresponding %2 exists. - + The URI cannot have a fragment - + Element %1 is not allowed at this location. + Text nodes are not allowed at this location. + Parse error: %1 + The value of the XSL-T version attribute must be a value of type %1, which %2 isn't. + Running an XSL-T 1.0 stylesheet with a 2.0 processor. + Unknown XSL-T attribute %1. + Attribute %1 and %2 are mutually exclusive. + In a simplified stylesheet module, attribute %1 must be present. + If element %1 has no attribute %2, it cannot have attribute %3 or %4. + Element %1 must have at least one of the attributes %2 or %3. + At least one mode must be specified in the %1-attribute on element %2. - + Attribute %1 cannot appear on the element %2. Only the standard attributes can appear. + Attribute %1 cannot appear on the element %2. Only %3 is allowed, and the standard attributes. + Attribute %1 cannot appear on the element %2. Allowed is %3, %4, and the standard attributes. + Attribute %1 cannot appear on the element %2. Allowed is %3, and the standard attributes. + XSL-T attributes on XSL-T elements must be in the null namespace, not in the XSL-T namespace which %1 is. + The attribute %1 must appear on element %2. + The element with local name %1 does not exist in XSL-T. - + Element %1 must come last. + At least one %1-element must occur before %2. + Only one %1-element can appear. + At least one %1-element must occur inside %2. + When attribute %1 is present on %2, a sequence constructor cannot be used. + Element %1 must have either a %2-attribute or a sequence constructor. + When a parameter is required, a default value cannot be supplied through a %1-attribute or a sequence constructor. + Element %1 cannot have children. + Element %1 cannot have a sequence constructor. + + The attribute %1 cannot appear on %2, when it is a child of %3. + A parameter in a function cannot be declared to be a tunnel. + This processor is not Schema-aware and therefore %1 cannot be used. + Top level stylesheet elements must be in a non-null namespace, which %1 isn't. + The value for attribute %1 on element %2 must either be %3 or %4, not %5. + Attribute %1 cannot have the value %2. + The attribute %1 can only appear on the first %2 element. + At least one %1 element must appear as child of %2. @@ -6305,11 +7731,13 @@ Vælg et andet filnavn. VolumeSlider - + Muted + + Volume: %1% Lydstyrke: %1% diff --git a/translations/qt_help_da.ts b/translations/qt_help_da.ts index 0e4a362..73609a1 100644 --- a/translations/qt_help_da.ts +++ b/translations/qt_help_da.ts @@ -4,27 +4,27 @@ QCLuceneResultWidget - + Search Results Søgeresultater - + Note: Bemærk: - + The search results may not be complete since the documentation is still being indexed! Søgeresultaterne kan være ufuldstændige, fordi dokumentationen stadig indekseres! - + Your search did not match any documents. Søgningen matchede ikke nogen dokumenter. - + (The reason for this might be that the documentation is still being indexed.) (Årsagen kan være, at dokumentationen stadig indekseres.) @@ -32,72 +32,78 @@ QHelpCollectionHandler - + The collection file is not set up yet! Hjælpesamlingen er ikke konfigureret endnu! - + + Cannot load sqlite database driver! + Kan ikke indlæse sqlite database-driver! + + + + Cannot open collection file: %1 Kan ikke åbne hjælpesamlingen: %1 - + Cannot create tables in file %1! Kan ikke oprette tabler i filen %1! - + The specified collection file already exists! Den angivne hjælpesamling findes allerede! - + Cannot create directory: %1 Kan ikke oprette kataloget: %1 - + Cannot copy collection file: %1 Kan ikke kopiere hjælpesamling: %1 - + Unknown filter! Ukendt filter! - + Cannot register filter %1! Kan ikke registrere filteret %1! - + Cannot open documentation file %1! Kan ikke åbne dokumentationsfilen %1! - + Invalid documentation file! Ugyldig dokumentationsfil! - + The namespace %1 was not registered! Navnerummet %1 blev ikke registreret! - + Namespace %1 already exists! Navnerummet %1 findes allerede! - + Cannot register namespace! Kan ikke registrere navnerummet! - + Cannot open database to optimize! Kan ikke åbne den database, der skal optimeres! @@ -105,15 +111,19 @@ QHelpDBReader - Cannot open DB! - Kan ikke åbne DB! + Kan ikke åbne DB! + + + + Cannot open database '%1' '%2': %3 + Kan ikke åbne database '%1' '%2': %3 QHelpEngineCore - + The specified namespace does not exist! Det angivne navnerum findes ikke! @@ -121,125 +131,135 @@ QHelpEngineCorePrivate - + + Cannot open documentation file %1: %2! + Kan ikke åbne dokumentationsfil %1: %2! + + Cannot open collection file %1! - Kan ikke åbne hjælpesamlingen %1! + Kan ikke åbne hjælpesamlingen %1! - Cannot open documentation file %1! - Kan ikke åbne dokumentationsfilen %1! + Kan ikke åbne dokumentationsfilen %1! QHelpGenerator - + Invalid help data! Ugyldigt hjælpedata! - + No output file name specified! Der er ikke anført et output-filnavn! - The file %1 already exists! - Filen %1 findes allerede! + Filen %1 findes allerede! - + Building up file structure... Bygger filstruktur... - Cannot open DB! - Kan ikke åbne DB! + Kan ikke åbne DB! + + + + The file %1 cannot be overwritten! + Filen %1 kan ikke overskrives! - + + Cannot open data base file %1! + Kan ikke åbne databasefil %1! + + + Cannot register namespace %1! Kan ikke registrere navnerummet %1! - + Insert custom filters... Indsæt brugerdefinerede filtre... - + Insert help data for filter section (%1 of %2)... Indsæt hjælpedata til filtersektion (%1 af %2)... - + Documentation successfully generated. Dokumentationen blev genereret. - + Some tables already exist! Nogle af tabellerne findes allerede! - + Cannot create tables! Kan ikke oprette tabeller! - + Cannot register virtual folder! Kan ikke registrere virtuel mappe! - + Insert files... Indsæt filer... - + The file %1 does not exist! Skipping it. Filen %1 findes ikke, og den springes over. - + Cannot open file %1! Skipping it. Kan ikke åbne filen %1, og den springes over. - Cannot insert file data into database! - Kan ikke indsætte fildata i databasen! + Kan ikke indsætte fildata i databasen! - + The filter %1 is already registered! Filtret %1 er allerede registreret! - + Cannot register filter %1! Kan ikke registrere filtret %1! - + Insert indices... Indsæt indeks... - + Insert contents... Indsæt indhold... - + Cannot insert contents! Kan ikke indsætte indhold! - + Cannot register contents! Kan ikke registrere indhold! @@ -247,42 +267,42 @@ QHelpSearchQueryWidget - + Search for: Søg efter: - + Search Søg - + Advanced search Avanceret søgning - + words <B>similar</B> to: ord <B>tilsvarende</B>: - + <B>without</B> the words: <B>uden</B> ordene: - + with <B>exact phrase</B>: med den <B>eksakte sætning</B>: - + with <B>all</B> of the words: med <B>alle</B> ordene: - + with <B>at least one</B> of the words: med <B>mindst ét</B> af ordene: @@ -290,7 +310,7 @@ QHelpSearchResultWidget - + 0 - 0 of 0 Hits 0 - 0 af 0 Hits @@ -298,7 +318,7 @@ QHelpSearchResultWidgetPrivate - + %1 - %2 of %3 Hits %1 - %2 af %3 Hits @@ -306,47 +326,60 @@ QObject - + Untitled Ingen titel - Unknown token at line %1. - Ukendt symbol på linie %1. + Ukendt symbol på linie %1. - Unknown token at line %1. Expected "QtHelpProject"! - Ukendt symbol på linie %1. Forventet "QtHelpProject"! + Ukendt symbol på linie %1. Forventet "QtHelpProject"! + + + + Unknown token. + Ukendt token. + + + + Unknown token. Expected "QtHelpProject"! + Ukendt token. Forventede "QtHelpProject"! + + + + Error in line %1: %2 + Fejl i linie %1: %2 - + A virtual folder must not contain a '/' character! En virtuel mappe må ikke indholde tegnet '/'! - + A namespace must not contain a '/' character! Et navnerum må ikke indeholde tegnet '/'! - + Missing namespace in QtHelpProject. Navnerum i +++ mangler. - + Missing virtual folder in QtHelpProject Virtuel mappe i QtHelpProject mangler - + Missing attribute in keyword at line %1. Attribut i nøgleord på linie %1 mangler. - + The input file %1 could not be opened! Input-filen %1 kunne ikke åbnes! diff --git a/translations/translations.pri b/translations/translations.pri index efefa09..0c5c1ee 100644 --- a/translations/translations.pri +++ b/translations/translations.pri @@ -21,7 +21,7 @@ LRELEASE = $$fixPath($$QT_BUILD_TREE/bin/lrelease) ###### Qt Libraries -QT_TS = de fr zh_CN untranslated ar es iw ja_JP pl pt ru sk sv uk zh_TW +QT_TS = de fr zh_CN untranslated ar es iw ja_JP pl pt ru sk sv uk zh_TW da ts-qt.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \ 3rdparty/phonon \ -- cgit v0.12 From 634954f1648a1ada74ba03f2eecec71e8bcba898 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Wed, 27 May 2009 16:41:53 +1000 Subject: Fix WinCE compile error not fixed by c666b88 You can't implicitly convert QLatin1Char to QString and thus neither to QFileInfo. Instead do the conversion the correct way, as illustrated by the code five lines above the line that broke. Reviewed-by: Lincoln Ramsay Reviewed-by: Andy Shaw --- src/corelib/io/qfsfileengine_win.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp index 82cde8b..0b87e2b 100644 --- a/src/corelib/io/qfsfileengine_win.cpp +++ b/src/corelib/io/qfsfileengine_win.cpp @@ -1298,7 +1298,7 @@ QFileInfoList QFSFileEngine::drives() } return ret; #else - ret.append(QFileInfo(QLatin1Char('/'))); + ret.append(QString::fromLatin1("/")); return ret; #endif } -- cgit v0.12 From 5e14efa547ffac5890b008ad23e9ff0bc634a3e1 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 27 May 2009 09:38:32 +0200 Subject: Use GLInt and not uint because of Apple's old header swap --- src/opengl/qpixmapdata_gl_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/opengl/qpixmapdata_gl_p.h b/src/opengl/qpixmapdata_gl_p.h index 536f33d..7e06db9 100644 --- a/src/opengl/qpixmapdata_gl_p.h +++ b/src/opengl/qpixmapdata_gl_p.h @@ -116,7 +116,7 @@ private: int m_height; mutable QGLFramebufferObject *m_renderFbo; - mutable uint m_textureId; + mutable GLuint m_textureId; mutable QPaintEngine *m_engine; mutable QGLContext *m_ctx; mutable bool m_dirty; -- cgit v0.12 From 0ea19cf01e2381969a8b8ce8cdaffe9ce873d3a9 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 25 May 2009 22:47:06 +0200 Subject: Add a flag that ensure that a connection is made only one It is often desirable, when doing connection, to ensure that the same connection is only made once. This can be done with the Qt::UniqueConnection 'flag' Also documented the order the slot are called Reviewed-by: Brad --- doc/src/qnamespace.qdoc | 4 ++ doc/src/signalsandslots.qdoc | 14 ++++--- src/corelib/global/qnamespace.h | 3 +- src/corelib/kernel/qobject.cpp | 36 ++++++++++++----- tests/auto/qobject/tst_qobject.cpp | 81 ++++++++++++++++++++++++++++++++++++-- 5 files changed, 119 insertions(+), 19 deletions(-) diff --git a/doc/src/qnamespace.qdoc b/doc/src/qnamespace.qdoc index fc4310b..069541f 100644 --- a/doc/src/qnamespace.qdoc +++ b/doc/src/qnamespace.qdoc @@ -528,6 +528,10 @@ Qt::DirectConnection; otherwise the signal is queued, as with Qt::QueuedConnection. + \value UniqueConnection Same as AutoConnection, but there will be a check that the signal is + not already connected to the same slot before connecting, otherwise, + the connection will fail. + \since 4.6 With queued connections, the parameters must be of types that are known to Qt's meta-object system, because Qt needs to copy the arguments to store them diff --git a/doc/src/signalsandslots.qdoc b/doc/src/signalsandslots.qdoc index 5432bd4..29c8215 100644 --- a/doc/src/signalsandslots.qdoc +++ b/doc/src/signalsandslots.qdoc @@ -178,9 +178,13 @@ looping in the case of cyclic connections (e.g., if \c{b.valueChanged()} were connected to \c{a.setValue()}). - A signal is emitted for every connection you make; if you - duplicate a connection, two signals will be emitted. You can - always break a connection using QObject::disconnect(). + By default, for every connection you make, a signal is emitted; + two signals are emitted for duplicate connections. You can break + all of these connections with a single disconnect() call. + If you pass the Qt::UniqueConnection \a type, the connection will only + be made if it is not a duplicate. If there is already a duplicate + (exact same signal to the exact same slot on the same objects), + the connection will fail and connect will return false This example illustrates that objects can work together without needing to know any information about each other. To enable this, the objects only @@ -218,8 +222,8 @@ will continue immediately, and the slots will be executed later. If several slots are connected to one signal, the slots will be - executed one after the other, in an arbitrary order, when the signal - is emitted. + executed one after the other, in the order they have been connected, + when the signal is emitted. Signals are automatically generated by the \l moc and must not be implemented in the \c .cpp file. They can never have return types diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 3367581..9e53d89 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -1327,7 +1327,8 @@ public: DirectConnection, QueuedConnection, AutoCompatConnection, - BlockingQueuedConnection + BlockingQueuedConnection, + UniqueConnection = 0x80 }; enum ShortcutContext { diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 65d81f1..be622d9 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -301,7 +301,6 @@ void QObjectPrivate::addConnection(int signal, Connection *c) ConnectionList &connectionList = (*connectionLists)[signal]; connectionList.append(c); - cleanConnectionLists(); } @@ -2377,7 +2376,8 @@ int QObject::receivers(const char *signal) const can be connected to one slot. If a signal is connected to several slots, the slots are activated - in an arbitrary order when the signal is emitted. + in the same order as the order the connection was made, when the + signal is emitted. The function returns true if it successfully connects the signal to the slot. It will return false if it cannot create the @@ -2385,9 +2385,13 @@ int QObject::receivers(const char *signal) const existence of either \a signal or \a method, or if their signatures aren't compatible. - For every connection you make, a signal is emitted; two signals are emitted - for duplicate connections. You can break all of these connections with a - single disconnect() call. + By default, a signal is emitted for every connection you make; + two signals are emitted for duplicate connections. You can break + all of these connections with a single disconnect() call. + If you pass the Qt::UniqueConnection \a type, the connection will only + be made if it is not a duplicate. If there is already a duplicate + (exact same signal to the exact same slot on the same objects), + the connection will fail and connect will return false The optional \a type parameter describes the type of connection to establish. In particular, it determines whether a particular @@ -2520,7 +2524,8 @@ bool QObject::connect(const QObject *sender, const char *signal, } } #endif - QMetaObject::connect(sender, signal_index, receiver, method_index, type, types); + if (!QMetaObject::connect(sender, signal_index, receiver, method_index, type, types)) + return false; const_cast(sender)->connectNotify(signal - 1); return true; } @@ -2771,6 +2776,22 @@ bool QMetaObject::connect(const QObject *sender, int signal_index, QObject *s = const_cast(sender); QObject *r = const_cast(receiver); + QOrderedMutexLocker locker(signalSlotLock(sender), + signalSlotLock(receiver)); + + if (type & Qt::UniqueConnection) { + QObjectConnectionListVector *connectionLists = s->d_func()->connectionLists; + if (connectionLists && connectionLists->count() > signal_index) { + QObjectPrivate::ConnectionList &connectionList = (*connectionLists)[signal_index]; + for (int i = 0; i < connectionList.count(); ++i) { + QObjectPrivate::Connection *c2 = connectionList.at(i); + if (c2->receiver == receiver && c2->method == method_index) + return false; + } + } + type &= Qt::UniqueConnection - 1; + } + QObjectPrivate::Connection *c = new QObjectPrivate::Connection; c->sender = s; c->receiver = r; @@ -2778,9 +2799,6 @@ bool QMetaObject::connect(const QObject *sender, int signal_index, c->connectionType = type; c->argumentTypes = types; - QOrderedMutexLocker locker(signalSlotLock(sender), - signalSlotLock(receiver)); - s->d_func()->addConnection(signal_index, c); r->d_func()->senders.append(c); diff --git a/tests/auto/qobject/tst_qobject.cpp b/tests/auto/qobject/tst_qobject.cpp index fb46073..399d021 100644 --- a/tests/auto/qobject/tst_qobject.cpp +++ b/tests/auto/qobject/tst_qobject.cpp @@ -116,6 +116,7 @@ private slots: void dumpObjectInfo(); void connectToSender(); void qobjectConstCast(); + void uniqConnection(); protected: }; @@ -204,12 +205,20 @@ public: sequence_slot3 = 0; sequence_slot2 = 0; sequence_slot1 = 0; + count_slot1 = 0; + count_slot2 = 0; + count_slot3 = 0; + count_slot4 = 0; } int sequence_slot1; int sequence_slot2; int sequence_slot3; int sequence_slot4; + int count_slot1; + int count_slot2; + int count_slot3; + int count_slot4; bool called(int slot) { switch (slot) { @@ -224,10 +233,10 @@ public: static int sequence; public slots: - void slot1() { sequence_slot1 = ++sequence; } - void slot2() { sequence_slot2 = ++sequence; } - void slot3() { sequence_slot3 = ++sequence; } - void slot4() { sequence_slot4 = ++sequence; } + void slot1() { sequence_slot1 = ++sequence; count_slot1++; } + void slot2() { sequence_slot2 = ++sequence; count_slot2++; } + void slot3() { sequence_slot3 = ++sequence; count_slot3++; } + void slot4() { sequence_slot4 = ++sequence; count_slot4++; } }; @@ -2783,5 +2792,69 @@ void tst_QObject::qobjectConstCast() QVERIFY(qobject_cast(cptr)); } +void tst_QObject::uniqConnection() +{ + SenderObject *s = new SenderObject; + ReceiverObject *r1 = new ReceiverObject; + ReceiverObject *r2 = new ReceiverObject; + r1->reset(); + r2->reset(); + ReceiverObject::sequence = 0; + + QVERIFY( connect( s, SIGNAL( signal1() ), r1, SLOT( slot1() ) , Qt::UniqueConnection) ); + QVERIFY( connect( s, SIGNAL( signal1() ), r2, SLOT( slot1() ) , Qt::UniqueConnection) ); + QVERIFY( connect( s, SIGNAL( signal1() ), r1, SLOT( slot3() ) , Qt::UniqueConnection) ); + QVERIFY( connect( s, SIGNAL( signal3() ), r1, SLOT( slot3() ) , Qt::UniqueConnection) ); + + s->emitSignal1(); + s->emitSignal2(); + s->emitSignal3(); + s->emitSignal4(); + + QCOMPARE( r1->count_slot1, 1 ); + QCOMPARE( r1->count_slot2, 0 ); + QCOMPARE( r1->count_slot3, 2 ); + QCOMPARE( r1->count_slot4, 0 ); + QCOMPARE( r2->count_slot1, 1 ); + QCOMPARE( r2->count_slot2, 0 ); + QCOMPARE( r2->count_slot3, 0 ); + QCOMPARE( r2->count_slot4, 0 ); + QCOMPARE( r1->sequence_slot1, 1 ); + QCOMPARE( r2->sequence_slot1, 2 ); + QCOMPARE( r1->sequence_slot3, 4 ); + + r1->reset(); + r2->reset(); + ReceiverObject::sequence = 0; + + QVERIFY( connect( s, SIGNAL( signal4() ), r1, SLOT( slot4() ) , Qt::UniqueConnection) ); + QVERIFY( connect( s, SIGNAL( signal4() ), r2, SLOT( slot4() ) , Qt::UniqueConnection) ); + QVERIFY(!connect( s, SIGNAL( signal4() ), r2, SLOT( slot4() ) , Qt::UniqueConnection) ); + QVERIFY( connect( s, SIGNAL( signal1() ), r2, SLOT( slot4() ) , Qt::UniqueConnection) ); + QVERIFY(!connect( s, SIGNAL( signal4() ), r1, SLOT( slot4() ) , Qt::UniqueConnection) ); + + s->emitSignal4(); + QCOMPARE( r1->count_slot4, 1 ); + QCOMPARE( r2->count_slot4, 1 ); + QCOMPARE( r1->sequence_slot4, 1 ); + QCOMPARE( r2->sequence_slot4, 2 ); + + r1->reset(); + r2->reset(); + ReceiverObject::sequence = 0; + + connect( s, SIGNAL( signal4() ), r1, SLOT( slot4() ) ); + + s->emitSignal4(); + QCOMPARE( r1->count_slot4, 2 ); + QCOMPARE( r2->count_slot4, 1 ); + QCOMPARE( r1->sequence_slot4, 3 ); + QCOMPARE( r2->sequence_slot4, 2 ); + + delete s; + delete r1; + delete r2; +} + QTEST_MAIN(tst_QObject) #include "tst_qobject.moc" -- cgit v0.12 From 00ffd16d367a19f958149b3b4ec5f5c5e6b71f9b Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 27 May 2009 09:56:16 +0200 Subject: Do not use the locale in QDoubleSpinBoxPrivate::round We had a report from a customer saying this breaks if the decimal separator is the same as the group separator. This is not really something we want to support, but because this fix is easy and cleanup the code I decided to fix it. Reviewed-by: Thierry Task-number: 253962 --- src/gui/widgets/qspinbox.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gui/widgets/qspinbox.cpp b/src/gui/widgets/qspinbox.cpp index b7426f0..f12946c 100644 --- a/src/gui/widgets/qspinbox.cpp +++ b/src/gui/widgets/qspinbox.cpp @@ -1254,9 +1254,7 @@ QVariant QDoubleSpinBoxPrivate::valueFromText(const QString &f) const double QDoubleSpinBoxPrivate::round(double value) const { - Q_Q(const QDoubleSpinBox); - const QString strDbl = q->locale().toString(value, 'f', decimals); - return q->locale().toDouble(strDbl); + return QString::number(value, 'f', decimals).toDouble(); } -- cgit v0.12 From 0bcfa7aa496d460c72862369662560c49eb55f17 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Wed, 27 May 2009 11:48:20 +0200 Subject: small refactor to change the interpolator at the same time as the current interval in the variant animations --- src/corelib/animation/qpropertyanimation.cpp | 11 ++++--- src/corelib/animation/qpropertyanimation_p.h | 2 +- src/corelib/animation/qvariantanimation.cpp | 43 +++++++++++++++++++--------- src/corelib/animation/qvariantanimation_p.h | 18 ++++-------- 4 files changed, 40 insertions(+), 34 deletions(-) diff --git a/src/corelib/animation/qpropertyanimation.cpp b/src/corelib/animation/qpropertyanimation.cpp index 9a17049..47361a5 100644 --- a/src/corelib/animation/qpropertyanimation.cpp +++ b/src/corelib/animation/qpropertyanimation.cpp @@ -110,17 +110,16 @@ void QPropertyAnimationPrivate::updateMetaProperty() if (!target || propertyName.isEmpty()) return; - if (hasMetaProperty == 0 && !property.isValid()) { + if (!hasMetaProperty && !property.isValid()) { const QMetaObject *mo = target->metaObject(); propertyIndex = mo->indexOfProperty(propertyName); if (propertyIndex != -1) { - hasMetaProperty = 1; + hasMetaProperty = true; property = mo->property(propertyIndex); propertyType = property.userType(); } else { if (!target->dynamicPropertyNames().contains(propertyName)) qWarning("QPropertyAnimation: you're trying to animate a non-existing property %s of your QObject", propertyName.constData()); - hasMetaProperty = 2; } } @@ -133,7 +132,7 @@ void QPropertyAnimationPrivate::updateProperty(const QVariant &newValue) if (!target || state == QAbstractAnimation::Stopped) return; - if (hasMetaProperty == 1) { + if (hasMetaProperty) { if (newValue.userType() == propertyType) { //no conversion is needed, we directly call the QObject::qt_metacall void *data = const_cast(newValue.constData()); @@ -216,7 +215,7 @@ void QPropertyAnimation::setTargetObject(QObject *target) connect(target, SIGNAL(destroyed()), SLOT(_q_targetDestroyed())); d->target = target; - d->hasMetaProperty = 0; + d->hasMetaProperty = false; d->updateMetaProperty(); } @@ -242,7 +241,7 @@ void QPropertyAnimation::setPropertyName(const QByteArray &propertyName) } d->propertyName = propertyName; - d->hasMetaProperty = 0; + d->hasMetaProperty = false; d->updateMetaProperty(); } diff --git a/src/corelib/animation/qpropertyanimation_p.h b/src/corelib/animation/qpropertyanimation_p.h index b51d039..a4387dd 100644 --- a/src/corelib/animation/qpropertyanimation_p.h +++ b/src/corelib/animation/qpropertyanimation_p.h @@ -78,7 +78,7 @@ public: int propertyType; int propertyIndex; - int hasMetaProperty; + bool hasMetaProperty; QByteArray propertyName; void updateProperty(const QVariant &); void updateMetaProperty(); diff --git a/src/corelib/animation/qvariantanimation.cpp b/src/corelib/animation/qvariantanimation.cpp index 239add9..e973ec5 100644 --- a/src/corelib/animation/qvariantanimation.cpp +++ b/src/corelib/animation/qvariantanimation.cpp @@ -144,6 +144,11 @@ static bool animationValueLessThan(const QVariantAnimation::KeyValue &p1, const return p1.first < p2.first; } +static QVariant defaultInterpolator(const void *, const void *, qreal) +{ + return QVariant(); +} + template<> Q_INLINE_TEMPLATE QRect _q_interpolate(const QRect &f, const QRect &t, qreal progress) { QRect ret; @@ -174,6 +179,13 @@ template<> Q_INLINE_TEMPLATE QLineF _q_interpolate(const QLineF &f, const QLineF return QLineF( _q_interpolate(f.p1(), t.p1(), progress), _q_interpolate(f.p2(), t.p2(), progress)); } +QVariantAnimationPrivate::QVariantAnimationPrivate() : duration(250), hasStartValue(false), + interpolator(&defaultInterpolator), + changedSignalMask(1 << QVariantAnimation::staticMetaObject.indexOfSignal("valueChanged(QVariant)")) +{ + //we keep the mask so that we emit valueChanged only when needed (for performance reasons) +} + void QVariantAnimationPrivate::convertValues(int t) { //this ensures that all the keyValues are of type t @@ -186,7 +198,20 @@ void QVariantAnimationPrivate::convertValues(int t) currentInterval.end.second.convert(static_cast(t)); //... and the interpolator - interpolator = 0; + updateInterpolator(); +} + +void QVariantAnimationPrivate::updateInterpolator() +{ + int type = currentInterval.start.second.userType(); + if (type == currentInterval.end.second.userType()) + interpolator = getInterpolator(type); + else + interpolator = 0; + + //we make sure that the interpolator is always set to something + if (!interpolator) + interpolator = &defaultInterpolator; } /*! @@ -224,6 +249,7 @@ void QVariantAnimationPrivate::recalculateCurrentInterval(bool force/*=false*/) // update all the values of the currentInterval currentInterval.start = *itStart; currentInterval.end = *itEnd; + updateInterpolator(); } } setCurrentValueForProgress(progress); @@ -295,7 +321,6 @@ void QVariantAnimationPrivate::setDefaultStartValue(const QVariant &value) */ QVariantAnimation::QVariantAnimation(QObject *parent) : QAbstractAnimation(*new QVariantAnimationPrivate, parent) { - d_func()->init(); } /*! @@ -303,7 +328,6 @@ QVariantAnimation::QVariantAnimation(QObject *parent) : QAbstractAnimation(*new */ QVariantAnimation::QVariantAnimation(QVariantAnimationPrivate &dd, QObject *parent) : QAbstractAnimation(dd, parent) { - d_func()->init(); } /*! @@ -629,15 +653,7 @@ void QVariantAnimation::updateState(QAbstractAnimation::State oldState, */ QVariant QVariantAnimation::interpolated(const QVariant &from, const QVariant &to, qreal progress) const { - Q_D(const QVariantAnimation); - if (d->interpolator == 0) { - if (from.userType() == to.userType()) - d->interpolator = QVariantAnimationPrivate::getInterpolator(from.userType()); - if (d->interpolator == 0) //no interpolator found - return QVariant(); - } - - return d->interpolator(from.constData(), to.constData(), progress); + return d_func()->interpolator(from.constData(), to.constData(), progress); } /*! @@ -645,9 +661,8 @@ QVariant QVariantAnimation::interpolated(const QVariant &from, const QVariant &t */ void QVariantAnimation::updateCurrentTime(int msecs) { - Q_D(QVariantAnimation); Q_UNUSED(msecs); - d->recalculateCurrentInterval(); + d_func()->recalculateCurrentInterval(); } QT_END_NAMESPACE diff --git a/src/corelib/animation/qvariantanimation_p.h b/src/corelib/animation/qvariantanimation_p.h index 0d296db..2c559cf 100644 --- a/src/corelib/animation/qvariantanimation_p.h +++ b/src/corelib/animation/qvariantanimation_p.h @@ -67,17 +67,7 @@ class QVariantAnimationPrivate : public QAbstractAnimationPrivate Q_DECLARE_PUBLIC(QVariantAnimation) public: - QVariantAnimationPrivate() : duration(250), hasStartValue(false) - { - } - - void init() - { - //we keep the mask so that we emit valueChanged only when needed (for performance reasons) - changedSignalMask = (1 << q_func()->metaObject()->indexOfSignal("valueChanged(QVariant)")); - currentInterval.start.first = currentInterval.end.first = 2; //will force the initial refresh - interpolator = 0; - } + QVariantAnimationPrivate(); static QVariantAnimationPrivate *get(QVariantAnimation *q) { @@ -100,9 +90,9 @@ public: QVariantAnimation::KeyValue start, end; } currentInterval; - mutable QVariantAnimation::Interpolator interpolator; + QVariantAnimation::Interpolator interpolator; - quint32 changedSignalMask; + const quint32 changedSignalMask; void setCurrentValueForProgress(const qreal progress); void recalculateCurrentInterval(bool force=false); @@ -110,6 +100,8 @@ public: QVariant valueAt(qreal step) const; void convertValues(int t); + void updateInterpolator(); + static QVariantAnimation::Interpolator getInterpolator(int interpolationType); }; -- cgit v0.12 From 80bc757b56953065fafeffe6c4b8fb6fbca287ac Mon Sep 17 00:00:00 2001 From: Alexis Menard Date: Wed, 27 May 2009 10:30:07 +0200 Subject: Avoid deep copies of pixmaps when using cache in QGraphicsView. When we have already a pixmap of an item in the cache, we should remove the entry from the cache otherwise when we will repaint/modify the copy of the pixmap (the copy of the cache) then we will trigger a deep copy ; this is because both entries in the cache and our copy share the same data and if you modify one of them a copy is triggered. I have added a benchmark as well to test that. Reviewed-by:bnilsen Reviewed-by:andreas --- src/gui/graphicsview/qgraphicsscene.cpp | 28 +++--- .../benchmarks/qgraphicsview/images/wine-big.jpeg | Bin 0 -> 12249 bytes tests/benchmarks/qgraphicsview/qgraphicsview.qrc | 1 + .../benchmarks/qgraphicsview/tst_qgraphicsview.cpp | 102 +++++++++++++++++++++ 4 files changed, 118 insertions(+), 13 deletions(-) create mode 100644 tests/benchmarks/qgraphicsview/images/wine-big.jpeg diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 126ea5b..1fc4567 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -4784,6 +4784,12 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte // Redraw any newly exposed areas. if (itemCache->allExposed || !itemCache->exposed.isEmpty()) { + + //We know that we will modify the pixmap, removing it from the cache + //will detach the one we have and avoid a deep copy + if (pixmapFound) + QPixmapCache::remove(pixmapKey); + // Fit the item's bounding rect into the pixmap's coordinates. QTransform itemToPixmap; if (fixedCacheSize) { @@ -4812,12 +4818,8 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte _q_paintIntoCache(&pix, item, pixmapExposed, itemToPixmap, painter->renderHints(), &cacheOption, painterStateProtection); - if (!pixmapFound) { - // insert this pixmap into the cache. - itemCache->key = QPixmapCache::insert(pix); - } else { - QPixmapCache::replace(pixmapKey, pix); - } + // insert this pixmap into the cache. + itemCache->key = QPixmapCache::insert(pix); // Reset expose data. itemCache->allExposed = false; @@ -4944,6 +4946,11 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte // Check for newly invalidated areas. if (itemCache->allExposed || !itemCache->exposed.isEmpty() || !scrollExposure.isEmpty()) { + //We know that we will modify the pixmap, removing it from the cache + //will detach the one we have and avoid a deep copy + if (pixmapFound) + QPixmapCache::remove(pixmapKey); + // Construct an item-to-pixmap transform. QPointF p = deviceRect.topLeft(); QTransform itemToPixmap = painter->worldTransform(); @@ -4984,13 +4991,8 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte } if (pixModified) { - if (!pixmapFound) { - // Insert this pixmap into the cache. - deviceData->key = QPixmapCache::insert(pix); - } else { - //otherwise we replace the pixmap in the cache - QPixmapCache::replace(pixmapKey, pix); - } + // Insert this pixmap into the cache. + deviceData->key = QPixmapCache::insert(pix); } // Redraw the exposed area using an untransformed painter. This diff --git a/tests/benchmarks/qgraphicsview/images/wine-big.jpeg b/tests/benchmarks/qgraphicsview/images/wine-big.jpeg new file mode 100644 index 0000000..9900a50 Binary files /dev/null and b/tests/benchmarks/qgraphicsview/images/wine-big.jpeg differ diff --git a/tests/benchmarks/qgraphicsview/qgraphicsview.qrc b/tests/benchmarks/qgraphicsview/qgraphicsview.qrc index 5e80029..3681648 100644 --- a/tests/benchmarks/qgraphicsview/qgraphicsview.qrc +++ b/tests/benchmarks/qgraphicsview/qgraphicsview.qrc @@ -2,6 +2,7 @@ images/designer.png images/wine.jpeg + images/wine-big.jpeg random.data diff --git a/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp b/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp index a06e033..570f744 100644 --- a/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp @@ -124,6 +124,8 @@ private slots: void textRiver(); void moveItemCache_data(); void moveItemCache(); + void paintItemCache_data(); + void paintItemCache(); }; tst_QGraphicsView::tst_QGraphicsView() @@ -796,5 +798,105 @@ void tst_QGraphicsView::moveItemCache() } } +class UpdatedPixmapCacheItem : public QGraphicsPixmapItem +{ +public: + UpdatedPixmapCacheItem(bool partial, QGraphicsItem *parent = 0) + : QGraphicsPixmapItem(parent), partial(partial) + { + } + + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) + { + QGraphicsPixmapItem::paint(painter,option,widget); + } +protected: + void advance(int i) + { + if (partial) + update(QRectF(boundingRect().center().x(), boundingRect().center().x(), 30, 30)); + else + update(); + } + +private: + bool partial; +}; + +void tst_QGraphicsView::paintItemCache_data() +{ + QTest::addColumn("updatePartial"); + QTest::addColumn("rotation"); + QTest::addColumn("cacheMode"); + QTest::newRow("Partial Update : ItemCoordinate Cache") << true << false << (int)QGraphicsItem::ItemCoordinateCache; + QTest::newRow("Partial Update : DeviceCoordinate Cache") << true << false << (int)QGraphicsItem::DeviceCoordinateCache; + QTest::newRow("Partial Update : No Cache") << true << false << (int)QGraphicsItem::NoCache; + QTest::newRow("Full Update : ItemCoordinate Cache") << false << false << (int)QGraphicsItem::ItemCoordinateCache; + QTest::newRow("Full Update : DeviceCoordinate Cache") << false << false << (int)QGraphicsItem::DeviceCoordinateCache; + QTest::newRow("Full Update : No Cache") << false << false << (int)QGraphicsItem::NoCache; + QTest::newRow("Partial Update : ItemCoordinate Cache item rotated") << true << true << (int)QGraphicsItem::ItemCoordinateCache; + QTest::newRow("Partial Update : DeviceCoordinate Cache item rotated") << true << true << (int)QGraphicsItem::DeviceCoordinateCache; + QTest::newRow("Partial Update : No Cache item rotated") << true << true << (int)QGraphicsItem::NoCache; + QTest::newRow("Full Update : ItemCoordinate Cache item rotated") << false << true << (int)QGraphicsItem::ItemCoordinateCache; + QTest::newRow("Full Update : DeviceCoordinate Cache item rotated") << false << true << (int)QGraphicsItem::DeviceCoordinateCache; + QTest::newRow("Full Update : No Cache item rotated") << false << true <<(int)QGraphicsItem::NoCache; +} + +void tst_QGraphicsView::paintItemCache() +{ + QFETCH(bool, updatePartial); + QFETCH(bool, rotation); + QFETCH(int, cacheMode); + + QGraphicsScene scene(0, 0, 300, 300); + + CountPaintEventView view(&scene); + view.resize(600, 600); + view.setFrameStyle(0); + view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + view.show(); + + QPixmap pix(":/images/wine.jpeg"); + QVERIFY(!pix.isNull()); + + QList items; + QFile file(":/random.data"); + QVERIFY(file.open(QIODevice::ReadOnly)); + QDataStream str(&file); + UpdatedPixmapCacheItem *item = new UpdatedPixmapCacheItem(updatePartial); + item->setPixmap(pix); + item->setCacheMode((QGraphicsItem::CacheMode)cacheMode); + if (rotation) + item->setTransform(QTransform().rotate(45)); + item->setPos(-100, -100); + scene.addItem(item); + + QPixmap pix2(":/images/wine-big.jpeg"); + item = new UpdatedPixmapCacheItem(updatePartial); + item->setPixmap(pix2); + item->setCacheMode((QGraphicsItem::CacheMode)cacheMode); + if (rotation) + item->setTransform(QTransform().rotate(45)); + item->setPos(0, 0); + scene.addItem(item); + + view.count = 0; + + QBENCHMARK { +#ifdef CALLGRIND_DEBUG + CALLGRIND_START_INSTRUMENTATION +#endif + for (int i = 0; i < 50; ++i) { + scene.advance(); + while (view.count < (i+1)) + qApp->processEvents(); + } +#ifdef CALLGRIND_DEBUG + CALLGRIND_STOP_INSTRUMENTATION +#endif + } +} + QTEST_MAIN(tst_QGraphicsView) #include "tst_qgraphicsview.moc" -- cgit v0.12 From 2c1b11f2192fd48da01a1093a7cb4a848de43c8a Mon Sep 17 00:00:00 2001 From: Trond Kjernaasen Date: Wed, 27 May 2009 11:11:57 +0200 Subject: Fixed aliasing pointer corruption in QDataStream. Use a union instead of an unsafe cast when swapping the bytes in the QDataStream streaming operators. The old seems to cause problems with Link Time Code Generation optimizations with the MSVC compilers. Task-number: 247708 Reviewed-by: Samuel Reviewed-by: Thiago BT: yes --- src/corelib/io/qdatastream.cpp | 92 +++++++++++++++++++++++++++++++++++------- 1 file changed, 77 insertions(+), 15 deletions(-) diff --git a/src/corelib/io/qdatastream.cpp b/src/corelib/io/qdatastream.cpp index b203899..e324ffe 100644 --- a/src/corelib/io/qdatastream.cpp +++ b/src/corelib/io/qdatastream.cpp @@ -622,11 +622,16 @@ QDataStream &QDataStream::operator>>(qint16 &i) setStatus(ReadPastEnd); } } else { - register uchar *p = (uchar *)(&i); + union { + qint16 val1; + char val2[2]; + } x; + char *p = x.val2; char b[2]; if (dev->read(b, 2) == 2) { *p++ = b[1]; *p = b[0]; + i = x.val1; } else { setStatus(ReadPastEnd); } @@ -660,13 +665,18 @@ QDataStream &QDataStream::operator>>(qint32 &i) setStatus(ReadPastEnd); } } else { // swap bytes - uchar *p = (uchar *)(&i); + union { + qint32 val1; + char val2[4]; + } x; + char *p = x.val2; char b[4]; if (dev->read(b, 4) == 4) { *p++ = b[3]; *p++ = b[2]; *p++ = b[1]; *p = b[0]; + i = x.val1; } else { setStatus(ReadPastEnd); } @@ -703,7 +713,12 @@ QDataStream &QDataStream::operator>>(qint64 &i) setStatus(ReadPastEnd); } } else { // swap bytes - uchar *p = (uchar *)(&i); + union { + qint64 val1; + char val2[8]; + } x; + + char *p = x.val2; char b[8]; if (dev->read(b, 8) == 8) { *p++ = b[7]; @@ -714,6 +729,7 @@ QDataStream &QDataStream::operator>>(qint64 &i) *p++ = b[2]; *p++ = b[1]; *p = b[0]; + i = x.val1; } else { setStatus(ReadPastEnd); } @@ -751,13 +767,19 @@ QDataStream &QDataStream::operator>>(float &f) setStatus(ReadPastEnd); } } else { // swap bytes - uchar *p = (uchar *)(&f); + union { + float val1; + char val2[4]; + } x; + + char *p = x.val2; char b[4]; if (dev->read(b, 4) == 4) { *p++ = b[3]; *p++ = b[2]; *p++ = b[1]; *p = b[0]; + f = x.val1; } else { setStatus(ReadPastEnd); } @@ -788,7 +810,11 @@ QDataStream &QDataStream::operator>>(double &f) setStatus(ReadPastEnd); } } else { // swap bytes - register uchar *p = (uchar *)(&f); + union { + double val1; + char val2[8]; + } x; + char *p = x.val2; char b[8]; if (dev->read(b, 8) == 8) { *p++ = b[7]; @@ -799,13 +825,18 @@ QDataStream &QDataStream::operator>>(double &f) *p++ = b[2]; *p++ = b[1]; *p = b[0]; + f = x.val1; } else { setStatus(ReadPastEnd); } } #else //non-standard floating point format - register uchar *p = (uchar *)(&f); + union { + double val1; + char val2[8]; + } x; + char *p = x.val2; char b[8]; if (dev->read(b, 8) == 8) { if (noswap) { @@ -827,6 +858,7 @@ QDataStream &QDataStream::operator>>(double &f) *p++ = b[Q_DF(1)]; *p = b[Q_DF(0)]; } + f = x.val1; } else { setStatus(ReadPastEnd); } @@ -970,7 +1002,12 @@ QDataStream &QDataStream::operator<<(qint16 i) if (noswap) { dev->write((char *)&i, sizeof(qint16)); } else { // swap bytes - register uchar *p = (uchar *)(&i); + union { + qint16 val1; + char val2[2]; + } x; + x.val1 = i; + char *p = x.val2; char b[2]; b[1] = *p++; b[0] = *p; @@ -992,7 +1029,12 @@ QDataStream &QDataStream::operator<<(qint32 i) if (noswap) { dev->write((char *)&i, sizeof(qint32)); } else { // swap bytes - register uchar *p = (uchar *)(&i); + union { + qint32 val1; + char val2[4]; + } x; + x.val1 = i; + char *p = x.val2; char b[4]; b[3] = *p++; b[2] = *p++; @@ -1022,13 +1064,18 @@ QDataStream &QDataStream::operator<<(qint64 i) { CHECK_STREAM_PRECOND(*this) if (version() < 6) { - quint32 i1 = i & 0xffffffff; - quint32 i2 = i >> 32; - *this << i2 << i1; + quint32 i1 = i & 0xffffffff; + quint32 i2 = i >> 32; + *this << i2 << i1; } else if (noswap) { // no conversion needed dev->write((char *)&i, sizeof(qint64)); } else { // swap bytes - register uchar *p = (uchar *)(&i); + union { + qint64 val1; + char val2[8]; + } x; + x.val1 = i; + char *p = x.val2; char b[8]; b[7] = *p++; b[6] = *p++; @@ -1077,7 +1124,12 @@ QDataStream &QDataStream::operator<<(float f) if (noswap) { // no conversion needed dev->write((char *)&g, sizeof(float)); } else { // swap bytes - register uchar *p = (uchar *)(&g); + union { + float val1; + char val2[4]; + } x; + x.val1 = f; + char *p = x.val2; char b[4]; b[3] = *p++; b[2] = *p++; @@ -1103,7 +1155,12 @@ QDataStream &QDataStream::operator<<(double f) if (noswap) { dev->write((char *)&f, sizeof(double)); } else { - register uchar *p = (uchar *)(&f); + union { + double val1; + char val2[8]; + } x; + x.val1 = f; + char *p = x.val2; char b[8]; b[7] = *p++; b[6] = *p++; @@ -1116,7 +1173,12 @@ QDataStream &QDataStream::operator<<(double f) dev->write(b, 8); } #else - register uchar *p = (uchar *)(&f); + union { + double val1; + char val2[8]; + } x; + x.val1 = f; + char *p = x.val2; char b[8]; if (noswap) { b[Q_DF(0)] = *p++; -- cgit v0.12 From cfdfdf079c4a2095c588dd8af8403c74d2cfa37a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 27 May 2009 09:44:14 +0200 Subject: Optimized QRasterPixmapData::metric. Avoid needless DPI calculations when not needed, and simplify the DPI calculations to the point where most of the operations disappear. Also avoid calling QImage::metric() so that we don't need to go through two switch statements and an extra function call just to get the width of a pixmap. Reviewed-by: Trond --- src/gui/image/qpixmap_raster.cpp | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp index b5556cd..29e4f3f 100644 --- a/src/gui/image/qpixmap_raster.cpp +++ b/src/gui/image/qpixmap_raster.cpp @@ -322,25 +322,36 @@ extern int qt_defaultDpiY(); int QRasterPixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const { + QImageData *d = image.d; + if (!d) + return 0; + // override the image dpi with the screen dpi when rendering to a pixmap - const int dpmX = qRound(qt_defaultDpiX() * 100 / qreal(2.54)); - const int dpmY = qRound(qt_defaultDpiY() * 100 / qreal(2.54)); switch (metric) { + case QPaintDevice::PdmWidth: + return d->width; + case QPaintDevice::PdmHeight: + return d->height; case QPaintDevice::PdmWidthMM: - return qRound(image.width() * 1000 / dpmX); + return qRound(d->width * 25.4 / qt_defaultDpiX()); case QPaintDevice::PdmHeightMM: - return qRound(image.height() * 1000 / dpmY); - case QPaintDevice::PdmDpiX: - return qRound(dpmX * qreal(0.0254)); - case QPaintDevice::PdmDpiY: - return qRound(dpmY * qreal(0.0254)); + return qRound(d->width * 25.4 / qt_defaultDpiY()); + case QPaintDevice::PdmNumColors: + return d->colortable.size(); + case QPaintDevice::PdmDepth: + return d->depth; + case QPaintDevice::PdmDpiX: // fall-through case QPaintDevice::PdmPhysicalDpiX: - return qRound(dpmX * qreal(0.0254)); + return qt_defaultDpiX(); + case QPaintDevice::PdmDpiY: // fall-through case QPaintDevice::PdmPhysicalDpiY: - return qRound(dpmY * qreal(0.0254)); + return qt_defaultDpiY(); default: - return image.metric(metric); + qWarning("QRasterPixmapData::metric(): Unhandled metric type %d", metric); + break; } + + return 0; } QImage* QRasterPixmapData::buffer() -- cgit v0.12 From 15c8f565973592c9929cdd6fc83d61641aa63afa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Mon, 25 May 2009 14:56:27 +0200 Subject: Fixed bugs in GL2 paint engine when several engines are active. Make sure makeCurrent() on a window surface unbinds any active FBO, and simplify ensureActive() code in GL2 paint engine a bit. We don't need the last_engine pointer as ensureActive() will take care of ensuring the correct engine is active anway. --- .../gl2paintengineex/qpaintengineex_opengl2.cpp | 46 ++++++++-------------- src/opengl/qgl.cpp | 15 +++++++ src/opengl/qgl_p.h | 1 + src/opengl/qglframebufferobject.cpp | 12 ++++-- 4 files changed, 41 insertions(+), 33 deletions(-) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index f174306..a7c7426 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -175,8 +175,6 @@ public: void updateDepthClip(); void systemStateChanged(); uint use_system_clip : 1; - - QPaintEngine *last_engine; }; @@ -830,10 +828,11 @@ void QGL2PaintEngineEx::stroke(const QVectorPath &path, const QPen &pen) { Q_D(QGL2PaintEngineEx); - ensureActive(); if (pen.style() == Qt::NoPen) return; + ensureActive(); + if ( (pen.isCosmetic() && (pen.style() == Qt::SolidLine)) && (pen.widthF() < 2.5f) ) { // We only handle solid, cosmetic pens with a width of 1 pixel @@ -1051,10 +1050,19 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev) Q_D(QGL2PaintEngineEx); // qDebug("QGL2PaintEngineEx::begin()"); - d->drawable.setDevice(pdev); - d->drawable.makeCurrent(); d->ctx = d->drawable.context(); + + if (d->ctx->d_ptr->active_engine) { + QGL2PaintEngineEx *engine = static_cast(d->ctx->d_ptr->active_engine); + QGL2PaintEngineExPrivate *p = static_cast(engine->d_ptr); + p->transferMode(BrushDrawingMode); + p->drawable.doneCurrent(); + } + + d->ctx->d_ptr->active_engine = this; + + d->drawable.makeCurrent(); QSize sz = d->drawable.size(); d->width = sz.width(); d->height = sz.height(); @@ -1064,14 +1072,6 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev) qt_resolve_version_2_0_functions(d->ctx); #endif - d->last_engine = d->ctx->d_ptr->active_engine; - d->ctx->d_ptr->active_engine = this; - - if (d->last_engine) { - QGL2PaintEngineEx *engine = static_cast(d->last_engine); - static_cast(engine->d_ptr)->transferMode(BrushDrawingMode); - } - if (!d->shaderManager) d->shaderManager = new QGLEngineShaderManager(d->ctx); @@ -1115,8 +1115,8 @@ bool QGL2PaintEngineEx::end() Q_D(QGL2PaintEngineEx); QGLContext *ctx = d->ctx; if (ctx->d_ptr->active_engine != this) { - QGL2PaintEngineEx *engine = static_cast(d->last_engine); - if (engine) { + QGL2PaintEngineEx *engine = static_cast(ctx->d_ptr->active_engine); + if (engine && engine->isActive()) { QGL2PaintEngineExPrivate *p = static_cast(engine->d_ptr); p->transferMode(BrushDrawingMode); p->drawable.doneCurrent(); @@ -1128,19 +1128,7 @@ bool QGL2PaintEngineEx::end() d->transferMode(BrushDrawingMode); d->drawable.swapBuffers(); d->drawable.doneCurrent(); - d->ctx->d_ptr->active_engine = d->last_engine; - - if (d->last_engine) { - QGL2PaintEngineEx *engine = static_cast(d->last_engine); - QGL2PaintEngineExPrivate *p = static_cast(engine->d_ptr); - - glDisable(GL_DEPTH_TEST); - glDisable(GL_SCISSOR_TEST); - - glViewport(0, 0, p->width, p->height); - engine->setState(engine->state()); - p->updateDepthClip(); - } + d->ctx->d_ptr->active_engine = 0; return false; } @@ -1152,7 +1140,7 @@ void QGL2PaintEngineEx::ensureActive() if (isActive() && ctx->d_ptr->active_engine != this) { QGL2PaintEngineEx *engine = static_cast(ctx->d_ptr->active_engine); - if (engine) { + if (engine && engine->isActive()) { QGL2PaintEngineExPrivate *p = static_cast(engine->d_ptr); p->transferMode(BrushDrawingMode); p->drawable.doneCurrent(); diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 0a2a196..62a592a 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -4391,6 +4391,15 @@ void QGLDrawable::swapBuffers() void QGLDrawable::makeCurrent() { + previous_fbo = 0; + if (!pixmapData && !fbo) { + QGLContext *ctx = context(); + previous_fbo = ctx->d_ptr->current_fbo; + ctx->d_ptr->current_fbo = 0; + if (previous_fbo) + glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0); + } + if (widget) widget->makeCurrent(); #if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL) @@ -4428,6 +4437,12 @@ void QGLDrawable::doneCurrent() } #endif + if (previous_fbo) { + QGLContext *ctx = context(); + ctx->d_ptr->current_fbo = previous_fbo; + glBindFramebuffer(GL_FRAMEBUFFER_EXT, previous_fbo); + } + if (fbo && !wasBound) fbo->release(); } diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index b421eee..9657416 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -333,6 +333,7 @@ private: #if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL) QGLPixmapData *pixmapData; #endif + int previous_fbo; }; // GL extension definitions diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp index 338ce1f..3e7ca0a 100644 --- a/src/opengl/qglframebufferobject.cpp +++ b/src/opengl/qglframebufferobject.cpp @@ -804,8 +804,10 @@ bool QGLFramebufferObject::bind() const QGLContext *context = QGLContext::currentContext(); if (d->valid && context) { // Save the previous setting to automatically restore in release(). - d->previous_fbo = context->d_ptr->current_fbo; - context->d_ptr->current_fbo = d->fbo; + if (context->d_ptr->current_fbo != d->fbo) { + d->previous_fbo = context->d_ptr->current_fbo; + context->d_ptr->current_fbo = d->fbo; + } } return d->valid; } @@ -834,8 +836,10 @@ bool QGLFramebufferObject::release() const QGLContext *context = QGLContext::currentContext(); if (context) { // Restore the previous setting for stacked framebuffer objects. - context->d_ptr->current_fbo = d->previous_fbo; - glBindFramebuffer(GL_FRAMEBUFFER_EXT, d->previous_fbo); + if (d->previous_fbo != context->d_ptr->current_fbo) { + context->d_ptr->current_fbo = d->previous_fbo; + glBindFramebuffer(GL_FRAMEBUFFER_EXT, d->previous_fbo); + } d->previous_fbo = 0; } -- cgit v0.12 From 855022d6108f6b3c90832e742217c50550af717d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 26 May 2009 10:58:30 +0200 Subject: Avoided expensive image upload for GL pixmap backend for QPixmap::fill. In the fill case we can simply set a flag saying the pixmap needs to be filled, and then when painting on the pixmap we start by filling the background using glClear via the existing QGLDrawable::autoFillBackground interface. --- .../gl2paintengineex/qpaintengineex_opengl2.cpp | 8 +++- src/opengl/qgl.cpp | 4 ++ src/opengl/qpixmapdata_gl.cpp | 46 +++++++++++++++++----- src/opengl/qpixmapdata_gl_p.h | 12 +++++- 4 files changed, 59 insertions(+), 11 deletions(-) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index a7c7426..aafa6de 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1095,7 +1095,13 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev) glDisable(GL_SCISSOR_TEST); QGLPixmapData *source = d->drawable.copyOnBegin(); - if (source) { + if (d->drawable.autoFillBackground()) { + QColor color = d->drawable.backgroundColor(); + + float alpha = color.alphaF(); + glClearColor(color.redF() * alpha, color.greenF() * alpha, color.blueF() * alpha, alpha); + glClear(GL_COLOR_BUFFER_BIT); + } else if (source) { d->transferMode(ImageDrawingMode); source->bind(false); diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 62a592a..0be70d7 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -4525,6 +4525,8 @@ QColor QGLDrawable::backgroundColor() const { if (widget) return widget->palette().brush(widget->backgroundRole()).color(); + else if (pixmapData) + return pixmapData->fillColor(); return QApplication::palette().brush(QPalette::Background).color(); } @@ -4547,6 +4549,8 @@ bool QGLDrawable::autoFillBackground() const { if (widget) return widget->autoFillBackground(); + else if (pixmapData) + return pixmapData->needsFill(); else return false; } diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp index c89b99b..85bcda5 100644 --- a/src/opengl/qpixmapdata_gl.cpp +++ b/src/opengl/qpixmapdata_gl.cpp @@ -103,6 +103,7 @@ QGLPixmapData::QGLPixmapData(PixelType type) , m_engine(0) , m_ctx(0) , m_dirty(false) + , m_hasFillColor(false) { setSerialNumber(++qt_gl_pixmap_serial); } @@ -196,6 +197,13 @@ void QGLPixmapData::fromImage(const QImage &image, resize(image.width(), image.height()); m_source = image; m_dirty = true; + m_hasFillColor = false; + + if (m_textureId) { + QGLShareContextScope ctx(qt_gl_share_widget()->context()); + glDeleteTextures(1, &m_textureId); + m_textureId = 0; + } } bool QGLPixmapData::scroll(int dx, int dy, const QRect &rect) @@ -222,7 +230,11 @@ void QGLPixmapData::fill(const QColor &color) if (!isValid()) return; - if (!m_source.isNull()) { + if (useFramebufferObjects()) { + m_source = QImage(); + m_hasFillColor = true; + m_fillColor = color; + } else if (!m_source.isNull()) { m_source.fill(PREMUL(color.rgba())); } else { // ## TODO: improve performance here @@ -243,14 +255,18 @@ QImage QGLPixmapData::toImage() const if (!isValid()) return QImage(); - if (m_renderFbo) + if (m_renderFbo) { copyBackFromRenderFbo(true); - else if (!m_source.isNull()) + } else if (!m_source.isNull()) { return m_source; - else if (m_dirty) - return QImage(m_width, m_height, QImage::Format_ARGB32_Premultiplied); - else + } else if (m_dirty || m_hasFillColor) { + QImage img(m_width, m_height, QImage::Format_ARGB32_Premultiplied); + if (m_hasFillColor) + img.fill(PREMUL(m_fillColor.rgba())); + return img; + } else { ensureCreated(); + } QGLShareContextScope ctx(qt_gl_share_widget()->context()); extern QImage qt_gl_read_texture(const QSize &size, bool alpha_format, bool include_alpha); @@ -272,6 +288,8 @@ void QGLPixmapData::copyBackFromRenderFbo(bool keepCurrentFboBound) const if (!isValid()) return; + m_hasFillColor = false; + const QGLContext *share_ctx = qt_gl_share_widget()->context(); QGLShareContextScope ctx(share_ctx); @@ -356,9 +374,12 @@ QPaintEngine* QGLPixmapData::paintEngine() const return m_engine; else if (!useFramebufferObjects()) { m_dirty = true; - if (m_source.size() != size()) m_source = QImage(size(), QImage::Format_ARGB32_Premultiplied); + if (m_hasFillColor) { + m_source.fill(PREMUL(m_fillColor.rgba())); + m_hasFillColor = false; + } return m_source.paintEngine(); } @@ -394,10 +415,17 @@ QPaintEngine* QGLPixmapData::paintEngine() const GLuint QGLPixmapData::bind(bool copyBack) const { - if (m_renderFbo && copyBack) + if (m_renderFbo && copyBack) { copyBackFromRenderFbo(true); - else + } else { + if (m_hasFillColor) { + m_dirty = true; + m_source = QImage(m_width, m_height, QImage::Format_ARGB32_Premultiplied); + m_source.fill(PREMUL(m_fillColor.rgba())); + m_hasFillColor = false; + } ensureCreated(); + } GLuint id = m_textureId; glBindTexture(GL_TEXTURE_2D, id); diff --git a/src/opengl/qpixmapdata_gl_p.h b/src/opengl/qpixmapdata_gl_p.h index 7e06db9..1b6b7ae 100644 --- a/src/opengl/qpixmapdata_gl_p.h +++ b/src/opengl/qpixmapdata_gl_p.h @@ -91,6 +91,9 @@ public: bool isUninitialized() const { return m_dirty && m_source.isNull(); } + bool needsFill() const { return m_hasFillColor; } + QColor fillColor() const { return m_fillColor; } + QSize size() const { return QSize(m_width, m_height); } int width() const { return m_width; } int height() const { return m_height; } @@ -119,8 +122,15 @@ private: mutable GLuint m_textureId; mutable QPaintEngine *m_engine; mutable QGLContext *m_ctx; - mutable bool m_dirty; mutable QImage m_source; + + // the texture is not in sync with the source image + mutable bool m_dirty; + + // fill has been called and no painting has been done, so the pixmap is + // represented by a single fill color + mutable QColor m_fillColor; + mutable bool m_hasFillColor; }; QT_END_NAMESPACE -- cgit v0.12 From 73e7d0cbed0261715f534d95f81055bf97ce4314 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Wed, 27 May 2009 11:45:52 +0200 Subject: Make WA_TranslucentBackground work on QGLWidget for X11 This patch enables QGLWidget's to have an ARGB visual on X11, alowing GL rendering on semi-transparent windows. Reviewed-By: Trond --- src/gui/kernel/qwidget_x11.cpp | 31 ++++-- .../gl2paintengineex/qpaintengineex_opengl2.cpp | 10 ++ src/opengl/qgl.cpp | 2 +- src/opengl/qgl_x11.cpp | 116 ++++++++++++++++++++- src/opengl/qpaintengine_opengl.cpp | 2 +- 5 files changed, 146 insertions(+), 15 deletions(-) diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp index b35740a..7e41ea1 100644 --- a/src/gui/kernel/qwidget_x11.cpp +++ b/src/gui/kernel/qwidget_x11.cpp @@ -893,15 +893,28 @@ void QWidgetPrivate::x11UpdateIsOpaque() int screen = xinfo.screen(); if (topLevel && X11->use_xrender && X11->argbVisuals[screen] && xinfo.depth() != 32) { - // recreate widget - QPoint pos = q->pos(); - bool visible = q->isVisible(); - if (visible) - q->hide(); - q->setParent(q->parentWidget(), q->windowFlags()); - q->move(pos); - if (visible) - q->show(); + + if (q->inherits("QGLWidget")) { + // We send QGLWidgets a ParentChange event which causes them to + // recreate their GL context, which in turn causes them to choose + // their visual again. Now that WA_TranslucentBackground is set, + // QGLContext::chooseVisual will select an ARGB visual. + QEvent e(QEvent::ParentChange); + QApplication::sendEvent(q, &e); + } + else { + // For regular widgets, reparent them with their parent which + // also triggers a recreation of the native window + QPoint pos = q->pos(); + bool visible = q->isVisible(); + if (visible) + q->hide(); + + q->setParent(q->parentWidget(), q->windowFlags()); + q->move(pos); + if (visible) + q->show(); + } } #endif } diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index aafa6de..5c8b364 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1083,6 +1083,16 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev) // qDebug("You should see green now"); // sleep(5); + const QColor &c = d->drawable.backgroundColor(); + glClearColor(c.redF(), c.greenF(), c.blueF(), d->drawable.format().alpha() ? c.alphaF() : 1.0); + if (d->drawable.context()->d_func()->clear_on_painter_begin && d->drawable.autoFillBackground()) { + GLbitfield clearBits = GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT; +#ifndef QT_OPENGL_ES + clearBits |= GL_ACCUM_BUFFER_BIT; +#endif + glClear(clearBits); + } + d->brushTextureDirty = true; d->brushUniformsDirty = true; d->matrixDirty = true; diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 0be70d7..9626a3d 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -3306,7 +3306,7 @@ bool QGLWidget::event(QEvent *e) glFinish(); doneCurrent(); } else if (e->type() == QEvent::ParentChange) { - if (d->glcx->d_func()->screen != d->xinfo.screen()) { + if (d->glcx->d_func()->screen != d->xinfo.screen() || testAttribute(Qt::WA_TranslucentBackground)) { setContext(new QGLContext(d->glcx->requestedFormat(), this)); // ### recreating the overlay isn't supported atm } diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp index 28c34de..aba1e5c 100644 --- a/src/opengl/qgl_x11.cpp +++ b/src/opengl/qgl_x11.cpp @@ -533,11 +533,22 @@ void *QGLContext::chooseVisual() void *QGLContext::tryVisual(const QGLFormat& f, int bufDepth) { Q_D(QGLContext); - int spec[40]; + int spec[45]; int i = 0; spec[i++] = GLX_LEVEL; spec[i++] = f.plane(); const QX11Info *xinfo = qt_x11Info(d->paintDevice); + bool useFBConfig = false; + +#if defined(GLX_VERSION_1_3) && !defined(QT_NO_XRENDER) + QWidget* widget = 0; + if (d->paintDevice->devType() == QInternal::Widget) + widget = static_cast(d->paintDevice); + + // Only use glXChooseFBConfig for widgets if we're trying to get an ARGB visual + if (widget && widget->testAttribute(Qt::WA_TranslucentBackground) && X11->use_xrender) + useFBConfig = true; +#endif #if defined(GLX_VERSION_1_1) && defined(GLX_EXT_visual_info) static bool useTranspExt = false; @@ -565,28 +576,41 @@ void *QGLContext::tryVisual(const QGLFormat& f, int bufDepth) useTranspExtChecked = true; } - if (f.plane() && useTranspExt) { + if (f.plane() && useTranspExt && !useFBConfig) { // Required to avoid non-transparent overlay visual(!) on some systems spec[i++] = GLX_TRANSPARENT_TYPE_EXT; spec[i++] = f.rgba() ? GLX_TRANSPARENT_RGB_EXT : GLX_TRANSPARENT_INDEX_EXT; } #endif +#if defined(GLX_VERSION_1_3) + // GLX_RENDER_TYPE is only in glx >=1.3 + if (useFBConfig) { + spec[i++] = GLX_RENDER_TYPE; + spec[i++] = f.rgba() ? GLX_RGBA_BIT : GLX_COLOR_INDEX_BIT; + } +#endif + if (f.doubleBuffer()) spec[i++] = GLX_DOUBLEBUFFER; + if (useFBConfig) + spec[i++] = True; if (f.depth()) { spec[i++] = GLX_DEPTH_SIZE; spec[i++] = f.depthBufferSize() == -1 ? 1 : f.depthBufferSize(); } if (f.stereo()) { spec[i++] = GLX_STEREO; + if (useFBConfig) + spec[i++] = True; } if (f.stencil()) { spec[i++] = GLX_STENCIL_SIZE; spec[i++] = f.stencilBufferSize() == -1 ? 1 : f.stencilBufferSize(); } if (f.rgba()) { - spec[i++] = GLX_RGBA; + if (!useFBConfig) + spec[i++] = GLX_RGBA; spec[i++] = GLX_RED_SIZE; spec[i++] = f.redBufferSize() == -1 ? 1 : f.redBufferSize(); spec[i++] = GLX_GREEN_SIZE; @@ -621,8 +645,86 @@ void *QGLContext::tryVisual(const QGLFormat& f, int bufDepth) spec[i++] = f.samples() == -1 ? 4 : f.samples(); } +#if defined(GLX_VERSION_1_3) + if (useFBConfig) { + spec[i++] = GLX_DRAWABLE_TYPE; + switch(d->paintDevice->devType()) { + case QInternal::Pixmap: + spec[i++] = GLX_PIXMAP_BIT; + break; + case QInternal::Pbuffer: + spec[i++] = GLX_PBUFFER_BIT; + break; + default: + qWarning("QGLContext: Unknown paint device type %d", d->paintDevice->devType()); + // Fall-through & assume it's a window + case QInternal::Widget: + spec[i++] = GLX_WINDOW_BIT; + break; + }; + } +#endif + spec[i] = XNone; - return glXChooseVisual(xinfo->display(), xinfo->screen(), spec); + + + XVisualInfo* chosenVisualInfo = 0; + +#if defined(GLX_VERSION_1_3) + while (useFBConfig) { + GLXFBConfig *configs; + int configCount = 0; + configs = glXChooseFBConfig(xinfo->display(), xinfo->screen(), spec, &configCount); + + if (!configs) + break; // fallback to trying glXChooseVisual + + for (i = 0; i < configCount; ++i) { + XVisualInfo* vi; + vi = glXGetVisualFromFBConfig(xinfo->display(), configs[i]); + if (!vi) + continue; + +#if !defined(QT_NO_XRENDER) + QWidget* w = 0; + if (d->paintDevice->devType() == QInternal::Widget) + w = static_cast(d->paintDevice); + + if (w && w->testAttribute(Qt::WA_TranslucentBackground) && f.alpha()) { + // Attempt to find a config who's visual has a proper alpha channel + XRenderPictFormat *pictFormat; + pictFormat = XRenderFindVisualFormat(xinfo->display(), vi->visual); + + if (pictFormat && (pictFormat->type == PictTypeDirect) && pictFormat->direct.alphaMask) { + // The pict format for the visual matching the FBConfig indicates ARGB + if (chosenVisualInfo) + XFree(chosenVisualInfo); + chosenVisualInfo = vi; + break; + } + } else +#endif //QT_NO_XRENDER + if (chosenVisualInfo) { + // If we've got a visual we can use and we're not trying to find one with a + // real alpha channel, we might as well just use the one we've got + break; + } + + if (!chosenVisualInfo) + chosenVisualInfo = vi; // Have something to fall back to + else + XFree(vi); + } + + XFree(configs); + break; + } +#endif // defined(GLX_VERSION_1_3) + + if (!chosenVisualInfo) + chosenVisualInfo = glXChooseVisual(xinfo->display(), xinfo->screen(), spec); + + return chosenVisualInfo; } @@ -1191,6 +1293,12 @@ void QGLWidget::setContext(QGLContext *context, d_func()->xinfo = parentWidget()->d_func()->xinfo; } + // If the application has set WA_TranslucentBackground and not explicitly set + // the alpha buffer size to zero, modify the format so it have an alpha channel + QGLFormat& fmt = d->glcx->d_func()->glFormat; + if (testAttribute(Qt::WA_TranslucentBackground) && fmt.alphaBufferSize() == -1) + fmt.setAlphaBufferSize(1); + bool createFailed = false; if (!d->glcx->isValid()) { if (!d->glcx->create(shareContext ? shareContext : oldcx)) diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp index d98cd7c..d5bf1dc 100644 --- a/src/opengl/qpaintengine_opengl.cpp +++ b/src/opengl/qpaintengine_opengl.cpp @@ -1331,7 +1331,7 @@ bool QOpenGLPaintEngine::begin(QPaintDevice *pdev) d->offscreen.begin(); const QColor &c = d->drawable.backgroundColor(); - glClearColor(c.redF(), c.greenF(), c.blueF(), 1.0); + glClearColor(c.redF(), c.greenF(), c.blueF(), d->drawable.format().alpha() ? c.alphaF() : 1.0); if (d->drawable.context()->d_func()->clear_on_painter_begin && d->drawable.autoFillBackground()) { GLbitfield clearBits = GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT; #ifndef QT_OPENGL_ES -- cgit v0.12 From 71cb35e942b94e4dba2055acdebbf90c352da762 Mon Sep 17 00:00:00 2001 From: Benjamin Poulain Date: Wed, 27 May 2009 13:23:53 +0200 Subject: Add comparation of images with indexed color Previously, two images with indexed colors were not equal if their color tables were not the same. The image are not compared by the value of the pixels Reviewed-by: Samuel --- src/gui/image/qimage.cpp | 10 +++++----- tests/auto/qimage/tst_qimage.cpp | 28 ++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 25c68bc..c1c5631 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -4853,8 +4853,6 @@ bool QImage::operator==(const QImage & i) const return false; if (d->format != Format_RGB32) { - if (d->colortable != i.d->colortable) - return false; if (d->format >= Format_ARGB32) { // all bits defined const int n = d->width * d->depth / 8; if (n == d->bytes_per_line && n == i.d->bytes_per_line) { @@ -4867,11 +4865,13 @@ bool QImage::operator==(const QImage & i) const } } } else { - int w = width(); - int h = height(); + const int w = width(); + const int h = height(); + const QVector &colortable = d->colortable; + const QVector &icolortable = i.d->colortable; for (int y=0; y colorTable(256); + for (int i = 0; i < 256; ++i) + colorTable[i] = qRgb(i, i, i); + img.setColorTable(colorTable); + + for (int i = 0; i < 256; ++i) { + img.setPixel(i, 0, i); + } + + QImage imgInverted(256, 1, QImage::Format_Indexed8); + QVector invertedColorTable(256); + for (int i = 0; i < 256; ++i) + invertedColorTable[255-i] = qRgb(i, i, i); + imgInverted.setColorTable(invertedColorTable); + + for (int i = 0; i < 256; ++i) { + imgInverted.setPixel(i, 0, (255-i)); + } + + QCOMPARE(img, imgInverted); +} + QTEST_MAIN(tst_QImage) #include "tst_qimage.moc" -- cgit v0.12 From 962d216ce9f9f1e6bd73fe43e3d2a7c86f64b75f Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Wed, 27 May 2009 14:02:14 +0200 Subject: Make QGLWidgets have the same background colour as QWidgets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QWidgets are filled with Qt::transparent when WA_TranslucentBackground is set, reguardless of what their background colour has been set to. This patch makes QGLWidgets behave the same way. Reviewed-By: Samuel Rødal --- .../gl2paintengineex/qpaintengineex_opengl2.cpp | 23 ++++++++-------------- src/opengl/qgl.cpp | 5 +++++ src/opengl/qgl_p.h | 1 + src/opengl/qpaintengine_opengl.cpp | 10 ++++++++-- 4 files changed, 22 insertions(+), 17 deletions(-) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 5c8b364..f7dbed3 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1083,16 +1083,6 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev) // qDebug("You should see green now"); // sleep(5); - const QColor &c = d->drawable.backgroundColor(); - glClearColor(c.redF(), c.greenF(), c.blueF(), d->drawable.format().alpha() ? c.alphaF() : 1.0); - if (d->drawable.context()->d_func()->clear_on_painter_begin && d->drawable.autoFillBackground()) { - GLbitfield clearBits = GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT; -#ifndef QT_OPENGL_ES - clearBits |= GL_ACCUM_BUFFER_BIT; -#endif - glClear(clearBits); - } - d->brushTextureDirty = true; d->brushUniformsDirty = true; d->matrixDirty = true; @@ -1105,11 +1095,14 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev) glDisable(GL_SCISSOR_TEST); QGLPixmapData *source = d->drawable.copyOnBegin(); - if (d->drawable.autoFillBackground()) { - QColor color = d->drawable.backgroundColor(); - - float alpha = color.alphaF(); - glClearColor(color.redF() * alpha, color.greenF() * alpha, color.blueF() * alpha, alpha); + if (d->drawable.context()->d_func()->clear_on_painter_begin && d->drawable.autoFillBackground()) { + if (d->drawable.hasTransparentBackground()) + glClearColor(0.0, 0.0, 0.0, 0.0); + else { + const QColor &c = d->drawable.backgroundColor(); + float alpha = c.alphaF(); + glClearColor(c.redF() * alpha, c.greenF() * alpha, c.blueF() * alpha, alpha); + } glClear(GL_COLOR_BUFFER_BIT); } else if (source) { d->transferMode(ImageDrawingMode); diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 9626a3d..ced3452 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -4530,6 +4530,11 @@ QColor QGLDrawable::backgroundColor() const return QApplication::palette().brush(QPalette::Background).color(); } +bool QGLDrawable::hasTransparentBackground() const +{ + return widget && widget->testAttribute(Qt::WA_TranslucentBackground); +} + QGLContext *QGLDrawable::context() const { if (widget) diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index 9657416..b1a63b5 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -314,6 +314,7 @@ public: QColor backgroundColor() const; QGLContext *context() const; bool autoFillBackground() const; + bool hasTransparentBackground() const; #if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL) QGLPixmapData *copyOnBegin() const; diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp index d5bf1dc..e3d8a1d 100644 --- a/src/opengl/qpaintengine_opengl.cpp +++ b/src/opengl/qpaintengine_opengl.cpp @@ -1330,9 +1330,15 @@ bool QOpenGLPaintEngine::begin(QPaintDevice *pdev) d->offscreen.begin(); - const QColor &c = d->drawable.backgroundColor(); - glClearColor(c.redF(), c.greenF(), c.blueF(), d->drawable.format().alpha() ? c.alphaF() : 1.0); if (d->drawable.context()->d_func()->clear_on_painter_begin && d->drawable.autoFillBackground()) { + + if (d->drawable.hasTransparentBackground()) + glClearColor(0.0, 0.0, 0.0, 0.0); + else { + const QColor &c = d->drawable.backgroundColor(); + glClearColor(c.redF(), c.greenF(), c.blueF(), 1.0); + } + GLbitfield clearBits = GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT; #ifndef QT_OPENGL_ES clearBits |= GL_ACCUM_BUFFER_BIT; -- cgit v0.12 From 16275ff6b9abc085a498428170047f2bee9ee30b Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 27 May 2009 14:28:06 +0200 Subject: A few html code generator fixes. There was an empty
    element with a name that came after it. I moved the name inside the
    element. And there were some elements that began inside one element and ended inside the next element. I just removed them, because they didn't really add anything. And I made the "Access functions:" bold. --- tools/qdoc3/htmlgenerator.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 798cbb5..e2e6950 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -2207,18 +2207,14 @@ void HtmlGenerator::generateSectionList(const Section& section, else { if (twoColumn && i == (int) (section.members.count() + 1) / 2) out() << "
      \n"; - out() << "
    • "; + out() << "
    • "; } - if (style == CodeMarker::Accessors) - out() << ""; generateSynopsis(*m, relative, marker, style, name_alignment); - if (style == CodeMarker::Accessors) - out() << ""; if (name_alignment) out() << "\n"; else - out() << "
    • \n"; + out() << "
    \n"; i++; ++m; } @@ -2283,8 +2279,10 @@ void HtmlGenerator::generateSynopsis(const Node *node, marked.replace("<@param>", ""); marked.replace("", ""); - if (style == CodeMarker::Summary) - marked.replace("@name>", "b>"); + if (style == CodeMarker::Summary) { + marked.replace("<@name>", ""); // was "" + marked.replace("", ""); // was "" + } if (style == CodeMarker::SeparateList) { QRegExp extraRegExp("<@extra>.*"); @@ -3090,7 +3088,7 @@ void HtmlGenerator::generateDetailedMember(const Node *node, section.members += property->resetters(); if (!section.members.isEmpty()) { - out() << "

    Access functions:

    \n"; + out() << "

    Access functions:

    \n"; generateSectionList(section, node, marker, CodeMarker::Accessors); } } -- cgit v0.12 From 3a61a448b92b4f7c7ee02196340d3bcb75d067fb Mon Sep 17 00:00:00 2001 From: diaulas Date: Tue, 12 May 2009 14:15:34 +0200 Subject: Dont show children when parent is not visible in QGraphicsItem When setVisible() is called on a QGraphicsItem, if the parent of that item was hidden, the child shouldn't be actually shown. Task-number: 197802 Reviewed-by: leo Reviewed-by: alexis --- src/gui/graphicsview/qgraphicsitem.cpp | 5 ++++ tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 32 ++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 4908296..b6a7386 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -1522,6 +1522,11 @@ void QGraphicsItemPrivate::setVisibleHelper(bool newVisible, bool explicitly, bo if (visible == quint32(newVisible)) return; + QGraphicsItem *parent(q_ptr->parentItem()); + if (parent && newVisible && !parent->d_ptr->visible) { + return; + } + // Modify the property. const QVariant newVisibleVariant(q_ptr->itemChange(QGraphicsItem::ItemVisibleChange, quint32(newVisible))); diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 58a17ea..d477135 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -123,6 +123,7 @@ private slots: void destruction(); void scene(); void parentItem(); + void childrenVisibility(); void setParentItem(); void children(); void flags(); @@ -549,6 +550,37 @@ void tst_QGraphicsItem::parentItem() delete item2; } +void tst_QGraphicsItem::childrenVisibility() +{ + QGraphicsScene scene; + QGraphicsRectItem item(QRectF(0,0,20,20)); + + QGraphicsRectItem *item2 = new QGraphicsRectItem(QRectF(0,0,10,10), &item); + scene.addItem(&item); + + //freshly created: both visible + QVERIFY(item.isVisible()); + QVERIFY(item2->isVisible()); + //hide child: parent visible, child not + item2->hide(); + QVERIFY(item.isVisible()); + QVERIFY(!item2->isVisible()); + //hide parent: parent and child invisible + item.hide(); + QVERIFY(!item.isVisible()); + QVERIFY(!item2->isVisible()); + //ask to show the child: parent and child invisible anyways + item2->show(); + QVERIFY(!item.isVisible()); + QVERIFY(!item2->isVisible()); + //show the parent: both parent and child visible + item.show(); + QVERIFY(item.isVisible()); + QVERIFY(item2->isVisible()); + + delete item2; +} + void tst_QGraphicsItem::setParentItem() { QGraphicsScene scene; -- cgit v0.12 From 5675d15eebd76fde43bc9305347c3b7833a7d893 Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Wed, 27 May 2009 15:03:00 +0200 Subject: Fixes for merge-request #407 Removed unused line and added task number to autotest. --- src/gui/graphicsview/qgraphicsitem.cpp | 5 +- tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 70 ++++++++++++++------------ 2 files changed, 39 insertions(+), 36 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index b6a7386..e8ace65 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -1522,10 +1522,9 @@ void QGraphicsItemPrivate::setVisibleHelper(bool newVisible, bool explicitly, bo if (visible == quint32(newVisible)) return; - QGraphicsItem *parent(q_ptr->parentItem()); - if (parent && newVisible && !parent->d_ptr->visible) { + // Don't show child if parent is not visible + if (parent && newVisible && !parent->d_ptr->visible) return; - } // Modify the property. const QVariant newVisibleVariant(q_ptr->itemChange(QGraphicsItem::ItemVisibleChange, diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index d477135..34a6ab1 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -123,7 +123,6 @@ private slots: void destruction(); void scene(); void parentItem(); - void childrenVisibility(); void setParentItem(); void children(); void flags(); @@ -227,6 +226,7 @@ private slots: void task240400_clickOnTextItem_data(); void task240400_clickOnTextItem(); void task243707_addChildBeforeParent(); + void task197802_childrenVisibility(); }; void tst_QGraphicsItem::init() @@ -550,37 +550,6 @@ void tst_QGraphicsItem::parentItem() delete item2; } -void tst_QGraphicsItem::childrenVisibility() -{ - QGraphicsScene scene; - QGraphicsRectItem item(QRectF(0,0,20,20)); - - QGraphicsRectItem *item2 = new QGraphicsRectItem(QRectF(0,0,10,10), &item); - scene.addItem(&item); - - //freshly created: both visible - QVERIFY(item.isVisible()); - QVERIFY(item2->isVisible()); - //hide child: parent visible, child not - item2->hide(); - QVERIFY(item.isVisible()); - QVERIFY(!item2->isVisible()); - //hide parent: parent and child invisible - item.hide(); - QVERIFY(!item.isVisible()); - QVERIFY(!item2->isVisible()); - //ask to show the child: parent and child invisible anyways - item2->show(); - QVERIFY(!item.isVisible()); - QVERIFY(!item2->isVisible()); - //show the parent: both parent and child visible - item.show(); - QVERIFY(item.isVisible()); - QVERIFY(item2->isVisible()); - - delete item2; -} - void tst_QGraphicsItem::setParentItem() { QGraphicsScene scene; @@ -5378,7 +5347,7 @@ void tst_QGraphicsItem::task243707_addChildBeforeParent() // inconsistent internal state that can cause a crash. This test shows // one such crash. QGraphicsScene scene; - QGraphicsWidget *widget = new QGraphicsWidget; + QGraphicsWidget *widget = new QGraphicsWidget; QGraphicsWidget *widget2 = new QGraphicsWidget(widget); scene.addItem(widget2); QVERIFY(!widget2->parentItem()); @@ -5387,6 +5356,41 @@ void tst_QGraphicsItem::task243707_addChildBeforeParent() QVERIFY(!widget2->commonAncestorItem(widget)); } +void tst_QGraphicsItem::task197802_childrenVisibility() +{ + QGraphicsScene scene; + QGraphicsRectItem item(QRectF(0,0,20,20)); + + QGraphicsRectItem *item2 = new QGraphicsRectItem(QRectF(0,0,10,10), &item); + scene.addItem(&item); + + //freshly created: both visible + QVERIFY(item.isVisible()); + QVERIFY(item2->isVisible()); + + //hide child: parent visible, child not + item2->hide(); + QVERIFY(item.isVisible()); + QVERIFY(!item2->isVisible()); + + //hide parent: parent and child invisible + item.hide(); + QVERIFY(!item.isVisible()); + QVERIFY(!item2->isVisible()); + + //ask to show the child: parent and child invisible anyways + item2->show(); + QVERIFY(!item.isVisible()); + QVERIFY(!item2->isVisible()); + + //show the parent: both parent and child visible + item.show(); + QVERIFY(item.isVisible()); + QVERIFY(item2->isVisible()); + + delete item2; +} + void tst_QGraphicsItem::boundingRegion_data() { QTest::addColumn("line"); -- cgit v0.12 From d8a2e52e4db873a2cfd39630df47b61bec502fd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl?= Date: Fri, 15 May 2009 05:29:29 +0000 Subject: Memory of fixedKernel is never returned, found by cppcheck. --- src/gui/image/qpixmapfilter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp index 8631c8c..4e6adc0 100644 --- a/src/gui/image/qpixmapfilter.cpp +++ b/src/gui/image/qpixmapfilter.cpp @@ -401,6 +401,7 @@ static void convolute( } yk++; } + delete[] fixedKernel; } /*! -- cgit v0.12 From b66f7a2e95c32c64701a992f28d99e32f48e2db1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 27 May 2009 16:25:25 +0200 Subject: Optimized fast scaling of ARGB8565 images onto RGB16 images. There was an optimized blend function for this case but not an optimized scale function. Performance increase seems to be in the order of 5x. Reviewed-by: Trond --- src/gui/painting/qblendfunctions.cpp | 59 +++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp index 8f4a2bf..f83ff7b 100644 --- a/src/gui/painting/qblendfunctions.cpp +++ b/src/gui/painting/qblendfunctions.cpp @@ -104,6 +104,37 @@ struct Blend_RGB16_on_RGB16_ConstAlpha { quint32 m_ialpha; }; +struct Blend_ARGB24_on_RGB16_SourceAlpha { + inline void write(quint16 *dst, qargb8565 src) { + const uint alpha = src.alpha(); + if (alpha) { + quint16 s = qrgb565(src).rawValue(); + if (alpha < 255) + s += BYTE_MUL_RGB16(*dst, 255 - alpha); + *dst = s; + } + } +}; + +struct Blend_ARGB24_on_RGB16_SourceAndConstAlpha { + inline Blend_ARGB24_on_RGB16_SourceAndConstAlpha(quint32 alpha) { + m_alpha = (alpha * 255) >> 8; + } + + inline void write(quint16 *dst, qargb8565 src) { + src = src.byte_mul(src.alpha(m_alpha)); + const uint alpha = src.alpha(); + if (alpha) { + quint16 s = qrgb565(src).rawValue(); + if (alpha < 255) + s += BYTE_MUL_RGB16(*dst, 255 - alpha); + *dst = s; + } + } + + quint32 m_alpha; +}; + struct Blend_ARGB32_on_RGB16_SourceAlpha { inline void write(quint16 *dst, quint32 src) { const quint8 alpha = qAlpha(src); @@ -237,6 +268,32 @@ void qt_scale_image_rgb16_on_rgb16(uchar *destPixels, int dbpl, } } +void qt_scale_image_argb24_on_rgb16(uchar *destPixels, int dbpl, + const uchar *srcPixels, int sbpl, + const QRectF &targetRect, + const QRectF &sourceRect, + const QRect &clip, + int const_alpha) +{ +#ifdef QT_DEBUG_DRAW + printf("qt_scale_argb24_on_rgb16: dst=(%p, %d), src=(%p, %d), target=(%d, %d), [%d x %d], src=(%d, %d) [%d x %d] alpha=%d\n", + destPixels, dbpl, srcPixels, sbpl, + targetRect.x(), targetRect.y(), targetRect.width(), targetRect.height(), + sourceRect.x(), sourceRect.y(), sourceRect.width(), sourceRect.height(), + const_alpha); +#endif + if (const_alpha == 256) { + Blend_ARGB24_on_RGB16_SourceAlpha noAlpha; + qt_scale_image_16bit(destPixels, dbpl, srcPixels, sbpl, + targetRect, sourceRect, clip, noAlpha); + } else { + Blend_ARGB24_on_RGB16_SourceAndConstAlpha constAlpha(const_alpha); + qt_scale_image_16bit(destPixels, dbpl, srcPixels, sbpl, + targetRect, sourceRect, clip, constAlpha); + } +} + + void qt_scale_image_argb32_on_rgb16(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, const QRectF &targetRect, @@ -874,7 +931,7 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] = 0, // Format_ARGB32, qt_scale_image_argb32_on_rgb16, // Format_ARGB32_Premultiplied, qt_scale_image_rgb16_on_rgb16, // Format_RGB16, - 0, // Format_ARGB8565_Premultiplied, + qt_scale_image_argb24_on_rgb16, // Format_ARGB8565_Premultiplied, 0, // Format_RGB666, 0, // Format_ARGB6666_Premultiplied, 0, // Format_RGB555, -- cgit v0.12 From e24868e99ef0ffd8e5690761a798d731c4b71b26 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Wed, 27 May 2009 16:30:47 +0200 Subject: Fixed a possible assert in QGtkStyle We now set and unset the GTK_HAS_FOCUS flag on the same painting call only if focus is set instead of resetting it on each painting call. This is a tiny optimization but also kills a possible assert on certain versions of Gtk+ (as reported with Red Hat Enterprise Linux 5). Task-number: 254614 Reviewed-by: denis --- src/gui/styles/qgtkstyle.cpp | 63 ++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index 14be518..0e54af8 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -940,10 +940,6 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, case PE_FrameLineEdit: { GtkWidget *gtkEntry = QGtk::gtkWidget(QLS("GtkEntry")); - if (option->state & State_HasFocus) - GTK_WIDGET_SET_FLAGS(gtkEntry, GTK_HAS_FOCUS); - else - GTK_WIDGET_UNSET_FLAGS(gtkEntry, GTK_HAS_FOCUS); gboolean interior_focus; gint focus_line_width; @@ -957,6 +953,9 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, if (!interior_focus && option->state & State_HasFocus) rect.adjust(focus_line_width, focus_line_width, -focus_line_width, -focus_line_width); + + if (option->state & State_HasFocus) + GTK_WIDGET_SET_FLAGS(gtkEntry, GTK_HAS_FOCUS); gtkPainter.paintShadow(gtkEntry, "entry", rect, option->state & State_Enabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE, GTK_SHADOW_IN, gtkEntry->style, @@ -965,6 +964,9 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, gtkPainter.paintShadow(gtkEntry, "entry", option->rect, option->state & State_Enabled ? GTK_STATE_ACTIVE : GTK_STATE_INSENSITIVE, GTK_SHADOW_IN, gtkEntry->style, QLS("GtkEntryShadowIn")); + + if (option->state & State_HasFocus) + GTK_WIDGET_UNSET_FLAGS(gtkEntry, GTK_HAS_FOCUS); } break; @@ -1050,17 +1052,13 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, GTK_WIDGET_SET_FLAGS(gtkButton, GTK_HAS_DEFAULT); gtkPainter.paintBox(gtkButton, "buttondefault", buttonRect, state, GTK_SHADOW_IN, style, isDefault ? QLS("d") : QString()); - } else - GTK_WIDGET_UNSET_FLAGS(gtkButton, GTK_HAS_DEFAULT); + } bool hasFocus = option->state & State_HasFocus; if (hasFocus) { key += QLS("def"); GTK_WIDGET_SET_FLAGS(gtkButton, GTK_HAS_FOCUS); - - } else { - GTK_WIDGET_UNSET_FLAGS(gtkButton, GTK_HAS_FOCUS); } if (!interiorFocus) @@ -1071,6 +1069,10 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, gtkPainter.paintBox(gtkButton, "button", buttonRect, state, shadow, style, key); + if (isDefault) + GTK_WIDGET_UNSET_FLAGS(gtkButton, GTK_HAS_DEFAULT); + if (hasFocus) + GTK_WIDGET_UNSET_FLAGS(gtkButton, GTK_HAS_FOCUS); } break; @@ -1334,6 +1336,8 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom GtkWidget *gtkToggleButton = QGtk::gtkWidget(buttonPath); QGtk::gtk_widget_set_direction(gtkToggleButton, reverse ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR); if (gtkToggleButton && (appears_as_list || comboBox->editable)) { + if (focus) + GTK_WIDGET_SET_FLAGS(gtkToggleButton, GTK_HAS_FOCUS); // Draw the combo box as a line edit with a button next to it if (comboBox->editable || appears_as_list) { GtkStateType frameState = (state == GTK_STATE_PRELIGHT) ? GTK_STATE_NORMAL : state; @@ -1347,22 +1351,16 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom else frameRect.setRight(arrowButtonRect.left()); - // Required for inner blue highlight with clearlooks - if (focus) { - GTK_WIDGET_SET_FLAGS(gtkEntry, GTK_HAS_FOCUS); - GTK_WIDGET_SET_FLAGS(gtkToggleButton, GTK_HAS_FOCUS); - - } else { - GTK_WIDGET_UNSET_FLAGS(gtkEntry, GTK_HAS_FOCUS); - GTK_WIDGET_UNSET_FLAGS(gtkToggleButton, GTK_HAS_FOCUS); - } - // Fill the line edit background // We could have used flat_box with "entry_bg" but that is probably not worth the overhead uint resolve_mask = option->palette.resolve(); int xt = gtkEntry->style->xthickness; int yt = gtkEntry->style->ythickness; QRect contentRect = frameRect.adjusted(xt, yt, -xt, -yt); + // Required for inner blue highlight with clearlooks + if (focus) + GTK_WIDGET_SET_FLAGS(gtkEntry, GTK_HAS_FOCUS); + if (widget && widget->testAttribute(Qt::WA_SetPalette) && resolve_mask & (1 << QPalette::Base)) // Palette overridden by user p->fillRect(contentRect, option->palette.base().color()); @@ -1376,6 +1374,8 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom GTK_SHADOW_IN, gtkEntry->style, entryPath + QString::number(focus) + QString::number(comboBox->editable) + QString::number(option->direction)); + if (focus) + GTK_WIDGET_UNSET_FLAGS(gtkEntry, GTK_HAS_FOCUS); } GtkStateType buttonState = GTK_STATE_NORMAL; @@ -1394,22 +1394,21 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom gtkCachedPainter.paintBox( gtkToggleButton, "button", arrowButtonRect, buttonState, shadow, gtkToggleButton->style, buttonPath + QString::number(focus) + QString::number(option->direction)); - + if (focus) + GTK_WIDGET_UNSET_FLAGS(gtkToggleButton, GTK_HAS_FOCUS); } else { // Draw combo box as a button QRect buttonRect = option->rect; - if (focus) { // Clearlooks actually check the widget for the default state + if (focus) // Clearlooks actually check the widget for the default state GTK_WIDGET_SET_FLAGS(gtkToggleButton, GTK_HAS_FOCUS); - - } else { - GTK_WIDGET_UNSET_FLAGS(gtkToggleButton, GTK_HAS_FOCUS); - } - gtkCachedPainter.paintBox(gtkToggleButton, "button", buttonRect, state, shadow, gtkToggleButton->style, buttonPath + QString::number(focus)); + if (focus) + GTK_WIDGET_UNSET_FLAGS(gtkToggleButton, GTK_HAS_FOCUS); + // Draw the separator between label and arrows QString vSeparatorPath = buttonPath + QLS(".GtkHBox.GtkVSeparator"); @@ -1775,15 +1774,12 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom shadow = GTK_SHADOW_IN; style = gtkPainter.getStyle(gtkSpinButton); - if (option->state & State_HasFocus) - GTK_WIDGET_SET_FLAGS(gtkSpinButton, GTK_HAS_FOCUS); - else - GTK_WIDGET_UNSET_FLAGS(gtkSpinButton, GTK_HAS_FOCUS); QString key; - - if (option->state & State_HasFocus) + if (option->state & State_HasFocus) { key = QLS("f"); + GTK_WIDGET_SET_FLAGS(gtkSpinButton, GTK_HAS_FOCUS); + } uint resolve_mask = option->palette.resolve(); @@ -1816,6 +1812,9 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom gtkPainter.paintBox( gtkSpinButton, "spinbutton_down", downRect, GTK_STATE_PRELIGHT, GTK_SHADOW_OUT, style, key); else gtkPainter.paintBox( gtkSpinButton, "spinbutton_down", downRect, GTK_STATE_NORMAL, GTK_SHADOW_OUT, style, key); + + if (option->state & State_HasFocus) + GTK_WIDGET_UNSET_FLAGS(gtkSpinButton, GTK_HAS_FOCUS); } if (spinBox->buttonSymbols == QAbstractSpinBox::PlusMinus) { -- cgit v0.12 From 884eb97fe9eab4ee84dd8aafb026fd918906cf9a Mon Sep 17 00:00:00 2001 From: Matteo Bertozzi Date: Sun, 17 May 2009 15:19:31 +0200 Subject: Speed up util/normalize dir iteration Use QDirIterator to speed up iterating over directories in normalize util. Reviewed-by: Eskil --- util/normalize/main.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/util/normalize/main.cpp b/util/normalize/main.cpp index 905c1ec..b16335e 100644 --- a/util/normalize/main.cpp +++ b/util/normalize/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ #include -#include +#include #include #include #include @@ -140,18 +140,14 @@ void check(const QString &fileName) void traverse(const QString &path) { - QDir dir(path); - dir.setFilter(QDir::Dirs | QDir::Files | QDir::NoSymLinks); - - const QFileInfoList list = dir.entryInfoList(); - for (int i = 0; i < list.count(); ++i) { - const QFileInfo fi = list.at(i); - if (fi.fileName() == QLatin1String(".") || fi.fileName() == QLatin1String("..")) - continue; - if (fi.fileName().endsWith(".cpp")) - check(path + fi.fileName()); - if (fi.isDir()) - traverse(path + fi.fileName() + "/"); // recurse + QDirIterator dirIterator(path, QDir::NoDotAndDotDot | QDir::Dirs | QDir::Files | QDir::NoSymLinks); + + while (dirIterator.hasNext()) { + QString filePath = dirIterator.next(); + if (filePath.endsWith(".cpp")) + check(filePath); + else if (QFileInfo(filePath).isDir()) + traverse(filePath); // recurse } } -- cgit v0.12 From 2be3c937fdca26287f74dd58cc217cb51924cf8a Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Wed, 27 May 2009 17:21:53 +0200 Subject: QNetworkReply internals: do not assert when aborted and reading data ...but just silently return. This is ok because at another location in QNetworkReplyImplPrivate we do the same. Reviewed-by: Thiago Task-number: 254638 --- src/network/access/qnetworkreplyimpl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp index 79c3d1a..6f715e5 100644 --- a/src/network/access/qnetworkreplyimpl.cpp +++ b/src/network/access/qnetworkreplyimpl.cpp @@ -382,7 +382,8 @@ void QNetworkReplyImplPrivate::feed(const QByteArray &data) void QNetworkReplyImplPrivate::feed(QIODevice *data) { Q_Q(QNetworkReplyImpl); - Q_ASSERT(q->isOpen()); + if (!q->isOpen()) + return; // read until EOF from data if (copyDevice) { -- cgit v0.12 From d0bc0a26f8ac4c2f02819c262b8aa7c3dd1cad3b Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 27 May 2009 17:25:01 +0200 Subject: Fixed: Setting a border using stylesheet for QComboBox adds an unwated frame. This was already fix. But there was still a frame if there was a stylesheet on the applicaiton. The reason is that the frame's constructor call the style for some hints. And later the combobox will query the style again for the frame hint, before the view get polished. The problem is that the StyleSheetStyle will fill the css cache with wrong information on the first call. This is not visible if there is no stylesheet as in the constructor, the widget style is still the default application stylesheet if there is no global applicaiton stylesheet. Task-number: 254589 Reviewed-by: jbache BT: --- src/gui/styles/qstylesheetstyle.cpp | 9 ++++++--- tests/auto/qcombobox/tst_qcombobox.cpp | 8 +++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp index 714b8c5..bd80bb6 100644 --- a/src/gui/styles/qstylesheetstyle.cpp +++ b/src/gui/styles/qstylesheetstyle.cpp @@ -5252,9 +5252,12 @@ int QStyleSheetStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWi #ifndef QT_NO_COMBOBOX if (qobject_cast(w)) { QAbstractItemView *view = qFindChild(w); - QRenderRule subRule = renderRule(view, PseudoElement_None); - if (subRule.hasBox() || !subRule.hasNativeBorder()) - return QFrame::NoFrame; + if (view) { + view->ensurePolished(); + QRenderRule subRule = renderRule(view, PseudoElement_None); + if (subRule.hasBox() || !subRule.hasNativeBorder()) + return QFrame::NoFrame; + } } #endif // QT_NO_COMBOBOX break; diff --git a/tests/auto/qcombobox/tst_qcombobox.cpp b/tests/auto/qcombobox/tst_qcombobox.cpp index 2fff6d0..816b2e8 100644 --- a/tests/auto/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/qcombobox/tst_qcombobox.cpp @@ -2171,7 +2171,7 @@ void tst_QComboBox::noScrollbar_data() QTest::newRow("everything and more") << QString::fromLatin1("QAbstractItemView { border: 1px 3px 5px 1px solid blue; " " padding: 2px 5px 3px 1px; margin: 2px 5px 3px 1px; } " " QAbstractItemView::item { border: 2px solid green; " - " padding: 1px 1px 2px 2px margin: 1px; } " ); + " padding: 1px 1px 2px 2px; margin: 1px; } " ); } void tst_QComboBox::noScrollbar() @@ -2179,10 +2179,11 @@ void tst_QComboBox::noScrollbar() QStringList initialContent; initialContent << "foo" << "bar" << "foobar" << "moo"; QFETCH(QString, stylesheet); + QString oldCss = qApp->styleSheet(); + qApp->setStyleSheet(stylesheet); { QComboBox comboBox; - comboBox.setStyleSheet(stylesheet); comboBox.addItems(initialContent); comboBox.show(); comboBox.resize(200, comboBox.height()); @@ -2196,7 +2197,6 @@ void tst_QComboBox::noScrollbar() { QTableWidget *table = new QTableWidget(2,2); QComboBox comboBox; - comboBox.setStyleSheet(stylesheet); comboBox.setView(table); comboBox.setModel(table->model()); comboBox.show(); @@ -2207,6 +2207,8 @@ void tst_QComboBox::noScrollbar() QVERIFY(!comboBox.view()->horizontalScrollBar()->isVisible()); QVERIFY(!comboBox.view()->verticalScrollBar()->isVisible()); } + + qApp->setStyleSheet(oldCss); } void tst_QComboBox::setItemDelegate() -- cgit v0.12 From 665614ede1de33d5ccfacb81c1463896a99ffd86 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 27 May 2009 18:21:30 +0200 Subject: Remove used variable olsFrameStyle was old. Reviewed-by: jbache --- src/gui/widgets/qframe.cpp | 4 +--- src/gui/widgets/qframe_p.h | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/gui/widgets/qframe.cpp b/src/gui/widgets/qframe.cpp index 6f81331..22a990b 100644 --- a/src/gui/widgets/qframe.cpp +++ b/src/gui/widgets/qframe.cpp @@ -59,8 +59,7 @@ QFramePrivate::QFramePrivate() midLineWidth(0), frameWidth(0), leftFrameWidth(0), rightFrameWidth(0), - topFrameWidth(0), bottomFrameWidth(0), - oldFrameStyle(QFrame::NoFrame | QFrame::Plain) + topFrameWidth(0), bottomFrameWidth(0) { } @@ -333,7 +332,6 @@ void QFrame::setFrameStyle(int style) d->frameStyle = (short)style; update(); d->updateFrameWidth(); - d->oldFrameStyle = (short)style; } /*! diff --git a/src/gui/widgets/qframe_p.h b/src/gui/widgets/qframe_p.h index 3ea0c8b..537f5bf 100644 --- a/src/gui/widgets/qframe_p.h +++ b/src/gui/widgets/qframe_p.h @@ -74,7 +74,6 @@ public: short frameWidth; short leftFrameWidth, rightFrameWidth; short topFrameWidth, bottomFrameWidth; - short oldFrameStyle; inline void init(); -- cgit v0.12 From a9308e78e9b8aea110316c18489dd222936e13e4 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 27 May 2009 18:50:20 +0200 Subject: Compile without OpenGL Reviewed-by: Alexis --- examples/animation/sub-attaq/mainwindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/animation/sub-attaq/mainwindow.cpp b/examples/animation/sub-attaq/mainwindow.cpp index a166241..9cf9eb5 100644 --- a/examples/animation/sub-attaq/mainwindow.cpp +++ b/examples/animation/sub-attaq/mainwindow.cpp @@ -43,11 +43,11 @@ #include "mainwindow.h" #include "graphicsscene.h" +//Qt +#include #ifndef QT_NO_OPENGL - #include +#include #endif -//Qt -#include MainWindow::MainWindow() : QMainWindow(0) { -- cgit v0.12 From 8facefaef36ae313661bbdbcf317c374e35754cb Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 27 May 2009 19:04:55 +0200 Subject: Fixes sub-attaq in shadow build. Reviewed-by: Alexis --- examples/animation/sub-attaq/graphicsscene.cpp | 2 +- examples/animation/sub-attaq/subattaq.qrc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/animation/sub-attaq/graphicsscene.cpp b/examples/animation/sub-attaq/graphicsscene.cpp index f2d41bc..e773dae 100644 --- a/examples/animation/sub-attaq/graphicsscene.cpp +++ b/examples/animation/sub-attaq/graphicsscene.cpp @@ -120,7 +120,7 @@ GraphicsScene::GraphicsScene(int x, int y, int width, int height, Mode mode) //parse the xml that contain all data of the game QXmlStreamReader reader; - QFile file(QDir::currentPath() + "/data.xml"); + QFile file(":data.xml"); file.open(QIODevice::ReadOnly); reader.setDevice(&file); LevelDescription currentLevel; diff --git a/examples/animation/sub-attaq/subattaq.qrc b/examples/animation/sub-attaq/subattaq.qrc index c76f8ef..80a3af1 100644 --- a/examples/animation/sub-attaq/subattaq.qrc +++ b/examples/animation/sub-attaq/subattaq.qrc @@ -34,5 +34,6 @@ pics/big/explosion/submarine/step2.png pics/big/explosion/submarine/step3.png pics/big/explosion/submarine/step4.png + data.xml -- cgit v0.12 From e4cd7640d98f229e777f0699d7b738a8b539c269 Mon Sep 17 00:00:00 2001 From: mae Date: Wed, 27 May 2009 20:18:01 +0200 Subject: Restore undo compression for cut/del of selections This is a small fix to 4af30f47c37fd0e6826aca2984dd0f567dc7e465 --- src/gui/text/qtextcursor.cpp | 57 +++++++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 25 deletions(-) diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp index d12e3fe..b9e1c89 100644 --- a/src/gui/text/qtextcursor.cpp +++ b/src/gui/text/qtextcursor.cpp @@ -1361,12 +1361,15 @@ void QTextCursor::deleteChar() if (!d || !d->priv) return; - if (d->position == d->anchor) { - if (!d->canDelete(d->position)) - return; - d->adjusted_anchor = d->anchor = - d->priv->nextCursorPosition(d->anchor, QTextLayout::SkipCharacters); + if (d->position != d->anchor) { + removeSelectedText(); + return; } + + if (!d->canDelete(d->position)) + return; + d->adjusted_anchor = d->anchor = + d->priv->nextCursorPosition(d->anchor, QTextLayout::SkipCharacters); d->remove(); d->setX(); } @@ -1381,27 +1384,29 @@ void QTextCursor::deletePreviousChar() { if (!d || !d->priv) return; - - if (d->position == d->anchor) { - if (d->anchor < 1 || !d->canDelete(d->anchor-1)) - return; - d->anchor--; - - QTextDocumentPrivate::FragmentIterator fragIt = d->priv->find(d->anchor); - const QTextFragmentData * const frag = fragIt.value(); - int fpos = fragIt.position(); - QChar uc = d->priv->buffer().at(d->anchor - fpos + frag->stringPosition); - if (d->anchor > fpos && uc.unicode() >= 0xdc00 && uc.unicode() < 0xe000) { - // second half of a surrogate, check if we have the first half as well, - // if yes delete both at once - uc = d->priv->buffer().at(d->anchor - 1 - fpos + frag->stringPosition); - if (uc.unicode() >= 0xd800 && uc.unicode() < 0xdc00) - --d->anchor; - } - - d->adjusted_anchor = d->anchor; + + if (d->position != d->anchor) { + removeSelectedText(); + return; } - + + if (d->anchor < 1 || !d->canDelete(d->anchor-1)) + return; + d->anchor--; + + QTextDocumentPrivate::FragmentIterator fragIt = d->priv->find(d->anchor); + const QTextFragmentData * const frag = fragIt.value(); + int fpos = fragIt.position(); + QChar uc = d->priv->buffer().at(d->anchor - fpos + frag->stringPosition); + if (d->anchor > fpos && uc.unicode() >= 0xdc00 && uc.unicode() < 0xe000) { + // second half of a surrogate, check if we have the first half as well, + // if yes delete both at once + uc = d->priv->buffer().at(d->anchor - 1 - fpos + frag->stringPosition); + if (uc.unicode() >= 0xd800 && uc.unicode() < 0xdc00) + --d->anchor; + } + + d->adjusted_anchor = d->anchor; d->remove(); d->setX(); } @@ -1517,7 +1522,9 @@ void QTextCursor::removeSelectedText() if (!d || !d->priv || d->position == d->anchor) return; + d->priv->beginEditBlock(); d->remove(); + d->priv->endEditBlock(); d->setX(); } -- cgit v0.12 From 8aef511877d460e4d7e75c978142f1ca3bd50451 Mon Sep 17 00:00:00 2001 From: Bill King Date: Thu, 28 May 2009 11:12:26 +1000 Subject: Adds support for linking against iodbc on linux. If unixodbc detection fails, try and link/detect iodbc libraries and link against them. Reviewed-by: Lincoln Ramsay --- config.tests/unix/iodbc/iodbc.cpp | 7 +++++++ config.tests/unix/iodbc/iodbc.pro | 4 ++++ configure | 25 ++++++++++++++++++------- projects.pro | 1 + src/plugins/sqldrivers/odbc/odbc.pro | 8 +------- 5 files changed, 31 insertions(+), 14 deletions(-) create mode 100644 config.tests/unix/iodbc/iodbc.cpp create mode 100644 config.tests/unix/iodbc/iodbc.pro diff --git a/config.tests/unix/iodbc/iodbc.cpp b/config.tests/unix/iodbc/iodbc.cpp new file mode 100644 index 0000000..6b64e12 --- /dev/null +++ b/config.tests/unix/iodbc/iodbc.cpp @@ -0,0 +1,7 @@ +#include +#include + +int main(int, char **) +{ + return 0; +} diff --git a/config.tests/unix/iodbc/iodbc.pro b/config.tests/unix/iodbc/iodbc.pro new file mode 100644 index 0000000..465a9a7 --- /dev/null +++ b/config.tests/unix/iodbc/iodbc.pro @@ -0,0 +1,4 @@ +SOURCES = iodbc.cpp +CONFIG -= qt dylib +mac:CONFIG -= app_bundle +LIBS += -liodbc diff --git a/configure b/configure index 85ce3da..764840e 100755 --- a/configure +++ b/configure @@ -716,6 +716,7 @@ QT_LFLAGS_MYSQL= QT_LFLAGS_MYSQL_R= QT_CFLAGS_SQLITE= QT_LFLAGS_SQLITE= +QT_LFLAGS_ODBC="-lodbc" # flags for libdbus-1 QT_CFLAGS_DBUS= @@ -4431,14 +4432,21 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do CFG_SQL_odbc=plugin fi else - if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then - echo "ODBC support cannot be enabled due to functionality tests!" - echo " Turn on verbose messaging (-v) to $0 to see the final report." - echo " If you believe this message is in error you may use the continue" - echo " switch (-continue) to $0 to continue." - exit 101 + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iodbc "iODBC" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_ARCHS_COMMANDLINE; then + QT_LFLAGS_ODBC="-liodbc" + if [ "$CFG_SQL_odbc" = "auto" ]; then + CFG_SQL_odbc=plugin + fi else - CFG_SQL_odbc=no + if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then + echo "ODBC support cannot be enabled due to functionality tests!" + echo " Turn on verbose messaging (-v) to $0 to see the final report." + echo " If you believe this message is in error you may use the continue" + echo " switch (-continue) to $0 to continue." + exit 101 + else + CFG_SQL_odbc=no + fi fi fi fi @@ -6684,6 +6692,9 @@ fi if [ -n "$QT_LFLAGS_SQLITE" ]; then echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$CACHEFILE.tmp" fi +if [ -n "$QT_LFLAGS_ODBC" ]; then + echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$CACHEFILE.tmp" +fi if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$CACHEFILE.tmp" diff --git a/projects.pro b/projects.pro index 2596c0a..3817792 100644 --- a/projects.pro +++ b/projects.pro @@ -61,6 +61,7 @@ unix { (cd config.tests/unix/mysql_r && $(MAKE) distclean); \ (cd config.tests/unix/nis && $(MAKE) distclean); \ (cd config.tests/unix/nix && $(MAKE) distclean); \ + (cd config.tests/unix/iodbc && $(MAKE) distclean); \ (cd config.tests/unix/odbc && $(MAKE) distclean); \ (cd config.tests/unix/oci && $(MAKE) distclean); \ (cd config.tests/unix/tds && $(MAKE) distclean); \ diff --git a/src/plugins/sqldrivers/odbc/odbc.pro b/src/plugins/sqldrivers/odbc/odbc.pro index 0835ce1..3de8ab2 100644 --- a/src/plugins/sqldrivers/odbc/odbc.pro +++ b/src/plugins/sqldrivers/odbc/odbc.pro @@ -4,15 +4,9 @@ HEADERS = ../../../sql/drivers/odbc/qsql_odbc.h SOURCES = main.cpp \ ../../../sql/drivers/odbc/qsql_odbc.cpp -mac { - !contains( LIBS, .*odbc.* ) { - LIBS *= -liodbc - } -} - unix { !contains( LIBS, .*odbc.* ) { - LIBS *= -lodbc + LIBS *= $$QT_LFLAGS_ODBC } } -- cgit v0.12 From 5d7a0073ac8e9ad241812ae8b5dc138961bd612f Mon Sep 17 00:00:00 2001 From: Andreas Aardal Hanssen Date: Thu, 28 May 2009 09:35:39 +0200 Subject: Doc change; QGraphicsView::DontClipPainter is obsolete since Qt 4.5. Reviewed-by: Lars --- src/gui/graphicsview/qgraphicsview.cpp | 11 +---------- src/gui/graphicsview/qgraphicsview.h | 2 +- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp index 501aef1..10b837a 100644 --- a/src/gui/graphicsview/qgraphicsview.cpp +++ b/src/gui/graphicsview/qgraphicsview.cpp @@ -200,16 +200,7 @@ static const int QGRAPHICSVIEW_PREALLOC_STYLE_OPTIONS = 503; // largest prime < Note that setting a flag usually imposes a side effect, and this effect can vary between paint devices and platforms. - \value DontClipPainter QGraphicsView sometimes clips the painter when - rendering the scene contents. This can generally improve performance - (e.g., rendering only small parts of a large pixmap), and protects against - rendering mistakes (e.g., drawing outside bounding rectangles, or outside - the exposed area). In some situations, however, the painter clip can slow - down rendering; especially when all painting is restricted to inside - exposed areas. By enabling this flag, QGraphicsView will completely - disable its implicit clipping. Note that rendering artifacts from using a - semi-transparent foreground or background brush can occur if clipping is - disabled. + \value DontClipPainter This value is obsolete and has no effect. \value DontSavePainterState When rendering, QGraphicsView protects the painter state (see QPainter::save()) when rendering the background or diff --git a/src/gui/graphicsview/qgraphicsview.h b/src/gui/graphicsview/qgraphicsview.h index e77e45c..c3ea6e5 100644 --- a/src/gui/graphicsview/qgraphicsview.h +++ b/src/gui/graphicsview/qgraphicsview.h @@ -110,7 +110,7 @@ public: }; enum OptimizationFlag { - DontClipPainter = 0x1, + DontClipPainter = 0x1, // obsolete DontSavePainterState = 0x2, DontAdjustForAntialiasing = 0x4 }; -- cgit v0.12 From b3be28bf199521546bc7890c66f8454f5d310083 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 28 May 2009 09:51:06 +0200 Subject: Compile qstatemachine autotest --- src/corelib/statemachine/qstate_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/statemachine/qstate_p.h b/src/corelib/statemachine/qstate_p.h index 491cb87..93744b9 100644 --- a/src/corelib/statemachine/qstate_p.h +++ b/src/corelib/statemachine/qstate_p.h @@ -79,7 +79,7 @@ class QAbstractTransition; class QHistoryState; class QState; -class QStatePrivate : public QAbstractStatePrivate +class Q_AUTOTEST_EXPORT QStatePrivate : public QAbstractStatePrivate { Q_DECLARE_PUBLIC(QState) public: -- cgit v0.12 From 695e49acfb34ffb5b61fddbd6afff9f1281e8299 Mon Sep 17 00:00:00 2001 From: Kavindra Devi Palaraja Date: Thu, 28 May 2009 10:00:22 +0200 Subject: Doc - final screenshot and changes --- doc/src/designer-manual.qdoc | 19 ++++++++----------- .../images/rgbController-configure-connection1.png | Bin 29210 -> 23241 bytes 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/doc/src/designer-manual.qdoc b/doc/src/designer-manual.qdoc index 58d0f71..4b8de32 100644 --- a/doc/src/designer-manual.qdoc +++ b/doc/src/designer-manual.qdoc @@ -58,7 +58,8 @@ and custom plugins allow you to use your own components with \QD. If you are new to \QD, you can take a look at the - \l{Getting To Know Qt Designer} document. + \l{Getting To Know Qt Designer} document. For a quick tutorial on how to + use \QD, refer to \l{A Quick Start to Qt Designer}. Qt Designer 4.5 boasts a long list of improvements. For a detailed list of what is new, refer \l{What's New in Qt Designer 4.5}. @@ -499,7 +500,7 @@ correct signal and slot and click \gui OK. \endtable - \image rgbController-configureConnection1.png + \image rgbController-configure-connection1.png Repeat the step (in reverse order), clicking on the spin box and dragging the cursor towards the slider, to connect the spin box's @@ -531,15 +532,11 @@ process for the remaining spin boxes and sliders. \endtable - Now, we preview your form to see how it would look in your application. To - preview your form, press \key{Ctrl + R} or select \gui Preview from the - \gui Form menu. - - \image rgbController-preview.png - - Try dragging the slider - the spin box will mirror its value too (and vice - versa). Also, you can resize it to see how the layouts used to manage the - child widgets respond to different window sizes. + Now, we preview your form to see how it would look in your application - + press \key{Ctrl + R} or select \gui Preview from the \gui Form menu. Try + dragging the slider - the spin box will mirror its value too (and vice + versa). Also, you can resize it to see how the layouts that are used to + manage the child widgets, respond to different window sizes. */ diff --git a/doc/src/images/rgbController-configure-connection1.png b/doc/src/images/rgbController-configure-connection1.png index 0798184..4e5dcf2 100644 Binary files a/doc/src/images/rgbController-configure-connection1.png and b/doc/src/images/rgbController-configure-connection1.png differ -- cgit v0.12 From 0bb0699d403b7541472a72a4057ecf0ca366a7cd Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 28 May 2009 09:51:43 +0200 Subject: Use Qt::UniqueConnection instead of disconnect/connect Also fix an issue in QTreeView where a signal could be connected several times Reviewed-by: Thierry --- src/corelib/statemachine/qstatemachine.cpp | 3 +-- src/gui/dialogs/qinputdialog.cpp | 3 +-- src/gui/itemviews/qtreeview.cpp | 2 +- src/gui/styles/qstylesheetstyle.cpp | 8 ++------ src/gui/widgets/qpushbutton.cpp | 3 +-- 5 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index 757584a..185fb7d 100644 --- a/src/corelib/statemachine/qstatemachine.cpp +++ b/src/corelib/statemachine/qstatemachine.cpp @@ -803,8 +803,7 @@ void QStateMachinePrivate::applyProperties(const QList &tr stateForAnimation.insert(a, s); animationsForState[s].append(a); // ### connect to just the top-level animation? - QObject::disconnect(a, SIGNAL(finished()), q, SLOT(_q_animationFinished())); - QObject::connect(a, SIGNAL(finished()), q, SLOT(_q_animationFinished())); + QObject::connect(a, SIGNAL(finished()), q, SLOT(_q_animationFinished()), Qt::UniqueConnection); } it2 = assignments.erase(it2); } else { diff --git a/src/gui/dialogs/qinputdialog.cpp b/src/gui/dialogs/qinputdialog.cpp index 78d99e3..8608334 100644 --- a/src/gui/dialogs/qinputdialog.cpp +++ b/src/gui/dialogs/qinputdialog.cpp @@ -307,8 +307,7 @@ void QInputDialogPrivate::ensureEnabledConnection(QAbstractSpinBox *spinBox) { if (spinBox) { QAbstractButton *okButton = buttonBox->button(QDialogButtonBox::Ok); - QObject::disconnect(spinBox, SIGNAL(textChanged(bool)), okButton, SLOT(setEnabled(bool))); - QObject::connect(spinBox, SIGNAL(textChanged(bool)), okButton, SLOT(setEnabled(bool))); + QObject::connect(spinBox, SIGNAL(textChanged(bool)), okButton, SLOT(setEnabled(bool)), Qt::UniqueConnection); } } diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp index c3fca8e..7837700 100644 --- a/src/gui/itemviews/qtreeview.cpp +++ b/src/gui/itemviews/qtreeview.cpp @@ -851,7 +851,7 @@ void QTreeView::setSortingEnabled(bool enable) // because otherwise it will not call sort on the model. sortByColumn(header()->sortIndicatorSection(), header()->sortIndicatorOrder()); connect(header(), SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)), - this, SLOT(_q_sortIndicatorChanged(int, Qt::SortOrder))); + this, SLOT(_q_sortIndicatorChanged(int, Qt::SortOrder)), Qt::UniqueConnection); } else { disconnect(header(), SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)), this, SLOT(_q_sortIndicatorChanged(int, Qt::SortOrder))); diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp index 1d6dc8a..9a8f97e 100644 --- a/src/gui/styles/qstylesheetstyle.cpp +++ b/src/gui/styles/qstylesheetstyle.cpp @@ -2702,14 +2702,10 @@ void QStyleSheetStyle::polish(QWidget *w) QRenderRule rule = renderRule(sa, PseudoElement_None, PseudoClass_Enabled); if ((rule.hasBorder() && rule.border()->hasBorderImage()) || (rule.hasBackground() && !rule.background()->pixmap.isNull())) { - QObject::disconnect(sa->horizontalScrollBar(), SIGNAL(valueChanged(int)), - sa, SLOT(update())); - QObject::disconnect(sa->verticalScrollBar(), SIGNAL(valueChanged(int)), - sa, SLOT(update())); QObject::connect(sa->horizontalScrollBar(), SIGNAL(valueChanged(int)), - sa, SLOT(update())); + sa, SLOT(update()), Qt::UniqueConnection); QObject::connect(sa->verticalScrollBar(), SIGNAL(valueChanged(int)), - sa, SLOT(update())); + sa, SLOT(update()), Qt::UniqueConnection); } } #endif diff --git a/src/gui/widgets/qpushbutton.cpp b/src/gui/widgets/qpushbutton.cpp index 03ca751..ca58f87 100644 --- a/src/gui/widgets/qpushbutton.cpp +++ b/src/gui/widgets/qpushbutton.cpp @@ -527,8 +527,7 @@ void QPushButton::setMenu(QMenu* menu) return; if (menu && !d->menu) { - disconnect(this, SIGNAL(pressed()), this, SLOT(_q_popupPressed())); - connect(this, SIGNAL(pressed()), this, SLOT(_q_popupPressed())); + connect(this, SIGNAL(pressed()), this, SLOT(_q_popupPressed()), Qt::UniqueConnection); } if (d->menu) removeAction(d->menu->menuAction()); -- cgit v0.12 From f390f9b51cf8686e9ed44f13a33c7349b9e96a09 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Thu, 28 May 2009 10:27:50 +0200 Subject: improved string operations all over the place used character operations whenever possible better usage of QLatin1String --- .../clucene/src/CLucene/store/FSDirectory.cpp | 2 +- src/3rdparty/clucene/src/CLucene/util/Misc.cpp | 9 +- .../webkit/WebCore/bridge/qt/qt_instance.cpp | 4 +- .../webkit/WebCore/bridge/qt/qt_runtime.cpp | 6 +- src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp | 2 +- .../webkit/WebCore/platform/graphics/qt/PathQt.cpp | 6 +- src/activeqt/container/qaxbase.cpp | 76 ++++----- src/activeqt/container/qaxdump.cpp | 38 ++--- src/activeqt/container/qaxscript.cpp | 4 +- src/activeqt/control/qaxserver.cpp | 183 +++++++++++---------- src/activeqt/control/qaxserverbase.cpp | 10 +- src/activeqt/control/qaxservermain.cpp | 2 +- src/activeqt/shared/qaxtypes.cpp | 2 +- src/corelib/io/qfsfileengine_unix.cpp | 6 +- src/corelib/io/qfsfileengine_win.cpp | 8 +- src/corelib/io/qurl.cpp | 2 +- src/corelib/kernel/qcoreapplication.cpp | 2 +- src/corelib/kernel/qcoreapplication_win.cpp | 2 +- src/corelib/plugin/qlibrary_unix.cpp | 2 +- src/corelib/tools/qdatetime.cpp | 2 +- src/corelib/tools/qlocale.cpp | 4 +- src/corelib/xml/qxmlstream.cpp | 2 +- src/dbus/qdbuserror.cpp | 2 +- src/dbus/qdbusintegrator.cpp | 6 +- src/dbus/qdbusmetaobject.cpp | 2 +- src/dbus/qdbusutil.cpp | 16 +- src/gui/dialogs/qprintdialog_unix.cpp | 8 +- src/gui/dialogs/qprintpreviewdialog.cpp | 4 +- src/gui/embedded/qmouse_qws.cpp | 4 +- src/gui/embedded/qscreenmulti_qws.cpp | 4 +- src/gui/embedded/qscreentransformed_qws.cpp | 6 +- src/gui/embedded/qscreenvfb_qws.cpp | 4 +- src/gui/embedded/qtransportauth_qws.cpp | 4 +- src/gui/embedded/qunixsocket.cpp | 32 ++-- src/gui/embedded/qunixsocketserver.cpp | 8 +- src/gui/embedded/qwindowsystem_qws.cpp | 4 +- src/gui/embedded/qwscommand_qws.cpp | 8 +- src/gui/kernel/qapplication_qws.cpp | 6 +- src/gui/kernel/qapplication_win.cpp | 4 +- src/gui/kernel/qmime_mac.cpp | 4 +- src/gui/kernel/qmime_win.cpp | 8 +- src/gui/kernel/qsound_qws.cpp | 2 +- src/gui/painting/qbezier.cpp | 8 +- src/gui/painting/qpaintengine_raster.cpp | 2 +- src/gui/painting/qprinterinfo_unix.cpp | 4 +- src/gui/painting/qtessellator.cpp | 2 +- src/gui/painting/qwindowsurface_x11.cpp | 2 +- src/gui/styles/gtksymbols.cpp | 6 +- src/gui/styles/qgtkstyle.cpp | 3 +- src/gui/text/qfontdatabase_qws.cpp | 4 +- src/gui/text/qfontdatabase_x11.cpp | 28 ++-- src/gui/text/qfontengine_qpf.cpp | 10 +- src/gui/text/qfontengine_x11.cpp | 5 +- src/gui/text/qtextdocumentlayout.cpp | 2 +- src/gui/text/qtexthtmlparser.cpp | 2 +- src/gui/util/qdesktopservices_mac.cpp | 2 +- src/gui/util/qdesktopservices_x11.cpp | 4 +- src/gui/widgets/qcombobox_p.h | 2 +- src/gui/widgets/qprogressbar.cpp | 8 +- src/network/access/qhttpnetworkrequest.cpp | 4 +- src/network/access/qnetworkaccessfilebackend.cpp | 2 +- src/network/access/qnetworkcookie.cpp | 2 +- src/network/kernel/qauthenticator.cpp | 4 +- src/network/kernel/qhostaddress.cpp | 2 +- src/network/kernel/qnetworkinterface.cpp | 2 +- src/network/socket/qabstractsocket.cpp | 6 +- src/network/socket/qlocalsocket.cpp | 4 +- src/network/socket/qsocks5socketengine.cpp | 14 +- src/network/ssl/qsslcertificate.cpp | 16 +- src/network/ssl/qsslcipher.cpp | 2 +- src/network/ssl/qsslkey.cpp | 2 +- src/network/ssl/qsslsocket.cpp | 16 +- src/network/ssl/qsslsocket_openssl.cpp | 2 +- src/opengl/qegl.cpp | 14 +- src/opengl/qgl.cpp | 2 +- src/opengl/qgl_x11.cpp | 6 +- src/opengl/qglpixmapfilter.cpp | 37 ++--- src/opengl/util/generator.cpp | 2 +- src/plugins/accessible/widgets/rangecontrols.cpp | 2 +- src/plugins/gfxdrivers/hybrid/hybridscreen.cpp | 4 +- src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp | 4 +- src/qt3support/dialogs/q3filedialog.cpp | 8 +- src/qt3support/dialogs/q3filedialog_mac.cpp | 2 +- src/qt3support/dialogs/q3filedialog_win.cpp | 2 +- src/qt3support/itemviews/q3iconview.cpp | 6 +- src/qt3support/network/q3dns.cpp | 16 +- src/qt3support/network/q3ftp.cpp | 22 +-- src/qt3support/network/q3http.cpp | 8 +- src/qt3support/network/q3url.cpp | 61 ++++--- src/qt3support/network/q3urloperator.cpp | 2 +- src/qt3support/other/q3dragobject.cpp | 6 +- src/qt3support/other/q3process.cpp | 2 +- src/qt3support/other/q3process_unix.cpp | 2 +- src/qt3support/other/q3process_win.cpp | 10 +- src/qt3support/painting/q3paintengine_svg.cpp | 48 +++--- src/qt3support/text/q3richtext.cpp | 28 ++-- src/qt3support/text/q3textedit.cpp | 4 +- src/qt3support/widgets/q3mainwindow.cpp | 18 +- src/script/qscriptcontext.cpp | 2 +- src/script/qscriptcontext_p.cpp | 6 +- src/script/qscriptecmaerror.cpp | 6 +- src/script/qscriptecmafunction.cpp | 2 +- src/script/qscriptecmaglobal.cpp | 2 +- src/script/qscriptecmaobject.cpp | 2 +- src/script/qscriptparser.cpp | 4 +- src/script/qscriptprettypretty.cpp | 108 ++++++------ src/script/qscriptsyntaxchecker.cpp | 4 +- src/script/qscriptvalueimpl.cpp | 10 +- src/script/qscriptxmlgenerator.cpp | 10 +- .../debugging/qscriptcompletiontask.cpp | 10 +- .../debugging/qscriptdebuggerbackend.cpp | 2 +- .../debugging/qscriptdebuggerconsole.cpp | 4 +- .../debugging/qscriptdebuggerlocalsmodel.cpp | 2 +- src/sql/drivers/db2/qsql_db2.cpp | 2 +- src/sql/drivers/ibase/qsql_ibase.cpp | 6 +- src/sql/drivers/mysql/qsql_mysql.cpp | 11 +- src/sql/drivers/oci/qsql_oci.cpp | 16 +- src/sql/drivers/odbc/qsql_odbc.cpp | 21 +-- src/sql/drivers/psql/qsql_psql.cpp | 22 +-- src/sql/drivers/sqlite/qsql_sqlite.cpp | 4 +- src/sql/drivers/sqlite2/qsql_sqlite2.cpp | 6 +- src/sql/drivers/tds/qsql_tds.cpp | 6 +- src/sql/kernel/qsqldriver.cpp | 18 +- src/sql/kernel/qsqlerror.cpp | 2 +- src/sql/kernel/qsqlfield.cpp | 4 +- src/sql/kernel/qsqlrecord.cpp | 2 +- src/sql/models/qsqlrelationaltablemodel.cpp | 2 +- src/svg/qsvggenerator.cpp | 77 +++++---- src/testlib/qbenchmark_p.h | 2 +- src/testlib/qbenchmarkvalgrind.cpp | 10 +- src/testlib/qplaintestlogger.cpp | 4 +- src/testlib/qsignaldumper.cpp | 10 +- src/tools/idc/main.cpp | 6 +- src/tools/moc/generator.cpp | 4 +- src/tools/moc/moc.cpp | 6 +- src/tools/moc/preprocessor.cpp | 2 +- src/tools/uic/cpp/cppwriteicondata.cpp | 4 +- src/tools/uic/cpp/cppwriteinitialization.cpp | 6 +- src/tools/uic3/embed.cpp | 2 +- src/tools/uic3/form.cpp | 84 +++++----- src/tools/uic3/main.cpp | 2 +- src/tools/uic3/parser.cpp | 12 +- src/tools/uic3/qt3to4.cpp | 2 +- src/tools/uic3/subclassing.cpp | 36 ++-- src/tools/uic3/ui3reader.cpp | 24 +-- src/winmain/qtmain_win.cpp | 4 +- src/xml/dom/qdom.cpp | 2 +- src/xml/sax/qxml.cpp | 12 +- src/xmlpatterns/acceltree/qacceltree.cpp | 14 +- src/xmlpatterns/api/qsourcelocation.cpp | 2 +- src/xmlpatterns/data/qabstractfloat.cpp | 2 +- src/xmlpatterns/data/qcommonvalues.cpp | 2 +- src/xmlpatterns/expr/qexpression_p.h | 2 +- tools/assistant/tools/assistant/main.cpp | 2 +- tools/linguist/linguist/mainwindow.cpp | 2 +- tools/linguist/linguist/phrase.cpp | 12 +- tools/linguist/lupdate/merge.cpp | 6 +- tools/linguist/shared/profileevaluator.cpp | 4 +- tools/linguist/shared/proparserutils.h | 2 +- tools/pixeltool/qpixeltool.cpp | 4 +- tools/porting/src/logger.cpp | 6 +- tools/qdoc3/config.cpp | 2 +- tools/shared/qttoolbardialog/qttoolbardialog.cpp | 6 +- 163 files changed, 827 insertions(+), 846 deletions(-) diff --git a/src/3rdparty/clucene/src/CLucene/store/FSDirectory.cpp b/src/3rdparty/clucene/src/CLucene/store/FSDirectory.cpp index 36c170a..e9659cf 100644 --- a/src/3rdparty/clucene/src/CLucene/store/FSDirectory.cpp +++ b/src/3rdparty/clucene/src/CLucene/store/FSDirectory.cpp @@ -624,7 +624,7 @@ LuceneLock* FSDirectory::makeLock(const QString& name) QString lockFile(getLockPrefix()); - lockFile.append(QLatin1String("-")).append(name); + lockFile.append(QLatin1Char('-')).append(name); return _CLNEW FSLock(lockDir, lockFile); } diff --git a/src/3rdparty/clucene/src/CLucene/util/Misc.cpp b/src/3rdparty/clucene/src/CLucene/util/Misc.cpp index 069b487..cb2efe2 100644 --- a/src/3rdparty/clucene/src/CLucene/util/Misc.cpp +++ b/src/3rdparty/clucene/src/CLucene/util/Misc.cpp @@ -181,12 +181,9 @@ void Misc::segmentname(QString& buffer, int32_t bufferLen, CND_PRECONDITION(!segment.isEmpty(), "segment is NULL"); CND_PRECONDITION(!ext.isEmpty(), "extention is NULL"); - buffer.clear(); - if (x == -1) { - buffer = QString(segment + ext); - } else { - buffer = QString(QLatin1String("%1%2%3")).arg(segment).arg(ext).arg(x); - } + buffer = segment + ext; + if (x != -1) + buffer += QString::number(x); } // #pragma mark -- TCHAR related utils diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp b/src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp index 4b94a94..26323e8 100644 --- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp +++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp @@ -337,7 +337,7 @@ JSValuePtr QtField::valueFromInstance(ExecState* exec, const Instance* inst) con return ret; } else { - QString msg = QString(QLatin1String("cannot access member `%1' of deleted QObject")).arg(QLatin1String(name())); + QString msg = QString::fromLatin1("cannot access member `%1' of deleted QObject").arg(QLatin1String(name())); return throwError(exec, GeneralError, msg.toLatin1().constData()); } } @@ -362,7 +362,7 @@ void QtField::setValueToInstance(ExecState* exec, const Instance* inst, JSValueP } else if (m_type == DynamicProperty) obj->setProperty(m_dynamicProperty.constData(), val); } else { - QString msg = QString(QLatin1String("cannot access member `%1' of deleted QObject")).arg(QLatin1String(name())); + QString msg = QString::fromLatin1("cannot access member `%1' of deleted QObject").arg(QLatin1String(name())); throwError(exec, GeneralError, msg.toLatin1().constData()); } } diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp index c7ba6c2..5a73dc7 100644 --- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp +++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp @@ -1515,7 +1515,7 @@ JSValuePtr QtRuntimeConnectionMethod::call(ExecState* exec, JSObject* functionOb bool ok = QMetaObject::connect(sender, signalIndex, conn, conn->metaObject()->methodOffset()); if (!ok) { delete conn; - QString msg = QString(QLatin1String("QtMetaMethod.connect: failed to connect to %1::%2()")) + QString msg = QString::fromLatin1("QtMetaMethod.connect: failed to connect to %1::%2()") .arg(QLatin1String(sender->metaObject()->className())) .arg(QLatin1String(d->m_signature)); return throwError(exec, GeneralError, msg.toLatin1().constData()); @@ -1541,14 +1541,14 @@ JSValuePtr QtRuntimeConnectionMethod::call(ExecState* exec, JSObject* functionOb } if (!ret) { - QString msg = QString(QLatin1String("QtMetaMethod.disconnect: failed to disconnect from %1::%2()")) + QString msg = QString::fromLatin1("QtMetaMethod.disconnect: failed to disconnect from %1::%2()") .arg(QLatin1String(sender->metaObject()->className())) .arg(QLatin1String(d->m_signature)); return throwError(exec, GeneralError, msg.toLatin1().constData()); } } } else { - QString msg = QString(QLatin1String("QtMetaMethod.%1: %2::%3() is not a signal")) + QString msg = QString::fromLatin1("QtMetaMethod.%1: %2::%3() is not a signal") .arg(QLatin1String(d->m_isConnect ? "connect": "disconnect")) .arg(QLatin1String(sender->metaObject()->className())) .arg(QLatin1String(d->m_signature)); diff --git a/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp b/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp index 2050a70..39ccefe 100644 --- a/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp +++ b/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp @@ -357,7 +357,7 @@ HashMap parseAttributes(const String& string, bool& attrsOK) state.gotAttributes = false; QXmlStreamReader stream; - QString dummy = QString(QLatin1String("")).arg(string); + QString dummy = QString::fromLatin1("").arg(string); stream.addData(dummy); while (!stream.atEnd()) { stream.readNext(); diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp index e68be2b..bff9edb 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp @@ -286,10 +286,10 @@ String Path::debugString() const switch (cur.type) { case QPainterPath::MoveToElement: - ret += QString(QLatin1String("M %1 %2")).arg(cur.x).arg(cur.y); + ret += QString::fromLatin1("M %1 %2").arg(cur.x).arg(cur.y); break; case QPainterPath::LineToElement: - ret += QString(QLatin1String("L %1 %2")).arg(cur.x).arg(cur.y); + ret += QString::fromLatin1("L %1 %2").arg(cur.x).arg(cur.y); break; case QPainterPath::CurveToElement: { @@ -299,7 +299,7 @@ String Path::debugString() const Q_ASSERT(c1.type == QPainterPath::CurveToDataElement); Q_ASSERT(c2.type == QPainterPath::CurveToDataElement); - ret += QString(QLatin1String("C %1 %2 %3 %4 %5 %6")).arg(cur.x).arg(cur.y).arg(c1.x).arg(c1.y).arg(c2.x).arg(c2.y); + ret += QString::fromLatin1("C %1 %2 %3 %4 %5 %6").arg(cur.x).arg(cur.y).arg(c1.x).arg(c1.y).arg(c2.x).arg(c2.y); i += 2; break; diff --git a/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp index 44c3e9e..e1ffb81 100644 --- a/src/activeqt/container/qaxbase.cpp +++ b/src/activeqt/container/qaxbase.cpp @@ -421,7 +421,7 @@ public: argv[p + 1] = varp + p + 1; } else { argv[p + 1] = const_cast(varp[p + 1].constData()); - if (ptype.endsWith("*")) { + if (ptype.endsWith('*')) { argv_pointer[p + 1] = argv[p + 1]; argv[p + 1] = argv_pointer + p + 1; } @@ -648,7 +648,7 @@ QByteArray QAxEventSink::findProperty(DISPID dispID) int index = mo->indexOfProperty(propname); const QMetaProperty prop = mo->property(index); propsignal += prop.typeName(); - propsignal += ")"; + propsignal += ')'; addProperty(dispID, propname, propsignal); return propname; @@ -1661,7 +1661,7 @@ private: void addProperty(const QByteArray &type, const QByteArray &name, uint flags) { QByteArray propertyType(type); - if (propertyType.endsWith("&")) + if (propertyType.endsWith('&')) propertyType.chop(1); Property &prop = property_list[name]; @@ -2046,11 +2046,11 @@ QByteArray MetaObjectGenerator::guessTypes(const TYPEDESC &tdesc, ITypeInfo *inf case VT_INT: case VT_UINT: case VT_CY: - str += "&"; + str += '&'; break; case VT_PTR: if (str == "QFont" || str == "QPixmap") { - str += "&"; + str += '&'; break; } else if (str == "void*") { str = "void **"; @@ -2059,19 +2059,19 @@ QByteArray MetaObjectGenerator::guessTypes(const TYPEDESC &tdesc, ITypeInfo *inf // FALLTHROUGH default: if (str == "QColor") - str += "&"; + str += '&'; else if (str == "QDateTime") - str += "&"; + str += '&'; else if (str == "QVariantList") - str += "&"; + str += '&'; else if (str == "QByteArray") - str += "&"; + str += '&'; else if (str == "QStringList") - str += "&"; + str += '&'; else if (!str.isEmpty() && hasEnum(str)) - str += "&"; + str += '&'; else if (!str.isEmpty() && str != "QFont" && str != "QPixmap" && str != "QVariant") - str += "*"; + str += '*'; } break; case VT_SAFEARRAY: @@ -2089,7 +2089,7 @@ QByteArray MetaObjectGenerator::guessTypes(const TYPEDESC &tdesc, ITypeInfo *inf default: str = guessTypes(tdesc.lpadesc->tdescElem, info, function); if (!str.isEmpty()) - str = "QList<" + str + ">"; + str = "QList<" + str + '>'; break; } break; @@ -2097,7 +2097,7 @@ QByteArray MetaObjectGenerator::guessTypes(const TYPEDESC &tdesc, ITypeInfo *inf str = guessTypes(tdesc.lpadesc->tdescElem, info, function); if (!str.isEmpty()) { for (int index = 0; index < tdesc.lpadesc->cDims; ++index) - str += "[" + QByteArray::number((int)tdesc.lpadesc->rgbounds[index].cElements) + "]"; + str += '[' + QByteArray::number((int)tdesc.lpadesc->rgbounds[index].cElements) + ']'; } break; case VT_USERDEFINED: @@ -2114,7 +2114,7 @@ QByteArray MetaObjectGenerator::guessTypes(const TYPEDESC &tdesc, ITypeInfo *inf } if (tdesc.vt & VT_BYREF) - str += "&"; + str += '&'; str.replace("&*", "**"); return str; @@ -2141,7 +2141,7 @@ void MetaObjectGenerator::readClassInfo() if (d->useClassInfo && !hasClassInfo("CoClass")) { QString coClassIDstr = iidnames.value(QLatin1String("/CLSID/") + coClassID + QLatin1String("/Default"), coClassID).toString(); addClassInfo("CoClass", coClassIDstr.isEmpty() ? coClassID.toLatin1() : coClassIDstr.toLatin1()); - QByteArray version = QByteArray::number(typeattr->wMajorVerNum) + "." + QByteArray::number(typeattr->wMinorVerNum); + QByteArray version = QByteArray::number(typeattr->wMajorVerNum) + '.' + QByteArray::number(typeattr->wMinorVerNum); if (version != "0.0") addClassInfo("Version", version); } @@ -2174,7 +2174,7 @@ void MetaObjectGenerator::readClassInfo() while (tlfile.isEmpty() && vit != versions.end()) { QString version = *vit; ++vit; - tlfile = controls.value(QLatin1String("/") + version + QLatin1String("/0/win32/.")).toString(); + tlfile = controls.value(QLatin1Char('/') + version + QLatin1String("/0/win32/.")).toString(); } controls.endGroup(); } else { @@ -2347,7 +2347,7 @@ void MetaObjectGenerator::addChangedSignal(const QByteArray &function, const QBy // generate changed signal QByteArray signalName(function); signalName += "Changed"; - QByteArray signalProto = signalName + "(" + replaceType(type) + ")"; + QByteArray signalProto = signalName + '(' + replaceType(type) + ')'; if (!hasSignal(signalProto)) addSignal(signalProto, function); if (eventSink) @@ -2364,7 +2364,7 @@ void MetaObjectGenerator::addSetterSlot(const QByteArray &property) set = "set"; prototype[0] = toupper(prototype[0]); } - prototype = set + prototype + "(" + propertyType(property) + ")"; + prototype = set + prototype + '(' + propertyType(property) + ')'; if (!hasSlot(prototype)) addSlot(0, prototype, property); } @@ -2381,7 +2381,7 @@ QByteArray MetaObjectGenerator::createPrototype(FUNCDESC *funcdesc, ITypeInfo *t type = guessTypes(funcdesc->lprgelemdescParam->tdesc, typeinfo, function); } - prototype = function + "("; + prototype = function + '('; if (funcdesc->invkind == INVOKE_FUNC && type == hresult) type = 0; @@ -2395,7 +2395,7 @@ QByteArray MetaObjectGenerator::createPrototype(FUNCDESC *funcdesc, ITypeInfo *t QByteArray ptype = guessTypes(tdesc, typeinfo, function); if (pdesc.wParamFlags & PARAMFLAG_FRETVAL) { - if (ptype.endsWith("&")) { + if (ptype.endsWith('&')) { ptype.truncate(ptype.length() - 1); } else if (ptype.endsWith("**")) { ptype.truncate(ptype.length() - 1); @@ -2403,8 +2403,8 @@ QByteArray MetaObjectGenerator::createPrototype(FUNCDESC *funcdesc, ITypeInfo *t type = ptype; } else { prototype += ptype; - if (pdesc.wParamFlags & PARAMFLAG_FOUT && !ptype.endsWith("&") && !ptype.endsWith("**")) - prototype += "&"; + if (pdesc.wParamFlags & PARAMFLAG_FOUT && !ptype.endsWith('&') && !ptype.endsWith("**")) + prototype += '&'; if (optional || pdesc.wParamFlags & PARAMFLAG_FOPT) paramName += "=0"; else if (pdesc.wParamFlags & PARAMFLAG_FHASDEFAULT) { @@ -2414,22 +2414,22 @@ QByteArray MetaObjectGenerator::createPrototype(FUNCDESC *funcdesc, ITypeInfo *t parameters << paramName; } if (p < funcdesc->cParams && !(pdesc.wParamFlags & PARAMFLAG_FRETVAL)) - prototype += ","; + prototype += ','; } if (!prototype.isEmpty()) { - if (prototype.right(1) == ",") { + if (prototype.endsWith(',')) { if (funcdesc->invkind == INVOKE_PROPERTYPUT && p == funcdesc->cParams) { TYPEDESC tdesc = funcdesc->lprgelemdescParam[p-1].tdesc; QByteArray ptype = guessTypes(tdesc, typeinfo, function); prototype += ptype; - prototype += ")"; + prototype += ')'; parameters << "rhs"; } else { prototype[prototype.length()-1] = ')'; } } else { - prototype += ")"; + prototype += ')'; } } @@ -2577,11 +2577,11 @@ void MetaObjectGenerator::readFuncsInfo(ITypeInfo *typeinfo, ushort nFuncs) if (defargs) { parameters.takeLast(); - int lastParam = prototype.lastIndexOf(","); + int lastParam = prototype.lastIndexOf(','); if (lastParam == -1) - lastParam = prototype.indexOf("(") + 1; + lastParam = prototype.indexOf('(') + 1; prototype.truncate(lastParam); - prototype += ")"; + prototype += ')'; } } while (defargs); } @@ -2597,8 +2597,8 @@ void MetaObjectGenerator::readFuncsInfo(ITypeInfo *typeinfo, ushort nFuncs) QString strDocu = QString::fromUtf16((const ushort*)bstrDocu); SysFreeString(bstrDocu); if (!!strDocu) - desc += "[" + strDocu + "]"; - desc += "\n"; + desc += '[' + strDocu + ']'; + desc += '\n'; #endif typeinfo->ReleaseFuncDesc(funcdesc); } @@ -2680,8 +2680,8 @@ void MetaObjectGenerator::readVarsInfo(ITypeInfo *typeinfo, ushort nVars) QString strDocu = QString::fromUtf16((const ushort*)bstrDocu); SysFreeString(bstrDocu); if (!!strDocu) - desc += "[" + strDocu + "]"; - desc += "\n"; + desc += '[' + strDocu + ']'; + desc += '\n'; #endif typeinfo->ReleaseVarDesc(vardesc); } @@ -2827,8 +2827,8 @@ void MetaObjectGenerator::readEventInterface(ITypeInfo *eventinfo, IConnectionPo QString strDocu = QString::fromUtf16((const ushort*)bstrDocu); SysFreeString(bstrDocu); if (!!strDocu) - desc += "[" + strDocu + "]"; - desc += "\n"; + desc += '[' + strDocu + ']'; + desc += '\n'; #endif eventinfo->ReleaseFuncDesc(funcdesc); } @@ -4398,8 +4398,8 @@ QVariant QAxBase::asVariant() const cn = cn.mid(cn.lastIndexOf(':') + 1); QObject *object = qObject(); if (QMetaType::type(cn)) - qvar = QVariant(qRegisterMetaType(cn + "*"), &object); -// qVariantSetValue(qvar, qObject(), cn + "*"); + qvar = QVariant(qRegisterMetaType(cn + '*'), &object); +// qVariantSetValue(qvar, qObject(), cn + '*'); } return qvar; diff --git a/src/activeqt/container/qaxdump.cpp b/src/activeqt/container/qaxdump.cpp index 62ef0a4..c3218a9 100644 --- a/src/activeqt/container/qaxdump.cpp +++ b/src/activeqt/container/qaxdump.cpp @@ -94,14 +94,14 @@ static QByteArray namedPrototype(const QList ¶meterTypes, const prototype += type; if (p < parameterNames.count()) - prototype += " " + parameterNames.at(p); + prototype += ' ' + parameterNames.at(p); if (numDefArgs >= parameterTypes.count() - p) prototype += " = 0"; if (p < parameterTypes.count() - 1) prototype += ", "; } - prototype += ")"; + prototype += ')'; return prototype; } @@ -196,8 +196,8 @@ QString qax_generateDocumentation(QAxBase *that) prototype = namedPrototype(slot.parameterTypes(), slot.parameterNames()); QString detail = QString::fromLatin1("

    ") + - QString::fromLatin1(returntype.constData()) + QLatin1String(" ") + - QString::fromLatin1(name.constData()) + QLatin1String(" ") + + QLatin1String(returntype.constData()) + QLatin1Char(' ') + + QLatin1String(name.constData()) + QLatin1Char(' ') + QString::fromLatin1(prototype.constData()) + QLatin1String(" [slot]

    \n"); prototype = namedPrototype(slot.parameterTypes(), QList()); detail += docuFromName(typeInfo, QString::fromLatin1(name.constData())); @@ -220,14 +220,14 @@ QString qax_generateDocumentation(QAxBase *that) returntype = "QAxObject *"; } if (returntype != "void") - detail += QString::fromLatin1(returntype.constData()) + QLatin1String(" result = "); - detail += QLatin1String("object->") + QString::fromLatin1(functionToCall.constData()) + - QLatin1String("(\"" + name + prototype + "\""); + detail += QLatin1String(returntype.constData()) + QLatin1String(" result = "); + detail += QLatin1String("object->") + QLatin1String(functionToCall.constData()) + + QLatin1String("(\"" + name + prototype + '\"'); if (hasParams) detail += QLatin1String(", params"); - detail += QLatin1String(")"); + detail += QLatin1Char(')'); if (returntype != "void" && returntype != "QAxObject *" && returntype != "QVariant") - detail += QLatin1String(".") + QString::fromLatin1(toType(returntype)); + detail += QLatin1Char('.') + QLatin1String(toType(returntype)); detail += QLatin1String(";\n"); } else { detail += QLatin1String("

    This function has parameters of unsupported types and cannot be called directly."); @@ -262,9 +262,9 @@ QString qax_generateDocumentation(QAxBase *that) QByteArray name = signature.left(signature.indexOf('(')); stream << "

  • void " << name << "" << prototype << ";
  • " << endl; - QString detail = QLatin1String("

    void ") + - QString::fromLatin1(name.constData()) + QLatin1String(" ") + - QString::fromLatin1(prototype.constData()) + QLatin1String(" [signal]

    \n"); + QString detail = QLatin1String("

    void ") + + QLatin1String(name.constData()) + QLatin1Char(' ') + + QLatin1String(prototype.constData()) + QLatin1String(" [signal]

    \n"); if (typeLib) { interCount = 0; do { @@ -311,8 +311,8 @@ QString qax_generateDocumentation(QAxBase *that) stream << "
  • " << type << " " << name << ";
  • " << endl; QString detail = QLatin1String("

    ") + - QString::fromLatin1(type.constData()) + - QLatin1String(" ") + QString::fromLatin1(name.constData()) + QLatin1String("

    \n"); + QLatin1String(type.constData()) + + QLatin1Char(' ') + QLatin1String(name.constData()) + QLatin1String("\n"); detail += docuFromName(typeInfo, QString::fromLatin1(name)); QVariant::Type vartype = QVariant::nameToType(type); if (!prop.isReadable()) @@ -326,14 +326,14 @@ QString qax_generateDocumentation(QAxBase *that) if (prop.isEnumType()) detail += QLatin1String("\tint val = "); else - detail += QLatin1String("\t") + QString::fromLatin1(type.constData()) + QLatin1String(" val = "); - detail += QLatin1String("object->property(\"") + QString::fromLatin1(name.constData()) + - QLatin1String("\").") + QString::fromLatin1(toType(type).constData()) + QLatin1String(";\n"); + detail += QLatin1Char('\t') + QLatin1String(type.constData()) + QLatin1String(" val = "); + detail += QLatin1String("object->property(\"") + QLatin1String(name.constData()) + + QLatin1String("\").") + QLatin1String(toType(type).constData()) + QLatin1String(";\n"); detail += QLatin1String("\n"); } else if (type == "IDispatch*" || type == "IUnknown*") { detail += QLatin1String("

    Get the subobject using querySubObject:

    \n");
    -		detail += QLatin1String("\tQAxObject *") + QString::fromLatin1(name.constData()) +
    -                          QLatin1String(" = object->querySubObject(\"") + QString::fromLatin1(name.constData()) + QLatin1String("\");\n");
    +		detail += QLatin1String("\tQAxObject *") + QLatin1String(name.constData()) +
    +                          QLatin1String(" = object->querySubObject(\"") + QLatin1String(name.constData()) + QLatin1String("\");\n");
     		detail += QLatin1String("
    \n"); } else { detail += QLatin1String("

    This property is of an unsupported type.\n"); diff --git a/src/activeqt/container/qaxscript.cpp b/src/activeqt/container/qaxscript.cpp index c69fea0..8f8186a 100644 --- a/src/activeqt/container/qaxscript.cpp +++ b/src/activeqt/container/qaxscript.cpp @@ -1203,9 +1203,9 @@ QString QAxScriptManager::scriptFileFilter() continue; allFiles += QLatin1String(" *") + engine.extension; - specialFiles += QLatin1String(";;") + engine.name + QLatin1String(" Files (*") + engine.extension + QLatin1String(")"); + specialFiles += QLatin1String(";;") + engine.name + QLatin1String(" Files (*") + engine.extension + QLatin1Char(')'); } - allFiles += QLatin1String(")"); + allFiles += QLatin1Char(')'); return allFiles + specialFiles + QLatin1String(";;All Files (*.*)"); } diff --git a/src/activeqt/control/qaxserver.cpp b/src/activeqt/control/qaxserver.cpp index d919382..1771293 100644 --- a/src/activeqt/control/qaxserver.cpp +++ b/src/activeqt/control/qaxserver.cpp @@ -90,7 +90,7 @@ QAxFactory *qAxFactory() QStringList keys(qax_factory->featureList()); for (int i = 0; i < keys.count(); ++i) { QString key(keys.at(i)); - qRegisterMetaType((key + QLatin1String("*")).toLatin1(), (void**)0); + qRegisterMetaType((key + QLatin1Char('*')).toLatin1(), (void**)0); } } return qax_factory; @@ -208,9 +208,9 @@ HRESULT UpdateRegistry(BOOL bRegister) { qAxIsServer = false; QString file = QString::fromLocal8Bit(qAxModuleFilename); - QString path = file.left(file.lastIndexOf(QLatin1String("\\"))+1); + QString path = file.left(file.lastIndexOf(QLatin1Char('\\'))+1); QString module = file.right(file.length() - path.length()); - module = module.left(module.lastIndexOf(QLatin1String("."))); + module = module.left(module.lastIndexOf(QLatin1Char('.'))); const QString appId = qAxFactory()->appID().toString().toUpper(); const QString libId = qAxFactory()->typeLibID().toString().toUpper(); @@ -226,7 +226,7 @@ HRESULT UpdateRegistry(BOOL bRegister) DWORD major = libAttr->wMajorVerNum; DWORD minor = libAttr->wMinorVerNum; - typeLibVersion = QString::number((uint)major) + QLatin1String(".") + QString::number((uint)minor); + typeLibVersion = QString::number((uint)major) + QLatin1Char('.') + QString::number((uint)minor); if (bRegister) RegisterTypeLib(qAxTypeLibrary, (TCHAR*)libFile.utf16(), 0); @@ -271,12 +271,12 @@ HRESULT UpdateRegistry(BOOL bRegister) className = qax_clean_type(className, mo); if (object) { // don't register subobject classes - QString classVersion = mo ? QString(QLatin1String(mo->classInfo(mo->indexOfClassInfo("Version")).value())) : QString(); + QString classVersion = mo ? QString::fromLatin1(mo->classInfo(mo->indexOfClassInfo("Version")).value()) : QString(); if (classVersion.isNull()) classVersion = QLatin1String("1.0"); bool insertable = mo && !qstricmp(mo->classInfo(mo->indexOfClassInfo("Insertable")).value(), "yes"); bool control = object->isWidgetType(); - const QString classMajorVersion = classVersion.left(classVersion.indexOf(QLatin1String("."))); + const QString classMajorVersion = classVersion.left(classVersion.indexOf(QLatin1Char('.'))); uint olemisc = OLEMISC_SETCLIENTSITEFIRST |OLEMISC_ACTIVATEWHENVISIBLE |OLEMISC_INSIDEOUT @@ -287,17 +287,17 @@ HRESULT UpdateRegistry(BOOL bRegister) else if (qFindChild(object) && !qax_disable_inplaceframe) olemisc |= OLEMISC_WANTSTOMENUMERGE; - settings.setValue(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion + QLatin1String("/."), className + QLatin1String(" Class")); - settings.setValue(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion + QLatin1String("/CLSID/."), classId); + settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/."), className + QLatin1String(" Class")); + settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/CLSID/."), classId); if (insertable) - settings.setValue(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion + QLatin1String("/Insertable/."), QVariant(QLatin1String(""))); + settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/Insertable/."), QVariant(QLatin1String(""))); - settings.setValue(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String("/."), className + QLatin1String(" Class")); - settings.setValue(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String("/CLSID/."), classId); - settings.setValue(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String("/CurVer/."), module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion); + settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/."), className + QLatin1String(" Class")); + settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/CLSID/."), classId); + settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/CurVer/."), module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion); settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/."), className + QLatin1String(" Class")); - if (file.right(3).toLower() == QLatin1String("exe")) + if (file.endsWith(QLatin1String("exe"), Qt::CaseInsensitive)) settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/AppID"), appId); if (control) settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/Control/."), QVariant(QLatin1String(""))); @@ -307,15 +307,15 @@ HRESULT UpdateRegistry(BOOL bRegister) settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/InProcServer32/."), file); else settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/LocalServer32/."), - QLatin1String("\"") + file + QLatin1String("\" -activex")); + QLatin1Char('\"') + file + QLatin1String("\" -activex")); settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/MiscStatus/."), control ? QLatin1String("1") : QLatin1String("0")); settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/MiscStatus/1/."), QString::number(olemisc)); settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/Programmable/."), QVariant(QLatin1String(""))); - settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/ToolboxBitmap32/."), QLatin1String("\"") + + settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/ToolboxBitmap32/."), QLatin1Char('\"') + file + QLatin1String("\", 101")); settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/TypeLib/."), libId); settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/Version/."), classVersion); - settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/VersionIndependentProgID/."), module + QLatin1String(".") + className); - settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/ProgID/."), module + QLatin1String(".") + className + QLatin1String(".") + classVersion.left(classVersion.indexOf(QLatin1Char('.')))); + settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/VersionIndependentProgID/."), module + QLatin1Char('.') + className); + settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/ProgID/."), module + QLatin1Char('.') + className + QLatin1Char('.') + classVersion.left(classVersion.indexOf(QLatin1Char('.')))); QString mime = QLatin1String(mo->classInfo(mo->indexOfClassInfo("MIME")).value()); if (!mime.isEmpty()) { @@ -330,15 +330,15 @@ HRESULT UpdateRegistry(BOOL bRegister) mime = mime.left(mime.length() - extension.length() - 1); // Prepend '.' before extension, if required. extension = extension.trimmed(); - if (extension[0] != QChar(QLatin1Char('.'))) - extension = QLatin1String(".") + extension; + if (extension[0] != QLatin1Char('.')) + extension = QLatin1Char('.') + extension; } if (!extension.isEmpty()) { - settings.setValue(QLatin1String("/") + extension + QLatin1String("/."), module + QLatin1String(".") + className); - settings.setValue(QLatin1String("/") + extension + QLatin1String("/Content Type"), mime); + settings.setValue(QLatin1Char('/') + extension + QLatin1String("/."), module + QLatin1Char('.') + className); + settings.setValue(QLatin1Char('/') + extension + QLatin1String("/Content Type"), mime); - mime = mime.replace(QLatin1String("/"), QLatin1String("\\")); + mime = mime.replace(QLatin1Char('/'), QLatin1Char('\\')); settings.setValue(QLatin1String("/MIME/Database/Content Type/") + mime + QLatin1String("/CLSID"), classId); settings.setValue(QLatin1String("/MIME/Database/Content Type/") + mime + QLatin1String("/Extension"), extension); } @@ -358,22 +358,22 @@ HRESULT UpdateRegistry(BOOL bRegister) const QString classId = qAxFactory()->classID(className).toString().toUpper(); className = qax_clean_type(className, mo); - QString classVersion = mo ? QString(QLatin1String(mo->classInfo(mo->indexOfClassInfo("Version")).value())) : QString(); + QString classVersion = mo ? QString::fromLatin1(mo->classInfo(mo->indexOfClassInfo("Version")).value()) : QString(); if (classVersion.isNull()) classVersion = QLatin1String("1.0"); - const QString classMajorVersion = classVersion.left(classVersion.indexOf(QLatin1String("."))); + const QString classMajorVersion = classVersion.left(classVersion.indexOf(QLatin1Char('.'))); qAxFactory()->unregisterClass(*key, &settings); - settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion + QLatin1String("/CLSID/.")); - settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion + QLatin1String("/Insertable/.")); - settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion + QLatin1String("/.")); - settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion); + settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/CLSID/.")); + settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/Insertable/.")); + settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/.")); + settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion); - settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String("/CLSID/.")); - settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String("/CurVer/.")); - settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String("/.")); - settings.remove(QLatin1String("/") + module + QLatin1String(".") + className); + settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/CLSID/.")); + settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/CurVer/.")); + settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/.")); + settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className); settings.remove(QLatin1String("/CLSID/") + classId + QLatin1String("/AppID")); settings.remove(QLatin1String("/CLSID/") + classId + QLatin1String("/Control/.")); @@ -404,14 +404,14 @@ HRESULT UpdateRegistry(BOOL bRegister) mime = mime.left(mime.length() - extension.length() - 1); // Prepend '.' before extension, if required. extension = extension.trimmed(); - if (extension[0] != QChar(QLatin1Char('.'))) - extension = QLatin1String(".") + extension; + if (extension[0] != QLatin1Char('.')) + extension.prepend(QLatin1Char('.')); } if (!extension.isEmpty()) { - settings.remove(QLatin1String("/") + extension + QLatin1String("/Content Type")); - settings.remove(QLatin1String("/") + extension + QLatin1String("/.")); - settings.remove(QLatin1String("/") + extension); - mime = mime.replace(QLatin1String("/"), QLatin1String("\\")); + settings.remove(QLatin1Char('/') + extension + QLatin1String("/Content Type")); + settings.remove(QLatin1Char('/') + extension + QLatin1String("/.")); + settings.remove(QLatin1Char('/') + extension); + mime.replace(QLatin1Char('/'), QLatin1Char('\\')); settings.remove(QLatin1String("/MIME/Database/Content Type/") + mime + QLatin1String("/Extension")); settings.remove(QLatin1String("/MIME/Database/Content Type/") + mime + QLatin1String("/CLSID")); settings.remove(QLatin1String("/MIME/Database/Content Type/") + mime + QLatin1String("/.")); @@ -455,8 +455,8 @@ static const char* const type_map[][2] = { "QFont", "IFontDisp*" }, { "QPixmap", "IPictureDisp*" }, { "QVariant", "VARIANT" }, - { "QVariantList", "SAFEARRAY(VARIANT)" }, - { "QList","SAFEARRAY(VARIANT)" }, + { "QVariantList", "SAFEARRAY(VARIANT)" }, + { "QList", "SAFEARRAY(VARIANT)" }, { "quint64", "CY" }, { "qint64", "CY" }, { "qulonglong", "CY" }, @@ -464,8 +464,8 @@ static const char* const type_map[][2] = { "QByteArray", "SAFEARRAY(BYTE)" }, { "QStringList", "SAFEARRAY(BSTR)" }, // Userdefined Qt datatypes - some not on Borland though - { "QCursor", "enum MousePointer" }, - { "Qt::FocusPolicy","enum FocusPolicy" }, + { "QCursor", "enum MousePointer" }, + { "Qt::FocusPolicy", "enum FocusPolicy" }, #ifndef Q_CC_BOR # if __REQUIRED_RPCNDR_H_VERSION__ >= Q_REQUIRED_RPCNDR_H_VERSION { "QRect", "struct QRect" }, @@ -578,7 +578,7 @@ static QByteArray renameOverloads(const QByteArray &name) int n = mapping.value(name); if (mapping.contains(name)) { int n = mapping.value(name); - newName = name + "_" + QByteArray::number(n); + newName = name + '_' + QByteArray::number(n); mapping.insert(name, n+1); } else { mapping.insert(name, 1); @@ -686,13 +686,13 @@ static QByteArray prototype(const QList ¶meterTypes, const QList QByteArray type(parameterTypes.at(p)); QByteArray name(parameterNames.at(p)); - if (type.endsWith("&")) { + if (type.endsWith('&')) { out = true; type.truncate(type.length() - 1); } else if (type.endsWith("**")) { out = true; type.truncate(type.length() - 1); - } else if (type.endsWith("*") && !subtypes.contains(type)) { + } else if (type.endsWith('*') && !subtypes.contains(type)) { type.truncate(type.length() - 1); } if (type.isEmpty()) { @@ -701,14 +701,14 @@ static QByteArray prototype(const QList ¶meterTypes, const QList } type = convertTypes(type, ok); if (!out) - prototype += "[in] " + type + " "; + prototype += "[in] " + type + ' '; else - prototype += "[in,out] " + type + " "; + prototype += "[in,out] " + type + ' '; if (out) - prototype += "*"; + prototype += '*'; if (name.isEmpty()) - prototype += "p" + QByteArray::number(p); + prototype += 'p' + QByteArray::number(p); else prototype += "p_" + replaceKeyword(name); @@ -728,12 +728,12 @@ static QByteArray addDefaultArguments(const QByteArray &prototype, int numDefArg QByteArray ptype(prototype); int in = -1; while (numDefArgs) { - in = ptype.lastIndexOf("]", in); + in = ptype.lastIndexOf(']', in); ptype.replace(in, 1, ",optional]"); in = ptype.indexOf(' ', in) + 1; QByteArray type = ptype.mid(in, ptype.indexOf(' ', in) - in); if (type == "enum") - type += " " + ptype.mid(in + 5, ptype.indexOf(' ', in + 5) - in - 5); + type += ' ' + ptype.mid(in + 5, ptype.indexOf(' ', in + 5) - in - 5); ptype.replace(in, type.length(), QByteArray("VARIANT /*was: ") + type + "*/"); --numDefArgs; } @@ -801,7 +801,7 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN for (int j = 0; j < enumerator.keyCount(); ++j) { QByteArray key(enumerator.key(j)); while (enumValues.contains(key)) { - key += "_"; + key += '_'; } enumValues.append(key); uint value = (uint)enumerator.value(j); @@ -822,32 +822,32 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN if (!enums.contains("MousePointer")) { enums.append("MousePointer"); out << "\tenum MousePointer {" << endl; - out << "\t\tArrowCursor = " << Qt::ArrowCursor << "," << endl; - out << "\t\tUpArrowCursor = " << Qt::UpArrowCursor << "," << endl; - out << "\t\tCrossCursor = " << Qt::CrossCursor << "," << endl; - out << "\t\tWaitCursor = " << Qt::WaitCursor << "," << endl; - out << "\t\tIBeamCursor = " << Qt::IBeamCursor << "," << endl; - out << "\t\tSizeVerCursor = " << Qt::SizeVerCursor << "," << endl; - out << "\t\tSizeHorCursor = " << Qt::SizeHorCursor << "," << endl; - out << "\t\tSizeBDiagCursor = " << Qt::SizeBDiagCursor << "," << endl; - out << "\t\tSizeFDiagCursor = " << Qt::SizeFDiagCursor << "," << endl; - out << "\t\tSizeAllCursor = " << Qt::SizeAllCursor << "," << endl; - out << "\t\tBlankCursor = " << Qt::BlankCursor << "," << endl; - out << "\t\tSplitVCursor = " << Qt::SplitVCursor << "," << endl; - out << "\t\tSplitHCursor = " << Qt::SplitHCursor << "," << endl; - out << "\t\tPointingHandCursor = " << Qt::PointingHandCursor << "," << endl; - out << "\t\tForbiddenCursor = " << Qt::ForbiddenCursor << "," << endl; - out << "\t\tWhatsThisCursor = " << Qt::WhatsThisCursor << "," << endl; + out << "\t\tArrowCursor = " << Qt::ArrowCursor << ',' << endl; + out << "\t\tUpArrowCursor = " << Qt::UpArrowCursor << ',' << endl; + out << "\t\tCrossCursor = " << Qt::CrossCursor << ',' << endl; + out << "\t\tWaitCursor = " << Qt::WaitCursor << ',' << endl; + out << "\t\tIBeamCursor = " << Qt::IBeamCursor << ',' << endl; + out << "\t\tSizeVerCursor = " << Qt::SizeVerCursor << ',' << endl; + out << "\t\tSizeHorCursor = " << Qt::SizeHorCursor << ',' << endl; + out << "\t\tSizeBDiagCursor = " << Qt::SizeBDiagCursor << ',' << endl; + out << "\t\tSizeFDiagCursor = " << Qt::SizeFDiagCursor << ',' << endl; + out << "\t\tSizeAllCursor = " << Qt::SizeAllCursor << ',' << endl; + out << "\t\tBlankCursor = " << Qt::BlankCursor << ',' << endl; + out << "\t\tSplitVCursor = " << Qt::SplitVCursor << ',' << endl; + out << "\t\tSplitHCursor = " << Qt::SplitHCursor << ',' << endl; + out << "\t\tPointingHandCursor = " << Qt::PointingHandCursor << ',' << endl; + out << "\t\tForbiddenCursor = " << Qt::ForbiddenCursor << ',' << endl; + out << "\t\tWhatsThisCursor = " << Qt::WhatsThisCursor << ',' << endl; out << "\t\tBusyCursor\t= " << Qt::BusyCursor << endl; out << "\t};" << endl << endl; } if (!enums.contains("FocusPolicy")) { enums.append("FocusPolicy"); out << "\tenum FocusPolicy {" << endl; - out << "\t\tNoFocus = " << Qt::NoFocus << "," << endl; - out << "\t\tTabFocus = " << Qt::TabFocus << "," << endl; - out << "\t\tClickFocus = " << Qt::ClickFocus << "," << endl; - out << "\t\tStrongFocus = " << Qt::StrongFocus << "," << endl; + out << "\t\tNoFocus = " << Qt::NoFocus << ',' << endl; + out << "\t\tTabFocus = " << Qt::TabFocus << ',' << endl; + out << "\t\tClickFocus = " << Qt::ClickFocus << ',' << endl; + out << "\t\tStrongFocus = " << Qt::StrongFocus << ',' << endl; out << "\t\tWheelFocus = " << Qt::WheelFocus << endl; out << "\t};" << endl << endl; } @@ -877,7 +877,7 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN if (!ok) out << "\t/****** Property is of unsupported datatype" << endl; - out << "\t\t[id(" << id << ")"; + out << "\t\t[id(" << id << ')'; if (!property.isWritable()) out << ", readonly"; if (isBindable && property.isScriptable(o)) @@ -886,9 +886,9 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN out << ", nonbrowsable"; if (isBindable) out << ", requestedit"; - if (defProp == QString::fromLatin1(name.constData())) + if (defProp == QLatin1String(name)) out << ", uidefault"; - out << "] " << type << " " << name << ";" << endl; + out << "] " << type << ' ' << name << ';' << endl; if (!ok) out << "\t******/" << endl; @@ -939,7 +939,7 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN if (!ok) outBuffer += "\t/****** Slot parameter uses unsupported datatype\n"; - outBuffer += "\t\t[id(" + QString::number(id).toLatin1() + ")] " + type + " " + name + "(" + ptype + ");\n"; + outBuffer += "\t\t[id(" + QString::number(id).toLatin1() + ")] " + type + ' ' + name + '(' + ptype + ");\n"; if (!ok) outBuffer += "\t******/\n"; @@ -991,7 +991,7 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN QList parameterTypes(signal.parameterTypes()); QList parameterNames(signal.parameterNames()); - bool isDefault = defSignal == QString::fromLatin1(name.constData()); + bool isDefault = defSignal == QLatin1String(name); name = renameOverloads(replaceKeyword(name)); bool ok = true; @@ -1003,10 +1003,10 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN if (!ok) out << "\t/****** Signal parameter uses unsupported datatype" << endl; - out << "\t\t[id(" << id << ")"; + out << "\t\t[id(" << id << ')'; if (isDefault) out << ", uidefault"; - out << "] void " << name << "(" << ptype << ");" << endl; + out << "] void " << name << '(' << ptype << ");" << endl; if (!ok) out << "\t******/" << endl; @@ -1031,7 +1031,7 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN const char *classVersion = mo->classInfo(mo->indexOfClassInfo("Version")).value(); if (classVersion) out << "\t\tversion(" << classVersion << ")," << endl; - out << "\t\tuuid(" << classID << ")"; + out << "\t\tuuid(" << classID << ')'; if (control) { out << ", " << endl; out << "\t\tcontrol"; @@ -1043,7 +1043,7 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN out << "\t]" << endl; out << "\tcoclass " << cleanClassName << endl; out << "\t{" << endl; - out << "\t\t[default] dispinterface I" << cleanClassName << ";" << endl; + out << "\t\t[default] dispinterface I" << cleanClassName << ';' << endl; if (hasEvents) out << "\t\t[default, source] dispinterface I" << cleanClassName << "Events;" << endl; out << "\t};" << endl; @@ -1068,7 +1068,7 @@ extern "C" HRESULT __stdcall DumpIDL(const QString &outfile, const QString &ver) file.remove(); QString filebase = QString::fromLocal8Bit(qAxModuleFilename); - filebase = filebase.left(filebase.lastIndexOf(QLatin1String("."))); + filebase = filebase.left(filebase.lastIndexOf(QLatin1Char('.'))); QString appID = qAxFactory()->appID().toString().toUpper(); if (QUuid(appID).isNull()) @@ -1103,7 +1103,7 @@ extern "C" HRESULT __stdcall DumpIDL(const QString &outfile, const QString &ver) out << "/****************************************************************************" << endl; out << "** Interface definition generated for ActiveQt project" << endl; out << "**" << endl; - out << "** '" << qAxModuleFilename << "'" << endl; + out << "** '" << qAxModuleFilename << '\'' << endl; out << "**" << endl; out << "** Created: " << QDateTime::currentDateTime().toString() << endl; out << "**" << endl; @@ -1121,13 +1121,13 @@ extern "C" HRESULT __stdcall DumpIDL(const QString &outfile, const QString &ver) delete_qApp = true; } - out << "[" << endl; + out << '[' << endl; out << "\tuuid(" << typeLibID << ")," << endl; out << "\tversion(" << version << ")," << endl; - out << "\thelpstring(\"" << typelib << " " << version << " Type Library\")" << endl; - out << "]" << endl; + out << "\thelpstring(\"" << typelib << ' ' << version << " Type Library\")" << endl; + out << ']' << endl; out << "library " << typelib << "Lib" << endl; - out << "{" << endl; + out << '{' << endl; out << "\timportlib(\"stdole32.tlb\");" << endl; out << "\timportlib(\"stdole2.tlb\");" << endl << endl; @@ -1188,11 +1188,12 @@ extern "C" HRESULT __stdcall DumpIDL(const QString &outfile, const QString &ver) // We have meta object information for this type. Forward declare it. if (mo) { QByteArray cleanType = qax_clean_type(*key, mo).toLatin1(); - out << "\tcoclass " << cleanType << ";" << endl; + out << "\tcoclass " << cleanType << ';' << endl; + subtypes.append(cleanType); + qRegisterMetaType(cleanType, (void**)0); + cleanType += '*'; subtypes.append(cleanType); - subtypes.append(cleanType + "*"); qRegisterMetaType(cleanType, (void**)0); - qRegisterMetaType(cleanType + "*", (void**)0); } } out << endl; @@ -1225,7 +1226,7 @@ extern "C" HRESULT __stdcall DumpIDL(const QString &outfile, const QString &ver) QByteArray cleanType = qax_clean_type(*key, mo).toLatin1(); subtypes.append(cleanType); - subtypes.append(cleanType + "*"); + subtypes.append(cleanType + '*'); res = classIDL(o, mo, QString::fromLatin1(className.constData()), isBindable, out); delete o; if (res != S_OK) diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp index f3e1dff..19c2404 100644 --- a/src/activeqt/control/qaxserverbase.cpp +++ b/src/activeqt/control/qaxserverbase.cpp @@ -2446,10 +2446,10 @@ HRESULT WINAPI QAxServerBase::Invoke(DISPID dispidMember, REFIID riid, int nameLength = 0; if (index == -1) { nameLength = name.length(); - name += "("; + name += '('; // no parameter - shortcut if (!pDispParams->cArgs) - index = mo->indexOfSlot((name + ")")); + index = mo->indexOfSlot((name + ')')); // search if (index == -1) { for (int i = 0; i < mo->methodCount(); ++i) { @@ -2463,7 +2463,7 @@ HRESULT WINAPI QAxServerBase::Invoke(DISPID dispidMember, REFIID riid, if (index == -1) { QRegExp regexp(QLatin1String("_([0-9])\\(")); if (regexp.lastIndexIn(QString::fromLatin1(name.constData())) != -1) { - name = name.left(name.length() - regexp.cap(0).length()) + "("; + name = name.left(name.length() - regexp.cap(0).length()) + '('; int overload = regexp.cap(1).toInt() + 1; for (int s = 0; s < qt.object->metaObject()->methodCount(); ++s) { @@ -2559,7 +2559,7 @@ HRESULT WINAPI QAxServerBase::Invoke(DISPID dispidMember, REFIID riid, argv[p + 1] = varp + p + 1; } else { argv[p + 1] = const_cast(varp[p + 1].constData()); - if (ptype.endsWith("*")) { + if (ptype.endsWith('*')) { argv_pointer[p + 1] = argv[p + 1]; argv[p + 1] = argv_pointer + p + 1; } @@ -2590,7 +2590,7 @@ HRESULT WINAPI QAxServerBase::Invoke(DISPID dispidMember, REFIID riid, } else { argv[0] = const_cast(varp[0].constData()); } - if (type.endsWith("*")) { + if (type.endsWith('*')) { argv_pointer[0] = argv[0]; argv[0] = argv_pointer; } diff --git a/src/activeqt/control/qaxservermain.cpp b/src/activeqt/control/qaxservermain.cpp index a50fef0..e3e1e5d 100644 --- a/src/activeqt/control/qaxservermain.cpp +++ b/src/activeqt/control/qaxservermain.cpp @@ -253,7 +253,7 @@ EXTERN_C int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR, run = false; break; } else { - unprocessed += cmds.at(i) + " "; + unprocessed += cmds.at(i) + ' '; } } diff --git a/src/activeqt/shared/qaxtypes.cpp b/src/activeqt/shared/qaxtypes.cpp index ace81e7..12307f3 100644 --- a/src/activeqt/shared/qaxtypes.cpp +++ b/src/activeqt/shared/qaxtypes.cpp @@ -1111,7 +1111,7 @@ QVariant VARIANTToQVariant(const VARIANT &arg, const QByteArray &typeName, uint if (iface) { QObject *qObj = iface->qObject(); iface->Release(); - var = QVariant(qRegisterMetaType(qObj ? QByteArray(qObj->metaObject()->className()) + "*" : typeName), &qObj); + var = QVariant(qRegisterMetaType(qObj ? QByteArray(qObj->metaObject()->className()) + '*' : typeName), &qObj); } else #endif { diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index 8ea48d1..3c443ff 100644 --- a/src/corelib/io/qfsfileengine_unix.cpp +++ b/src/corelib/io/qfsfileengine_unix.cpp @@ -83,12 +83,12 @@ static QByteArray openModeToFopenMode(QIODevice::OpenMode flags, const QString & } else if (flags & QIODevice::WriteOnly) { mode = "wb"; if (flags & QIODevice::ReadOnly) - mode += "+"; + mode += '+'; } if (flags & QIODevice::Append) { mode = "ab"; if (flags & QIODevice::ReadOnly) - mode += "+"; + mode += '+'; } return mode; } @@ -723,7 +723,7 @@ QString QFSFileEngine::fileName(FileName file) const bool isDir = ret.endsWith(QLatin1Char('/')); ret = QDir::cleanPath(ret); if (isDir) - ret += QLatin1String("/"); + ret += QLatin1Char('/'); if (file == AbsolutePathName) { int slash = ret.lastIndexOf(QLatin1Char('/')); if (slash == -1) diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp index 0b87e2b..790f1eb 100644 --- a/src/corelib/io/qfsfileengine_win.cpp +++ b/src/corelib/io/qfsfileengine_win.cpp @@ -1770,10 +1770,10 @@ QString QFSFileEngine::fileName(FileName file) const if(slash == -1) { if(d->filePath.length() >= 2 && d->filePath.at(1) == QLatin1Char(':')) return d->filePath.left(2); - return QString::fromLatin1("."); + return QLatin1Char('.'); } else { if(!slash) - return QString::fromLatin1("/"); + return QLatin1Char('/'); if(slash == 2 && d->filePath.length() >= 2 && d->filePath.at(1) == QLatin1Char(':')) slash++; return d->filePath.left(slash); @@ -1831,7 +1831,7 @@ QString QFSFileEngine::fileName(FileName file) const if (slash == -1) ret = QDir::currentPath(); else if (slash == 0) - ret = QLatin1String("/"); + ret = QLatin1Char('/'); ret = ret.left(slash); } return ret; @@ -1893,7 +1893,7 @@ QString QFSFileEngine::owner(FileOwner own) const #else Q_UNUSED(own); #endif - return QString(QLatin1String("")); + return QString(); } bool QFSFileEngine::setPermissions(uint perms) diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 94a53f1..5846e23 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -5330,7 +5330,7 @@ QString QUrl::toString(FormattingOptions options) const url += QLatin1Char('/'); url += ourPath; // check if we need to remove trailing slashes - while ((options & StripTrailingSlash) && url.right(1) == QLatin1String("/")) + while ((options & StripTrailingSlash) && url.endsWith(QLatin1Char('/'))) url.chop(1); } diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 6847173..cb40f19 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -1908,7 +1908,7 @@ QStringList QCoreApplication::arguments() wchar_t tempFilename[MAX_PATH+1]; if (GetModuleFileNameW(0, tempFilename, MAX_PATH)) { tempFilename[MAX_PATH] = 0; - cmdline.prepend(QLatin1Char('\"') + QString::fromUtf16((unsigned short *)tempFilename) + QString(QLatin1String("\" "))); + cmdline.prepend(QLatin1Char('\"') + QString::fromUtf16((unsigned short *)tempFilename) + QLatin1String("\" ")); } #endif // Q_OS_WINCE diff --git a/src/corelib/kernel/qcoreapplication_win.cpp b/src/corelib/kernel/qcoreapplication_win.cpp index 9868c23..815a558 100644 --- a/src/corelib/kernel/qcoreapplication_win.cpp +++ b/src/corelib/kernel/qcoreapplication_win.cpp @@ -840,7 +840,7 @@ QString decodeMSG(const MSG& msg) FLGSTR(ISC_SHOWUICANDIDATEWINDOW << 2), FLGSTR(ISC_SHOWUICANDIDATEWINDOW << 3), FLAG_STRING()); - parameters.sprintf("Input context(%s) Show flags(%s)", (fSet?"Active":"Inactive"), showFlgs.toLatin1().data()); + parameters.sprintf("Input context(%s) Show flags(%s)", (fSet? "Active" : "Inactive"), showFlgs.toLatin1().data()); } break; #endif diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp index 08bd2d0..de1baac 100644 --- a/src/corelib/plugin/qlibrary_unix.cpp +++ b/src/corelib/plugin/qlibrary_unix.cpp @@ -71,7 +71,7 @@ static QString qdlerror() #else const char *err = strerror(errno); #endif - return err ? QLatin1String("(")+QString::fromLocal8Bit(err) + QLatin1String(")"): QString(); + return err ? QLatin1Char('(') + QString::fromLocal8Bit(err) + QLatin1Char(')'): QString(); } bool QLibraryPrivate::load_sys() diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index 090ca61..de41360 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -4688,7 +4688,7 @@ QDateTimeParser::StateNode QDateTimeParser::parse(QString &input, int &cursorPos if (fixup && tmpstate == Intermediate && used < sn.count) { const FieldInfo fi = fieldInfo(index); if ((fi & (Numeric|FixedWidth)) == (Numeric|FixedWidth)) { - const QString newText = QString(QLatin1String("%1")).arg(num, sn.count, 10, QLatin1Char('0')); + const QString newText = QString::fromLatin1("%1").arg(num, sn.count, 10, QLatin1Char('0')); input.replace(pos, used, newText); used = sn.count; } diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index 248137a..9953155 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -321,7 +321,7 @@ static QString readEscapedFormatString(const QString &format, int *idx) { int &i = *idx; - Q_ASSERT(format.at(i).unicode() == '\''); + Q_ASSERT(format.at(i) == QLatin1Char('\'')); ++i; if (i == format.size()) return QString(); @@ -635,7 +635,7 @@ static QLocale::MeasurementSystem winSystemMeasurementSystem() QString iMeasure = QT_WA_INLINE( QString::fromUtf16(reinterpret_cast(output)), QString::fromLocal8Bit(reinterpret_cast(output))); - if (iMeasure == QString::fromLatin1("1")) { + if (iMeasure == QLatin1String("1")) { return QLocale::ImperialSystem; } } diff --git a/src/corelib/xml/qxmlstream.cpp b/src/corelib/xml/qxmlstream.cpp index ff1a01f..5e1fec3 100644 --- a/src/corelib/xml/qxmlstream.cpp +++ b/src/corelib/xml/qxmlstream.cpp @@ -3058,7 +3058,7 @@ QXmlStreamPrivateTagStack::NamespaceDeclaration &QXmlStreamWriterPrivate::findNa QString s; int n = ++namespacePrefixCount; forever { - s = QLatin1String("n") + QString::number(n++); + s = QLatin1Char('n') + QString::number(n++); int j = namespaceDeclarations.size() - 2; while (j >= 0 && namespaceDeclarations.at(j).prefix != s) --j; diff --git a/src/dbus/qdbuserror.cpp b/src/dbus/qdbuserror.cpp index 955a31c..2347a54 100644 --- a/src/dbus/qdbuserror.cpp +++ b/src/dbus/qdbuserror.cpp @@ -339,7 +339,7 @@ QString QDBusError::errorString(ErrorType error) #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug dbg, const QDBusError &msg) { - dbg.nospace() << "QDBusError(" << msg.name() << ", " << msg.message() << ")"; + dbg.nospace() << "QDBusError(" << msg.name() << ", " << msg.message() << ')'; return dbg.space(); } #endif diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp index f40a45f..33f44ab 100644 --- a/src/dbus/qdbusintegrator.cpp +++ b/src/dbus/qdbusintegrator.cpp @@ -74,7 +74,7 @@ static inline QDebug operator<<(QDebug dbg, const QThread *th) dbg.nospace() << "QThread(ptr=" << (void*)th; if (th && !th->objectName().isEmpty()) dbg.nospace() << ", name=" << th->objectName(); - dbg.nospace() << ")"; + dbg.nospace() << ')'; return dbg.space(); } @@ -90,7 +90,7 @@ static inline QDebug operator<<(QDebug dbg, const QDBusConnectionPrivate *conn) dbg.nospace() << "same thread"; else dbg.nospace() << conn->thread(); - dbg.nospace() << ")"; + dbg.nospace() << ')'; return dbg.space(); } @@ -565,7 +565,7 @@ static void huntAndEmit(DBusConnection *connection, DBusMessage *msg, QDBusConnectionPrivate::ObjectTreeNode::DataList::ConstIterator it = haystack.children.constBegin(); QDBusConnectionPrivate::ObjectTreeNode::DataList::ConstIterator end = haystack.children.constEnd(); for ( ; it != end; ++it) - huntAndEmit(connection, msg, needle, *it, isScriptable, isAdaptor, path + QLatin1String("/") + it->name); + huntAndEmit(connection, msg, needle, *it, isScriptable, isAdaptor, path + QLatin1Char('/') + it->name); if (needle == haystack.obj) { // is this a signal we should relay? diff --git a/src/dbus/qdbusmetaobject.cpp b/src/dbus/qdbusmetaobject.cpp index 8eb8b1a..ce76ecc 100644 --- a/src/dbus/qdbusmetaobject.cpp +++ b/src/dbus/qdbusmetaobject.cpp @@ -601,7 +601,7 @@ QDBusMetaObject *QDBusMetaObject::createMetaObject(const QString &interface, con // mark as an error error = QDBusError(QDBusError::UnknownInterface, - QString( QLatin1String("Interface '%1' was not found") ) + QString::fromLatin1("Interface '%1' was not found") .arg(interface)); return 0; } diff --git a/src/dbus/qdbusutil.cpp b/src/dbus/qdbusutil.cpp index 471b899..dd983a0 100644 --- a/src/dbus/qdbusutil.cpp +++ b/src/dbus/qdbusutil.cpp @@ -80,15 +80,15 @@ static bool variantToString(const QVariant &arg, QString &out) int argType = arg.userType(); if (argType == QVariant::StringList) { - out += QLatin1String("{"); + out += QLatin1Char('{'); QStringList list = arg.toStringList(); foreach (QString item, list) out += QLatin1Char('\"') + item + QLatin1String("\", "); if (!list.isEmpty()) out.chop(2); - out += QLatin1String("}"); + out += QLatin1Char('}'); } else if (argType == QVariant::ByteArray) { - out += QLatin1String("{"); + out += QLatin1Char('{'); QByteArray list = arg.toByteArray(); for (int i = 0; i < list.count(); ++i) { out += QString::number(list.at(i)); @@ -96,9 +96,9 @@ static bool variantToString(const QVariant &arg, QString &out) } if (!list.isEmpty()) out.chop(2); - out += QLatin1String("}"); + out += QLatin1Char('}'); } else if (argType == QVariant::List) { - out += QLatin1String("{"); + out += QLatin1Char('{'); QList list = arg.toList(); foreach (QVariant item, list) { if (!variantToString(item, out)) @@ -107,7 +107,7 @@ static bool variantToString(const QVariant &arg, QString &out) } if (!list.isEmpty()) out.chop(2); - out += QLatin1String("}"); + out += QLatin1Char('}'); } else if (argType == QMetaType::Char || argType == QMetaType::Short || argType == QMetaType::Int || argType == QMetaType::Long || argType == QMetaType::LongLong) { out += QString::number(arg.toLongLong()); @@ -142,7 +142,7 @@ static bool variantToString(const QVariant &arg, QString &out) return false; out += QLatin1Char(']'); } else if (arg.canConvert(QVariant::String)) { - out += QLatin1String("\"") + arg.toString() + QLatin1String("\""); + out += QLatin1Char('\"') + arg.toString() + QLatin1Char('\"'); } else { out += QLatin1Char('['); out += QLatin1String(arg.typeName()); @@ -226,7 +226,7 @@ bool argToString(const QDBusArgument &busArg, QString &out) if (elementType != QDBusArgument::BasicType && elementType != QDBusArgument::VariantType && elementType != QDBusArgument::MapEntryType) - out += QLatin1String("]"); + out += QLatin1Char(']'); return true; } diff --git a/src/gui/dialogs/qprintdialog_unix.cpp b/src/gui/dialogs/qprintdialog_unix.cpp index 87a4e65..8456d13 100644 --- a/src/gui/dialogs/qprintdialog_unix.cpp +++ b/src/gui/dialogs/qprintdialog_unix.cpp @@ -669,7 +669,7 @@ QUnixPrintWidgetPrivate::QUnixPrintWidgetPrivate(QUnixPrintWidget *p) for (int i = 0; i < cupsPrinterCount; ++i) { QString printerName(QString::fromLocal8Bit(cupsPrinters[i].name)); if (cupsPrinters[i].instance) - printerName += QLatin1String("/") + QString::fromLocal8Bit(cupsPrinters[i].instance); + printerName += QLatin1Char('/') + QString::fromLocal8Bit(cupsPrinters[i].instance); widget.printers->addItem(printerName); if (cupsPrinters[i].is_default) @@ -813,7 +813,7 @@ void QUnixPrintWidgetPrivate::_q_printerChanged(int index) optionsPane->selectPrinter(0); #endif if (lprPrinters.count() > 0) { - QString type = lprPrinters.at(index).name + QLatin1String("@") + lprPrinters.at(index).host; + QString type = lprPrinters.at(index).name + QLatin1Char('@') + lprPrinters.at(index).host; if (!lprPrinters.at(index).comment.isEmpty()) type += QLatin1String(", ") + lprPrinters.at(index).comment; widget.type->setText(type); @@ -1194,9 +1194,9 @@ QVariant QPPDOptionsModel::headerData(int section, Qt::Orientation, int role) co switch(section){ case 0: - return QVariant(QApplication::translate("QPPDOptionsModel","Name")); + return QVariant(QApplication::translate("QPPDOptionsModel", "Name")); case 1: - return QVariant(QApplication::translate("QPPDOptionsModel","Value")); + return QVariant(QApplication::translate("QPPDOptionsModel", "Value")); default: return QVariant(); } diff --git a/src/gui/dialogs/qprintpreviewdialog.cpp b/src/gui/dialogs/qprintpreviewdialog.cpp index 29a2738..a696160 100644 --- a/src/gui/dialogs/qprintpreviewdialog.cpp +++ b/src/gui/dialogs/qprintpreviewdialog.cpp @@ -460,7 +460,7 @@ void QPrintPreviewDialogPrivate::updatePageNumLabel() int numPages = preview->numPages(); int maxChars = QString::number(numPages).length(); - pageNumLabel->setText(QString(QLatin1String("/ %1")).arg(numPages)); + pageNumLabel->setText(QString::fromLatin1("/ %1").arg(numPages)); int cyphersWidth = q->fontMetrics().width(QString().fill(QLatin1Char('8'), maxChars)); int maxWidth = pageNumEdit->minimumSizeHint().width() + cyphersWidth; pageNumEdit->setMinimumWidth(maxWidth); @@ -611,7 +611,7 @@ void QPrintPreviewDialogPrivate::_q_zoomFactorChanged() factor = qMax(qreal(1.0), qMin(qreal(1000.0), factor)); if (ok) { preview->setZoomFactor(factor/100.0); - zoomFactor->setEditText(QString(QLatin1String("%1%")).arg(factor)); + zoomFactor->setEditText(QString::fromLatin1("%1%").arg(factor)); setFitting(false); } } diff --git a/src/gui/embedded/qmouse_qws.cpp b/src/gui/embedded/qmouse_qws.cpp index 044a574..b5eda0c 100644 --- a/src/gui/embedded/qmouse_qws.cpp +++ b/src/gui/embedded/qmouse_qws.cpp @@ -413,8 +413,8 @@ void QWSCalibratedMouseHandler::writeCalibration() QFile file(calFile); if (file.open(QIODevice::WriteOnly)) { QTextStream t(&file); - t << a << " " << b << " " << c << " "; - t << d << " " << e << " " << f << " " << s << endl; + t << a << ' ' << b << ' ' << c << ' '; + t << d << ' ' << e << ' ' << f << ' ' << s << endl; } else #endif { diff --git a/src/gui/embedded/qscreenmulti_qws.cpp b/src/gui/embedded/qscreenmulti_qws.cpp index 1914b44..a639e01 100644 --- a/src/gui/embedded/qscreenmulti_qws.cpp +++ b/src/gui/embedded/qscreenmulti_qws.cpp @@ -221,9 +221,9 @@ bool QMultiScreen::connect(const QString &displaySpec) { QString dSpec = displaySpec; if (dSpec.startsWith(QLatin1String("Multi:"), Qt::CaseInsensitive)) - dSpec = dSpec.mid(QString(QLatin1String("Multi:")).size()); + dSpec = dSpec.mid(QString::fromLatin1("Multi:").size()); - const QString displayIdSpec = QString(QLatin1String(" :%1")).arg(displayId); + const QString displayIdSpec = QString::fromLatin1(" :%1").arg(displayId); if (dSpec.endsWith(displayIdSpec)) dSpec = dSpec.left(dSpec.size() - displayIdSpec.size()); diff --git a/src/gui/embedded/qscreentransformed_qws.cpp b/src/gui/embedded/qscreentransformed_qws.cpp index e22ea1f..01a18b3 100644 --- a/src/gui/embedded/qscreentransformed_qws.cpp +++ b/src/gui/embedded/qscreentransformed_qws.cpp @@ -206,11 +206,11 @@ bool QTransformedScreen::connect(const QString &displaySpec) { QString dspec = displaySpec.trimmed(); if (dspec.startsWith(QLatin1String("Transformed:"), Qt::CaseInsensitive)) - dspec = dspec.mid(QString(QLatin1String("Transformed:")).size()); + dspec = dspec.mid(QString::fromLatin1("Transformed:").size()); else if (!dspec.compare(QLatin1String("Transformed"), Qt::CaseInsensitive)) dspec = QString(); - const QString displayIdSpec = QString(QLatin1String(" :%1")).arg(displayId); + const QString displayIdSpec = QString::fromLatin1(" :%1").arg(displayId); if (dspec.endsWith(displayIdSpec)) dspec = dspec.left(dspec.size() - displayIdSpec.size()); @@ -223,7 +223,7 @@ bool QTransformedScreen::connect(const QString &displaySpec) if (!QScreenDriverFactory::keys().contains(driver, Qt::CaseInsensitive)) if (!dspec.isEmpty()) - dspec.prepend(QLatin1String(":")); + dspec.prepend(QLatin1Char(':')); const int id = getDisplayId(dspec); QScreen *s = qt_get_screen(id, dspec.toLatin1().constData()); diff --git a/src/gui/embedded/qscreenvfb_qws.cpp b/src/gui/embedded/qscreenvfb_qws.cpp index accfe1f..ec393e3 100644 --- a/src/gui/embedded/qscreenvfb_qws.cpp +++ b/src/gui/embedded/qscreenvfb_qws.cpp @@ -330,7 +330,7 @@ void QVFbScreen::disconnect() bool QVFbScreen::initDevice() { #ifndef QT_NO_QWS_MOUSE_QVFB - const QString mouseDev = QString(QLatin1String(QT_VFB_MOUSE_PIPE)) + const QString mouseDev = QString::fromLatin1(QT_VFB_MOUSE_PIPE) .arg(displayId); d_ptr->mouse = new QVFbMouseHandler(QLatin1String("QVFbMouse"), mouseDev); qwsServer->setDefaultMouse("None"); @@ -339,7 +339,7 @@ bool QVFbScreen::initDevice() #endif #if !defined(QT_NO_QWS_KBD_QVFB) && !defined(QT_NO_QWS_KEYBOARD) - const QString keyboardDev = QString(QLatin1String(QT_VFB_KEYBOARD_PIPE)) + const QString keyboardDev = QString::fromLatin1(QT_VFB_KEYBOARD_PIPE) .arg(displayId); d_ptr->keyboard = new QVFbKeyboardHandler(keyboardDev); qwsServer->setDefaultKeyboard("None"); diff --git a/src/gui/embedded/qtransportauth_qws.cpp b/src/gui/embedded/qtransportauth_qws.cpp index 97ba5b8..6677482 100644 --- a/src/gui/embedded/qtransportauth_qws.cpp +++ b/src/gui/embedded/qtransportauth_qws.cpp @@ -834,12 +834,12 @@ QString RequestAnalyzer::analyze( QByteArray *msgQueue ) if ( command_type == QWSCommand::QCopSend ) { QWSQCopSendCommand *sendCommand = static_cast(command); - request += QString( QLatin1String("/QCop/%1/%2") ).arg( sendCommand->channel ).arg( sendCommand->message ); + request += QString::fromLatin1("/QCop/%1/%2").arg( sendCommand->channel ).arg( sendCommand->message ); } if ( command_type == QWSCommand::QCopRegisterChannel ) { QWSQCopRegisterChannelCommand *registerCommand = static_cast(command); - request += QString( QLatin1String("/QCop/RegisterChannel/%1") ).arg( registerCommand->channel ); + request += QString::fromLatin1("/QCop/RegisterChannel/%1").arg( registerCommand->channel ); } #endif dataSize = QWS_PROTOCOL_ITEM_SIZE( *command ); diff --git a/src/gui/embedded/qunixsocket.cpp b/src/gui/embedded/qunixsocket.cpp index 16f2cae..1600505 100644 --- a/src/gui/embedded/qunixsocket.cpp +++ b/src/gui/embedded/qunixsocket.cpp @@ -135,7 +135,7 @@ struct QUnixSocketRightsPrivate : public QSharedData #ifdef QUNIXSOCKET_DEBUG if(0 != closerv) { qDebug() << "QUnixSocketRightsPrivate: Unable to close managed" - " file descriptor (" << ::strerror(errno) << ")"; + " file descriptor (" << ::strerror(errno) << ')'; } #endif } @@ -166,7 +166,7 @@ QUnixSocketRights::QUnixSocketRights(int fd) #ifdef QUNIXSOCKET_DEBUG if(-1 == d->fd) { qDebug() << "QUnixSocketRights: Unable to duplicate fd " - << fd << " (" << ::strerror(errno) << ")"; + << fd << " (" << ::strerror(errno) << ')'; } #endif } @@ -237,7 +237,7 @@ int QUnixSocketRights::dupFd() const #ifdef QUNIXSOCKET_DEBUG if(-1 == rv) qDebug() << "QUnixSocketRights: Unable to duplicate managed file " - "descriptor (" << ::strerror(errno) << ")"; + "descriptor (" << ::strerror(errno) << ')'; #endif return rv; @@ -927,7 +927,7 @@ bool QUnixSocket::connect(const QByteArray & path) int crv; #ifdef QUNIXSOCKET_DEBUG qDebug() << "QUnixSocket: Connect requested to '" - << path << "'"; + << path << '\''; #endif abort(); // Reset any existing connection @@ -949,7 +949,7 @@ bool QUnixSocket::connect(const QByteArray & path) if(-1 == d->fd) { #ifdef QUNIXSOCKET_DEBUG qDebug() << "QUnixSocket: Unable to create socket (" - << strerror(errno) << ")"; + << strerror(errno) << ')'; #endif d->error = ResourceError; goto connect_error; @@ -962,7 +962,7 @@ bool QUnixSocket::connect(const QByteArray & path) if(-1 == crv) { #ifdef QUNIXSOCKET_DEBUG qDebug() << "QUnixSocket: Unable to configure socket (" - << ::strerror(errno) << ")"; + << ::strerror(errno) << ')'; #endif d->error = ResourceError; @@ -981,7 +981,7 @@ bool QUnixSocket::connect(const QByteArray & path) if(-1 == crv) { #ifdef QUNIXSOCKET_DEBUG qDebug() << "QUnixSocket: Unable to connect (" - << ::strerror(errno) << ")"; + << ::strerror(errno) << ')'; #endif if(ECONNREFUSED == errno) d->error = ConnectionRefused; @@ -1021,7 +1021,7 @@ connect_error: // Cleanup failed connection #ifdef QUNIXSOCKET_DEBUG if(0 != closerv) { qDebug() << "QUnixSocket: Unable to close file descriptor after " - "failed connect (" << ::strerror(errno) << ")"; + "failed connect (" << ::strerror(errno) << ')'; } #endif } @@ -1065,7 +1065,7 @@ bool QUnixSocket::setSocketDescriptor(int socketDescriptor) if(-1 == crv) { #ifdef QUNIXSOCKET_DEBUG qDebug() << "QUnixSocket: Unable to configure client provided socket (" - << ::strerror(errno) << ")"; + << ::strerror(errno) << ')'; #endif d->error = ResourceError; @@ -1136,7 +1136,7 @@ void QUnixSocket::abort() #ifdef QUNIXSOCKET_DEBUG if(0 != closerv) { qDebug() << "QUnixSocket: Unable to close socket during abort (" - << strerror(errno) << ")"; + << strerror(errno) << ')'; } #endif @@ -1686,11 +1686,11 @@ qint64 QUnixSocketPrivate::writeActivated() } #ifdef QUNIXSOCKET_DEBUG - qDebug() << "QUnixSocket: Transmitting message (length" << m.d->size() << ")"; + qDebug() << "QUnixSocket: Transmitting message (length" << m.d->size() << ')'; #endif ::ssize_t s = ::sendmsg(fd, &sendmessage, MSG_DONTWAIT | MSG_NOSIGNAL); #ifdef QUNIXSOCKET_DEBUG - qDebug() << "QUnixSocket: Transmitted message (" << s << ")"; + qDebug() << "QUnixSocket: Transmitted message (" << s << ')'; #endif if(-1 == s) { @@ -1699,13 +1699,13 @@ qint64 QUnixSocketPrivate::writeActivated() } else if(EPIPE == errno) { #ifdef QUNIXSOCKET_DEBUG qDebug() << "QUnixSocket: Remote side disconnected during transmit " - "(" << ::strerror(errno) << ")"; + "(" << ::strerror(errno) << ')'; #endif me->abort(); } else { #ifdef QUNIXSOCKET_DEBUG qDebug() << "QUnixSocket: Unable to transmit data (" - << ::strerror(errno) << ")"; + << ::strerror(errno) << ')'; #endif error = (QUnixSocket::SocketError)(QUnixSocket::WriteFailure | CausedAbort); @@ -1764,12 +1764,12 @@ void QUnixSocketPrivate::readActivated() int recvrv = ::recvmsg(fd, &message, 0); #ifdef QUNIXSOCKET_DEBUG - qDebug() << "QUnixSocket: Received message (" << recvrv << ")"; + qDebug() << "QUnixSocket: Received message (" << recvrv << ')'; #endif if(-1 == recvrv) { #ifdef QUNIXSOCKET_DEBUG qDebug() << "QUnixSocket: Unable to receive data (" - << ::strerror(errno) << ")"; + << ::strerror(errno) << ')'; #endif error = (QUnixSocket::SocketError)(QUnixSocket::ReadFailure | CausedAbort); diff --git a/src/gui/embedded/qunixsocketserver.cpp b/src/gui/embedded/qunixsocketserver.cpp index 6e9347b..489c40a 100644 --- a/src/gui/embedded/qunixsocketserver.cpp +++ b/src/gui/embedded/qunixsocketserver.cpp @@ -172,7 +172,7 @@ void QUnixSocketServer::close() #ifdef QUNIXSOCKET_DEBUG if(0 != closerv) { qDebug() << "QUnixSocketServer: Unable to close socket (" - << strerror(errno) << ")"; + << strerror(errno) << ')'; } #endif } @@ -245,7 +245,7 @@ bool QUnixSocketServer::listen(const QByteArray & path) if(-1 == d->fd) { #ifdef QUNIXSOCKETSERVER_DEBUG qDebug() << "QUnixSocketServer: Unable to create socket (" - << strerror(errno) << ")"; + << strerror(errno) << ')'; #endif close(); d->error = ResourceError; @@ -263,7 +263,7 @@ bool QUnixSocketServer::listen(const QByteArray & path) if(-1 == ::bind(d->fd, (sockaddr *)&addr, sizeof(sockaddr_un))) { #ifdef QUNIXSOCKETSERVER_DEBUG qDebug() << "QUnixSocketServer: Unable to bind socket (" - << strerror(errno) << ")"; + << strerror(errno) << ')'; #endif close(); d->error = BindError; @@ -274,7 +274,7 @@ bool QUnixSocketServer::listen(const QByteArray & path) if(-1 == ::listen(d->fd, d->maxConns)) { #ifdef QUNIXSOCKETSERVER_DEBUG qDebug() << "QUnixSocketServer: Unable to listen socket (" - << strerror(errno) << ")"; + << strerror(errno) << ')'; #endif close(); d->error = ListenError; diff --git a/src/gui/embedded/qwindowsystem_qws.cpp b/src/gui/embedded/qwindowsystem_qws.cpp index fdcd193..a15decd 100644 --- a/src/gui/embedded/qwindowsystem_qws.cpp +++ b/src/gui/embedded/qwindowsystem_qws.cpp @@ -2210,7 +2210,7 @@ void QWSServer::sendMouseEvent(const QPoint& pos, int state, int wheel) { bool block = qwsServerPrivate->screensaverblockevent(MOUSE, qwsServerPrivate->screensaverinterval, state); #ifdef EVENT_BLOCK_DEBUG - qDebug() << "sendMouseEvent" << pos.x() << pos.y() << state << (block?"block":"pass"); + qDebug() << "sendMouseEvent" << pos.x() << pos.y() << state << (block ? "block" : "pass"); #endif if (state || wheel) @@ -4110,7 +4110,7 @@ void QWSServer::processKeyEvent(int unicode, int keycode, Qt::KeyboardModifiers block = qwsServerPrivate->screensaverblockevent(KEY, qwsServerPrivate->screensaverinterval, isPress); #ifdef EVENT_BLOCK_DEBUG - qDebug() << "processKeyEvent" << unicode << keycode << modifiers << isPress << autoRepeat << (block?"block":"pass"); + qDebug() << "processKeyEvent" << unicode << keycode << modifiers << isPress << autoRepeat << (block ? "block" : "pass"); #endif // If we press a key and it's going to be blocked, wake up the screen diff --git a/src/gui/embedded/qwscommand_qws.cpp b/src/gui/embedded/qwscommand_qws.cpp index b0fd78b..26d3435 100644 --- a/src/gui/embedded/qwscommand_qws.cpp +++ b/src/gui/embedded/qwscommand_qws.cpp @@ -133,7 +133,7 @@ void QWSHexDump::init() void QWSHexDump::hexDump() { - *outstrm << "(" << dataSize << " bytes):\n" << prefix; + *outstrm << '(' << dataSize << " bytes):\n" << prefix; sprintf(sideviewLayout, " [%%-%us]", wrap); dataWidth = (2 * wrap) + (wrap / clustering); @@ -144,7 +144,7 @@ void QWSHexDump::hexDump() sideview[wrapIndex = i%wrap] = isprint(c) ? c : '.'; if (wrapIndex && (wrapIndex % clustering == 0)) - *outstrm << " "; + *outstrm << ' '; outstrm->setFieldWidth(2); outstrm->setPadChar('0'); @@ -172,14 +172,14 @@ void QWSHexDump::sideviewDump(int at) int currentWidth = (2 * at) + (at / clustering) - (at%clustering?0:1); int missing = qMax(dataWidth - currentWidth, 0); while (missing--) - *outstrm << " "; + *outstrm << ' '; *outstrm << " ["; outstrm->setPadChar(' '); outstrm->setFieldWidth(wrap); outstrm->setFieldAlignment( QTextStream::AlignLeft ); *outstrm << sideview; - *outstrm << "]"; + *outstrm << ']'; } } diff --git a/src/gui/kernel/qapplication_qws.cpp b/src/gui/kernel/qapplication_qws.cpp index 1125610..ea52e11 100644 --- a/src/gui/kernel/qapplication_qws.cpp +++ b/src/gui/kernel/qapplication_qws.cpp @@ -194,7 +194,7 @@ QString qws_dataDir() static QString result; if (!result.isEmpty()) return result; - QByteArray dataDir = QString(QLatin1String("/tmp/qtembedded-%1")).arg(qws_display_id).toLocal8Bit(); + QByteArray dataDir = QString::fromLatin1("/tmp/qtembedded-%1").arg(qws_display_id).toLocal8Bit(); if (QT_MKDIR(dataDir, 0700)) { if (errno != EEXIST) { qFatal("Cannot create Qt for Embedded Linux data directory: %s", dataDir.constData()); @@ -215,7 +215,7 @@ QString qws_dataDir() if ((buf.st_mode & 0677) != 0600) qFatal("Qt for Embedded Linux data directory has incorrect permissions: %s", dataDir.constData()); #endif - dataDir += "/"; + dataDir += '/'; result = QString::fromLocal8Bit(dataDir); return result; @@ -224,7 +224,7 @@ QString qws_dataDir() // Get the filename of the pipe Qt for Embedded Linux uses for server/client comms Q_GUI_EXPORT QString qws_qtePipeFilename() { - return (qws_dataDir() + QString(QLatin1String(QTE_PIPE)).arg(qws_display_id)); + return (qws_dataDir() + QString::fromLatin1(QTE_PIPE).arg(qws_display_id)); } static void setMaxWindowRect(const QRect &rect) diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index 39f7335..670058b 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -955,8 +955,8 @@ const QString qt_reg_winclass(QWidget *w) // register window class wchar_t uniqueAppID[256]; GetModuleFileNameW(0, uniqueAppID, 255); cname = QString::number(RegisterWindowMessageW( - (const wchar_t *) QString::fromUtf16((const ushort *)uniqueAppID).toLower().replace(QString(QString::fromLatin1("\\")), - QString(QString::fromLatin1("_"))).utf16())); + (const wchar_t *) QString::fromUtf16((const ushort *)uniqueAppID).toLower().replace(QLatin1Char('\\'), + QLatin1Char('_')).utf16())); #endif // since multiple Qt versions can be used in one process diff --git a/src/gui/kernel/qmime_mac.cpp b/src/gui/kernel/qmime_mac.cpp index b2eeb5c..9cb8b61 100644 --- a/src/gui/kernel/qmime_mac.cpp +++ b/src/gui/kernel/qmime_mac.cpp @@ -218,7 +218,7 @@ QString QMacPasteboardMimeAny::flavorFor(const QString &mime) if(mime == QLatin1String("application/x-qt-mime-type-name")) return QString(); QString ret = QLatin1String("com.trolltech.anymime.") + mime; - return ret.replace(QLatin1String("/"), QLatin1String("--")); + return ret.replace(QLatin1Char('/'), QLatin1String("--")); } QString QMacPasteboardMimeAny::mimeFor(QString flav) @@ -394,7 +394,7 @@ QString QMacPasteboardMimeUnicodeText::flavorFor(const QString &mime) int i = mime.indexOf(QLatin1String("charset=")); if (i >= 0) { QString cs(mime.mid(i+8).toLower()); - i = cs.indexOf(QLatin1String(";")); + i = cs.indexOf(QLatin1Char(';')); if (i>=0) cs = cs.left(i); if (cs == QLatin1String("system")) diff --git a/src/gui/kernel/qmime_win.cpp b/src/gui/kernel/qmime_win.cpp index 109ce20..ad2dec1 100644 --- a/src/gui/kernel/qmime_win.cpp +++ b/src/gui/kernel/qmime_win.cpp @@ -1262,16 +1262,16 @@ QVector QLastResortMimes::formatsForMime(const QString &mimeType, con } return formatetcs; } -static const char *x_qt_windows_mime = "application/x-qt-windows-mime;value=\""; +static const char x_qt_windows_mime[] = "application/x-qt-windows-mime;value=\""; -bool isCustomMimeType(const QString &mimeType) +static bool isCustomMimeType(const QString &mimeType) { return mimeType.startsWith(QLatin1String(x_qt_windows_mime), Qt::CaseInsensitive); } -QString customMimeType(const QString &mimeType) +static QString customMimeType(const QString &mimeType) { - int len = QString(QLatin1String(x_qt_windows_mime)).length(); + int len = sizeof(x_qt_windows_mime) - 1; int n = mimeType.lastIndexOf(QLatin1Char('\"'))-len; return mimeType.mid(len, n); } diff --git a/src/gui/kernel/qsound_qws.cpp b/src/gui/kernel/qsound_qws.cpp index e83935f..661544f 100644 --- a/src/gui/kernel/qsound_qws.cpp +++ b/src/gui/kernel/qsound_qws.cpp @@ -279,7 +279,7 @@ QAuBucketQWS::QAuBucketQWS( QAuServerQWS *server, QSound *sound, QObject* parent sound->setObjectName( m_id.toString() ); - m_channel = new QCopChannel(QString( QLatin1String("QPE/QSound/") ).append( m_id ), this ); + m_channel = new QCopChannel(QLatin1String("QPE/QSound/") + m_id ), this ); connect( m_channel, SIGNAL(received(QString,QByteArray)), this, SLOT(processMessage(QString,QByteArray)) ); diff --git a/src/gui/painting/qbezier.cpp b/src/gui/painting/qbezier.cpp index 7ed521e..6a206ee 100644 --- a/src/gui/painting/qbezier.cpp +++ b/src/gui/painting/qbezier.cpp @@ -673,10 +673,10 @@ static int IntersectBB(const QBezier &a, const QBezier &b) #ifdef QDEBUG_BEZIER static QDebug operator<<(QDebug dbg, const QBezier &bz) { - dbg <<"["<= 0); fprintf(stderr,"clip %d: %d %d - %d %d\n", counter, x0, y0, x1, y1); - clipImg.save(QString(QLatin1String("clip-%0.png")).arg(counter++)); + clipImg.save(QString::fromLatin1("clip-%0.png").arg(counter++)); } #endif diff --git a/src/gui/painting/qprinterinfo_unix.cpp b/src/gui/painting/qprinterinfo_unix.cpp index 0f33ea7..5724173 100644 --- a/src/gui/painting/qprinterinfo_unix.cpp +++ b/src/gui/painting/qprinterinfo_unix.cpp @@ -822,7 +822,7 @@ QList QPrinterInfo::availablePrinters() for (int i = 0; i < cupsPrinterCount; ++i) { QString printerName(QString::fromLocal8Bit(cupsPrinters[i].name)); if (cupsPrinters[i].instance) - printerName += QLatin1String("/") + QString::fromLocal8Bit(cupsPrinters[i].instance); + printerName += QLatin1Char('/') + QString::fromLocal8Bit(cupsPrinters[i].instance); list.append(QPrinterInfo(printerName)); if (cupsPrinters[i].is_default) list[i].d_ptr->m_default = true; @@ -893,7 +893,7 @@ QPrinterInfo::QPrinterInfo(const QPrinter& printer) for (int i = 0; i < cupsPrinterCount; ++i) { QString printerName(QString::fromLocal8Bit(cupsPrinters[i].name)); if (cupsPrinters[i].instance) - printerName += QLatin1String("/") + QString::fromLocal8Bit(cupsPrinters[i].instance); + printerName += QLatin1Char('/') + QString::fromLocal8Bit(cupsPrinters[i].instance); if (printerName == printer.printerName()) { if (cupsPrinters[i].is_default) d->m_default = true; diff --git a/src/gui/painting/qtessellator.cpp b/src/gui/painting/qtessellator.cpp index b743940..9b5efee 100644 --- a/src/gui/painting/qtessellator.cpp +++ b/src/gui/painting/qtessellator.cpp @@ -1273,7 +1273,7 @@ QRectF QTessellator::tessellate(const QPointF *points, int nPoints) << "p0= (" << Q27Dot5ToDouble(d->scanline.edges[i]->v0->x) << '/' << Q27Dot5ToDouble(d->scanline.edges[i]->v0->y) << ") p1= (" << Q27Dot5ToDouble(d->scanline.edges[i]->v1->x) - << '/' << Q27Dot5ToDouble(d->scanline.edges[i]->v1->y) << ")" + << '/' << Q27Dot5ToDouble(d->scanline.edges[i]->v1->y) << ')' << "x=" << Q27Dot5ToDouble(d->scanline.edges[i]->positionAt(d->y)) << "isLeftOfNext=" << ((i < d->scanline.size - 1) diff --git a/src/gui/painting/qwindowsurface_x11.cpp b/src/gui/painting/qwindowsurface_x11.cpp index 9e8b498..f29d627 100644 --- a/src/gui/painting/qwindowsurface_x11.cpp +++ b/src/gui/painting/qwindowsurface_x11.cpp @@ -128,7 +128,7 @@ void QX11WindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint return; // qDebug() << "XSetClipRectangles"; // for (int i = 0; i < num; ++i) -// qDebug() << " " << i << rects[i].x << rects[i].x << rects[i].y << rects[i].width << rects[i].height; +// qDebug() << ' ' << i << rects[i].x << rects[i].x << rects[i].y << rects[i].width << rects[i].height; XSetClipRectangles(X11->display, gc, 0, 0, rects, num, YXBanded); XCopyArea(X11->display, d_ptr->device.handle(), widget->handle(), gc, br.x() + offset.x(), br.y() + offset.y(), br.width(), br.height(), wbr.x(), wbr.y()); diff --git a/src/gui/styles/gtksymbols.cpp b/src/gui/styles/gtksymbols.cpp index 07cec93..f92fd0e 100644 --- a/src/gui/styles/gtksymbols.cpp +++ b/src/gui/styles/gtksymbols.cpp @@ -374,8 +374,8 @@ static QString getThemeName() while(!in.atEnd()) { QString line = in.readLine(); if (line.contains(QLS("gtk-theme-name"))) { - line = line.right(line.length() - line.indexOf(QLS("=")) - 1); - line.remove(QLS("\"")); + line = line.right(line.length() - line.indexOf(QLatin1Char('=')) - 1); + line.remove(QLatin1Char('\"')); line = line.trimmed(); themeName = line; break; @@ -695,7 +695,7 @@ void QGtk::initGtkWidgets() QHashIterator it(oldMap); while (it.hasNext()) { it.next(); - if (!it.key().contains(QLS("."))) { + if (!it.key().contains(QLatin1Char('.'))) { add_all_sub_widgets(it.value()); } } diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index 0e54af8..151dab0 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -1776,8 +1776,9 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom QString key; + if (option->state & State_HasFocus) { - key = QLS("f"); + key += QLatin1Char('f'); GTK_WIDGET_SET_FLAGS(gtkSpinButton, GTK_HAS_FOCUS); } diff --git a/src/gui/text/qfontdatabase_qws.cpp b/src/gui/text/qfontdatabase_qws.cpp index f62a6d1..9a29de2 100644 --- a/src/gui/text/qfontdatabase_qws.cpp +++ b/src/gui/text/qfontdatabase_qws.cpp @@ -767,8 +767,8 @@ QFontEngine *loadSingleEngine(int script, const QFontPrivate *fp, QString fn = qwsFontPath(); fn += QLatin1Char('/'); fn += family->name.toLower() - + QLatin1String("_") + QString::number(pixelSize*10) - + QLatin1String("_") + QString::number(style->key.weight) + + QLatin1Char('_') + QString::number(pixelSize*10) + + QLatin1Char('_') + QString::number(style->key.weight) + (style->key.style == QFont::StyleItalic ? QLatin1String("i.qpf") : QLatin1String(".qpf")); //###rotation ### diff --git a/src/gui/text/qfontdatabase_x11.cpp b/src/gui/text/qfontdatabase_x11.cpp index 70e1599..605a7dd 100644 --- a/src/gui/text/qfontdatabase_x11.cpp +++ b/src/gui/text/qfontdatabase_x11.cpp @@ -509,9 +509,9 @@ bool qt_fillFontDef(const QByteArray &xlfd, QFontDef *fd, int dpi, QtFontDesc *d fd->styleStrategy |= QFont::NoAntialias; fd->family = QString::fromLatin1(tokens[Family]); QString foundry = QString::fromLatin1(tokens[Foundry]); - if (! foundry.isEmpty() && foundry != QString::fromLatin1("*") && (!desc || desc->family->count > 1)) + if (! foundry.isEmpty() && foundry != QLatin1String("*") && (!desc || desc->family->count > 1)) fd->family += - QString::fromLatin1(" [") + foundry + QString::fromLatin1("]"); + QLatin1String(" [") + foundry + QLatin1Char(']'); if (qstrlen(tokens[AddStyle]) > 0) fd->addStyle = QString::fromLatin1(tokens[AddStyle]); @@ -1802,30 +1802,30 @@ QFontEngine *QFontDatabase::loadXlfd(int screen, int script, const QFontDef &req QByteArray xlfd("-"); xlfd += desc.foundry->name.isEmpty() ? QByteArray("*") : desc.foundry->name.toLatin1(); - xlfd += "-"; + xlfd += '-'; xlfd += desc.family->name.isEmpty() ? QByteArray("*") : desc.family->name.toLatin1(); - xlfd += "-"; + xlfd += '-'; xlfd += desc.style->weightName ? desc.style->weightName : "*"; - xlfd += "-"; + xlfd += '-'; xlfd += (desc.style->key.style == QFont::StyleItalic - ? "i" - : (desc.style->key.style == QFont::StyleOblique ? "o" : "r")); - xlfd += "-"; + ? 'i' + : (desc.style->key.style == QFont::StyleOblique ? 'o' : 'r')); + xlfd += '-'; xlfd += desc.style->setwidthName ? desc.style->setwidthName : "*"; // ### handle add-style xlfd += "-*-"; xlfd += QByteArray::number(px); - xlfd += "-"; + xlfd += '-'; xlfd += QByteArray::number(desc.encoding->xpoint); - xlfd += "-"; + xlfd += '-'; xlfd += QByteArray::number(desc.encoding->xres); - xlfd += "-"; + xlfd += '-'; xlfd += QByteArray::number(desc.encoding->yres); - xlfd += "-"; + xlfd += '-'; xlfd += desc.encoding->pitch; - xlfd += "-"; + xlfd += '-'; xlfd += QByteArray::number(desc.encoding->avgwidth); - xlfd += "-"; + xlfd += '-'; xlfd += xlfd_for_id(desc.encoding->encoding); FM_DEBUG(" using XLFD: %s\n", xlfd.data()); diff --git a/src/gui/text/qfontengine_qpf.cpp b/src/gui/text/qfontengine_qpf.cpp index b7d1c59..28eb362 100644 --- a/src/gui/text/qfontengine_qpf.cpp +++ b/src/gui/text/qfontengine_qpf.cpp @@ -308,7 +308,7 @@ QFontEngineQPF::QFontEngineQPF(const QFontDef &def, int fileDescriptor, QFontEng readOnly = true; #if defined(DEBUG_FONTENGINE) - qDebug() << "QFontEngineQPF::QFontEngineQPF( fd =" << fd << ", renderingFontEngine =" << renderingFontEngine << ")"; + qDebug() << "QFontEngineQPF::QFontEngineQPF( fd =" << fd << ", renderingFontEngine =" << renderingFontEngine << ')'; #endif #ifndef QT_FONTS_ARE_RESOURCES @@ -316,11 +316,11 @@ QFontEngineQPF::QFontEngineQPF(const QFontDef &def, int fileDescriptor, QFontEng if (!renderingFontEngine) return; - fileName = fontDef.family.toLower() + QLatin1String("_") + fileName = fontDef.family.toLower() + QLatin1Char('_') + QString::number(fontDef.pixelSize) - + QLatin1String("_") + QString::number(fontDef.weight) + + QLatin1Char('_') + QString::number(fontDef.weight) + (fontDef.style != QFont::StyleNormal ? - QLatin1String("_italic") : QLatin1String("")) + QLatin1String("_italic") : QLatin1String()) + QLatin1String(".qsf"); fileName.replace(QLatin1Char(' '), QLatin1Char('_')); fileName.prepend(qws_fontCacheDir()); @@ -550,7 +550,7 @@ bool QFontEngineQPF::stringToCMap(const QChar *str, int len, QGlyphLayout *glyph #if 0 && defined(DEBUG_FONTENGINE) QChar c(uc); if (!findGlyph(glyphs[glyph_pos].glyph) && !seenGlyphs.contains(c)) - qDebug() << "glyph for character" << c << "/" << hex << uc << "is" << dec << glyphs[glyph_pos].glyph; + qDebug() << "glyph for character" << c << '/' << hex << uc << "is" << dec << glyphs[glyph_pos].glyph; seenGlyphs.insert(c); #endif diff --git a/src/gui/text/qfontengine_x11.cpp b/src/gui/text/qfontengine_x11.cpp index 0972b2b..bafc99d 100644 --- a/src/gui/text/qfontengine_x11.cpp +++ b/src/gui/text/qfontengine_x11.cpp @@ -227,7 +227,7 @@ static QFontEngine::FaceId fontFile(const QByteArray &_xname, QFreetypeFace **fr QByteArray best_mapping; for (QStringList::ConstIterator it = fontpath.constBegin(); it != fontpath.constEnd(); ++it) { - if ((*it).left(1) != QLatin1String("/")) + if (!(*it).startsWith(QLatin1Char('/'))) continue; // not a path name, a font server QString fontmapname; int num = 0; @@ -693,9 +693,8 @@ QFontEngine::FaceId QFontEngineXLFD::faceId() const if (freetype) { const_cast(this)->fsType = freetype->fsType(); } else { - QFontEngine::Properties properties = QFontEngine::properties(); face_id.index = 0; - face_id.filename = "-" + properties.postscriptName; + face_id.filename = '-' + QFontEngine::properties().postscriptName; } } #endif diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp index c66d0c1..fa032e6 100644 --- a/src/gui/text/qtextdocumentlayout.cpp +++ b/src/gui/text/qtextdocumentlayout.cpp @@ -2500,7 +2500,7 @@ void QTextDocumentLayoutPrivate::layoutBlock(const QTextBlock &bl, int blockPosi LDEBUG << "layoutBlock from=" << layoutFrom << "to=" << layoutTo; -// qDebug() << "layoutBlock; width" << layoutStruct->x_right - layoutStruct->x_left << "(maxWidth is btw" << tl->maximumWidth() << ")"; +// qDebug() << "layoutBlock; width" << layoutStruct->x_right - layoutStruct->x_left << "(maxWidth is btw" << tl->maximumWidth() << ')'; if (previousBlockFormat) { qreal margin = qMax(blockFormat.topMargin(), previousBlockFormat->bottomMargin()); diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp index b1f1b75..ee743dc 100644 --- a/src/gui/text/qtexthtmlparser.cpp +++ b/src/gui/text/qtexthtmlparser.cpp @@ -499,7 +499,7 @@ void QTextHtmlParser::dumpHtml() { for (int i = 0; i < count(); ++i) { qDebug().nospace() << qPrintable(QString(depth(i)*4, QLatin1Char(' '))) - << qPrintable(at(i).tag) << ":" + << qPrintable(at(i).tag) << ':' << quoteNewline(at(i).text); ; } diff --git a/src/gui/util/qdesktopservices_mac.cpp b/src/gui/util/qdesktopservices_mac.cpp index fdafa1e..fb1e193 100644 --- a/src/gui/util/qdesktopservices_mac.cpp +++ b/src/gui/util/qdesktopservices_mac.cpp @@ -154,7 +154,7 @@ QString QDesktopServices::storageLocation(StandardLocation type) QString appName = QCoreApplication::applicationName(); if (!appName.isEmpty() && (QDesktopServices::DataLocation == type || QDesktopServices::CacheLocation == type)) - path += QLatin1String("/") + appName; + path += QLatin1Char('/') + appName; return path; } diff --git a/src/gui/util/qdesktopservices_x11.cpp b/src/gui/util/qdesktopservices_x11.cpp index b3486e8..8c4a597 100644 --- a/src/gui/util/qdesktopservices_x11.cpp +++ b/src/gui/util/qdesktopservices_x11.cpp @@ -164,8 +164,8 @@ QString QDesktopServices::storageLocation(StandardLocation type) QString key = lst.at(1); QString value = lst.at(2); if (value.length() > 2 - && value.startsWith(QLatin1String("\"")) - && value.endsWith(QLatin1String("\""))) + && value.startsWith(QLatin1Char('\"')) + && value.endsWith(QLatin1Char('\"'))) value = value.mid(1, value.length() - 2); // Store the key and value: "DESKTOP", "$HOME/Desktop" lines[key] = value; diff --git a/src/gui/widgets/qcombobox_p.h b/src/gui/widgets/qcombobox_p.h index ee0da62..0998e52 100644 --- a/src/gui/widgets/qcombobox_p.h +++ b/src/gui/widgets/qcombobox_p.h @@ -290,7 +290,7 @@ public: QComboBoxDelegate(QObject *parent, QComboBox *cmb) : QItemDelegate(parent), mCombo(cmb) {} static bool isSeparator(const QModelIndex &index) { - return index.data(Qt::AccessibleDescriptionRole).toString() == QString::fromLatin1("separator"); + return index.data(Qt::AccessibleDescriptionRole).toString() == QLatin1String("separator"); } static void setSeparator(QAbstractItemModel *model, const QModelIndex &index) { model->setData(index, QString::fromLatin1("separator"), Qt::AccessibleDescriptionRole); diff --git a/src/gui/widgets/qprogressbar.cpp b/src/gui/widgets/qprogressbar.cpp index cdb3836..804220d 100644 --- a/src/gui/widgets/qprogressbar.cpp +++ b/src/gui/widgets/qprogressbar.cpp @@ -448,19 +448,19 @@ QString QProgressBar::text() const qint64 totalSteps = qint64(d->maximum) - qint64(d->minimum); QString result = d->format; - result.replace(QLatin1String("%m"), QString::fromLatin1("%1").arg(totalSteps)); - result.replace(QLatin1String("%v"), QString::fromLatin1("%1").arg(d->value)); + result.replace(QLatin1String("%m"), QString::number(totalSteps)); + result.replace(QLatin1String("%v"), QString::number(d->value)); // If max and min are equal and we get this far, it means that the // progress bar has one step and that we are on that step. Return // 100% here in order to avoid division by zero further down. if (totalSteps == 0) { - result.replace(QLatin1String("%p"), QString::fromLatin1("%1").arg(100)); + result.replace(QLatin1String("%p"), QString::number(100)); return result; } int progress = int(((qreal(d->value) - qreal(d->minimum)) * 100.0) / totalSteps); - result.replace(QLatin1String("%p"), QString::fromLatin1("%1").arg(progress)); + result.replace(QLatin1String("%p"), QString::number(progress)); return result; } diff --git a/src/network/access/qhttpnetworkrequest.cpp b/src/network/access/qhttpnetworkrequest.cpp index 7df68fc..b9b9d84 100644 --- a/src/network/access/qhttpnetworkrequest.cpp +++ b/src/network/access/qhttpnetworkrequest.cpp @@ -127,11 +127,11 @@ QByteArray QHttpNetworkRequestPrivate::header(const QHttpNetworkRequest &request { QByteArray ba = request.d->methodName(); QByteArray uri = request.d->uri(throughProxy); - ba += " " + uri; + ba += ' ' + uri; QString majorVersion = QString::number(request.majorVersion()); QString minorVersion = QString::number(request.minorVersion()); - ba += " HTTP/" + majorVersion.toLatin1() + "." + minorVersion.toLatin1() + "\r\n"; + ba += " HTTP/" + majorVersion.toLatin1() + '.' + minorVersion.toLatin1() + "\r\n"; QList > fields = request.header(); QList >::const_iterator it = fields.constBegin(); diff --git a/src/network/access/qnetworkaccessfilebackend.cpp b/src/network/access/qnetworkaccessfilebackend.cpp index 6374fde..d905b70 100644 --- a/src/network/access/qnetworkaccessfilebackend.cpp +++ b/src/network/access/qnetworkaccessfilebackend.cpp @@ -109,7 +109,7 @@ void QNetworkAccessFileBackend::open() QString fileName = url.toLocalFile(); if (fileName.isEmpty()) { if (url.scheme() == QLatin1String("qrc")) - fileName = QLatin1String(":") + url.path(); + fileName = QLatin1Char(':') + url.path(); else fileName = url.toString(QUrl::RemoveAuthority | QUrl::RemoveFragment | QUrl::RemoveQuery); } diff --git a/src/network/access/qnetworkcookie.cpp b/src/network/access/qnetworkcookie.cpp index 67df526..29bf042 100644 --- a/src/network/access/qnetworkcookie.cpp +++ b/src/network/access/qnetworkcookie.cpp @@ -1026,7 +1026,7 @@ QList QNetworkCookiePrivate::parseSetCookieHeaderLine(const QByt #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug s, const QNetworkCookie &cookie) { - s.nospace() << "QNetworkCookie(" << cookie.toRawForm(QNetworkCookie::Full) << ")"; + s.nospace() << "QNetworkCookie(" << cookie.toRawForm(QNetworkCookie::Full) << ')'; return s.space(); } #endif diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp index 33795aa..b672765 100644 --- a/src/network/kernel/qauthenticator.cpp +++ b/src/network/kernel/qauthenticator.cpp @@ -511,13 +511,13 @@ QByteArray QAuthenticatorPrivate::digestMd5Response(const QByteArray &challenge, credentials += "uri=\"" + path + "\", "; if (!opaque.isEmpty()) credentials += "opaque=\"" + opaque + "\", "; - credentials += "response=\"" + response + "\""; + credentials += "response=\"" + response + '\"'; if (!options.value("algorithm").isEmpty()) credentials += ", algorithm=" + options.value("algorithm"); if (!options.value("qop").isEmpty()) { credentials += ", qop=" + qop + ", "; credentials += "nc=" + nonceCountString + ", "; - credentials += "cnonce=\"" + cnonce + "\""; + credentials += "cnonce=\"" + cnonce + '\"'; } return credentials; diff --git a/src/network/kernel/qhostaddress.cpp b/src/network/kernel/qhostaddress.cpp index b225c17..c2fb690 100644 --- a/src/network/kernel/qhostaddress.cpp +++ b/src/network/kernel/qhostaddress.cpp @@ -1078,7 +1078,7 @@ QPair QHostAddress::parseSubnet(const QString &subnet) #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug d, const QHostAddress &address) { - d.maybeSpace() << "QHostAddress(" << address.toString() << ")"; + d.maybeSpace() << "QHostAddress(" << address.toString() << ')'; return d.space(); } #endif diff --git a/src/network/kernel/qnetworkinterface.cpp b/src/network/kernel/qnetworkinterface.cpp index 960999e..f12b0c0 100644 --- a/src/network/kernel/qnetworkinterface.cpp +++ b/src/network/kernel/qnetworkinterface.cpp @@ -594,7 +594,7 @@ static inline QDebug operator<<(QDebug debug, const QNetworkAddressEntry &entry) debug.nospace() << ", netmask = " << entry.netmask(); if (!entry.broadcast().isNull()) debug.nospace() << ", broadcast = " << entry.broadcast(); - debug.nospace() << ")"; + debug.nospace() << ')'; return debug.space(); } diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp index 4bb12e6..2d37e2e 100644 --- a/src/network/socket/qabstractsocket.cpp +++ b/src/network/socket/qabstractsocket.cpp @@ -852,7 +852,7 @@ void QAbstractSocketPrivate::_q_startConnecting(const QHostInfo &hostInfo) if (i != 0) s += ", "; s += addresses.at(i).toString(); } - s += "}"; + s += '}'; qDebug("QAbstractSocketPrivate::_q_startConnecting(hostInfo == %s)", s.toLatin1().constData()); #endif @@ -2596,7 +2596,7 @@ Q_NETWORK_EXPORT QDebug operator<<(QDebug debug, QAbstractSocket::SocketError er debug << "QAbstractSocket::ProxyProtocolError"; break; default: - debug << "QAbstractSocket::SocketError(" << int(error) << ")"; + debug << "QAbstractSocket::SocketError(" << int(error) << ')'; break; } return debug; @@ -2627,7 +2627,7 @@ Q_NETWORK_EXPORT QDebug operator<<(QDebug debug, QAbstractSocket::SocketState st debug << "QAbstractSocket::ClosingState"; break; default: - debug << "QAbstractSocket::SocketState(" << int(state) << ")"; + debug << "QAbstractSocket::SocketState(" << int(state) << ')'; break; } return debug; diff --git a/src/network/socket/qlocalsocket.cpp b/src/network/socket/qlocalsocket.cpp index 327bfc6..9411130 100644 --- a/src/network/socket/qlocalsocket.cpp +++ b/src/network/socket/qlocalsocket.cpp @@ -468,7 +468,7 @@ QDebug operator<<(QDebug debug, QLocalSocket::LocalSocketError error) debug << "QLocalSocket::UnknownSocketError"; break; default: - debug << "QLocalSocket::SocketError(" << int(error) << ")"; + debug << "QLocalSocket::SocketError(" << int(error) << ')'; break; } return debug; @@ -490,7 +490,7 @@ QDebug operator<<(QDebug debug, QLocalSocket::LocalSocketState state) debug << "QLocalSocket::ClosingState"; break; default: - debug << "QLocalSocket::SocketState(" << int(state) << ")"; + debug << "QLocalSocket::SocketState(" << int(state) << ')'; break; } return debug; diff --git a/src/network/socket/qsocks5socketengine.cpp b/src/network/socket/qsocks5socketengine.cpp index c41e32d..40d86ac 100644 --- a/src/network/socket/qsocks5socketengine.cpp +++ b/src/network/socket/qsocks5socketengine.cpp @@ -153,7 +153,7 @@ static inline QString dump(const QByteArray &) { return QString(); } */ static bool qt_socks5_set_host_address_and_port(const QHostAddress &address, quint16 port, QByteArray *pBuf) { - QSOCKS5_DEBUG << "setting [" << address << ":" << port << "]"; + QSOCKS5_DEBUG << "setting [" << address << ':' << port << ']'; union { quint16 port; @@ -186,7 +186,7 @@ static bool qt_socks5_set_host_address_and_port(const QHostAddress &address, qui */ static bool qt_socks5_set_host_name_and_port(const QString &hostname, quint16 port, QByteArray *pBuf) { - QSOCKS5_DEBUG << "setting [" << hostname << ":" << port << "]"; + QSOCKS5_DEBUG << "setting [" << hostname << ':' << port << ']'; QByteArray encodedHostName = QUrl::toAce(hostname); QByteArray &buf = *pBuf; @@ -265,7 +265,7 @@ static bool qt_socks5_get_host_address_and_port(const QByteArray &buf, QHostAddr } if (ret) { - QSOCKS5_DEBUG << "got [" << address << ":" << port << "]"; + QSOCKS5_DEBUG << "got [" << address << ':' << port << ']'; *pAddress = address; *pPort = port; *pPos = pos; @@ -1124,7 +1124,7 @@ bool QSocks5SocketEngine::connectInternal() bool QSocks5SocketEngine::connectToHost(const QHostAddress &address, quint16 port) { Q_D(QSocks5SocketEngine); - QSOCKS5_DEBUG << "connectToHost" << address << ":" << port; + QSOCKS5_DEBUG << "connectToHost" << address << ':' << port; setPeerAddress(address); setPeerPort(port); @@ -1379,7 +1379,7 @@ bool QSocks5SocketEngine::bind(const QHostAddress &address, quint16 port) //### reset and error return false; } - QSOCKS5_DEBUG << "udp actual address and port" << d->localAddress << ":" << d->localPort; + QSOCKS5_DEBUG << "udp actual address and port" << d->localAddress << ':' << d->localPort; return true; #endif // QT_NO_UDPSOCKET } @@ -1478,7 +1478,7 @@ qint64 QSocks5SocketEngine::bytesAvailable() const qint64 QSocks5SocketEngine::read(char *data, qint64 maxlen) { Q_D(QSocks5SocketEngine); - QSOCKS5_Q_DEBUG << "read( , maxlen = " << maxlen << ")"; + QSOCKS5_Q_DEBUG << "read( , maxlen = " << maxlen << ')'; if (d->mode == QSocks5SocketEnginePrivate::ConnectMode) { if (d->connectData->readBuffer.size() == 0) { if (d->data->controlSocket->state() == QAbstractSocket::UnconnectedState) { @@ -1766,7 +1766,7 @@ void QSocks5SocketEngine::setReadNotificationEnabled(bool enable) { Q_D(QSocks5SocketEngine); - QSOCKS5_Q_DEBUG << "setReadNotificationEnabled(" << enable << ")"; + QSOCKS5_Q_DEBUG << "setReadNotificationEnabled(" << enable << ')'; bool emitSignal = false; if (!d->readNotificationEnabled diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp index 7b554dc..7ee0f07 100644 --- a/src/network/ssl/qsslcertificate.cpp +++ b/src/network/ssl/qsslcertificate.cpp @@ -766,16 +766,16 @@ QDebug operator<<(QDebug debug, const QSslCertificate &certificate) { debug << "QSslCertificate(" << certificate.version() - << "," << certificate.serialNumber() - << "," << certificate.digest().toBase64() - << "," << certificate.issuerInfo(QSslCertificate::Organization) - << "," << certificate.subjectInfo(QSslCertificate::Organization) - << "," << certificate.alternateSubjectNames() + << ',' << certificate.serialNumber() + << ',' << certificate.digest().toBase64() + << ',' << certificate.issuerInfo(QSslCertificate::Organization) + << ',' << certificate.subjectInfo(QSslCertificate::Organization) + << ',' << certificate.alternateSubjectNames() #ifndef QT_NO_TEXTSTREAM - << "," << certificate.effectiveDate() - << "," << certificate.expiryDate() + << ',' << certificate.effectiveDate() + << ',' << certificate.expiryDate() #endif - << ")"; + << ')'; return debug; } QDebug operator<<(QDebug debug, QSslCertificate::SubjectInfo info) diff --git a/src/network/ssl/qsslcipher.cpp b/src/network/ssl/qsslcipher.cpp index 7fec2df..696db1e 100644 --- a/src/network/ssl/qsslcipher.cpp +++ b/src/network/ssl/qsslcipher.cpp @@ -231,7 +231,7 @@ QDebug operator<<(QDebug debug, const QSslCipher &cipher) debug << "QSslCipher(name=" << qPrintable(cipher.name()) << ", bits=" << cipher.usedBits() << ", proto=" << qPrintable(cipher.protocolString()) - << ")"; + << ')'; return debug; } #endif diff --git a/src/network/ssl/qsslkey.cpp b/src/network/ssl/qsslkey.cpp index 8d550c0..6dbdc29 100644 --- a/src/network/ssl/qsslkey.cpp +++ b/src/network/ssl/qsslkey.cpp @@ -460,7 +460,7 @@ QDebug operator<<(QDebug debug, const QSslKey &key) << (key.type() == QSsl::PublicKey ? "PublicKey" : "PrivateKey") << ", " << (key.algorithm() == QSsl::Rsa ? "RSA" : "DSA") << ", " << key.length() - << ")"; + << ')'; return debug; } #endif diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp index 92054a4..16033b6 100644 --- a/src/network/ssl/qsslsocket.cpp +++ b/src/network/ssl/qsslsocket.cpp @@ -442,8 +442,8 @@ bool QSslSocket::setSocketDescriptor(int socketDescriptor, SocketState state, Op { Q_D(QSslSocket); #ifdef QSSLSOCKET_DEBUG - qDebug() << "QSslSocket::setSocketDescriptor(" << socketDescriptor << "," - << state << "," << openMode << ")"; + qDebug() << "QSslSocket::setSocketDescriptor(" << socketDescriptor << ',' + << state << ',' << openMode << ')'; #endif if (!d->plainSocket) d->createPlainSocket(openMode); @@ -1608,7 +1608,7 @@ void QSslSocket::connectToHostImplementation(const QString &hostName, quint16 po #ifdef QSSLSOCKET_DEBUG qDebug() << "QSslSocket::connectToHostImplementation(" - << hostName << "," << port << "," << openMode << ")"; + << hostName << ',' << port << ',' << openMode << ')'; #endif if (!d->plainSocket) { #ifdef QSSLSOCKET_DEBUG @@ -1682,7 +1682,7 @@ qint64 QSslSocket::readData(char *data, qint64 maxlen) } while (!d->readBuffer.isEmpty() && readBytes < maxlen); } #ifdef QSSLSOCKET_DEBUG - qDebug() << "QSslSocket::readData(" << (void *)data << "," << maxlen << ") ==" << readBytes; + qDebug() << "QSslSocket::readData(" << (void *)data << ',' << maxlen << ") ==" << readBytes; #endif return readBytes; } @@ -1694,7 +1694,7 @@ qint64 QSslSocket::writeData(const char *data, qint64 len) { Q_D(QSslSocket); #ifdef QSSLSOCKET_DEBUG - qDebug() << "QSslSocket::writeData(" << (void *)data << "," << len << ")"; + qDebug() << "QSslSocket::writeData(" << (void *)data << ',' << len << ')'; #endif if (d->mode == UnencryptedMode && !d->autoStartHandshake) return d->plainSocket->write(data, len); @@ -1999,7 +1999,7 @@ void QSslSocketPrivate::_q_stateChangedSlot(QAbstractSocket::SocketState state) { Q_Q(QSslSocket); #ifdef QSSLSOCKET_DEBUG - qDebug() << "QSslSocket::_q_stateChangedSlot(" << state << ")"; + qDebug() << "QSslSocket::_q_stateChangedSlot(" << state << ')'; #endif q->setSocketState(state); emit q->stateChanged(state); @@ -2012,7 +2012,7 @@ void QSslSocketPrivate::_q_errorSlot(QAbstractSocket::SocketError error) { Q_Q(QSslSocket); #ifdef QSSLSOCKET_DEBUG - qDebug() << "QSslSocket::_q_errorSlot(" << error << ")"; + qDebug() << "QSslSocket::_q_errorSlot(" << error << ')'; qDebug() << "\tstate =" << q->state(); qDebug() << "\terrorString =" << q->errorString(); #endif @@ -2047,7 +2047,7 @@ void QSslSocketPrivate::_q_bytesWrittenSlot(qint64 written) { Q_Q(QSslSocket); #ifdef QSSLSOCKET_DEBUG - qDebug() << "QSslSocket::_q_bytesWrittenSlot(" << written << ")"; + qDebug() << "QSslSocket::_q_bytesWrittenSlot(" << written << ')'; #endif if (mode == QSslSocket::UnencryptedMode) diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index 32b02c5..4017c4d 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -276,7 +276,7 @@ init_context: if (first) first = false; else - cipherString.append(":"); + cipherString.append(':'); cipherString.append(cipher.name().toLatin1()); } diff --git a/src/opengl/qegl.cpp b/src/opengl/qegl.cpp index c6c258b..f1ae4ed 100644 --- a/src/opengl/qegl.cpp +++ b/src/opengl/qegl.cpp @@ -582,7 +582,7 @@ QString QEglProperties::toString() const if (val != EGL_DONT_CARE) { str += QLatin1String("id="); str += QString::number(val); - str += QLatin1String(" "); + str += QLatin1Char(' '); } #ifdef EGL_RENDERABLE_TYPE @@ -617,11 +617,11 @@ QString QEglProperties::toString() const bufferSize = EGL_DONT_CARE; str += QLatin1String(" rgba="); str += QString::number(red); - str += QLatin1String(","); + str += QLatin1Char(','); str += QString::number(green); - str += QLatin1String(","); + str += QLatin1Char(','); str += QString::number(blue); - str += QLatin1String(","); + str += QLatin1Char(','); str += QString::number(alpha); if (bufferSize != EGL_DONT_CARE) { // Only report buffer size if different than r+g+b+a. @@ -708,7 +708,7 @@ QString QEglProperties::toString() const if (height != EGL_DONT_CARE || width != EGL_DONT_CARE) { addTag(str, QLatin1String(" max-pbuffer-size=")); str += QString::number(width); - str += QLatin1String("x"); + str += QLatin1Char('x'); str += QString::number(height); if (pixels != (width * height)) { addTag(str, QLatin1String(" max-pbuffer-pixels=")); @@ -762,9 +762,9 @@ QString QEglProperties::toString() const if (val == EGL_TRANSPARENT_RGB) { addTag(str, QLatin1String(" transparent-rgb=")); str += QString::number(value(EGL_TRANSPARENT_RED_VALUE)); - str += QLatin1String(","); + str += QLatin1Char(','); str += QString::number(value(EGL_TRANSPARENT_GREEN_VALUE)); - str += QLatin1String(","); + str += QLatin1Char(','); str += QString::number(value(EGL_TRANSPARENT_BLUE_VALUE)); } diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 431b488..60039eb 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -4365,7 +4365,7 @@ Q_OPENGL_EXPORT const QString qt_gl_library_name() { if (qt_gl_lib_name()->isNull()) { #if defined(Q_WS_X11) || defined(Q_WS_QWS) - return QString(QLatin1String("GL")); + return QLatin1String("GL"); #else // Q_WS_MAC return QLatin1String("/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"); #endif diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp index 528cc3b..28a50bd 100644 --- a/src/opengl/qgl_x11.cpp +++ b/src/opengl/qgl_x11.cpp @@ -433,7 +433,7 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) if (!d->gpm) return false; } - QString glxExt = QString(QLatin1String(glXGetClientString(QX11Info::display(), GLX_EXTENSIONS))); + QString glxExt = QLatin1String(glXGetClientString(QX11Info::display(), GLX_EXTENSIONS)); if (glxExt.contains(QLatin1String("GLX_SGI_video_sync"))) { if (d->glFormat.swapInterval() == -1) d->glFormat.setSwapInterval(0); @@ -787,7 +787,7 @@ void QGLContext::swapBuffers() const static qt_glXWaitVideoSyncSGI glXWaitVideoSyncSGI = 0; static bool resolved = false; if (!resolved) { - QString glxExt = QString(QLatin1String(glXGetClientString(QX11Info::display(), GLX_EXTENSIONS))); + QString glxExt = QLatin1String(glXGetClientString(QX11Info::display(), GLX_EXTENSIONS)); if (glxExt.contains(QLatin1String("GLX_SGI_video_sync"))) { #if defined(Q_OS_LINUX) || defined(Q_OS_BSD4) void *handle = dlopen(NULL, RTLD_LAZY); @@ -1032,7 +1032,7 @@ void *QGLContext::getProcAddress(const QString &proc) const if (resolved && !glXGetProcAddressARB) return 0; if (!glXGetProcAddressARB) { - QString glxExt = QString(QLatin1String(glXGetClientString(QX11Info::display(), GLX_EXTENSIONS))); + QString glxExt = QLatin1String(glXGetClientString(QX11Info::display(), GLX_EXTENSIONS)); if (glxExt.contains(QLatin1String("GLX_ARB_get_proc_address"))) { #if defined(Q_OS_LINUX) || defined(Q_OS_BSD4) void *handle = dlopen(NULL, RTLD_LAZY); diff --git a/src/opengl/qglpixmapfilter.cpp b/src/opengl/qglpixmapfilter.cpp index eb3298b..275bbed 100644 --- a/src/opengl/qglpixmapfilter.cpp +++ b/src/opengl/qglpixmapfilter.cpp @@ -192,15 +192,15 @@ bool QGLPixmapColorizeFilter::processGL(QPainter *, const QPointF &pos, const QP // generates convolution filter code for arbitrary sized kernel QByteArray QGLPixmapConvolutionFilter::generateConvolutionShader() const { QByteArray code; - code.append("uniform sampler2D texture;\n"); - code.append("uniform vec2 inv_texture_size;\n"); - code.append("uniform float matrix["); + code.append("uniform sampler2D texture;\n" + "uniform vec2 inv_texture_size;\n" + "uniform float matrix["); code.append(QByteArray::number(m_kernelWidth * m_kernelHeight)); - code.append("];\n"); - code.append("vec2 offset["); + code.append("];\n" + "vec2 offset["); code.append(QByteArray::number(m_kernelWidth*m_kernelHeight)); - code.append("];\n"); - code.append("void main(void) {\n"); + code.append("];\n" + "void main(void) {\n"); for(int y = 0; y < m_kernelHeight; y++) { for(int x = 0; x < m_kernelWidth; x++) { @@ -210,22 +210,21 @@ QByteArray QGLPixmapConvolutionFilter::generateConvolutionShader() const { code.append(QByteArray::number(x-(int)(m_kernelWidth/2))); code.append(".0, inv_texture_size.y * "); code.append(QByteArray::number((int)(m_kernelHeight/2)-y)); - code.append(".0)"); - code.append(";\n"); + code.append(".0);\n"); } } - code.append(" int i = 0;\n"); - code.append(" vec2 coords = gl_TexCoord[0].st;\n"); - code.append(" vec4 sum = vec4(0.0);\n"); - code.append(" for (i = 0; i < "); + code.append(" int i = 0;\n" + " vec2 coords = gl_TexCoord[0].st;\n" + " vec4 sum = vec4(0.0);\n" + " for (i = 0; i < "); code.append(QByteArray::number(m_kernelWidth * m_kernelHeight)); - code.append("; i++) {\n"); - code.append(" vec4 tmp = texture2D(texture,coords+offset[i]);\n"); - code.append(" sum += matrix[i] * tmp;\n"); - code.append(" }\n"); - code.append(" gl_FragColor = sum;\n"); - code.append("}"); + code.append("; i++) {\n" + " vec4 tmp = texture2D(texture,coords+offset[i]);\n" + " sum += matrix[i] * tmp;\n" + " }\n" + " gl_FragColor = sum;\n" + "}"); return code; } diff --git a/src/opengl/util/generator.cpp b/src/opengl/util/generator.cpp index de2450d..dac5a2d 100644 --- a/src/opengl/util/generator.cpp +++ b/src/opengl/util/generator.cpp @@ -116,7 +116,7 @@ QList readConf(const QString &confFile) lineStream >> enumerator; if (lineStream.atEnd()) { - qDebug() << "Error in file" << confFile << "(" << enumerator << ")"; + qDebug() << "Error in file" << confFile << '(' << enumerator << ')'; exit(0); } diff --git a/src/plugins/accessible/widgets/rangecontrols.cpp b/src/plugins/accessible/widgets/rangecontrols.cpp index 9297d6e..6d8c184 100644 --- a/src/plugins/accessible/widgets/rangecontrols.cpp +++ b/src/plugins/accessible/widgets/rangecontrols.cpp @@ -799,7 +799,7 @@ int QAccessibleSlider::defaultAction(int /*child*/) const /*! \internal */ QString QAccessibleSlider::actionText(int /*action*/, Text /*t*/, int /*child*/) const { - return QString(QLatin1String("")); + return QLatin1String(""); } QAccessibleAbstractSlider::QAccessibleAbstractSlider(QWidget *w, Role r) diff --git a/src/plugins/gfxdrivers/hybrid/hybridscreen.cpp b/src/plugins/gfxdrivers/hybrid/hybridscreen.cpp index 3a40b4c..da61a22 100644 --- a/src/plugins/gfxdrivers/hybrid/hybridscreen.cpp +++ b/src/plugins/gfxdrivers/hybrid/hybridscreen.cpp @@ -103,11 +103,11 @@ bool HybridScreen::connect(const QString &displaySpec) { QString dspec = displaySpec; if (dspec.startsWith(QLatin1String("hybrid:"), Qt::CaseInsensitive)) - dspec = dspec.mid(QString(QLatin1String("hybrid:")).size()); + dspec = dspec.mid(QString::fromLatin1("hybrid:").size()); else if (dspec.compare(QLatin1String("hybrid"), Qt::CaseInsensitive) == 0) dspec = QString(); - const QString displayIdSpec = QString(QLatin1String(" :%1")).arg(displayId); + const QString displayIdSpec = QString::fromLatin1(" :%1").arg(displayId); if (dspec.endsWith(displayIdSpec)) dspec = dspec.left(dspec.size() - displayIdSpec.size()); diff --git a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp index b7f03ba..8be3672 100644 --- a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp +++ b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp @@ -2100,11 +2100,11 @@ bool QVNCScreen::connect(const QString &displaySpec) { QString dspec = displaySpec; if (dspec.startsWith(QLatin1String("vnc:"), Qt::CaseInsensitive)) - dspec = dspec.mid(QString(QLatin1String("vnc:")).size()); + dspec = dspec.mid(QString::fromLatin1("vnc:").size()); else if (dspec.compare(QLatin1String("vnc"), Qt::CaseInsensitive) == 0) dspec = QString(); - const QString displayIdSpec = QString(QLatin1String(" :%1")).arg(displayId); + const QString displayIdSpec = QString::fromLatin1(" :%1").arg(displayId); if (dspec.endsWith(displayIdSpec)) dspec = dspec.left(dspec.size() - displayIdSpec.size()); diff --git a/src/qt3support/dialogs/q3filedialog.cpp b/src/qt3support/dialogs/q3filedialog.cpp index b9f8196..e41941b 100644 --- a/src/qt3support/dialogs/q3filedialog.cpp +++ b/src/qt3support/dialogs/q3filedialog.cpp @@ -3879,7 +3879,7 @@ void Q3FileDialog::detailViewSelectionChanged() d->moreFiles->setSelected(f->i, i->isSelected()); } if (i->isSelected() && !((Q3FileDialogPrivate::File *)i)->info.isDir()) - str += QString(QLatin1String("\"%1\" ")).arg(i->text(0)); + str += QString::fromLatin1("\"%1\" ").arg(i->text(0)); i = i->nextSibling(); } d->moreFiles->blockSignals(false); @@ -3931,7 +3931,7 @@ void Q3FileDialog::listBoxSelectionChanged() } if (d->moreFiles->isSelected(i) && !((Q3FileDialogPrivate::File*)(mcitem)->i)->info.isDir()) { - str += QString(QLatin1String("\"%1\" ")).arg(i->text()); + str += QString::fromLatin1("\"%1\" ").arg(i->text()); if (j == 0) j = i; } @@ -5757,8 +5757,8 @@ void Q3FileDialog::insertEntry(const Q3ValueList &lst, Q3NetworkOperat if (!bShowHiddenFiles && inf.name() != QLatin1String("..")) { if (d->url.isLocalFile()) { QString file = d->url.path(); - if (!file.endsWith(QLatin1String("/"))) - file.append(QLatin1String("/")); + if (!file.endsWith(QLatin1Char('/'))) + file.append(QLatin1Char('/')); file += inf.name(); QT_WA({ if (GetFileAttributesW((TCHAR*)file.ucs2()) & FILE_ATTRIBUTE_HIDDEN) diff --git a/src/qt3support/dialogs/q3filedialog_mac.cpp b/src/qt3support/dialogs/q3filedialog_mac.cpp index f1c749ec..18bebf1 100644 --- a/src/qt3support/dialogs/q3filedialog_mac.cpp +++ b/src/qt3support/dialogs/q3filedialog_mac.cpp @@ -554,7 +554,7 @@ QString Q3FileDialog::macGetSaveFileName(const QString &start, const QString &fi retstr = QString::fromUtf8((const char *)str_buffer); //now filename CFStringGetCString(ret.saveFileName, (char *)str_buffer, 1024, kCFStringEncodingUTF8); - retstr += QLatin1String("/") + QString::fromUtf8((const char *)str_buffer); + retstr += QLatin1Char('/') + QString::fromUtf8((const char *)str_buffer); } NavDisposeReply(&ret); if(selectedFilter) diff --git a/src/qt3support/dialogs/q3filedialog_win.cpp b/src/qt3support/dialogs/q3filedialog_win.cpp index 1be797a..a1c98f3 100644 --- a/src/qt3support/dialogs/q3filedialog_win.cpp +++ b/src/qt3support/dialogs/q3filedialog_win.cpp @@ -737,7 +737,7 @@ QString Q3FileDialog::winGetExistingDirectory(const QString& initialDirectory, QDir::setCurrent(currentDir); if (!result.isEmpty()) - result.replace(QLatin1String("\\"), QLatin1String("/")); + result.replace(QLatin1Char('\\'), QLatin1Char('/')); return result; #else return QString(); diff --git a/src/qt3support/itemviews/q3iconview.cpp b/src/qt3support/itemviews/q3iconview.cpp index d1a9c1e..a5664de 100644 --- a/src/qt3support/itemviews/q3iconview.cpp +++ b/src/qt3support/itemviews/q3iconview.cpp @@ -614,7 +614,7 @@ QByteArray Q3IconDrag::encodedData(const char* mime) const (*it).item.textRect().x()).arg((*it).item.textRect().y()). arg((*it).item.textRect().width()).arg( (*it).item.textRect().height()); - k += QString(QLatin1String((*it).data.data())) + QLatin1String("$@@$"); + k += QString::fromLatin1((*it).data.data()) + QLatin1String("$@@$"); s += k; } @@ -1820,8 +1820,8 @@ void Q3IconViewItem::calcRect(const QString &text_) tw = r.width(); th = r.height(); - if (tw < view->d->fm->width(QLatin1String("X"))) - tw = view->d->fm->width(QLatin1String("X")); + if (tw < view->d->fm->width(QLatin1Char('X'))) + tw = view->d->fm->width(QLatin1Char('X')); itemTextRect.setWidth(tw); itemTextRect.setHeight(th); diff --git a/src/qt3support/network/q3dns.cpp b/src/qt3support/network/q3dns.cpp index c53f2ff..3ca3977 100644 --- a/src/qt3support/network/q3dns.cpp +++ b/src/qt3support/network/q3dns.cpp @@ -1738,7 +1738,7 @@ void Q3Dns::setLabel( const QString & label ) const char * dom; while( (dom=it.current()) != 0 ) { ++it; - n.append( l.lower() + QLatin1String(".") + QLatin1String(dom) ); + n.append( l.lower() + QLatin1Char('.') + QLatin1String(dom) ); } } n.append( l.lower() ); @@ -1902,8 +1902,8 @@ QString Q3Dns::toInAddrArpaDomain( const QHostAddress &address ) s = QLatin1String("ip6.arpa"); uint b = 0; while( b < 16 ) { - s = QString::number( i.c[b]%16, 16 ) + QLatin1String(".") + - QString::number( i.c[b]/16, 16 ) + QLatin1String(".") + s; + s = QString::number( i.c[b]%16, 16 ) + QLatin1Char('.') + + QString::number( i.c[b]/16, 16 ) + QLatin1Char('.') + s; b++; } } @@ -2347,7 +2347,7 @@ void Q3Dns::doResInit() nameServer += QLatin1String(dnsServer->IpAddress.String); dnsServer = dnsServer->Next; if ( dnsServer != 0 ) - nameServer += QLatin1String(" "); + nameServer += QLatin1Char(' '); } searchList = QLatin1String(""); separator = ' '; @@ -2360,12 +2360,12 @@ void Q3Dns::doResInit() } if ( !gotNetworkParams ) { if ( getDnsParamsFromRegistry( - QString( QLatin1String("System\\CurrentControlSet\\Services\\Tcpip\\Parameters") ), + QLatin1String("System\\CurrentControlSet\\Services\\Tcpip\\Parameters"), &domainName, &nameServer, &searchList )) { // for NT separator = ' '; } else if ( getDnsParamsFromRegistry( - QString( QLatin1String("System\\CurrentControlSet\\Services\\VxD\\MSTCP") ), + QLatin1String("System\\CurrentControlSet\\Services\\VxD\\MSTCP"), &domainName, &nameServer, &searchList )) { // for Windows 98 separator = ','; @@ -2395,7 +2395,7 @@ void Q3Dns::doResInit() } while( first < (int)nameServer.length() ); } - searchList = searchList + QLatin1String(" ") + domainName; + searchList += QLatin1Char(' ') + domainName; searchList = searchList.simplifyWhiteSpace().lower(); first = 0; do { @@ -2488,7 +2488,7 @@ void Q3Dns::doResInit() while ( !stream.atEnd() ) { line = stream.readLine(); QStringList list = QStringList::split( QLatin1String(" "), line ); - if( line.startsWith( QLatin1String("#") ) || list.size() < 2 ) + if( line.startsWith( QLatin1Char('#') ) || list.size() < 2 ) continue; const QString type = list[0].lower(); diff --git a/src/qt3support/network/q3ftp.cpp b/src/qt3support/network/q3ftp.cpp index 5ab84cc..44c1f5c 100644 --- a/src/qt3support/network/q3ftp.cpp +++ b/src/qt3support/network/q3ftp.cpp @@ -485,7 +485,7 @@ bool Q3FtpDTP::parseDir( const QString &buffer, const QString &userName, QUrlInf dateStr += lst[ 6 ]; dateStr += QLatin1Char(' '); - if ( lst[ 7 ].contains( QLatin1String(":") ) ) { + if ( lst[ 7 ].contains( QLatin1Char(':') ) ) { time = QTime( lst[ 7 ].left( 2 ).toInt(), lst[ 7 ].right( 2 ).toInt() ); dateStr += QString::number( QDate::currentDate().year() ); } else { @@ -495,7 +495,7 @@ bool Q3FtpDTP::parseDir( const QString &buffer, const QString &userName, QUrlInf QDate date = QDate::fromString( dateStr ); info->setLastModified( QDateTime( date, time ) ); - if ( lst[ 7 ].contains( QLatin1String(":") ) ) { + if ( lst[ 7 ].contains( QLatin1Char(':') ) ) { const int futureTolerance = 600; if( info->lastModified().secsTo( QDateTime::currentDateTime() ) < -futureTolerance ) { QDateTime dt = info->lastModified(); @@ -512,7 +512,7 @@ bool Q3FtpDTP::parseDir( const QString &buffer, const QString &userName, QUrlInf else { QString n; for ( uint i = 8; i < (uint) lst.count(); ++i ) - n += lst[ i ] + QLatin1String(" "); + n += lst[ i ] + QLatin1Char(' '); n = n.stripWhiteSpace(); info->setName( n ); } @@ -897,7 +897,7 @@ bool Q3FtpPI::processReply() // ### error handling } else { QStringList lst = addrPortPattern.capturedTexts(); - QString host = lst[1] + QLatin1String(".") + lst[2] + QLatin1String(".") + lst[3] + QLatin1String(".") + lst[4]; + QString host = lst[1] + QLatin1Char('.') + lst[2] + QLatin1Char('.') + lst[3] + QLatin1Char('.') + lst[4]; Q_UINT16 port = ( lst[5].toUInt() << 8 ) + lst[6].toUInt(); waitForDtpToConnect = true; dtp.connectToHost( host, port ); @@ -1435,8 +1435,8 @@ int Q3Ftp::connectToHost( const QString &host, Q_UINT16 port ) int Q3Ftp::login( const QString &user, const QString &password ) { QStringList cmds; - cmds << ( QString(QLatin1String("USER ")) + ( user.isNull() ? QString(QLatin1String("anonymous")) : user ) + QLatin1String("\r\n") ); - cmds << ( QString(QLatin1String("PASS ")) + ( password.isNull() ? QString(QLatin1String("anonymous@")) : password ) + QLatin1String("\r\n") ); + cmds << ( QString::fromLatin1("USER ") + ( user.isNull() ? QString::fromLatin1("anonymous") : user ) + QLatin1String("\r\n") ); + cmds << ( QString::fromLatin1("PASS ") + ( password.isNull() ? QString::fromLatin1("anonymous@") : password ) + QLatin1String("\r\n") ); return addCommand( new Q3FtpCommand( Login, cmds ) ); } @@ -2095,7 +2095,7 @@ void Q3Ftp::operationListChildren( Q3NetworkOperation *op ) { op->setState( StInProgress ); - cd( ( url()->path().isEmpty() ? QString( QLatin1String("/") ) : url()->path() ) ); + cd( ( url()->path().isEmpty() ? QString::fromLatin1("/") : url()->path() ) ); list(); emit start( op ); } @@ -2115,7 +2115,7 @@ void Q3Ftp::operationRemove( Q3NetworkOperation *op ) { op->setState( StInProgress ); - cd( ( url()->path().isEmpty() ? QString( QLatin1String("/") ) : url()->path() ) ); + cd( ( url()->path().isEmpty() ? QString::fromLatin1("/") : url()->path() ) ); remove( Q3Url( op->arg( 0 ) ).path() ); } @@ -2125,7 +2125,7 @@ void Q3Ftp::operationRename( Q3NetworkOperation *op ) { op->setState( StInProgress ); - cd( ( url()->path().isEmpty() ? QString( QLatin1String("/") ) : url()->path() ) ); + cd( ( url()->path().isEmpty() ? QString::fromLatin1("/") : url()->path() ) ); rename( op->arg( 0 ), op->arg( 1 )); } @@ -2179,8 +2179,8 @@ bool Q3Ftp::checkConnection( Q3NetworkOperation *op ) connectToHost( url()->host(), url()->port() != -1 ? url()->port() : 21 ); break; } - QString user = url()->user().isEmpty() ? QString( QLatin1String("anonymous") ) : url()->user(); - QString pass = url()->password().isEmpty() ? QString( QLatin1String("anonymous@") ) : url()->password(); + QString user = url()->user().isEmpty() ? QString::fromLatin1("anonymous") : url()->user(); + QString pass = url()->password().isEmpty() ? QString::fromLatin1("anonymous@") : url()->password(); login( user, pass ); } diff --git a/src/qt3support/network/q3http.cpp b/src/qt3support/network/q3http.cpp index 591b381..aabf4a3 100644 --- a/src/qt3support/network/q3http.cpp +++ b/src/qt3support/network/q3http.cpp @@ -468,7 +468,7 @@ bool Q3HttpHeader::parse( const QString& str ) if ( !(*it).isEmpty() ) { if ( (*it)[0].isSpace() ) { if ( !lines.isEmpty() ) { - lines.last() += QLatin1String(" "); + lines.last() += QLatin1Char(' '); lines.last() += (*it).stripWhiteSpace(); } } else { @@ -562,7 +562,7 @@ void Q3HttpHeader::removeValue( const QString& key ) */ bool Q3HttpHeader::parseLine( const QString& line, int ) { - int i = line.find( QLatin1String(":") ); + int i = line.find( QLatin1Char(':') ); if ( i == -1 ) return false; @@ -647,7 +647,7 @@ QString Q3HttpHeader::contentType() const if ( type.isEmpty() ) return QString(); - int pos = type.find( QLatin1String(";") ); + int pos = type.find( QLatin1Char(';') ); if ( pos == -1 ) return type; @@ -2210,7 +2210,7 @@ void Q3Http::clientReply( const Q3HttpResponseHeader &rep ) if ( rep.statusCode() >= 400 && rep.statusCode() < 600 ) { op->setState( StFailed ); op->setProtocolDetail( - QString(QLatin1String("%1 %2")).arg(rep.statusCode()).arg(rep.reasonPhrase()) + QString::fromLatin1("%1 %2").arg(rep.statusCode()).arg(rep.reasonPhrase()) ); switch ( rep.statusCode() ) { case 401: diff --git a/src/qt3support/network/q3url.cpp b/src/qt3support/network/q3url.cpp index fc2fdb2..68753b6 100644 --- a/src/qt3support/network/q3url.cpp +++ b/src/qt3support/network/q3url.cpp @@ -211,8 +211,8 @@ Q3Url::Q3Url( const Q3Url& url ) bool Q3Url::isRelativeUrl( const QString &url ) { - int colon = url.find( QLatin1String(":") ); - int slash = url.find( QLatin1String("/") ); + int colon = url.find( QLatin1Char(':') ); + int slash = url.find( QLatin1Char('/') ); return ( slash != 0 && ( colon == -1 || ( slash != -1 && colon > slash ) ) ); } @@ -280,8 +280,8 @@ Q3Url::Q3Url( const Q3Url& url, const QString& relUrl, bool checkSlash ) if ( !d->host.isEmpty() && !d->user.isEmpty() && !d->pass.isEmpty() ) p = QLatin1String("/"); } - if ( !p.isEmpty() && p.right(1)!=QLatin1String("/") ) - p += QLatin1String("/"); + if ( !p.isEmpty() && !p.endsWith(QLatin1Char('/')) ) + p += QLatin1Char('/'); p += rel; d->path = p; d->cleanPathDirty = true; @@ -678,7 +678,7 @@ bool Q3Url::parse( const QString& url ) ++cs; while ( url_[ cs ] == QLatin1Char('/') ) ++cs; - int slash = url_.find( QLatin1String("/"), cs ); + int slash = url_.find( QLatin1Char('/'), cs ); if ( slash == -1 ) slash = url_.length() - 1; QString tmp = url_.mid( cs, slash - cs + 1 ); @@ -686,7 +686,7 @@ bool Q3Url::parse( const QString& url ) if ( !tmp.isEmpty() ) { // if this part exists // look for the @ in this part - int at = tmp.find( QLatin1String("@") ); + int at = tmp.find( QLatin1Char('@') ); if ( at != -1 ) at += cs; // we have no @, which means host[:port], so directly @@ -793,7 +793,7 @@ bool Q3Url::parse( const QString& url ) // hack for windows if ( d->path.length() == 2 && d->path[ 1 ] == QLatin1Char(':') ) - d->path += QLatin1String("/"); + d->path += QLatin1Char('/'); // #### do some corrections, should be done nicer too if ( !d->pass.isEmpty() ) { @@ -808,7 +808,7 @@ bool Q3Url::parse( const QString& url ) if ( d->path[ 0 ] == QLatin1Char('@') || d->path[ 0 ] == QLatin1Char(':') ) d->path.remove( (uint)0, 1 ); if ( d->path[ 0 ] != QLatin1Char('/') && !relPath && d->path[ 1 ] != QLatin1Char(':') ) - d->path.prepend( QLatin1String("/") ); + d->path.prepend( QLatin1Char('/') ); } if ( !d->refEncoded.isEmpty() && d->refEncoded[ 0 ] == QLatin1Char('#') ) d->refEncoded.remove( (uint)0, 1 ); @@ -820,9 +820,9 @@ bool Q3Url::parse( const QString& url ) #if defined(Q_OS_WIN32) // hack for windows file://machine/path syntax if ( d->protocol == QLatin1String("file") ) { - if ( url.left( 7 ) == QLatin1String("file://") && + if ( url.startsWith(QLatin1String("file://")) && d->path.length() > 1 && d->path[ 1 ] != QLatin1Char(':') ) - d->path.prepend( QLatin1String("/") ); + d->path.prepend( QLatin1Char('/') ); } #endif @@ -942,7 +942,7 @@ void Q3Url::setFileName( const QString& name ) p += fn; if ( !d->queryEncoded.isEmpty() ) - p += QLatin1String("?") + d->queryEncoded; + p += QLatin1Char('?') + d->queryEncoded; setEncodedPathAndQuery( p ); } @@ -961,7 +961,7 @@ QString Q3Url::encodedPathAndQuery() encode( p ); if ( !d->queryEncoded.isEmpty() ) { - p += QLatin1String("?"); + p += QLatin1Char('?'); p += d->queryEncoded; } @@ -1011,7 +1011,7 @@ QString Q3Url::path( bool correct ) const } else if ( isLocalFile() ) { #if defined(Q_OS_WIN32) // hack for stuff like \\machine\path and //machine/path on windows - if ( ( d->path.left( 1 ) == QLatin1String("/") || d->path.left( 1 ) == QLatin1String("\\") ) && + if ( ( d->path.startsWith(QLatin1Char('/')) || d->path.startsWith(QLatin1Char('\\')) ) && d->path.length() > 1 ) { d->cleanPath = d->path; bool share = (d->cleanPath[0] == QLatin1Char('\\') && d->cleanPath[1] == QLatin1Char('\\')) || @@ -1021,7 +1021,7 @@ QString Q3Url::path( bool correct ) const if ( share ) { check = false; while (d->cleanPath.at(0) != QLatin1Char('/') || d->cleanPath.at(1) != QLatin1Char('/')) - d->cleanPath.prepend(QLatin1String("/")); + d->cleanPath.prepend(QLatin1Char('/')); } } #endif @@ -1036,7 +1036,7 @@ QString Q3Url::path( bool correct ) const dir = QDir::cleanDirPath( canPath ); else dir = QDir::cleanDirPath( QDir( d->path ).absPath() ); - dir += QLatin1String("/"); + dir += QLatin1Char('/'); if ( dir == QLatin1String("//") ) d->cleanPath = QLatin1String("/"); else @@ -1046,14 +1046,13 @@ QString Q3Url::path( bool correct ) const QDir::cleanDirPath( (qt_resolve_symlinks ? fi.dir().canonicalPath() : fi.dir().absPath()) ); - d->cleanPath = p + QLatin1String("/") + fi.fileName(); + d->cleanPath = p + QLatin1Char('/') + fi.fileName(); } } } else { - if ( d->path != QLatin1String("/") && d->path[ (int)d->path.length() - 1 ] == QLatin1Char('/') ) - d->cleanPath = QDir::cleanDirPath( d->path ) + QLatin1String("/"); - else d->cleanPath = QDir::cleanDirPath( d->path ); + if ( d->path.length() > 1 && d->path.endsWith(QLatin1Char('/')) ) + d->cleanPath += QLatin1Char('/'); } if ( check ) @@ -1084,9 +1083,9 @@ bool Q3Url::isLocalFile() const QString Q3Url::fileName() const { - if ( d->path.isEmpty() || d->path.endsWith( QLatin1String("/") ) + if ( d->path.isEmpty() || d->path.endsWith( QLatin1Char('/') ) #ifdef Q_WS_WIN - || d->path.endsWith( QLatin1String("\\") ) + || d->path.endsWith( QLatin1Char('\\') ) #endif ) return QString(); @@ -1110,12 +1109,12 @@ void Q3Url::addPath( const QString& pa ) if ( path().isEmpty() ) { if ( p[ 0 ] != QLatin1Char( '/' ) ) - d->path = QLatin1String("/") + p; + d->path = QLatin1Char('/') + p; else d->path = p; } else { if ( p[ 0 ] != QLatin1Char( '/' ) && d->path[ (int)d->path.length() - 1 ] != QLatin1Char('/') ) - d->path += QLatin1String("/") + p; + d->path += QLatin1Char('/') + p; else d->path += p; } @@ -1250,11 +1249,11 @@ QString Q3Url::toString( bool encodedPath, bool forcePrependProtocol ) const if ( isLocalFile() ) { if ( forcePrependProtocol ) - res = d->protocol + QLatin1String(":") + p; + res = d->protocol + QLatin1Char(':') + p; else res = p; } else if ( d->protocol == QLatin1String("mailto") ) { - res = d->protocol + QLatin1String(":") + p; + res = d->protocol + QLatin1Char(':') + p; } else { res = d->protocol + QLatin1String("://"); if ( !d->user.isEmpty() || !d->pass.isEmpty() ) { @@ -1267,24 +1266,24 @@ QString Q3Url::toString( bool encodedPath, bool forcePrependProtocol ) const if ( !d->pass.isEmpty() ) { tmp = d->pass; encode( tmp ); - res += QLatin1String(":") + tmp; + res += QLatin1Char(':') + tmp; } - res += QLatin1String("@"); + res += QLatin1Char('@'); } res += d->host; if ( d->port != -1 ) - res += QLatin1String(":") + QString( QLatin1String("%1") ).arg( d->port ); + res += QLatin1Char(':') + QString::number( d->port ); if ( !p.isEmpty() ) { if ( !d->host.isEmpty() && p[0]!= QLatin1Char( '/' ) ) - res += QLatin1String("/"); + res += QLatin1Char('/'); res += p; } } if ( !d->refEncoded.isEmpty() ) - res += QLatin1String("#") + d->refEncoded; + res += QLatin1Char('#') + d->refEncoded; if ( !d->queryEncoded.isEmpty() ) - res += QLatin1String("?") + d->queryEncoded; + res += QLatin1Char('?') + d->queryEncoded; return res; } diff --git a/src/qt3support/network/q3urloperator.cpp b/src/qt3support/network/q3urloperator.cpp index b415e12..6afd8ab 100644 --- a/src/qt3support/network/q3urloperator.cpp +++ b/src/qt3support/network/q3urloperator.cpp @@ -579,7 +579,7 @@ Q3PtrList Q3UrlOperator::copy( const QString &from, const QS if (frm == to + file) return ops; - file.prepend( QLatin1String("/") ); + file.prepend( QLatin1Char('/') ); // uFrom and uTo are deleted when the Q3NetworkProtocol deletes itself via // autodelete diff --git a/src/qt3support/other/q3dragobject.cpp b/src/qt3support/other/q3dragobject.cpp index 50b75a4..89ffe24 100644 --- a/src/qt3support/other/q3dragobject.cpp +++ b/src/qt3support/other/q3dragobject.cpp @@ -93,7 +93,7 @@ public: Q3TextDragPrivate() { setSubType(QLatin1String("plain")); } void setSubType(const QString & st) { subtype = st; - fmt = QString(QLatin1String("text/")).toLatin1() + subtype.toLatin1(); + fmt = "text/" + subtype.toLatin1(); } QString txt; @@ -1297,7 +1297,7 @@ QByteArray Q3UriDrag::localFileToUri(const QString& filename) r.prepend(QString::fromLatin1(hostname)); } #endif - return unicodeUriToUri(QString(QLatin1String("file://") + r)); + return unicodeUriToUri(QLatin1String("file://") + r); } /*! @@ -1352,7 +1352,7 @@ QString Q3UriDrag::uriToLocalFile(const char* uri) return file; if (0==qstrnicmp(uri,"file:/",6)) // It is a local file uri uri += 6; - else if (QString(QLatin1String(uri)).indexOf(QLatin1String(":/")) != -1) // It is a different scheme uri + else if (QString::fromLatin1(uri).indexOf(QLatin1String(":/")) != -1) // It is a different scheme uri return file; bool local = uri[0] != '/' || (uri[0] != '\0' && uri[1] == '/'); diff --git a/src/qt3support/other/q3process.cpp b/src/qt3support/other/q3process.cpp index 6eac812..9689de9 100644 --- a/src/qt3support/other/q3process.cpp +++ b/src/qt3support/other/q3process.cpp @@ -483,7 +483,7 @@ QString Q3Process::readLineStdout() return QString(); if ( !buf->scanNewline( &a ) ) - return QString( QLatin1String(buf->readAll()) ); + return QLatin1String(buf->readAll()); } uint size = a.size(); diff --git a/src/qt3support/other/q3process_unix.cpp b/src/qt3support/other/q3process_unix.cpp index 098c581..2492bf2 100644 --- a/src/qt3support/other/q3process_unix.cpp +++ b/src/qt3support/other/q3process_unix.cpp @@ -828,7 +828,7 @@ bool Q3Process::start( QStringList *env ) #ifndef QT_NO_DIR QFileInfo fileInfo( dir, command ); #else - QFileInfo fileInfo( dir + "/" + command ); + QFileInfo fileInfo( dir + QLatin1Char('/') + command ); #endif if ( fileInfo.isExecutable() ) { #if defined(Q_OS_MACX) diff --git a/src/qt3support/other/q3process_win.cpp b/src/qt3support/other/q3process_win.cpp index 3c862ee..7dc28cb 100644 --- a/src/qt3support/other/q3process_win.cpp +++ b/src/qt3support/other/q3process_win.cpp @@ -285,7 +285,7 @@ bool Q3Process::start( QStringList *env ) for ( ; it != _arguments.end(); ++it ) { QString tmp = *it; // escape a single " because the arguments will be parsed - tmp.replace( QLatin1String("\""), QLatin1String("\\\"") ); + tmp.replace( QLatin1Char('\"'), QLatin1String("\\\"") ); if ( tmp.isEmpty() || tmp.contains( QLatin1Char(' ') ) || tmp.contains( QLatin1Char('\t') ) ) { // The argument must not end with a \ since this would be interpreted // as escaping the quote -- rather put the \ behind the quote: e.g. @@ -294,9 +294,9 @@ bool Q3Process::start( QStringList *env ) int i = tmp.length(); while ( i>0 && tmp.at( i-1 ) == QLatin1Char('\\') ) { --i; - endQuote += QLatin1String("\\"); + endQuote += QLatin1Char('\\'); } - args += QString( QLatin1String(" \"") ) + tmp.left( i ) + endQuote; + args += QLatin1String(" \"") + tmp.left( i ) + endQuote; } else { args += QLatin1Char(' ') + tmp; } @@ -330,7 +330,7 @@ bool Q3Process::start( QStringList *env ) // add PATH if necessary (for DLL loading) QByteArray path = qgetenv( "PATH" ); if ( env->grep( QRegExp(QLatin1String("^PATH="),FALSE) ).empty() && !path.isNull() ) { - QString tmp = QString( QLatin1String("PATH=%1") ).arg(QString::fromLatin1(path.constData())); + QString tmp = QString::fromLatin1("PATH=%1").arg(QLatin1String(path.constData())); uint tmpSize = sizeof(TCHAR) * (tmp.length()+1); envlist.resize( envlist.size() + tmpSize ); memcpy( envlist.data()+pos, tmp.ucs2(), tmpSize ); @@ -378,7 +378,7 @@ bool Q3Process::start( QStringList *env ) // add PATH if necessary (for DLL loading) QByteArray path = qgetenv( "PATH" ); if ( env->grep( QRegExp(QLatin1String("^PATH="),FALSE) ).empty() && !path.isNull() ) { - Q3CString tmp = QString( QLatin1String("PATH=%1") ).arg(QString::fromLatin1(path.constData())).local8Bit(); + Q3CString tmp = QString::fromLatin1("PATH=%1").arg(QString::fromLatin1(path.constData())).local8Bit(); uint tmpSize = tmp.length() + 1; envlist.resize( envlist.size() + tmpSize ); memcpy( envlist.data()+pos, tmp.data(), tmpSize ); diff --git a/src/qt3support/painting/q3paintengine_svg.cpp b/src/qt3support/painting/q3paintengine_svg.cpp index 95528e8..22e0d49 100644 --- a/src/qt3support/painting/q3paintengine_svg.cpp +++ b/src/qt3support/painting/q3paintengine_svg.cpp @@ -263,7 +263,7 @@ void Q3SVGPaintEngine::updateClipPath(const QPainterPath &path, Qt::ClipOperatio QDomElement e; d->currentClip++; e = d->doc.createElement(QLatin1String("clipPath")); - e.setAttribute(QLatin1String("id"), QString(QLatin1String("clip%1")).arg(d->currentClip)); + e.setAttribute(QLatin1String("id"), QString::fromLatin1("clip%1").arg(d->currentClip)); QDomElement path_element = d->doc.createElement(QLatin1String("path")); path_element.setAttribute(QLatin1String("d"), qt_svg_compose_path(path)); @@ -509,14 +509,14 @@ bool Q3SVGPaintEngine::save(const QString &fileName) int icount = 0; ImageList::Iterator iit = d->images.begin(); for (; iit != d->images.end(); ++iit) { - QString href = QString(QLatin1String("%1_%2.png")).arg(svgName).arg(icount); + QString href = QString::fromLatin1("%1_%2.png").arg(svgName).arg(icount); (*iit).image.save(href, "PNG"); (*iit).element.setAttribute(QLatin1String("xlink:href"), href); icount++; } PixmapList::Iterator pit = d->pixmaps.begin(); for (; pit != d->pixmaps.end(); ++pit) { - QString href = QString(QLatin1String("%1_%2.png")).arg(svgName).arg(icount); + QString href = QString::fromLatin1("%1_%2.png").arg(svgName).arg(icount); (*pit).pixmap.save(href, "PNG"); (*pit).element.setAttribute(QLatin1String("xlink:href"), href); icount++; @@ -592,7 +592,7 @@ void Q3SVGPaintEnginePrivate::appendChild(QDomElement &e, QPicturePrivate::Paint if (c == QPicturePrivate::PdcSetClipRegion || c == QPicturePrivate::PdcSetClipPath) { QDomElement ne; ne = doc.createElement(QLatin1String("g")); - ne.setAttribute(QLatin1String("style"), QString(QLatin1String("clip-path:url(#clip%1)")).arg(currentClip)); + ne.setAttribute(QLatin1String("style"), QString::fromLatin1("clip-path:url(#clip%1)").arg(currentClip)); if (dirtyTransform) { applyTransform(&ne); dirtyTransform = false; @@ -621,12 +621,12 @@ void Q3SVGPaintEnginePrivate::applyStyle(QDomElement *e, QPicturePrivate::PaintC if (c == QPicturePrivate::PdcDrawText2 || c == QPicturePrivate::PdcDrawText2Formatted) { // QPainter has a reversed understanding of pen/stroke vs. // brush/fill for text - s += QString(QLatin1String("fill:rgb(%1,%2,%3);")).arg(pcol.red()).arg(pcol.green()).arg(pcol.blue()); - s += QString(QLatin1String("stroke-width:0;")); + s += QString::fromLatin1("fill:rgb(%1,%2,%3);").arg(pcol.red()).arg(pcol.green()).arg(pcol.blue()); + s += QLatin1String("stroke-width:0;"); QFont f = cfont; QFontInfo fi(f); - s += QString(QLatin1String("font-size:%1;")).arg(fi.pointSize()); - s += QString(QLatin1String("font-style:%1;")).arg(f.italic() ? QLatin1String("italic") : QLatin1String("normal")); + s += QString::fromLatin1("font-size:%1;").arg(fi.pointSize()); + s += QString::fromLatin1("font-style:%1;").arg(f.italic() ? QLatin1String("italic") : QLatin1String("normal")); // not a very scientific distribution QString fw; if (f.weight() <= QFont::Light) @@ -641,32 +641,32 @@ void Q3SVGPaintEnginePrivate::applyStyle(QDomElement *e, QPicturePrivate::PaintC fw = QLatin1String("800"); else fw = QLatin1String("900"); - s += QString(QLatin1String("font-weight:%1;")).arg(fw); - s += QString(QLatin1String("font-family:%1;")).arg(f.family()); + s += QString::fromLatin1("font-weight:%1;").arg(fw); + s += QString::fromLatin1("font-family:%1;").arg(f.family()); } else { - s += QString(QLatin1String("stroke:rgb(%1,%2,%3);")).arg(pcol.red()).arg(pcol.green()).arg(pcol.blue()); + s += QString::fromLatin1("stroke:rgb(%1,%2,%3);").arg(pcol.red()).arg(pcol.green()).arg(pcol.blue()); if (pcol.alpha() != 255) - s += QString(QLatin1String("stroke-opacity:%1;")).arg(pcol.alpha()/255.0); + s += QString::fromLatin1("stroke-opacity:%1;").arg(pcol.alpha()/255.0); if (bcol.alpha() != 255) - s += QString(QLatin1String("fill-opacity:%1;")).arg(bcol.alpha()/255.0); + s += QString::fromLatin1("fill-opacity:%1;").arg(bcol.alpha()/255.0); double pw = cpen.width(); if (pw == 0 && cpen.style() != Qt::NoPen) pw = 0.9; if (c == QPicturePrivate::PdcDrawLine) pw /= (qAbs(worldMatrix.m11()) + qAbs(worldMatrix.m22())) / 2.0; - s += QString(QLatin1String("stroke-width:%1;")).arg(pw); + s += QString::fromLatin1("stroke-width:%1;").arg(pw); if (cpen.style() == Qt::DashLine) - s+= QString(QLatin1String("stroke-dasharray:18,6;")); + s+= QLatin1String("stroke-dasharray:18,6;"); else if (cpen.style() == Qt::DotLine) - s+= QString(QLatin1String("stroke-dasharray:3;")); + s+= QLatin1String("stroke-dasharray:3;"); else if (cpen.style() == Qt::DashDotLine) - s+= QString(QLatin1String("stroke-dasharray:9,6,3,6;")); + s+= QLatin1String("stroke-dasharray:9,6,3,6;"); else if (cpen.style() == Qt::DashDotDotLine) - s+= QString(QLatin1String("stroke-dasharray:9,3,3;")); + s+= QLatin1String("stroke-dasharray:9,3,3;"); if (cbrush.style() == Qt::NoBrush || c == QPicturePrivate::PdcDrawPolyline || c == QPicturePrivate::PdcDrawCubicBezier) s += QLatin1String("fill:none;"); // Qt polylines use no brush, neither do Beziers else - s += QString(QLatin1String("fill:rgb(%1,%2,%3);")).arg(bcol.red()).arg(bcol.green()).arg(bcol.blue()); + s += QString::fromLatin1("fill:rgb(%1,%2,%3);").arg(bcol.red()).arg(bcol.green()).arg(bcol.blue()); } e->setAttribute(QLatin1String("style"), s); } @@ -679,13 +679,13 @@ void Q3SVGPaintEnginePrivate::applyTransform(QDomElement *e) const bool rot = (m.m11() != 1.0 || m.m12() != 0.0 || m.m21() != 0.0 || m.m22() != 1.0); if (!rot && (m.dx() != 0.0 || m.dy() != 0.0)) { - s = QString(QLatin1String("translate(%1,%2)")).arg(m.dx()).arg(m.dy()); + s = QString::fromLatin1("translate(%1,%2)").arg(m.dx()).arg(m.dy()); } else if (rot) { if (m.m12() == 0.0 && m.m21() == 0.0 && m.dx() == 0.0 && m.dy() == 0.0) - s = QString(QLatin1String("scale(%1,%2)")).arg(m.m11()).arg(m.m22()); + s = QString::fromLatin1("scale(%1,%2)").arg(m.m11()).arg(m.m22()); else - s = QString(QLatin1String("matrix(%1,%2,%3,%4,%5,%6)")) + s = QString::fromLatin1("matrix(%1,%2,%3,%4,%5,%6)") .arg(m.m11()).arg(m.m12()) .arg(m.m21()).arg(m.m22()) .arg(m.dx()).arg(m.dy()); @@ -730,9 +730,9 @@ bool Q3SVGPaintEngine::play(QPainter *pt) d->brect.setX(x); d->brect.setY(y); QString wstr = attr.contains(QLatin1String("width")) - ? attr.namedItem(QLatin1String("width")).nodeValue() : QString(QLatin1String("100%")); + ? attr.namedItem(QLatin1String("width")).nodeValue() : QString::fromLatin1("100%"); QString hstr = attr.contains(QLatin1String("height")) - ? attr.namedItem(QLatin1String("height")).nodeValue() : QString(QLatin1String("100%")); + ? attr.namedItem(QLatin1String("height")).nodeValue() : QString::fromLatin1("100%"); double width = d->parseLen(wstr, 0, true); double height = d->parseLen(hstr, 0, false); // SVG doesn't respect x and y. But we want a proper bounding rect. diff --git a/src/qt3support/text/q3richtext.cpp b/src/qt3support/text/q3richtext.cpp index e508001..d02f961 100644 --- a/src/qt3support/text/q3richtext.cpp +++ b/src/qt3support/text/q3richtext.cpp @@ -1678,7 +1678,7 @@ void Q3TextDocument::setRichTextInternal(const QString &text, Q3TextCursor* curs if (curtag.style->displayMode() == Q3StyleSheetItem::DisplayListItem) { // we are in a li and a new block comes along - if (nstyle->name() == QString(QLatin1String("ul")) || nstyle->name() == QLatin1String("ol")) + if (nstyle->name() == QLatin1String("ul") || nstyle->name() == QLatin1String("ol")) hasNewPar = false; // we want an empty li (like most browsers) if (!hasNewPar) { /* do not add new blocks inside @@ -1857,7 +1857,7 @@ void Q3TextDocument::setRichTextInternal(const QString &text, Q3TextCursor* curs curtag.format = curtag.format.makeTextFormat(nstyle, attr, scaleFontsFactor); if (nstyle->isAnchor()) { if (!anchorName.isEmpty()) - anchorName += QLatin1String("#") + attr[QLatin1String("name")]; + anchorName += QLatin1Char('#') + attr[QLatin1String("name")]; else anchorName = attr[QLatin1String("name")]; curtag.anchorHref = attr[QLatin1String("href")]; @@ -2436,7 +2436,7 @@ QString Q3TextDocument::richText() const list_type = QLatin1String(" type=") + list_style_to_string(p->listStyle()); for (int i = pastListDepth; i < listDepth; i++) { s += list_is_ordered(p->listStyle()) ? QLatin1String(""); + s += list_type + QLatin1Char('>'); } } else { s += QLatin1Char('\n'); @@ -2463,7 +2463,7 @@ QString Q3TextDocument::richText() const s += margin_to_string(item_li, p->utm, p->ubm, p->ulm, p->urm, p->uflm); s += list_value_to_string(p->listValue()); s += direction_to_string(p->direction()); - s += QLatin1String(">"); + s += QLatin1Char('>'); s += ps; s += QLatin1String(""); } else if (p->listDepth()) { @@ -2471,7 +2471,7 @@ QString Q3TextDocument::richText() const s += align_to_string(p->alignment()); s += margin_to_string(item_div, p->utm, p->ubm, p->ulm, p->urm, p->uflm); s += direction_to_string(p->direction()); - s += QLatin1String(">"); + s += QLatin1Char('>'); s += ps; s += QLatin1String("

    "); } else { @@ -2480,7 +2480,7 @@ QString Q3TextDocument::richText() const s += align_to_string(p->alignment()); s += margin_to_string(item_p, p->utm, p->ubm, p->ulm, p->urm, p->uflm); s += direction_to_string(p->direction()); - s += QLatin1String(">"); + s += QLatin1Char('>'); s += ps; s += QLatin1String("

    "); } @@ -6667,7 +6667,7 @@ Q3TextImage::Q3TextImage(Q3TextDocument *p, const QMap &attr, imageName = attr[QLatin1String("source")]; if (!imageName.isEmpty()) { - imgId = QString(QLatin1String("%1,%2,%3,%4")).arg(imageName).arg(width).arg(height).arg((ulong)&factory); + imgId = QString::fromLatin1("%1,%2,%3,%4").arg(imageName).arg(width).arg(height).arg((ulong)&factory); if (!pixmap_map) pixmap_map = new QMap; if (pixmap_map->contains(imgId)) { @@ -6761,13 +6761,13 @@ QString Q3TextImage::richText() const s += QLatin1String("::ConstIterator it = attributes.begin(); for (; it != attributes.end(); ++it) { - s += it.key() + QLatin1String("="); + s += it.key() + QLatin1Char('='); if ((*it).contains(QLatin1Char(' '))) - s += QLatin1String("\"") + *it + QLatin1String("\" "); + s += QLatin1Char('\"') + *it + QLatin1String("\" "); else - s += *it + QLatin1String(" "); + s += *it + QLatin1Char(' '); } - s += QLatin1String(">"); + s += QLatin1Char('>'); return s; } @@ -7722,7 +7722,7 @@ QString Q3TextTable::richText() const s = QLatin1String("::ConstIterator it = attributes.begin(); for (; it != attributes.end(); ++it) - s += it.key() + QLatin1String("=") + *it + QLatin1String(" "); + s += it.key() + QLatin1Char('=') + *it + QLatin1Char(' '); s += QLatin1String(">\n"); int lastRow = -1; @@ -7739,8 +7739,8 @@ QString Q3TextTable::richText() const s += QLatin1String("attributes.constBegin(); for (; it != cell->attributes.constEnd(); ++it) - s += QLatin1String(" ") + it.key() + QLatin1String("=") + *it; - s += QLatin1String(">"); + s += QLatin1Char(' ') + it.key() + QLatin1Char('=') + *it; + s += QLatin1Char('>'); s += cell->richText()->richText(); s += QLatin1String(""); } diff --git a/src/qt3support/text/q3textedit.cpp b/src/qt3support/text/q3textedit.cpp index 7577dce..d1db1e4 100644 --- a/src/qt3support/text/q3textedit.cpp +++ b/src/qt3support/text/q3textedit.cpp @@ -77,7 +77,7 @@ #include #define ACCEL_KEY(k) QLatin1Char('\t') + QString(QKeySequence(Qt::CTRL | Qt::Key_ ## k)) #else -#define ACCEL_KEY(k) QLatin1Char('\t' )+ QString(QLatin1String("Ctrl+" #k)) +#define ACCEL_KEY(k) QLatin1Char('\t' )+ QString::fromLatin1("Ctrl+" #k) #endif #ifdef QT_TEXTEDIT_OPTIMIZATION @@ -6625,7 +6625,7 @@ void Q3TextEdit::optimSetTextFormat(Q3TextDocument * td, Q3TextCursor * cur, } if (tag) { QString col = tag->tag.simplified(); - if (col.left(10) == QLatin1String("font color")) { + if (col.startsWith(QLatin1String("font color"))) { int i = col.indexOf(QLatin1Char('='), 10); col = col.mid(i + 1).simplified(); if (col[0] == QLatin1Char('\"')) diff --git a/src/qt3support/widgets/q3mainwindow.cpp b/src/qt3support/widgets/q3mainwindow.cpp index 2ee3bdc..ae80321 100644 --- a/src/qt3support/widgets/q3mainwindow.cpp +++ b/src/qt3support/widgets/q3mainwindow.cpp @@ -2261,7 +2261,7 @@ static void saveDockArea(QTextStream &ts, Q3DockArea *a) for (int i = 0; i < l.size(); ++i) { Q3DockWindow *dw = l.at(i); ts << QString(dw->windowTitle()); - ts << ","; + ts << ','; } ts << endl; ts << *a; @@ -2287,7 +2287,7 @@ QTextStream &operator<<(QTextStream &ts, const Q3MainWindow &mainWindow) for (int i = 0; i < l.size(); ++i) { Q3DockWindow *dw = l.at(i); ts << dw->windowTitle(); - ts << ","; + ts << ','; } ts << endl; @@ -2295,17 +2295,17 @@ QTextStream &operator<<(QTextStream &ts, const Q3MainWindow &mainWindow) for (int i = 0; i < l.size(); ++i) { Q3DockWindow *dw = l.at(i); ts << dw->windowTitle(); - ts << ","; + ts << ','; } ts << endl; for (int i = 0; i < l.size(); ++i) { Q3DockWindow *dw = l.at(i); - ts << "[" << dw->windowTitle() << "," - << (int)dw->geometry().x() << "," - << (int)dw->geometry().y() << "," - << (int)dw->geometry().width() << "," - << (int)dw->geometry().height() << "," - << (int)dw->isVisible() << "]"; + ts << '[' << dw->windowTitle() << ',' + << (int)dw->geometry().x() << ',' + << (int)dw->geometry().y() << ',' + << (int)dw->geometry().width() << ',' + << (int)dw->geometry().height() << ',' + << (int)dw->isVisible() << ']'; } ts << endl; diff --git a/src/script/qscriptcontext.cpp b/src/script/qscriptcontext.cpp index 020601b..ff519c7 100644 --- a/src/script/qscriptcontext.cpp +++ b/src/script/qscriptcontext.cpp @@ -469,7 +469,7 @@ QString QScriptContext::toString() const QScriptValue arg = argument(i); result.append(safeValueToString(arg)); } - result.append(QLatin1String(")")); + result.append(QLatin1Char(')')); QString fileName = info.fileName(); int lineNumber = info.lineNumber(); diff --git a/src/script/qscriptcontext_p.cpp b/src/script/qscriptcontext_p.cpp index 199c9d4..f19ba9c 100644 --- a/src/script/qscriptcontext_p.cpp +++ b/src/script/qscriptcontext_p.cpp @@ -841,7 +841,7 @@ Ltop: flags = iPtr->operand[1].m_int_value; #ifndef QT_NO_REGEXP if (flags != 0) { - literal += QLatin1String("/"); + literal += QLatin1Char('/'); literal += QString::number(flags); } #endif @@ -2396,10 +2396,10 @@ QStringList QScriptContextPrivate::backtrace() const s += QLatin1String(""); } } - s += QLatin1String("("); + s += QLatin1Char('('); for (int i = 0; i < ctx->argc; ++i) { if (i > 0) - s += QLatin1String(","); + s += QLatin1Char(','); QScriptValueImpl arg = ctx->args[i]; if (arg.isObject()) s += QLatin1String("[object Object]"); // don't do a function call diff --git a/src/script/qscriptecmaerror.cpp b/src/script/qscriptecmaerror.cpp index fc39bf9..0dde68c 100644 --- a/src/script/qscriptecmaerror.cpp +++ b/src/script/qscriptecmaerror.cpp @@ -318,18 +318,18 @@ QStringList Error::backtrace(const QScriptValueImpl &error) } else { s += functionName; } - s += QLatin1String("("); + s += QLatin1Char('('); QScriptValueImpl arguments = frame.property(QLatin1String("arguments")); if (arguments.isObject()) { int argCount = arguments.property(QLatin1String("length")).toInt32(); for (int j = 0; j < argCount; ++j) { if (j > 0) - s += QLatin1String(","); + s += QLatin1Char(','); s += arguments.property(j).toString(); } } s += QLatin1String(")@") + o.property(QLatin1String("fileName")).toString() - + QLatin1String(":") + o.property(QLatin1String("lineNumber")).toString(); + + QLatin1Char(':') + o.property(QLatin1String("lineNumber")).toString(); result.append(s); } return result; diff --git a/src/script/qscriptecmafunction.cpp b/src/script/qscriptecmafunction.cpp index ec45ae4..a1e5b58 100644 --- a/src/script/qscriptecmafunction.cpp +++ b/src/script/qscriptecmafunction.cpp @@ -197,7 +197,7 @@ QString Function::buildFunction(QScriptContextPrivate *context) // the formals for (int i = 0; i < argc - 1; ++i) { if (i != 0) - code += QLatin1String(","); + code += QLatin1Char(','); code += context->argument(i).toString(); } diff --git a/src/script/qscriptecmaglobal.cpp b/src/script/qscriptecmaglobal.cpp index da7ab9e..b5cf675 100644 --- a/src/script/qscriptecmaglobal.cpp +++ b/src/script/qscriptecmaglobal.cpp @@ -296,7 +296,7 @@ public: QString result; for (int i = 0; i < context->argumentCount(); ++i) { if (i != 0) - result.append(QLatin1String(" ")); + result.append(QLatin1Char(' ')); QString s = context->argument(i).toString(); if (context->state() == QScriptContext::ExceptionState) diff --git a/src/script/qscriptecmaobject.cpp b/src/script/qscriptecmaobject.cpp index 694f479..c4a1b08 100644 --- a/src/script/qscriptecmaobject.cpp +++ b/src/script/qscriptecmaobject.cpp @@ -113,7 +113,7 @@ QScriptValueImpl Object::method_toString(QScriptContextPrivate *context, QScript QString s = QLatin1String("[object "); QScriptValueImpl self = context->thisObject(); s += self.classInfo()->name(); - s += QLatin1String("]"); + s += QLatin1Char(']'); return (QScriptValueImpl(eng, s)); } diff --git a/src/script/qscriptparser.cpp b/src/script/qscriptparser.cpp index 0b04df1..7408ec5 100644 --- a/src/script/qscriptparser.cpp +++ b/src/script/qscriptparser.cpp @@ -1148,9 +1148,9 @@ case 266: { error_message += QLatin1String (", "); first = false; - error_message += QLatin1String("`"); + error_message += QLatin1Char('`'); error_message += QLatin1String (spell [expected_tokens [s]]); - error_message += QLatin1String("'"); + error_message += QLatin1Char('\''); } } diff --git a/src/script/qscriptprettypretty.cpp b/src/script/qscriptprettypretty.cpp index 6ee1e55..b221b0a 100644 --- a/src/script/qscriptprettypretty.cpp +++ b/src/script/qscriptprettypretty.cpp @@ -73,13 +73,13 @@ PrettyPretty::~PrettyPretty() void PrettyPretty::acceptAsBlock(AST::Node *node) { - out << "{"; + out << '{'; pushIndentLevel(); newlineAndIndent(); accept(node); popIndentLevel(); newlineAndIndent(); - out << "}"; + out << '}'; } int PrettyPretty::operatorPrecedenceLevel(int op) @@ -230,8 +230,8 @@ void PrettyPretty::endVisit(AST::FalseLiteral *node) bool PrettyPretty::visit(AST::StringLiteral *node) { QString lit = QScriptEnginePrivate::toString(node->value); - lit.replace(QLatin1String("\\"), QLatin1String("\\\\")); - out << "\"" << lit << "\""; + lit.replace(QLatin1Char('\\'), QLatin1String("\\\\")); + out << '\"' << lit << '\"'; return false; } @@ -253,7 +253,7 @@ void PrettyPretty::endVisit(AST::NumericLiteral *node) bool PrettyPretty::visit(AST::RegExpLiteral *node) { - out << "/" << QScriptEnginePrivate::toString(node->pattern) << "/"; + out << '/' << QScriptEnginePrivate::toString(node->pattern) << '/'; if (node->flags) out << QScript::Ecma::RegExp::flagsToString(node->flags); @@ -267,10 +267,10 @@ void PrettyPretty::endVisit(AST::RegExpLiteral *node) bool PrettyPretty::visit(AST::ArrayLiteral *node) { - out << "["; + out << '['; accept(node->elements); accept(node->elision); - out << "]"; + out << ']'; return false; } @@ -281,7 +281,7 @@ void PrettyPretty::endVisit(AST::ArrayLiteral *node) bool PrettyPretty::visit(AST::ObjectLiteral *node) { - out << "{"; + out << '{'; if (node->properties) { pushIndentLevel(); AST::PropertyNameAndValueList *prop; @@ -289,12 +289,12 @@ bool PrettyPretty::visit(AST::ObjectLiteral *node) newlineAndIndent(); accept(prop); if (prop->next) - out << ","; + out << ','; } popIndentLevel(); newlineAndIndent(); } - out << "}"; + out << '}'; return false; } @@ -384,9 +384,9 @@ void PrettyPretty::endVisit(AST::NumericLiteralPropertyName *node) bool PrettyPretty::visit(AST::ArrayMemberExpression *node) { accept(node->base); - out << "["; + out << '['; accept(node->expression); - out << "]"; + out << ']'; return false; } @@ -398,7 +398,7 @@ void PrettyPretty::endVisit(AST::ArrayMemberExpression *node) bool PrettyPretty::visit(AST::FieldMemberExpression *node) { accept(node->base); - out << "." << QScriptEnginePrivate::toString(node->name); + out << '.' << QScriptEnginePrivate::toString(node->name); return false; } @@ -411,9 +411,9 @@ bool PrettyPretty::visit(AST::NewMemberExpression *node) { out << "new "; accept(node->base); - out << "("; + out << '('; accept(node->arguments); - out << ")"; + out << ')'; return false; } @@ -437,9 +437,9 @@ void PrettyPretty::endVisit(AST::NewExpression *node) bool PrettyPretty::visit(AST::CallExpression *node) { accept(node->base); - out << "("; + out << '('; accept(node->arguments); - out << ")"; + out << ')'; return false; } @@ -549,13 +549,13 @@ void PrettyPretty::endVisit(AST::PreDecrementExpression *node) bool PrettyPretty::visit(AST::UnaryPlusExpression *node) { - out << "+"; + out << '+'; bool needParens = (node->expression->binaryExpressionCast() != 0); if (needParens) - out << "("; + out << '('; accept(node->expression); if (needParens) - out << ")"; + out << ')'; return false; } @@ -566,13 +566,13 @@ void PrettyPretty::endVisit(AST::UnaryPlusExpression *node) bool PrettyPretty::visit(AST::UnaryMinusExpression *node) { - out << "-"; + out << '-'; bool needParens = (node->expression->binaryExpressionCast() != 0); if (needParens) - out << "("; + out << '('; accept(node->expression); if (needParens) - out << ")"; + out << ')'; return false; } @@ -583,13 +583,13 @@ void PrettyPretty::endVisit(AST::UnaryMinusExpression *node) bool PrettyPretty::visit(AST::TildeExpression *node) { - out << "~"; + out << '~'; bool needParens = (node->expression->binaryExpressionCast() != 0); if (needParens) - out << "("; + out << '('; accept(node->expression); if (needParens) - out << ")"; + out << ')'; return false; } @@ -600,13 +600,13 @@ void PrettyPretty::endVisit(AST::TildeExpression *node) bool PrettyPretty::visit(AST::NotExpression *node) { - out << "!"; + out << '!'; bool needParens = (node->expression->binaryExpressionCast() != 0); if (needParens) - out << "("; + out << '('; accept(node->expression); if (needParens) - out << ")"; + out << ')'; return false; } @@ -620,10 +620,10 @@ bool PrettyPretty::visit(AST::BinaryExpression *node) bool needParens = node->left->binaryExpressionCast() && (compareOperatorPrecedence(node->left->binaryExpressionCast()->op, node->op) < 0); if (needParens) - out << "("; + out << '('; accept(node->left); if (needParens) - out << ")"; + out << ')'; QString s; switch (node->op) { case QSOperator::Add: @@ -699,14 +699,14 @@ bool PrettyPretty::visit(AST::BinaryExpression *node) default: Q_ASSERT (0); } - out << " " << s << " "; + out << ' ' << s << ' '; needParens = node->right->binaryExpressionCast() && (compareOperatorPrecedence(node->right->binaryExpressionCast()->op, node->op) <= 0); if (needParens) - out << "("; + out << '('; accept(node->right); if (needParens) - out << ")"; + out << ')'; return false; } @@ -798,7 +798,7 @@ bool PrettyPretty::visit(AST::VariableStatement *node) void PrettyPretty::endVisit(AST::VariableStatement *node) { Q_UNUSED(node); - out << ";"; + out << ';'; } bool PrettyPretty::visit(AST::VariableDeclaration *node) @@ -819,7 +819,7 @@ void PrettyPretty::endVisit(AST::VariableDeclaration *node) bool PrettyPretty::visit(AST::EmptyStatement *node) { Q_UNUSED(node); - out << ";"; + out << ';'; return true; } @@ -831,7 +831,7 @@ void PrettyPretty::endVisit(AST::EmptyStatement *node) bool PrettyPretty::visit(AST::ExpressionStatement *node) { accept(node->expression); - out << ";"; + out << ';'; return false; } @@ -959,9 +959,9 @@ bool PrettyPretty::visit(AST::ContinueStatement *node) { out << "continue"; if (node->label) { - out << " " << QScriptEnginePrivate::toString(node->label); + out << ' ' << QScriptEnginePrivate::toString(node->label); } - out << ";"; + out << ';'; return false; } @@ -974,9 +974,9 @@ bool PrettyPretty::visit(AST::BreakStatement *node) { out << "break"; if (node->label) { - out << " " << QScriptEnginePrivate::toString(node->label); + out << ' ' << QScriptEnginePrivate::toString(node->label); } - out << ";"; + out << ';'; return false; } @@ -989,10 +989,10 @@ bool PrettyPretty::visit(AST::ReturnStatement *node) { out << "return"; if (node->expression) { - out << " "; + out << ' '; accept(node->expression); } - out << ";"; + out << ';'; return false; } @@ -1067,7 +1067,7 @@ bool PrettyPretty::visit(AST::CaseClause *node) { out << "case "; accept(node->expression); - out << ":"; + out << ':'; if (node->statements) { newlineAndIndent(); accept(node->statements); @@ -1109,7 +1109,7 @@ bool PrettyPretty::visit(AST::ThrowStatement *node) Q_UNUSED(node); out << "throw "; accept(node->expression); - out << ";"; + out << ';'; return false; } @@ -1166,10 +1166,10 @@ bool PrettyPretty::visit(AST::FunctionDeclaration *node) out << "function"; if (node->name) - out << " " << QScriptEnginePrivate::toString(node->name); + out << ' ' << QScriptEnginePrivate::toString(node->name); // the arguments - out << "("; + out << '('; for (AST::FormalParameterList *it = node->formals; it; it = it->next) { if (it->name) out << QScriptEnginePrivate::toString(it->name); @@ -1177,7 +1177,7 @@ bool PrettyPretty::visit(AST::FunctionDeclaration *node) if (it->next) out << ", "; } - out << ")"; + out << ')'; // the function body out << " {"; @@ -1190,7 +1190,7 @@ bool PrettyPretty::visit(AST::FunctionDeclaration *node) newlineAndIndent(); } - out << "}"; + out << '}'; return false; } @@ -1205,10 +1205,10 @@ bool PrettyPretty::visit(AST::FunctionExpression *node) out << "function"; if (node->name) - out << " " << QScriptEnginePrivate::toString(node->name); + out << ' ' << QScriptEnginePrivate::toString(node->name); // the arguments - out << "("; + out << '('; for (AST::FormalParameterList *it = node->formals; it; it = it->next) { if (it->name) out << QScriptEnginePrivate::toString(it->name); @@ -1216,7 +1216,7 @@ bool PrettyPretty::visit(AST::FunctionExpression *node) if (it->next) out << ", "; } - out << ")"; + out << ')'; // the function body out << " {"; @@ -1229,7 +1229,7 @@ bool PrettyPretty::visit(AST::FunctionExpression *node) newlineAndIndent(); } - out << "}"; + out << '}'; return false; } @@ -1320,7 +1320,7 @@ bool PrettyPretty::visit(AST::DebuggerStatement *node) void PrettyPretty::endVisit(AST::DebuggerStatement *node) { Q_UNUSED(node); - out << ";"; + out << ';'; } bool PrettyPretty::preVisit(AST::Node *node) diff --git a/src/script/qscriptsyntaxchecker.cpp b/src/script/qscriptsyntaxchecker.cpp index 9653bc1..74ca00f 100644 --- a/src/script/qscriptsyntaxchecker.cpp +++ b/src/script/qscriptsyntaxchecker.cpp @@ -186,9 +186,9 @@ SyntaxChecker::Result SyntaxChecker::checkSyntax(const QString &code) error_message += QLatin1String (", "); first = false; - error_message += QLatin1String("`"); + error_message += QLatin1Char('`'); error_message += QLatin1String (spell [expected_tokens [s]]); - error_message += QLatin1String("'"); + error_message += QLatin1Char('\''); } } diff --git a/src/script/qscriptvalueimpl.cpp b/src/script/qscriptvalueimpl.cpp index 15d1b8a..a890839 100644 --- a/src/script/qscriptvalueimpl.cpp +++ b/src/script/qscriptvalueimpl.cpp @@ -395,7 +395,7 @@ QDebug &operator<<(QDebug &d, const QScriptValueImpl &object) QScriptObject *od = object.objectValue(); for (int i=0; imemberCount(); ++i) { if (i != 0) - d << ","; + d << ','; QScript::Member m; od->member(i, &m); @@ -404,7 +404,7 @@ QDebug &operator<<(QDebug &d, const QScriptValueImpl &object) d << object.engine()->toString(m.nameId()); QScriptValueImpl o; od->get(m, &o); - d.nospace() << QLatin1String(":") + d.nospace() << QLatin1Char(':') << (o.classInfo() ? o.classInfo()->name() : QLatin1String("?")); @@ -415,14 +415,14 @@ QDebug &operator<<(QDebug &d, const QScriptValueImpl &object) QScriptValueImpl scope = object.scope(); while (scope.isValid()) { Q_ASSERT(scope.isObject()); - d.nospace() << " " << scope.objectValue(); + d.nospace() << ' ' << scope.objectValue(); scope = scope.scope(); } - d.nospace() << "}"; + d.nospace() << '}'; break; } - d << ")"; + d << ')'; return d; } diff --git a/src/script/qscriptxmlgenerator.cpp b/src/script/qscriptxmlgenerator.cpp index 131882b..163b60c 100644 --- a/src/script/qscriptxmlgenerator.cpp +++ b/src/script/qscriptxmlgenerator.cpp @@ -121,10 +121,10 @@ QTextStream &XmlGenerator::startTag(const QString &name, AST::Node *locationNode { pushIndentLevel(); newlineAndIndent(); - out << QLatin1String("<") << name; + out << QLatin1Char('<') << name; if (locationNode) - out << QLatin1String(" line=\"") << locationNode->startLine << QLatin1String("\""); - out << QLatin1String(">"); + out << QLatin1String(" line=\"") << locationNode->startLine << QLatin1Char('\"'); + out << QLatin1Char('>'); return out; } @@ -132,7 +132,7 @@ QTextStream &XmlGenerator::endTag(const QString &name) { newlineAndIndent(); popIndentLevel(); - out << QLatin1String(""); + out << QLatin1String("'); return out; } @@ -233,7 +233,7 @@ void XmlGenerator::endVisit(AST::NumericLiteral *) bool XmlGenerator::visit(AST::RegExpLiteral *node) { startTag(QLatin1String("regexp")); - out << QLatin1String("/") << escape(QScriptEnginePrivate::toString(node->pattern)) << QLatin1String("/"); + out << QLatin1Char('/') << escape(QScriptEnginePrivate::toString(node->pattern)) << QLatin1Char('/'); if (node->flags) out << QScript::Ecma::RegExp::flagsToString(node->flags); out << QLatin1String(""); diff --git a/src/scripttools/debugging/qscriptcompletiontask.cpp b/src/scripttools/debugging/qscriptcompletiontask.cpp index 119b96a..2f3c2cf 100644 --- a/src/scripttools/debugging/qscriptcompletiontask.cpp +++ b/src/scripttools/debugging/qscriptcompletiontask.cpp @@ -158,7 +158,7 @@ void QScriptCompletionTaskPrivate::completeScriptExpression() if (path.size() > 1) { const QString &topLevelIdent = path.at(0); QScriptValue obj; - if (topLevelIdent == QString::fromLatin1("this")) { + if (topLevelIdent == QLatin1String("this")) { obj = ctx->thisObject(); } else { QScriptValueList scopeChain; @@ -256,9 +256,9 @@ void QScriptCompletionTask::start() } QString argType = cmd->argumentTypes().value(argNum); if (!argType.isEmpty()) { - if (argType == QString::fromLatin1("command-or-group-name")) { + if (argType == QLatin1String("command-or-group-name")) { d->results = d->console->commandManager()->completions(arg); - } else if (argType == QString::fromLatin1("script-filename")) { + } else if (argType == QLatin1String("script-filename")) { // ### super-cheating for now; have to use the async API QScriptEngineDebuggerFrontend *edf = static_cast(d->frontend); QScriptDebuggerBackend *backend = edf->backend(); @@ -269,13 +269,13 @@ void QScriptCompletionTask::start() if (isPrefixOf(arg, fileName)) d->results.append(fileName); } - } else if (argType == QString::fromLatin1("subcommand-name")) { + } else if (argType == QLatin1String("subcommand-name")) { for (int i = 0; i < cmd->subCommands().size(); ++i) { QString name = cmd->subCommands().at(i); if (isPrefixOf(arg, name)) d->results.append(name); } - } else if (argType == QString::fromLatin1("script")) { + } else if (argType == QLatin1String("script")) { d->completeScriptExpression(); } if ((d->type == NoCompletion) && !d->results.isEmpty()) { diff --git a/src/scripttools/debugging/qscriptdebuggerbackend.cpp b/src/scripttools/debugging/qscriptdebuggerbackend.cpp index 3c29130..0771d0b 100644 --- a/src/scripttools/debugging/qscriptdebuggerbackend.cpp +++ b/src/scripttools/debugging/qscriptdebuggerbackend.cpp @@ -292,7 +292,7 @@ QScriptValue QScriptDebuggerBackendPrivate::trace(QScriptContext *context, QString str; for (int i = 0; i < context->argumentCount(); ++i) { if (i > 0) - str.append(QLatin1String(" ")); + str.append(QLatin1Char(' ')); str.append(context->argument(i).toString()); } QScriptDebuggerEvent e(QScriptDebuggerEvent::Trace); diff --git a/src/scripttools/debugging/qscriptdebuggerconsole.cpp b/src/scripttools/debugging/qscriptdebuggerconsole.cpp index 70bb8b1..546ec63 100644 --- a/src/scripttools/debugging/qscriptdebuggerconsole.cpp +++ b/src/scripttools/debugging/qscriptdebuggerconsole.cpp @@ -163,10 +163,10 @@ QScriptDebuggerConsoleCommandJob *QScriptDebuggerConsolePrivate::createJob( .arg(name)); for (int j = 0; j < completions.size(); ++j) { if (j > 0) - msg.append(QString::fromLatin1(", ")); + msg.append(QLatin1String(", ")); msg.append(completions.at(j)); } - msg.append(QString::fromLatin1(".")); + msg.append(QLatin1Char('.')); messageHandler->message(QtWarningMsg, msg); return 0; } diff --git a/src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp b/src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp index caeb971..e096ba8 100644 --- a/src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp +++ b/src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp @@ -807,7 +807,7 @@ QVariant QScriptDebuggerLocalsModel::data(const QModelIndex &index, int role) co QString str = node->property.valueAsString(); if (node->property.value().type() == QScriptDebuggerValue::StringValue) { // escape - str.replace(QLatin1String("\""), QLatin1String("\\\"")); + str.replace(QLatin1Char('\"'), QLatin1String("\\\"")); str.prepend(QLatin1Char('\"')); str.append(QLatin1Char('\"')); } diff --git a/src/sql/drivers/db2/qsql_db2.cpp b/src/sql/drivers/db2/qsql_db2.cpp index 11d0041..c7cbc9b 100644 --- a/src/sql/drivers/db2/qsql_db2.cpp +++ b/src/sql/drivers/db2/qsql_db2.cpp @@ -1666,7 +1666,7 @@ QVariant QDB2Driver::handle() const QString QDB2Driver::escapeIdentifier(const QString &identifier, IdentifierType) const { QString res = identifier; - if(!identifier.isEmpty() && identifier.left(1) != QString(QLatin1Char('"')) && identifier.right(1) != QString(QLatin1Char('"')) ) { + if(!identifier.isEmpty() && !identifier.startsWith(QLatin1Char('"')) && !identifier.endsWith(QLatin1Char('"')) ) { res.replace(QLatin1Char('"'), QLatin1String("\"\"")); res.prepend(QLatin1Char('"')).append(QLatin1Char('"')); res.replace(QLatin1Char('.'), QLatin1String("\".\"")); diff --git a/src/sql/drivers/ibase/qsql_ibase.cpp b/src/sql/drivers/ibase/qsql_ibase.cpp index 1645555..199ad8e 100644 --- a/src/sql/drivers/ibase/qsql_ibase.cpp +++ b/src/sql/drivers/ibase/qsql_ibase.cpp @@ -1732,7 +1732,7 @@ bool QIBaseDriver::subscribeToNotificationImplementation(const QString &name) eBuffer->resultBuffer); if (status[0] == 1 && status[1]) { - setLastError(QSqlError(QString(QLatin1String("Could not subscribe to event notifications for %1.")).arg(name))); + setLastError(QSqlError(QString::fromLatin1("Could not subscribe to event notifications for %1.").arg(name))); d->eventBuffers.remove(name); qFreeEventBuffer(eBuffer); return false; @@ -1760,7 +1760,7 @@ bool QIBaseDriver::unsubscribeFromNotificationImplementation(const QString &name isc_cancel_events(status, &d->ibase, &eBuffer->eventId); if (status[0] == 1 && status[1]) { - setLastError(QSqlError(QString(QLatin1String("Could not unsubscribe from event notifications for %1.")).arg(name))); + setLastError(QSqlError(QString::fromLatin1("Could not unsubscribe from event notifications for %1.").arg(name))); return false; } @@ -1818,7 +1818,7 @@ void QIBaseDriver::qHandleEventNotification(void *updatedResultBuffer) QString QIBaseDriver::escapeIdentifier(const QString &identifier, IdentifierType) const { QString res = identifier; - if(!identifier.isEmpty() && identifier.left(1) != QString(QLatin1Char('"')) && identifier.right(1) != QString(QLatin1Char('"')) ) { + if(!identifier.isEmpty() && !identifier.startsWith(QLatin1Char('"')) && !identifier.endsWith(QLatin1Char('"')) ) { res.replace(QLatin1Char('"'), QLatin1String("\"\"")); res.prepend(QLatin1Char('"')).append(QLatin1Char('"')); res.replace(QLatin1Char('.'), QLatin1String("\".\"")); diff --git a/src/sql/drivers/mysql/qsql_mysql.cpp b/src/sql/drivers/mysql/qsql_mysql.cpp index 53645c9..82ed124 100644 --- a/src/sql/drivers/mysql/qsql_mysql.cpp +++ b/src/sql/drivers/mysql/qsql_mysql.cpp @@ -1468,7 +1468,7 @@ QString QMYSQLDriver::formatValue(const QSqlField &field, bool trimStrings) cons QString QMYSQLDriver::escapeIdentifier(const QString &identifier, IdentifierType) const { QString res = identifier; - if(!identifier.isEmpty() && identifier.left(1) != QString(QLatin1Char('`')) && identifier.right(1) != QString(QLatin1Char('`')) ) { + if(!identifier.isEmpty() && !identifier.startsWith(QLatin1Char('`')) && !identifier.endsWith(QLatin1Char('`')) ) { res.prepend(QLatin1Char('`')).append(QLatin1Char('`')); res.replace(QLatin1Char('.'), QLatin1String("`.`")); } @@ -1478,12 +1478,9 @@ QString QMYSQLDriver::escapeIdentifier(const QString &identifier, IdentifierType bool QMYSQLDriver::isIdentifierEscapedImplementation(const QString &identifier, IdentifierType type) const { Q_UNUSED(type); - bool isLeftDelimited = (identifier.left(1) == QString(QLatin1Char('`'))); - bool isRightDelimited = (identifier.right(1) == QString(QLatin1Char('`'))); - if( identifier.size() > 2 && isLeftDelimited && isRightDelimited ) - return true; - else - return false; + return identifier.size() > 2 + && identifier.startsWith(QLatin1Char('`')) //left delimited + && identifier.endsWith(QLatin1Char('`')); //right delimited } QT_END_NAMESPACE diff --git a/src/sql/drivers/oci/qsql_oci.cpp b/src/sql/drivers/oci/qsql_oci.cpp index a7031b1..e6ee63d 100644 --- a/src/sql/drivers/oci/qsql_oci.cpp +++ b/src/sql/drivers/oci/qsql_oci.cpp @@ -2040,8 +2040,8 @@ bool QOCIDriver::open(const QString & db, QString connectionString = db; if (!hostname.isEmpty()) connectionString = - QString(QLatin1String("(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=%1)(Port=%2))" - "(CONNECT_DATA=(SID=%3)))")).arg(hostname).arg((port > -1 ? port : 1521)).arg(db); + QString::fromLatin1("(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=%1)(Port=%2))" + "(CONNECT_DATA=(SID=%3)))").arg(hostname).arg((port > -1 ? port : 1521)).arg(db); r = OCIHandleAlloc(d->env, reinterpret_cast(&d->srvhp), OCI_HTYPE_SERVER, 0, 0); if (r == OCI_SUCCESS) @@ -2219,7 +2219,7 @@ QStringList QOCIDriver::tables(QSql::TableType type) const while (t.next()) { if (t.value(0).toString().toUpper() != user.toUpper()) - tl.append(t.value(0).toString() + QLatin1String(".") + t.value(1).toString()); + tl.append(t.value(0).toString() + QLatin1Char('.') + t.value(1).toString()); else tl.append(t.value(1).toString()); } @@ -2235,7 +2235,7 @@ QStringList QOCIDriver::tables(QSql::TableType type) const "and owner != 'WMSYS'")); while (t.next()) { if (t.value(0).toString().toUpper() != d->user.toUpper()) - tl.append(t.value(0).toString() + QLatin1String(".") + t.value(1).toString()); + tl.append(t.value(0).toString() + QLatin1Char('.') + t.value(1).toString()); else tl.append(t.value(1).toString()); } @@ -2297,7 +2297,7 @@ QSqlRecord QOCIDriver::record(const QString& tablename) const else owner = owner.toUpper(); - tmpStmt += QLatin1String(" and owner='") + owner + QLatin1String("'"); + tmpStmt += QLatin1String(" and owner='") + owner + QLatin1Char('\''); t.setForwardOnly(true); t.exec(tmpStmt); if (!t.next()) { // try and see if the tablename is a synonym @@ -2352,7 +2352,7 @@ QSqlIndex QOCIDriver::primaryIndex(const QString& tablename) const else table = table.toUpper(); - tmpStmt = stmt + QLatin1String(" and a.table_name='") + table + QLatin1String("'"); + tmpStmt = stmt + QLatin1String(" and a.table_name='") + table + QLatin1Char('\''); if (owner.isEmpty()) { owner = d->user; } @@ -2362,7 +2362,7 @@ QSqlIndex QOCIDriver::primaryIndex(const QString& tablename) const else owner = owner.toUpper(); - tmpStmt += QLatin1String(" and a.owner='") + owner + QLatin1String("'"); + tmpStmt += QLatin1String(" and a.owner='") + owner + QLatin1Char('\''); t.setForwardOnly(true); t.exec(tmpStmt); @@ -2386,7 +2386,7 @@ QSqlIndex QOCIDriver::primaryIndex(const QString& tablename) const tt.exec(QLatin1String("select data_type from all_tab_columns where table_name='") + t.value(2).toString() + QLatin1String("' and column_name='") + t.value(0).toString() + QLatin1String("' and owner='") + - owner +QLatin1String("'")); + owner + QLatin1Char('\'')); if (!tt.next()) { return QSqlIndex(); } diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp index ee500a0..8eaa8bf 100644 --- a/src/sql/drivers/odbc/qsql_odbc.cpp +++ b/src/sql/drivers/odbc/qsql_odbc.cpp @@ -213,14 +213,14 @@ static QString qWarnODBCHandle(int handleType, SQLHANDLE handle, int *nativeCode static QString qODBCWarn(const QODBCPrivate* odbc, int *nativeCode = 0) { - return (qWarnODBCHandle(SQL_HANDLE_ENV, odbc->hEnv) + QLatin1String(" ") - + qWarnODBCHandle(SQL_HANDLE_DBC, odbc->hDbc) + QLatin1String(" ") + return (qWarnODBCHandle(SQL_HANDLE_ENV, odbc->hEnv) + QLatin1Char(' ') + + qWarnODBCHandle(SQL_HANDLE_DBC, odbc->hDbc) + QLatin1Char(' ') + qWarnODBCHandle(SQL_HANDLE_STMT, odbc->hStmt, nativeCode)); } static QString qODBCWarn(const QODBCDriverPrivate* odbc, int *nativeCode = 0) { - return (qWarnODBCHandle(SQL_HANDLE_ENV, odbc->hEnv) + QLatin1String(" ") + return (qWarnODBCHandle(SQL_HANDLE_ENV, odbc->hEnv) + QLatin1Char(' ') + qWarnODBCHandle(SQL_HANDLE_DBC, odbc->hDbc, nativeCode)); } @@ -2414,12 +2414,12 @@ QString QODBCDriver::escapeIdentifier(const QString &identifier, IdentifierType) { QString res = identifier; if (d->isMySqlServer) { - if(!identifier.isEmpty() && identifier.left(1) != QString(QLatin1Char('`')) && identifier.right(1) != QString(QLatin1Char('`')) ) { + if(!identifier.isEmpty() && !identifier.startsWith(QLatin1Char('`')) && !identifier.endsWith(QLatin1Char('`')) ) { res.prepend(QLatin1Char('`')).append(QLatin1Char('`')); res.replace(QLatin1Char('.'), QLatin1String("`.`")); } } else { - if(!identifier.isEmpty() && identifier.left(1) != QString(QLatin1Char('"')) && identifier.right(1) != QString(QLatin1Char('"')) ) { + if(!identifier.isEmpty() && !identifier.startsWith(QLatin1Char('"')) && !identifier.endsWith(QLatin1Char('"')) ) { res.replace(QLatin1Char('"'), QLatin1String("\"\"")); res.prepend(QLatin1Char('"')).append(QLatin1Char('"')); res.replace(QLatin1Char('.'), QLatin1String("\".\"")); @@ -2430,13 +2430,10 @@ QString QODBCDriver::escapeIdentifier(const QString &identifier, IdentifierType) bool QODBCDriver::isIdentifierEscapedImplementation(const QString &identifier, IdentifierType) const { - QString quote = d->quoteChar(); - bool isLeftDelimited = identifier.left(1) == quote; - bool isRightDelimited = identifier.right(1) == quote; - if( identifier.size() > 2 && isLeftDelimited && isRightDelimited ) - return true; - else - return false; + QChar quote = d->quoteChar(); + return identifier.size() > 2 + && identifier.startsWith(quote) //left delimited + && identifier.endsWith(quote); //right delimited } QT_END_NAMESPACE diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp index 16d19f1..ce0b8c5 100644 --- a/src/sql/drivers/psql/qsql_psql.cpp +++ b/src/sql/drivers/psql/qsql_psql.cpp @@ -541,7 +541,7 @@ bool QPSQLResult::prepare(const QString &query) qDeallocatePreparedStmt(d); const QString stmtId = qMakePreparedStmtId(); - const QString stmt = QString(QLatin1String("PREPARE %1 AS ")).arg(stmtId).append(qReplacePlaceholderMarkers(query)); + const QString stmt = QString::fromLatin1("PREPARE %1 AS ").arg(stmtId).append(qReplacePlaceholderMarkers(query)); PGresult *result = PQexec(d->driver->connection, d->driver->isUtf8 ? stmt.toUtf8().constData() @@ -570,9 +570,9 @@ bool QPSQLResult::exec() QString stmt; const QString params = qCreateParamString(boundValues(), d->q->driver()); if (params.isEmpty()) - stmt = QString(QLatin1String("EXECUTE %1")).arg(d->preparedStmtId); + stmt = QString::fromLatin1("EXECUTE %1").arg(d->preparedStmtId); else - stmt = QString(QLatin1String("EXECUTE %1 (%2)")).arg(d->preparedStmtId).arg(params); + stmt = QString::fromLatin1("EXECUTE %1 (%2)").arg(d->preparedStmtId).arg(params); d->result = PQexec(d->driver->connection, d->driver->isUtf8 ? stmt.toUtf8().constData() @@ -1102,12 +1102,12 @@ QString QPSQLDriver::formatValue(const QSqlField &field, bool trimStrings) const QTime tm = field.value().toDateTime().time(); // msecs need to be right aligned otherwise psql // interpretes them wrong - r = QLatin1String("'") + QString::number(dt.year()) + QLatin1String("-") - + QString::number(dt.month()) + QLatin1String("-") - + QString::number(dt.day()) + QLatin1String(" ") - + tm.toString() + QLatin1String(".") + r = QLatin1Char('\'') + QString::number(dt.year()) + QLatin1Char('-') + + QString::number(dt.month()) + QLatin1Char('-') + + QString::number(dt.day()) + QLatin1Char(' ') + + tm.toString() + QLatin1Char('.') + QString::number(tm.msec()).rightJustified(3, QLatin1Char('0')) - + QLatin1String("'"); + + QLatin1Char('\''); } else { r = QLatin1String("NULL"); } @@ -1162,7 +1162,7 @@ QString QPSQLDriver::formatValue(const QSqlField &field, bool trimStrings) const QString QPSQLDriver::escapeIdentifier(const QString &identifier, IdentifierType) const { QString res = identifier; - if(!identifier.isEmpty() && identifier.left(1) != QString(QLatin1Char('"')) && identifier.right(1) != QString(QLatin1Char('"')) ) { + if(!identifier.isEmpty() && !identifier.startsWith(QLatin1Char('"')) && !identifier.endsWith(QLatin1Char('"')) ) { res.replace(QLatin1Char('"'), QLatin1String("\"\"")); res.prepend(QLatin1Char('"')).append(QLatin1Char('"')); res.replace(QLatin1Char('.'), QLatin1String("\".\"")); @@ -1195,7 +1195,7 @@ bool QPSQLDriver::subscribeToNotificationImplementation(const QString &name) int socket = PQsocket(d->connection); if (socket) { - QString query = QString(QLatin1String("LISTEN %1")).arg(escapeIdentifier(name, QSqlDriver::TableName)); + QString query = QLatin1String("LISTEN ") + escapeIdentifier(name, QSqlDriver::TableName); if (PQresultStatus(PQexec(d->connection, d->isUtf8 ? query.toUtf8().constData() : query.toLocal8Bit().constData()) @@ -1227,7 +1227,7 @@ bool QPSQLDriver::unsubscribeFromNotificationImplementation(const QString &name) return false; } - QString query = QString(QLatin1String("UNLISTEN %1")).arg(escapeIdentifier(name, QSqlDriver::TableName)); + QString query = QLatin1String("UNLISTEN ") + escapeIdentifier(name, QSqlDriver::TableName); if (PQresultStatus(PQexec(d->connection, d->isUtf8 ? query.toUtf8().constData() : query.toLocal8Bit().constData()) diff --git a/src/sql/drivers/sqlite/qsql_sqlite.cpp b/src/sql/drivers/sqlite/qsql_sqlite.cpp index f732077..05d63ca 100644 --- a/src/sql/drivers/sqlite/qsql_sqlite.cpp +++ b/src/sql/drivers/sqlite/qsql_sqlite.cpp @@ -631,9 +631,9 @@ static QSqlIndex qGetTableInfo(QSqlQuery &q, const QString &tableName, bool only { QString schema; QString table(tableName); - int indexOfSeparator = tableName.indexOf(QLatin1String(".")); + int indexOfSeparator = tableName.indexOf(QLatin1Char('.')); if (indexOfSeparator > -1) { - schema = tableName.left(indexOfSeparator).append(QLatin1String(".")); + schema = tableName.left(indexOfSeparator).append(QLatin1Char('.')); table = tableName.mid(indexOfSeparator + 1); } q.exec(QLatin1String("PRAGMA ") + schema + QLatin1String("table_info ('") + table + QLatin1String("')")); diff --git a/src/sql/drivers/sqlite2/qsql_sqlite2.cpp b/src/sql/drivers/sqlite2/qsql_sqlite2.cpp index d0c6e18..cb72ff0 100644 --- a/src/sql/drivers/sqlite2/qsql_sqlite2.cpp +++ b/src/sql/drivers/sqlite2/qsql_sqlite2.cpp @@ -170,8 +170,8 @@ void QSQLite2ResultPrivate::init(const char **cnames, int numCols) //remove quotations around the field name if any QString fieldStr = QString::fromAscii(fieldName); - QString quote = QString::fromLatin1("\""); - if ( fieldStr.length() > 2 && fieldStr.left(1) == quote && fieldStr.right(1) == quote) { + QLatin1Char quote('\"'); + if ( fieldStr.length() > 2 && fieldStr.startsWith(quote) && fieldStr.endsWith(quote)) { fieldStr = fieldStr.mid(1); fieldStr.chop(1); } @@ -561,7 +561,7 @@ QVariant QSQLite2Driver::handle() const QString QSQLite2Driver::escapeIdentifier(const QString &identifier, IdentifierType /*type*/) const { QString res = identifier; - if(!identifier.isEmpty() && identifier.left(1) != QString(QLatin1Char('"')) && identifier.right(1) != QString(QLatin1Char('"')) ) { + if(!identifier.isEmpty() && !identifier.startsWith(QLatin1Char('"')) && !identifier.endsWith(QLatin1Char('"')) ) { res.replace(QLatin1Char('"'), QLatin1String("\"\"")); res.prepend(QLatin1Char('"')).append(QLatin1Char('"')); res.replace(QLatin1Char('.'), QLatin1String("\".\"")); diff --git a/src/sql/drivers/tds/qsql_tds.cpp b/src/sql/drivers/tds/qsql_tds.cpp index 515f0de..298b008 100644 --- a/src/sql/drivers/tds/qsql_tds.cpp +++ b/src/sql/drivers/tds/qsql_tds.cpp @@ -181,7 +181,7 @@ static int CS_PUBLIC qTdsMsgHandler (DBPROCESS* dbproc, } if (severity > 0) { - QString errMsg = QString(QLatin1String("%1 (%2)")).arg(QString::fromAscii(msgtext)).arg( + QString errMsg = QString::fromLatin1("%1 (%2)").arg(QString::fromAscii(msgtext)).arg( msgstate); p->addErrorMsg(errMsg); } @@ -211,8 +211,8 @@ static int CS_PUBLIC qTdsErrHandler(DBPROCESS* dbproc, } - QString errMsg = QString(QLatin1String("%1 %2\n")).arg(QString::fromAscii(dberrstr)).arg( - QString::fromAscii(oserrstr)); + QString errMsg = QString::fromLatin1("%1 %2\n").arg(QLatin1String(dberrstr)).arg( + QLatin1String(oserrstr)); errMsg += p->getErrorMsgs(); p->lastError = qMakeError(errMsg, QSqlError::UnknownError, dberr); p->clearErrorMsgs(); diff --git a/src/sql/kernel/qsqldriver.cpp b/src/sql/kernel/qsqldriver.cpp index 40bc0df..477d531 100644 --- a/src/sql/kernel/qsqldriver.cpp +++ b/src/sql/kernel/qsqldriver.cpp @@ -520,7 +520,7 @@ QString QSqlDriver::sqlStatement(StatementType type, const QString &tableName, continue; s.append(prepareIdentifier(rec.fieldName(i), QSqlDriver::FieldName, this)).append(QLatin1String(", ")); if (preparedStatement) - vals.append(QLatin1String("?")); + vals.append(QLatin1Char('?')); else vals.append(formatValue(rec.field(i))); vals.append(QLatin1String(", ")); @@ -530,7 +530,7 @@ QString QSqlDriver::sqlStatement(StatementType type, const QString &tableName, } else { vals.chop(2); // remove trailing comma s[s.length() - 2] = QLatin1Char(')'); - s.append(QLatin1String("VALUES (")).append(vals).append(QLatin1String(")")); + s.append(QLatin1String("VALUES (")).append(vals).append(QLatin1Char(')')); } break; } } @@ -625,10 +625,7 @@ QString QSqlDriver::formatValue(const QSqlField &field, bool trimStrings) const break; } case QVariant::Bool: - if (field.value().toBool()) - r = QLatin1String("1"); - else - r = QLatin1String("0"); + r = QString::number(field.value().toBool()); break; case QVariant::ByteArray : { if (hasFeature(BLOB)) { @@ -884,12 +881,9 @@ QStringList QSqlDriver::subscribedToNotificationsImplementation() const bool QSqlDriver::isIdentifierEscapedImplementation(const QString &identifier, IdentifierType type) const { Q_UNUSED(type); - bool isLeftDelimited = identifier.left(1) == QString(QLatin1Char('"')); - bool isRightDelimited = identifier.right(1) == QString(QLatin1Char('"')); - if( identifier.size() > 2 && isLeftDelimited && isRightDelimited ) - return true; - else - return false; + return identifier.size() > 2 + && identifier.startsWith(QLatin1Char('"')) //left delimited + && identifier.endsWith(QLatin1Char('"')); //right delimited } /*! diff --git a/src/sql/kernel/qsqlerror.cpp b/src/sql/kernel/qsqlerror.cpp index 14fc050..b1fa6e2 100644 --- a/src/sql/kernel/qsqlerror.cpp +++ b/src/sql/kernel/qsqlerror.cpp @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE QDebug operator<<(QDebug dbg, const QSqlError &s) { dbg.nospace() << "QSqlError(" << s.number() << ", " << s.driverText() << - ", " << s.databaseText() << ")"; + ", " << s.databaseText() << ')'; return dbg.space(); } #endif diff --git a/src/sql/kernel/qsqlfield.cpp b/src/sql/kernel/qsqlfield.cpp index 8a808b6..46a5135 100644 --- a/src/sql/kernel/qsqlfield.cpp +++ b/src/sql/kernel/qsqlfield.cpp @@ -514,8 +514,8 @@ QDebug operator<<(QDebug dbg, const QSqlField &f) if (f.typeID() >= 0) dbg.nospace() << ", typeID: " << f.typeID(); if (!f.defaultValue().isNull()) - dbg.nospace() << ", auto-value: \"" << f.defaultValue() << "\""; - dbg.nospace() << ")"; + dbg.nospace() << ", auto-value: \"" << f.defaultValue() << '\"'; + dbg.nospace() << ')'; return dbg.space(); #else qWarning("This compiler doesn't support streaming QSqlField to QDebug"); diff --git a/src/sql/kernel/qsqlrecord.cpp b/src/sql/kernel/qsqlrecord.cpp index 0162664..95f6020 100644 --- a/src/sql/kernel/qsqlrecord.cpp +++ b/src/sql/kernel/qsqlrecord.cpp @@ -589,7 +589,7 @@ void QSqlRecord::detach() #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug dbg, const QSqlRecord &r) { - dbg << "QSqlRecord(" << r.count() << ")"; + dbg << "QSqlRecord(" << r.count() << ')'; for (int i = 0; i < r.count(); ++i) dbg << '\n' << QString::fromLatin1("%1:").arg(i, 2) << r.field(i) << r.value(i).toString(); return dbg; diff --git a/src/sql/models/qsqlrelationaltablemodel.cpp b/src/sql/models/qsqlrelationaltablemodel.cpp index 12eae84..1b8fb4c 100644 --- a/src/sql/models/qsqlrelationaltablemodel.cpp +++ b/src/sql/models/qsqlrelationaltablemodel.cpp @@ -573,7 +573,7 @@ QString QSqlRelationalTableModel::selectStatement() const } // this needs fixing!! the below if is borken. - tables.append(relation.tableName().append(QLatin1String(" ")).append(relTableAlias)); + tables.append(relation.tableName().append(QLatin1Char(' ')).append(relTableAlias)); if(!where.isEmpty()) where.append(QLatin1String(" AND ")); where.append(d->relationField(tableName(), d->db.driver()->escapeIdentifier(rec.fieldName(i), QSqlDriver::FieldName))); diff --git a/src/svg/qsvggenerator.cpp b/src/svg/qsvggenerator.cpp index 2d351ff..d51636f 100644 --- a/src/svg/qsvggenerator.cpp +++ b/src/svg/qsvggenerator.cpp @@ -362,7 +362,7 @@ public: translate_dashPattern(spen.dashPattern(), penWidth, &dashPattern); // SVG uses absolute offset - dashOffset = QString::fromLatin1("%1").arg(spen.dashOffset() * penWidth); + dashOffset = QString::number(spen.dashOffset() * penWidth); d_func()->attributes.stroke = color; d_func()->attributes.strokeOpacity = colorOpacity; @@ -403,8 +403,8 @@ public: } switch (spen.joinStyle()) { case Qt::MiterJoin: - stream() << "stroke-linejoin=\"miter\" "; - stream() << "stroke-miterlimit=\""<attributes.fill = color; d_func()->attributes.fillOpacity = colorOpacity; @@ -493,9 +493,9 @@ public: d->attributes.font_style = d->font.italic() ? QLatin1String("italic") : QLatin1String("normal"); *d->stream << "font-family=\"" << d->attributes.font_family << "\" " - << "font-size=\"" << d->attributes.font_size << "\" " - << "font-weight=\"" << d->attributes.font_weight << "\" " - << "font-style=\"" << d->attributes.font_style << "\" " + "font-size=\"" << d->attributes.font_size << "\" " + "font-weight=\"" << d->attributes.font_weight << "\" " + "font-style=\"" << d->attributes.font_style << "\" " << endl; } }; @@ -849,13 +849,13 @@ bool QSvgPaintEngine::begin(QPaintDevice *) } if (d->viewBox.isValid()) { - *d->stream << " viewBox=\"" << d->viewBox.left() << " " << d->viewBox.top(); - *d->stream << " " << d->viewBox.width() << " " << d->viewBox.height() << "\"" << endl; + *d->stream << " viewBox=\"" << d->viewBox.left() << ' ' << d->viewBox.top(); + *d->stream << ' ' << d->viewBox.width() << ' ' << d->viewBox.height() << '\"' << endl; } *d->stream << " xmlns=\"http://www.w3.org/2000/svg\"" - << " xmlns:xlink=\"http://www.w3.org/1999/xlink\" " - << " version=\"1.2\" baseProfile=\"tiny\">" << endl; + " xmlns:xlink=\"http://www.w3.org/1999/xlink\" " + " version=\"1.2\" baseProfile=\"tiny\">" << endl; if (!d->attributes.document_title.isEmpty()) { *d->stream << "" << d->attributes.document_title << "" << endl; @@ -918,10 +918,10 @@ void QSvgPaintEngine::drawImage(const QRectF &r, const QImage &image, Q_UNUSED(sr); Q_UNUSED(flags); stream() << "\n"; + <<"\" />\n"; } void QSvgPaintEngine::updateState(const QPaintEngineState &state) @@ -958,10 +957,10 @@ void QSvgPaintEngine::updateState(const QPaintEngineState &state) if (flags & QPaintEngine::DirtyTransform) { d->matrix = state.matrix(); - *d->stream << "transform=\"matrix(" << d->matrix.m11() << "," - << d->matrix.m12() << "," - << d->matrix.m21() << "," << d->matrix.m22() << "," - << d->matrix.dx() << "," << d->matrix.dy() + *d->stream << "transform=\"matrix(" << d->matrix.m11() << ',' + << d->matrix.m12() << ',' + << d->matrix.m21() << ',' << d->matrix.m22() << ',' + << d->matrix.dx() << ',' << d->matrix.dy() << ")\"" << endl; } @@ -975,7 +974,7 @@ void QSvgPaintEngine::updateState(const QPaintEngineState &state) stream() << "opacity=\""<stream << ">" << endl; + *d->stream << '>' << endl; d->afterFirstUpdate = true; } @@ -984,10 +983,8 @@ void QSvgPaintEngine::drawPath(const QPainterPath &p) { Q_D(QSvgPaintEngine); - *d->stream << "stream << "fill-rule="; + *d->stream << "stream << "M" << e.x << "," << e.y; + *d->stream << 'M' << e.x << ',' << e.y; break; case QPainterPath::LineToElement: - *d->stream << "L" << e.x << "," << e.y; + *d->stream << 'L' << e.x << ',' << e.y; break; case QPainterPath::CurveToElement: - *d->stream << "C" << e.x << "," << e.y; + *d->stream << 'C' << e.x << ',' << e.y; ++i; while (i < p.elementCount()) { const QPainterPath::Element &e = p.elementAt(i); @@ -1013,8 +1010,8 @@ void QSvgPaintEngine::drawPath(const QPainterPath &p) --i; break; } else - *d->stream << " "; - *d->stream << e.x << "," << e.y; + *d->stream << ' '; + *d->stream << e.x << ',' << e.y; ++i; } break; @@ -1022,7 +1019,7 @@ void QSvgPaintEngine::drawPath(const QPainterPath &p) break; } if (i != p.elementCount() - 1) { - *d->stream << " "; + *d->stream << ' '; } } @@ -1044,7 +1041,7 @@ void QSvgPaintEngine::drawPolygon(const QPointF *points, int pointCount, stream() << "" <stream << "attributes.stroke << "\" " - << "fill-opacity=\"" << d->attributes.strokeOpacity << "\" " - << "stroke=\"none\" " - << "x=\"" << pt.x() << "\" y=\"" << pt.y() << "\" "; + "fill=\"" << d->attributes.stroke << "\" " + "fill-opacity=\"" << d->attributes.strokeOpacity << "\" " + "stroke=\"none\" " + "x=\"" << pt.x() << "\" y=\"" << pt.y() << "\" "; qfontToSvg(textItem.font()); *d->stream << " >" << Qt::escape(s) diff --git a/src/testlib/qbenchmark_p.h b/src/testlib/qbenchmark_p.h index 8bb6e84..b6340f8 100644 --- a/src/testlib/qbenchmark_p.h +++ b/src/testlib/qbenchmark_p.h @@ -81,7 +81,7 @@ struct QBenchmarkContext QString toString() const { - QString s = QString(QLatin1String("%1,%2,%3")).arg(slotName).arg(tag).arg(checkpointIndex); + QString s = QString::fromLatin1("%1,%2,%3").arg(slotName).arg(tag).arg(checkpointIndex); return s; } diff --git a/src/testlib/qbenchmarkvalgrind.cpp b/src/testlib/qbenchmarkvalgrind.cpp index bcce147..c61460d 100644 --- a/src/testlib/qbenchmarkvalgrind.cpp +++ b/src/testlib/qbenchmarkvalgrind.cpp @@ -133,12 +133,12 @@ QString QBenchmarkValgrindUtils::getNewestFileName() QString base = QBenchmarkGlobalData::current->callgrindOutFileBase; Q_ASSERT(!base.isEmpty()); - nameFilters << QString(QLatin1String("%1.*")).arg(base); + nameFilters << QString::fromLatin1("%1.*").arg(base); QFileInfoList fiList = QDir().entryInfoList(nameFilters, QDir::Files | QDir::Readable); Q_ASSERT(!fiList.empty()); int hiSuffix = -1; QFileInfo lastFileInfo; - const QString pattern = QString(QLatin1String("%1.(\\d+)")).arg(base); + const QString pattern = QString::fromLatin1("%1.(\\d+)").arg(base); const QRegExp rx(pattern); foreach (QFileInfo fileInfo, fiList) { const int index = rx.indexIn(fileInfo.fileName()); @@ -168,8 +168,8 @@ void QBenchmarkValgrindUtils::cleanup() QString base = QBenchmarkGlobalData::current->callgrindOutFileBase; Q_ASSERT(!base.isEmpty()); nameFilters - << QString(QLatin1String("%1")).arg(base) // overall summary - << QString(QLatin1String("%1.*")).arg(base); // individual dumps + << base // overall summary + << QString::fromLatin1("%1.*").arg(base); // individual dumps QFileInfoList fiList = QDir().entryInfoList(nameFilters, QDir::Files | QDir::Readable); foreach (QFileInfo fileInfo, fiList) { const bool removeOk = QFile::remove(fileInfo.fileName()); @@ -180,7 +180,7 @@ void QBenchmarkValgrindUtils::cleanup() QString QBenchmarkValgrindUtils::outFileBase(qint64 pid) { - return QString(QLatin1String("callgrind.out.%1")).arg( + return QString::fromLatin1("callgrind.out.%1").arg( pid != -1 ? pid : QCoreApplication::applicationPid()); } diff --git a/src/testlib/qplaintestlogger.cpp b/src/testlib/qplaintestlogger.cpp index 6f10d72..8ffdca2 100644 --- a/src/testlib/qplaintestlogger.cpp +++ b/src/testlib/qplaintestlogger.cpp @@ -216,9 +216,9 @@ namespace QTest { template QString formatResult(T number, int significantDigits) { if (number < T(0)) - return QString(QLatin1String("NAN")); + return QLatin1String("NAN"); if (number == T(0)) - return QString(QLatin1String("0")); + return QLatin1String("0"); QString beforeDecimalPoint = QString::number(qint64(number), 'f', 0); QString afterDecimalPoint = QString::number(number, 'f', 20); diff --git a/src/testlib/qsignaldumper.cpp b/src/testlib/qsignaldumper.cpp index 0a32a6d..3a9d75e 100644 --- a/src/testlib/qsignaldumper.cpp +++ b/src/testlib/qsignaldumper.cpp @@ -87,7 +87,7 @@ static void qSignalDumperCallback(QObject *caller, int method_index, void **argv str.fill(' ', QTest::iLevel++ * QTest::IndentSpacesCount); str += "Signal: "; str += mo->className(); - str += "("; + str += '('; QString objname = caller->objectName(); str += objname.toLocal8Bit(); @@ -114,15 +114,15 @@ static void qSignalDumperCallback(QObject *caller, int method_index, void **argv str.append(QByteArray::number(addr, 16)); } else if (typeId != QMetaType::Void) { str.append(arg) - .append("(") + .append('(') .append(QVariant(typeId, argv[i + 1]).toString().toLocal8Bit()) - .append(")"); + .append(')'); } str.append(", "); } if (str.endsWith(", ")) str.chop(2); - str.append(")"); + str.append(')'); qPrintMessage(str); } @@ -143,7 +143,7 @@ static void qSignalDumperCallbackSlot(QObject *caller, int method_index, void ** str.fill(' ', QTest::iLevel * QTest::IndentSpacesCount); str += "Slot: "; str += mo->className(); - str += "("; + str += '('; QString objname = caller->objectName(); str += objname.toLocal8Bit(); diff --git a/src/tools/idc/main.cpp b/src/tools/idc/main.cpp index eb04114..8d2f0cc 100644 --- a/src/tools/idc/main.cpp +++ b/src/tools/idc/main.cpp @@ -50,8 +50,8 @@ QT_BEGIN_NAMESPACE static QString quotePath(const QString &s) { - if (!s.startsWith(QLatin1String("\"")) && s.contains(QLatin1Char(' '))) - return QLatin1String("\"") + s + QLatin1String("\""); + if (!s.startsWith(QLatin1Char('\"')) && s.contains(QLatin1Char(' '))) + return QLatin1Char('\"') + s + QLatin1Char('\"'); return s; } @@ -282,7 +282,7 @@ int runIdc(int argc, char **argv) fprintf(stderr, "Server unregistered successfully!\n"); return 0; } else if (p[0] == QLatin1Char('/') || p[0] == QLatin1Char('-')) { - error = QLatin1String("Unknown option \"") + p + QLatin1String("\""); + error = QLatin1String("Unknown option \"") + p + QLatin1Char('\"'); break; } else { input = QLatin1String(argv[i]); diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp index ae8a76e..e94bb77 100644 --- a/src/tools/moc/generator.cpp +++ b/src/tools/moc/generator.cpp @@ -1161,8 +1161,8 @@ void Generator::_generateFunctions(QList &list, int type) for (int j = 0; j < f.arguments.count(); ++j) { const ArgumentDef &a = f.arguments.at(j); if (j) { - sig += ","; - arguments += ","; + sig += ','; + arguments += ','; } sig += a.normalizedType; arguments += a.name; diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp index a6a0ba1..8ca2823 100644 --- a/src/tools/moc/moc.cpp +++ b/src/tools/moc/moc.cpp @@ -752,14 +752,14 @@ void Moc::generate(FILE *out) if (!noInclude) { - if (includePath.size() && includePath.right(1) != "/") - includePath += "/"; + if (includePath.size() && !includePath.endsWith('/')) + includePath += '/'; for (int i = 0; i < includeFiles.size(); ++i) { QByteArray inc = includeFiles.at(i); if (inc[0] != '<' && inc[0] != '"') { if (includePath.size() && includePath != "./") inc.prepend(includePath); - inc = "\"" + inc + "\""; + inc = '\"' + inc + '\"'; } fprintf(out, "#include %s\n", inc.constData()); } diff --git a/src/tools/moc/preprocessor.cpp b/src/tools/moc/preprocessor.cpp index 45cbbfd..3260ca2 100644 --- a/src/tools/moc/preprocessor.cpp +++ b/src/tools/moc/preprocessor.cpp @@ -807,7 +807,7 @@ void Preprocessor::preprocess(const QByteArray &filename, Symbols &preprocessed) continue; QByteArray frameworkCandidate = include.left(slashPos); frameworkCandidate.append(".framework/Headers/"); - fi.setFile(QString::fromLocal8Bit(p.path + "/" + frameworkCandidate), QString::fromLocal8Bit(include.mid(slashPos + 1))); + fi.setFile(QString::fromLocal8Bit(p.path + '/' + frameworkCandidate), QString::fromLocal8Bit(include.mid(slashPos + 1))); } else { fi.setFile(QString::fromLocal8Bit(p.path), QString::fromLocal8Bit(include)); } diff --git a/src/tools/uic/cpp/cppwriteicondata.cpp b/src/tools/uic/cpp/cppwriteicondata.cpp index 53b108f..08d552d 100644 --- a/src/tools/uic/cpp/cppwriteicondata.cpp +++ b/src/tools/uic/cpp/cppwriteicondata.cpp @@ -161,9 +161,9 @@ void WriteIconData::writeImage(QTextStream &output, const QString &indent, DomIm for (a = 0; a < (int) (data.length()/2)-1; a++) { output << "0x" << QString(data[2*a]) << QString(data[2*a+1]) << ','; if (a % 12 == 11) - output << "\n" << indent; + output << '\n' << indent; else - output << " "; + output << ' '; } output << "0x" << QString(data[2*a]) << QString(data[2*a+1]) << '\n'; output << "};\n\n"; diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp index 47566ad..5a2f487 100644 --- a/src/tools/uic/cpp/cppwriteinitialization.cpp +++ b/src/tools/uic/cpp/cppwriteinitialization.cpp @@ -2813,7 +2813,7 @@ QString WriteInitialization::Item::writeSetupUi(const QString &parent, Item::Emp bool generateMultiDirective = false; if (emptyItemPolicy == Item::ConstructItemOnly && m_children.size() == 0) { if (m_setupUiData.policy == ItemData::DontGenerate) { - m_setupUiStream << m_indent << "new " << m_itemClassName << "(" << parent << ");\n"; + m_setupUiStream << m_indent << "new " << m_itemClassName << '(' << parent << ");\n"; return QString(); } else if (m_setupUiData.policy == ItemData::GenerateWithMultiDirective) { generateMultiDirective = true; @@ -2824,11 +2824,11 @@ QString WriteInitialization::Item::writeSetupUi(const QString &parent, Item::Emp generateMultiDirectiveBegin(m_setupUiStream, m_setupUiData.directives); const QString uniqueName = m_driver->unique(QLatin1String("__") + m_itemClassName.toLower()); - m_setupUiStream << m_indent << m_itemClassName << " *" << uniqueName << " = new " << m_itemClassName << "(" << parent << ");\n"; + m_setupUiStream << m_indent << m_itemClassName << " *" << uniqueName << " = new " << m_itemClassName << '(' << parent << ");\n"; if (generateMultiDirective) { m_setupUiStream << "#else\n"; - m_setupUiStream << m_indent << "new " << m_itemClassName << "(" << parent << ");\n"; + m_setupUiStream << m_indent << "new " << m_itemClassName << '(' << parent << ");\n"; generateMultiDirectiveEnd(m_setupUiStream, m_setupUiData.directives); } diff --git a/src/tools/uic3/embed.cpp b/src/tools/uic3/embed.cpp index 882328a..b406c1f 100644 --- a/src/tools/uic3/embed.cpp +++ b/src/tools/uic3/embed.cpp @@ -238,7 +238,7 @@ void Ui3Reader::embed(const char *project, const QStringList &images) out << "true, "; else out << "false, "; - out << "\"" << e->name << "\" },\n"; + out << '\"' << e->name << "\" },\n"; delete e; } #ifndef QT_NO_IMAGE_COLLECTION_COMPRESSION diff --git a/src/tools/uic3/form.cpp b/src/tools/uic3/form.cpp index d9e968b..b484210 100644 --- a/src/tools/uic3/form.cpp +++ b/src/tools/uic3/form.cpp @@ -185,14 +185,14 @@ void Ui3Reader::createFormDecl(const QDomElement &e, bool implicitIncludes) for (it = globalIncludes.constBegin(); it != globalIncludes.constEnd(); ++it) { if (!(*it).isEmpty()) { QString header = fixHeaderName(*it); - out << "#include <" << header << ">" << endl; + out << "#include <" << header << '>' << endl; } } localIncludes = unique(localIncludes); for (it = localIncludes.constBegin(); it != localIncludes.constEnd(); ++it) { if (!(*it).isEmpty()) { QString header = fixHeaderName(*it); - out << "#include \"" << header << "\"" << endl; + out << "#include \"" << header << '\"' << endl; } } out << endl; @@ -216,7 +216,7 @@ void Ui3Reader::createFormDecl(const QDomElement &e, bool implicitIncludes) typeDefs = unique(typeDefs); for (it = typeDefs.constBegin(); it != typeDefs.constEnd(); ++it) { if (!(*it).isEmpty()) - out << "typedef " << *it << ";" << endl; + out << "typedef " << *it << ';' << endl; } nl = e.parentNode().toElement().elementsByTagName(QLatin1String("forward")); @@ -236,17 +236,17 @@ void Ui3Reader::createFormDecl(const QDomElement &e, bool implicitIncludes) out << "namespace " << *ns << " {" << endl; ++ns; } - out << "class " << forwardName << ";" << endl; + out << "class " << forwardName << ';' << endl; for (int i = 0; i < (int) forwardNamespaces.count(); i++) - out << "}" << endl; + out << '}' << endl; } } for (it = forwardDecl2.constBegin(); it != forwardDecl2.constEnd(); ++it) { QString fd = *it; fd = fd.trimmed(); - if (!fd.endsWith(QLatin1String(";"))) - fd += QLatin1String(";"); + if (!fd.endsWith(QLatin1Char(';'))) + fd += QLatin1Char(';'); out << fd << endl; } @@ -279,7 +279,7 @@ void Ui3Reader::createWrapperDecl(const QDomElement &e, const QString &converted out << "#ifndef " << protector << endl; out << "#define " << protector << endl; out << endl; - out << "#include \"" << convertedUiFile << "\"" << endl; + out << "#include \"" << convertedUiFile << '\"' << endl; createWrapperDeclContents(e); out << endl; @@ -309,8 +309,8 @@ void Ui3Reader::createWrapperDeclContents(const QDomElement &e) out << "class "; if (!exportMacro.isEmpty()) - out << exportMacro << " "; - out << bareNameOfClass << " : public " << objClass << ", public Ui::" << bareNameOfClass << endl << "{" << endl; + out << exportMacro << ' '; + out << bareNameOfClass << " : public " << objClass << ", public Ui::" << bareNameOfClass << endl << '{' << endl; /* qmake ignore Q_OBJECT */ out << " Q_OBJECT" << endl; @@ -362,8 +362,8 @@ void Ui3Reader::createWrapperDeclContents(const QDomElement &e) continue; QString returnType = n.attribute(QLatin1String("returnType"), QLatin1String("void")); QString functionName = n.firstChild().toText().data().trimmed(); - if (functionName.endsWith(QLatin1String(";"))) - functionName = functionName.left(functionName.length() - 1); + if (functionName.endsWith(QLatin1Char(';'))) + functionName.chop(1); QString specifier = n.attribute(QLatin1String("specifier")); QString access = n.attribute(QLatin1String("access")); if (access == QLatin1String(QLatin1String("protected"))) { @@ -394,8 +394,8 @@ void Ui3Reader::createWrapperDeclContents(const QDomElement &e) continue; QString returnType = n.attribute(QLatin1String("returnType"), QLatin1String("void")); QString functionName = n.firstChild().toText().data().trimmed(); - if (functionName.endsWith(QLatin1String(";"))) - functionName = functionName.left(functionName.length() - 1); + if (functionName.endsWith(QLatin1Char(';'))) + functionName.chop(1); QString specifier = n.attribute(QLatin1String("specifier")); QString access = n.attribute(QLatin1String("access")); if (access == QLatin1String("protected")) { @@ -423,8 +423,8 @@ void Ui3Reader::createWrapperDeclContents(const QDomElement &e) // continue; QString access = n.attribute(QLatin1String("access"), QLatin1String("protected")); QString var = fixDeclaration(n.firstChild().toText().data().trimmed()); - if (!var.endsWith(QLatin1String(";"))) - var += QLatin1String(";"); + if (!var.endsWith(QLatin1Char(';'))) + var += QLatin1Char(';'); if (access == QLatin1String("public")) publicVars += var; else if (access == QLatin1String("private")) @@ -458,7 +458,7 @@ void Ui3Reader::createWrapperDeclContents(const QDomElement &e) if (n.attribute(QLatin1String("language"), QLatin1String("C++")) != QLatin1String("C++")) continue; QString sigName = n.firstChild().toText().data().trimmed(); - if (sigName.endsWith(QLatin1String(";"))) + if (sigName.endsWith(QLatin1Char(';'))) sigName = sigName.left(sigName.length() - 1); extraSignals += fixDeclaration(sigName); } @@ -467,7 +467,7 @@ void Ui3Reader::createWrapperDeclContents(const QDomElement &e) if (!extraSignals.isEmpty()) { out << "signals:" << endl; for (it = extraSignals.constBegin(); it != extraSignals.constEnd(); ++it) - out << " void " << (*it) << ";" << endl; + out << " void " << (*it) << ';' << endl; out << endl; } @@ -513,7 +513,7 @@ void Ui3Reader::createWrapperDeclContents(const QDomElement &e) out << "};" << endl; for (i = 0; i < (int) namespaces.count(); i++) - out << "}" << endl; + out << '}' << endl; out << endl; } @@ -543,7 +543,7 @@ void Ui3Reader::writeFunctionsDecl(const QStringList &fuLst, const QStringList & signature = fixDeclaration(signature); type = fixType(type); - out << " " << specifier << type << " " << signature << pure << ";" << endl; + out << " " << specifier << type << ' ' << signature << pure << ';' << endl; } out << endl; } @@ -583,8 +583,8 @@ void Ui3Reader::createFormImpl(const QDomElement &e) if (n.attribute(QLatin1String("language"), QLatin1String("C++")) != QLatin1String("C++")) continue; QString functionName = n.firstChild().toText().data().trimmed(); - if (functionName.endsWith(QLatin1String(";"))) - functionName = functionName.left(functionName.length() - 1); + if (functionName.endsWith(QLatin1Char(';'))) + functionName.chop(1); extraFuncts += functionName; extraFunctTyp += n.attribute(QLatin1String("returnType"), QLatin1String("void")); extraFunctSpecifier += n.attribute(QLatin1String("specifier"), QLatin1String("virtual")); @@ -598,8 +598,8 @@ void Ui3Reader::createFormImpl(const QDomElement &e) if (n.attribute(QLatin1String("language"), QLatin1String("C++")) != QLatin1String("C++")) continue; QString functionName = n.firstChild().toText().data().trimmed(); - if (functionName.endsWith(QLatin1String(";"))) - functionName = functionName.left(functionName.length() - 1); + if (functionName.endsWith(QLatin1Char(';'))) + functionName.chop(1); extraFuncts += functionName; extraFunctTyp += n.attribute(QLatin1String("returnType"), QLatin1String("void")); extraFunctSpecifier += n.attribute(QLatin1String("specifier"), QLatin1String("virtual")); @@ -663,7 +663,7 @@ void Ui3Reader::createFormImpl(const QDomElement &e) globalIncludes = unique(globalIncludes); for (it = globalIncludes.begin(); it != globalIncludes.end(); ++it) { if (!(*it).isEmpty()) - out << "#include <" << fixHeaderName(*it) << ">" << endl; + out << "#include <" << fixHeaderName(*it) << '>' << endl; } if (externPixmaps) { @@ -677,14 +677,14 @@ void Ui3Reader::createFormImpl(const QDomElement &e) localIncludes = unique(localIncludes); for (it = localIncludes.begin(); it != localIncludes.end(); ++it) { if (!(*it).isEmpty() && *it != QFileInfo(fileName + QLatin1String(".h")).fileName()) - out << "#include \"" << fixHeaderName(*it) << "\"" << endl; + out << "#include \"" << fixHeaderName(*it) << '\"' << endl; } QString uiDotH = fileName + QLatin1String(".h"); if (QFile::exists(uiDotH)) { if (!outputFileName.isEmpty()) uiDotH = QString::fromUtf8(combinePath(uiDotH.ascii(), outputFileName.ascii())); - out << "#include \"" << uiDotH << "\"" << endl; + out << "#include \"" << uiDotH << '\"' << endl; writeFunctImpl = false; } @@ -702,7 +702,7 @@ void Ui3Reader::createFormImpl(const QDomElement &e) out << " * name 'name' and widget flags set to 'f'." << endl; out << " *" << endl; out << " * The " << objClass.mid(1).toLower() << " will by default be modeless, unless you set 'modal' to" << endl; - out << " * true to construct a modal " << objClass.mid(1).toLower() << "." << endl; + out << " * true to construct a modal " << objClass.mid(1).toLower() << '.' << endl; out << " */" << endl; out << nameOfClass << "::" << bareNameOfClass << "(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl)" << endl; out << " : " << objClass << "(parent, name, modal, fl)"; @@ -733,7 +733,7 @@ void Ui3Reader::createFormImpl(const QDomElement &e) out << endl; - out << "{" << endl; + out << '{' << endl; // // setup the gui @@ -775,7 +775,7 @@ void Ui3Reader::createFormImpl(const QDomElement &e) out << indent << "init();" << endl; // end of constructor - out << "}" << endl; + out << '}' << endl; out << endl; // destructor @@ -783,11 +783,11 @@ void Ui3Reader::createFormImpl(const QDomElement &e) out << " * Destroys the object and frees any allocated resources" << endl; out << " */" << endl; out << nameOfClass << "::~" << bareNameOfClass << "()" << endl; - out << "{" << endl; + out << '{' << endl; if (extraFuncts.contains(QLatin1String("destroy()"))) out << indent << "destroy();" << endl; out << indent << "// no need to delete child widgets, Qt does it all for us" << endl; - out << "}" << endl; + out << '}' << endl; out << endl; // handle application events if required @@ -816,9 +816,9 @@ void Ui3Reader::createFormImpl(const QDomElement &e) out << " * language." << endl; out << " */" << endl; out << "void " << nameOfClass << "::languageChange()" << endl; - out << "{" << endl; + out << '{' << endl; out << " retranslateUi(this);" << endl; - out << "}" << endl; + out << '}' << endl; out << endl; // create stubs for additional slots if necessary @@ -833,8 +833,8 @@ void Ui3Reader::createFormImpl(const QDomElement &e) type = type.simplified(); QString fname = fixDeclaration(Parser::cleanArgs(*it)); if (!(*it3).startsWith(QLatin1String("pure"))) { // "pure virtual" or "pureVirtual" - out << type << " " << nameOfClass << "::" << fname << endl; - out << "{" << endl; + out << type << ' ' << nameOfClass << "::" << fname << endl; + out << '{' << endl; if (*it != QLatin1String("init()") && *it != QLatin1String("destroy()")) { QRegExp numeric(QLatin1String("^(?:signed|unsigned|u?char|u?short|u?int" "|u?long|Q_U?INT(?:8|16|32)|Q_U?LONG|float" @@ -868,14 +868,14 @@ void Ui3Reader::createFormImpl(const QDomElement &e) if (type == QLatin1String("bool")) { retVal = QLatin1String("false"); - } else if (isBasicNumericType || type.endsWith(QLatin1String("*"))) { + } else if (isBasicNumericType || type.endsWith(QLatin1Char('*'))) { retVal = QLatin1String("0"); - } else if (type.endsWith(QLatin1String("&"))) { + } else if (type.endsWith(QLatin1Char('&'))) { do { type.chop(1); - } while (type.endsWith(QLatin1String(" "))); + } while (type.endsWith(QLatin1Char(' '))); retVal = QLatin1String("uic_temp_var"); - out << indent << "static " << type << " " << retVal << ";" << endl; + out << indent << "static " << type << ' ' << retVal << ';' << endl; } else { retVal = type + QLatin1String("()"); } @@ -883,9 +883,9 @@ void Ui3Reader::createFormImpl(const QDomElement &e) out << indent << "qWarning(\"" << nameOfClass << "::" << fname << ": Not implemented yet\");" << endl; if (!retVal.isEmpty()) - out << indent << "return " << retVal << ";" << endl; + out << indent << "return " << retVal << ';' << endl; } - out << "}" << endl; + out << '}' << endl; out << endl; } ++it; diff --git a/src/tools/uic3/main.cpp b/src/tools/uic3/main.cpp index d581016..9535b91 100644 --- a/src/tools/uic3/main.cpp +++ b/src/tools/uic3/main.cpp @@ -367,7 +367,7 @@ int runUic3(int argc, char * argv[]) } if (headerFile) { - out << "#include \"" << headerFile << "\"" << endl << endl; + out << "#include \"" << headerFile << '\"' << endl << endl; } QString convertedUi; diff --git a/src/tools/uic3/parser.cpp b/src/tools/uic3/parser.cpp index 744dd30..395cc4d 100644 --- a/src/tools/uic3/parser.cpp +++ b/src/tools/uic3/parser.cpp @@ -48,14 +48,14 @@ QT_BEGIN_NAMESPACE QString Parser::cleanArgs(const QString &func) { QString slot(func); - int begin = slot.indexOf(QLatin1String("(")) + 1; + int begin = slot.indexOf(QLatin1Char('(')) + 1; QString args = slot.mid(begin); - args = args.left(args.indexOf(QLatin1String(")"))); + args = args.left(args.indexOf(QLatin1Char(')'))); QStringList lst = args.split(QLatin1Char(',')); QString res = slot.left(begin); for (QStringList::Iterator it = lst.begin(); it != lst.end(); ++it) { if (it != lst.begin()) - res += QLatin1String(","); + res += QLatin1Char(','); QString arg = *it; int pos = 0; if ((pos = arg.indexOf(QLatin1Char('&'))) != -1) { @@ -65,7 +65,7 @@ QString Parser::cleanArgs(const QString &func) } else { arg = arg.simplified(); if ((pos = arg.indexOf(QLatin1Char(':'))) != -1) - arg = arg.left(pos).simplified() + QLatin1String(":") + arg.mid(pos + 1).simplified(); + arg = arg.left(pos).simplified() + QLatin1Char(':') + arg.mid(pos + 1).simplified(); QStringList l = arg.split(QLatin1Char(' ')); if (l.count() == 2) { if (l[0] != QLatin1String("const") @@ -73,12 +73,12 @@ QString Parser::cleanArgs(const QString &func) && l[0] != QLatin1String("var")) arg = l[0]; } else if (l.count() == 3) { - arg = l[0] + QLatin1String(" ") + l[1]; + arg = l[0] + QLatin1Char(' ') + l[1]; } } res += arg; } - res += QLatin1String(")"); + res += QLatin1Char(')'); return res; } diff --git a/src/tools/uic3/qt3to4.cpp b/src/tools/uic3/qt3to4.cpp index 9e5b64b..2862727 100644 --- a/src/tools/uic3/qt3to4.cpp +++ b/src/tools/uic3/qt3to4.cpp @@ -149,7 +149,7 @@ void Porting::readXML(RuleList *renamedHeaders, RuleList *renamedClasses, RuleLi QString fileName = QLatin1String("q3porting.xml"); QString filePath; //check QLibraryInfo::DataPath/filename - filePath = QDir::cleanPath(QLibraryInfo::location(QLibraryInfo::DataPath) + QLatin1String("/") + fileName) ; + filePath = QDir::cleanPath(QLibraryInfo::location(QLibraryInfo::DataPath) + QLatin1Char('/') + fileName) ; //check QLibraryInfo::PrefixPath/tools/porting/src/filename if (!QFile::exists(filePath)) diff --git a/src/tools/uic3/subclassing.cpp b/src/tools/uic3/subclassing.cpp index e590ab7..85c2218 100644 --- a/src/tools/uic3/subclassing.cpp +++ b/src/tools/uic3/subclassing.cpp @@ -69,7 +69,7 @@ void Ui3Reader::createSubDecl( const QDomElement &e, const QString& subClass ) return; out << "class " << subClass << " : public " << nameOfClass << endl; - out << "{" << endl; + out << '{' << endl; /* tmake ignore Q_OBJECT */ out << " Q_OBJECT" << endl; @@ -105,8 +105,8 @@ void Ui3Reader::createSubDecl( const QDomElement &e, const QString& subClass ) continue; QString returnType = n.attribute(QLatin1String("returnType"), QLatin1String("void")); QString functionName = n.firstChild().toText().data().trimmed(); - if ( functionName.endsWith(QLatin1String(";"))) - functionName = functionName.left( functionName.length() - 1 ); + if ( functionName.endsWith(QLatin1Char(';'))) + functionName.chop(1); QString specifier = n.attribute(QLatin1String("specifier")); QString access = n.attribute(QLatin1String("access")); if ( access == QLatin1String("protected") ) { @@ -133,8 +133,8 @@ void Ui3Reader::createSubDecl( const QDomElement &e, const QString& subClass ) continue; QString returnType = n.attribute(QLatin1String("returnType"), QLatin1String("void")); QString functionName = n.firstChild().toText().data().trimmed(); - if ( functionName.endsWith(QLatin1String(";")) ) - functionName = functionName.left( functionName.length() - 1 ); + if ( functionName.endsWith(QLatin1Char(';')) ) + functionName.chop(1); QString specifier = n.attribute(QLatin1String("specifier")); QString access = n.attribute(QLatin1String("access")); if ( access == QLatin1String("protected") ) { @@ -195,7 +195,7 @@ void Ui3Reader::writeFunctionsSubDecl( const QStringList &fuLst, const QStringLi type = QLatin1String("void"); if ( *it3 == QLatin1String("non virtual") ) continue; - out << " " << type << " " << fixDeclaration(*it) << ";" << endl; + out << " " << type << ' ' << fixDeclaration(*it) << ';' << endl; } out << endl; } @@ -223,7 +223,7 @@ void Ui3Reader::createSubImpl( const QDomElement &e, const QString& subClass ) out << " * name 'name' and widget flags set to 'f' " << endl; out << " *" << endl; out << " * The " << objClass.mid(1).toLower() << " will by default be modeless, unless you set 'modal' to" << endl; - out << " * true to construct a modal " << objClass.mid(1).toLower() << "." << endl; + out << " * true to construct a modal " << objClass.mid(1).toLower() << '.' << endl; out << " */" << endl; out << subClass << "::" << subClass << "( QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl )" << endl; out << " : " << nameOfClass << "( parent, name, modal, fl )" << endl; @@ -235,8 +235,8 @@ void Ui3Reader::createSubImpl( const QDomElement &e, const QString& subClass ) out << subClass << "::" << subClass << "( QWidget* parent, const char* name, Qt::WindowFlags fl )" << endl; out << " : " << nameOfClass << "( parent, name, fl )" << endl; } - out << "{" << endl; - out << "}" << endl; + out << '{' << endl; + out << '}' << endl; out << endl; // destructor @@ -244,9 +244,9 @@ void Ui3Reader::createSubImpl( const QDomElement &e, const QString& subClass ) out << " * Destroys the object and frees any allocated resources" << endl; out << " */" << endl; out << subClass << "::~" << subClass << "()" << endl; - out << "{" << endl; + out << '{' << endl; out << " // no need to delete child widgets, Qt does it all for us" << endl; - out << "}" << endl; + out << '}' << endl; out << endl; @@ -268,8 +268,8 @@ void Ui3Reader::createSubImpl( const QDomElement &e, const QString& subClass ) continue; QString returnType = n.attribute(QLatin1String("returnType"), QLatin1String("void")); QString functionName = n.firstChild().toText().data().trimmed(); - if ( functionName.endsWith(QLatin1String(";")) ) - functionName = functionName.left( functionName.length() - 1 ); + if ( functionName.endsWith(QLatin1Char(';')) ) + functionName.chop(1); QString specifier = n.attribute(QLatin1String("specifier")); QString access = n.attribute(QLatin1String("access")); if ( access == QLatin1String("protected") ) { @@ -296,8 +296,8 @@ void Ui3Reader::createSubImpl( const QDomElement &e, const QString& subClass ) continue; QString returnType = n.attribute(QLatin1String("returnType"), QLatin1String("void")); QString functionName = n.firstChild().toText().data().trimmed(); - if ( functionName.endsWith(QLatin1String(";")) ) - functionName = functionName.left( functionName.length() - 1 ); + if ( functionName.endsWith(QLatin1Char(';')) ) + functionName.chop(1); QString specifier = n.attribute(QLatin1String("specifier")); QString access = n.attribute(QLatin1String("access")); if ( access == QLatin1String("protected") ) { @@ -351,10 +351,10 @@ void Ui3Reader::writeFunctionsSubImpl( const QStringList &fuLst, const QStringLi out << "/*" << endl; out << " * " << descr << endl; out << " */" << endl; - out << type << " " << subClass << "::" << fixDeclaration(*it) << endl; - out << "{" << endl; + out << type << ' ' << subClass << "::" << fixDeclaration(*it) << endl; + out << '{' << endl; out << " qWarning( \"" << subClass << "::" << fixDeclaration(*it) << " not yet implemented!\" );" << endl; - out << "}" << endl << endl; + out << '}' << endl << endl; } out << endl; } diff --git a/src/tools/uic3/ui3reader.cpp b/src/tools/uic3/ui3reader.cpp index 1ba4b2f..539565c 100644 --- a/src/tools/uic3/ui3reader.cpp +++ b/src/tools/uic3/ui3reader.cpp @@ -125,10 +125,10 @@ QString Ui3Reader::fixString(const QString &str, bool encode) QString s; if (!encode) { s = str; - s.replace(QLatin1String("\\"), QLatin1String("\\\\")); - s.replace(QLatin1String("\""), QLatin1String("\\\"")); - s.replace(QLatin1String("\r"), QLatin1String("")); - s.replace(QLatin1String("\n"), QLatin1String("\\n\"\n\"")); + s.replace(QLatin1Char('\\'), QLatin1String("\\\\")); + s.replace(QLatin1Char('\"'), QLatin1String("\\\"")); + s.remove(QLatin1Char('\r')); + s.replace(QLatin1Char('\n'), QLatin1String("\\n\"\n\"")); } else { QByteArray utf8 = str.utf8(); const int l = utf8.length(); @@ -136,7 +136,7 @@ QString Ui3Reader::fixString(const QString &str, bool encode) s += QLatin1String("\\x") + QString::number((uchar)utf8[i], 16); } - return QLatin1String("\"") + s + QLatin1String("\""); + return QLatin1Char('\"') + s + QLatin1Char('\"'); } QString Ui3Reader::trcall(const QString& sourceText, const QString& comment) @@ -158,12 +158,12 @@ QString Ui3Reader::trcall(const QString& sourceText, const QString& comment) } if (comment.isEmpty()) { - return t + QLatin1String("(") + fixString(sourceText, encode) + QLatin1String(")"); + return t + QLatin1Char('(') + fixString(sourceText, encode) + QLatin1Char(')'); } else { - return t + QLatin1String("(") + return t + QLatin1Char('(') + fixString(sourceText, encode) + QLatin1String(", ") - + fixString(comment, encode) + QLatin1String(")"); + + fixString(comment, encode) + QLatin1Char(')'); } } @@ -480,10 +480,10 @@ void Ui3Reader::createColorGroupImpl(const QString& name, const QDomElement& e) QString pixmap = n.firstChild().toText().data(); if (!pixmapLoaderFunction.isEmpty()) { pixmap.prepend(pixmapLoaderFunction - + QLatin1String("(") + + QLatin1Char('(') + QLatin1String(externPixmaps ? "\"" : "")); - pixmap.append(QLatin1String(externPixmaps ? "\"" : "") + QLatin1String(")")); + pixmap.append(QLatin1String(externPixmaps ? "\"" : "") + QLatin1Char(')')); } out << indent << name << ".setBrush(QColorGroup::" << ColorRole[r] << ", QBrush(" << color << ", " << pixmap << "));" << endl; @@ -578,9 +578,9 @@ QString Ui3Reader::registerObject(const QString& name) if (objectNames.contains(result)) { int i = 2; - while (objectNames.contains(result + QLatin1String("_") + QString::number(i))) + while (objectNames.contains(result + QLatin1Char('_') + QString::number(i))) i++; - result += QLatin1String("_"); + result += QLatin1Char('_'); result += QString::number(i); } objectNames += result; diff --git a/src/winmain/qtmain_win.cpp b/src/winmain/qtmain_win.cpp index a3bc0e0..b83b324 100644 --- a/src/winmain/qtmain_win.cpp +++ b/src/winmain/qtmain_win.cpp @@ -100,7 +100,7 @@ int APIENTRY WinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR /*cmdPara #if defined(Q_OS_WINCE) TCHAR appName[256]; GetModuleFileName(0, appName, 255); - cmdParam = QString(QLatin1String("\"%1\" ")).arg(QString::fromUtf16((const unsigned short *)appName)).toLocal8Bit() + cmdParam; + cmdParam.prepend(QString::fromLatin1("\"%1\" ").arg(QString::fromUtf16((const unsigned short *)appName)).toLocal8Bit()); #endif int argc = 0; @@ -110,7 +110,7 @@ int APIENTRY WinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR /*cmdPara #if defined(Q_OS_WINCE) TCHAR uniqueAppID[256]; GetModuleFileName(0, uniqueAppID, 255); - QString uid = QString::fromUtf16((const unsigned short *)uniqueAppID).toLower().replace(QString(QLatin1String("\\")), QString(QLatin1String("_"))); + QString uid = QString::frosmUtf16((const unsigned short *)uniqueAppID).toLower().replace(QLatin1Char('\\'), QLatin1Char('_')); // If there exists an other instance of this application // it will be the owner of a mutex with the unique ID. diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp index dc6ff92..da0e31b 100644 --- a/src/xml/dom/qdom.cpp +++ b/src/xml/dom/qdom.cpp @@ -4589,7 +4589,7 @@ void QDomElementPrivate::save(QTextStream& s, int depth, int indent) const qName = prefix + QLatin1Char(':') + name; nsDecl = QLatin1String(" xmlns:") + prefix; } - nsDecl += QLatin1String("=\"") + encodeText(namespaceURI, s) + QLatin1String("\""); + nsDecl += QLatin1String("=\"") + encodeText(namespaceURI, s) + QLatin1Char('\"'); } s << '<' << qName << nsDecl; diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp index ade0339..db50f01 100644 --- a/src/xml/sax/qxml.cpp +++ b/src/xml/sax/qxml.cpp @@ -5464,7 +5464,7 @@ bool QXmlSimpleReaderPrivate::parsePEReference() if (skipIt) { if (contentHnd) { - if (!contentHnd->skippedEntity(QString::fromLatin1("%") + ref())) { + if (!contentHnd->skippedEntity(QLatin1Char('%') + ref())) { reportParseError(contentHnd->errorString()); return false; } @@ -5476,7 +5476,7 @@ bool QXmlSimpleReaderPrivate::parsePEReference() return false; } else if (parsePEReference_context == InDTD) { // Included as PE - if (!insertXmlRef(QString::fromLatin1(" ")+xmlRefString+QString::fromLatin1(" "), ref(), false)) + if (!insertXmlRef(QLatin1Char(' ') + xmlRefString + QLatin1Char(' '), ref(), false)) return false; } } @@ -6728,7 +6728,7 @@ bool QXmlSimpleReaderPrivate::parseEntityDecl() if ( !entityExist(name())) { parameterEntities.insert(name(), string()); if (declHnd) { - if (!declHnd->internalEntityDecl(QString::fromLatin1("%")+name(), string())) { + if (!declHnd->internalEntityDecl(QLatin1Char('%') + name(), string())) { reportParseError(declHnd->errorString()); return false; } @@ -6740,7 +6740,7 @@ bool QXmlSimpleReaderPrivate::parseEntityDecl() if ( !entityExist(name())) { externParameterEntities.insert(name(), QXmlSimpleReaderPrivate::ExternParameterEntity(publicId, systemId)); if (declHnd) { - if (!declHnd->externalEntityDecl(QString::fromLatin1("%")+name(), publicId, systemId)) { + if (!declHnd->externalEntityDecl(QLatin1Char('%') + name(), publicId, systemId)) { reportParseError(declHnd->errorString()); return false; } @@ -7864,8 +7864,8 @@ bool QXmlSimpleReaderPrivate::insertXmlRef(const QString &data, const QString &n { if (inLiteral) { QString tmp = data; - xmlRefStack.push(XmlRef(name, tmp.replace(QLatin1String("\""), - QLatin1String(""")).replace(QLatin1String("'"), QLatin1String("'")))); + xmlRefStack.push(XmlRef(name, tmp.replace(QLatin1Char('\"'), + QLatin1String(""")).replace(QLatin1Char('\''), QLatin1String("'")))); } else { xmlRefStack.push(XmlRef(name, data)); } diff --git a/src/xmlpatterns/acceltree/qacceltree.cpp b/src/xmlpatterns/acceltree/qacceltree.cpp index 60e6e27..6bc1794 100644 --- a/src/xmlpatterns/acceltree/qacceltree.cpp +++ b/src/xmlpatterns/acceltree/qacceltree.cpp @@ -71,7 +71,7 @@ void AccelTree::printStats(const NamePool::Ptr &np) const for(int i = 0; i < len; ++i) { const BasicNodeData &v = basicData.at(i); - pDebug() << "|" << i + pDebug() << '|' << i << "\t\t|" << v.depth() << "\t|" << v.size() << "\t|" << postNumber(i) @@ -81,12 +81,12 @@ void AccelTree::printStats(const NamePool::Ptr &np) const : data.value(i)) << "\t|"; /* - pDebug() << "|" << QString().arg(i, 14) - << "|" << QString().arg(v.depth(), 6) - << "|" << QString().arg(v.size(), 6) - << "|" << QString().arg(postNumber(i), 14) - << "|" << QString().arg(v.kind(), 6) - << "|"; + pDebug() << '|' << QString().arg(i, 14) + << '|' << QString().arg(v.depth(), 6) + << '|' << QString().arg(v.size(), 6) + << '|' << QString().arg(postNumber(i), 14) + << '|' << QString().arg(v.kind(), 6) + << '|'; */ } pDebug() << "+---------------+-------+-------+---------------+-------+--------------+"; diff --git a/src/xmlpatterns/api/qsourcelocation.cpp b/src/xmlpatterns/api/qsourcelocation.cpp index 4eee39c..1dd8ffd 100644 --- a/src/xmlpatterns/api/qsourcelocation.cpp +++ b/src/xmlpatterns/api/qsourcelocation.cpp @@ -206,7 +206,7 @@ QDebug operator<<(QDebug debug, const QSourceLocation &sourceLocation) << sourceLocation.line() << ", column:" << sourceLocation.column() - << ")"; + << ')'; return debug; } #endif diff --git a/src/xmlpatterns/data/qabstractfloat.cpp b/src/xmlpatterns/data/qabstractfloat.cpp index b6226b5..a45b0fd 100644 --- a/src/xmlpatterns/data/qabstractfloat.cpp +++ b/src/xmlpatterns/data/qabstractfloat.cpp @@ -186,7 +186,7 @@ QString AbstractFloat::stringValue() const if(sign) valueAsString += QLatin1Char('-'); - valueAsString += qret.left(1); + valueAsString += qret.at(0); valueAsString += QLatin1Char('.'); if(1 == qret.size()) diff --git a/src/xmlpatterns/data/qcommonvalues.cpp b/src/xmlpatterns/data/qcommonvalues.cpp index 07a273d..99a8086 100644 --- a/src/xmlpatterns/data/qcommonvalues.cpp +++ b/src/xmlpatterns/data/qcommonvalues.cpp @@ -57,7 +57,7 @@ using namespace QPatternist; // STATIC DATA const AtomicString::Ptr CommonValues::EmptyString - (new AtomicString(QString(QLatin1String("")))); + (new AtomicString(QLatin1String(""))); const AtomicString::Ptr CommonValues::TrueString (new AtomicString(QLatin1String("true"))); const AtomicString::Ptr CommonValues::FalseString diff --git a/src/xmlpatterns/expr/qexpression_p.h b/src/xmlpatterns/expr/qexpression_p.h index 5eb63de..65918e6 100644 --- a/src/xmlpatterns/expr/qexpression_p.h +++ b/src/xmlpatterns/expr/qexpression_p.h @@ -884,7 +884,7 @@ namespace QPatternist { pDebug() << "AST REWRITE:" << old.data() << "to" << New.data() << '(' << old->actualReflection() << "to" << New->actualReflection() << ", " - << old->description() << "to" << New->description() << ")"; + << old->description() << "to" << New->description() << ')'; /* The order of these two lines is significant.. */ context->addLocation(New.data(), context->locationFor(old->actualReflection())); diff --git a/tools/assistant/tools/assistant/main.cpp b/tools/assistant/tools/assistant/main.cpp index 75955ec..f63cc65 100644 --- a/tools/assistant/tools/assistant/main.cpp +++ b/tools/assistant/tools/assistant/main.cpp @@ -230,7 +230,7 @@ int main(int argc, char *argv[]) if (file.isEmpty()) file = MainWindow::defaultHelpCollectionFileName(); QString path = QFileInfo(file).path(); - path += QLatin1String("/") + indexFilesFolder(file); + path += QLatin1Char('/') + indexFilesFolder(file); QLocalSocket localSocket; localSocket.connectToServer(QString(QLatin1String("QtAssistant%1")) diff --git a/tools/linguist/linguist/mainwindow.cpp b/tools/linguist/linguist/mainwindow.cpp index 921b8b6..f91175d 100644 --- a/tools/linguist/linguist/mainwindow.cpp +++ b/tools/linguist/linguist/mainwindow.cpp @@ -127,7 +127,7 @@ static Ending ending(QString str, QLocale::Language lang) switch (ch) { case 0x002e: // full stop - if (str.endsWith(QString(QLatin1String("...")))) + if (str.endsWith(QLatin1String("..."))) return End_Ellipsis; else return End_FullStop; diff --git a/tools/linguist/linguist/phrase.cpp b/tools/linguist/linguist/phrase.cpp index 300f6e8..b1f9818 100644 --- a/tools/linguist/linguist/phrase.cpp +++ b/tools/linguist/linguist/phrase.cpp @@ -152,10 +152,10 @@ bool QphHandler::startElement(const QString & /* namespaceURI */, const QString &qName, const QXmlAttributes &atts) { - if (qName == QString(QLatin1String("QPH"))) { + if (qName == QLatin1String("QPH")) { m_language = atts.value(QLatin1String("language")); m_sourceLanguage = atts.value(QLatin1String("sourcelanguage")); - } else if (qName == QString(QLatin1String("phrase"))) { + } else if (qName == QLatin1String("phrase")) { source.truncate(0); target.truncate(0); definition.truncate(0); @@ -168,13 +168,13 @@ bool QphHandler::endElement(const QString & /* namespaceURI */, const QString & /* localName */, const QString &qName) { - if (qName == QString(QLatin1String("source"))) + if (qName == QLatin1String("source")) source = accum; - else if (qName == QString(QLatin1String("target"))) + else if (qName == QLatin1String("target")) target = accum; - else if (qName == QString(QLatin1String("definition"))) + else if (qName == QLatin1String("definition")) definition = accum; - else if (qName == QString(QLatin1String("phrase"))) + else if (qName == QLatin1String("phrase")) pb->m_phrases.append(new Phrase(source, target, definition, pb)); return true; } diff --git a/tools/linguist/lupdate/merge.cpp b/tools/linguist/lupdate/merge.cpp index c4f4448..4849d6e 100644 --- a/tools/linguist/lupdate/merge.cpp +++ b/tools/linguist/lupdate/merge.cpp @@ -193,7 +193,7 @@ static QString translationAttempt(const QString &oldTranslation, */ for (k = 0; k < p; k++) { if (!met[k]) - attempt += QString(QLatin1String(" {")) + newNumbers[k] + QString(QLatin1String("?}")); + attempt += QLatin1String(" {") + newNumbers[k] + QLatin1String("?}"); } /* @@ -205,8 +205,8 @@ static QString translationAttempt(const QString &oldTranslation, for (ell = 0; ell < p; ell++) { if (k != ell && oldNumbers[k] == oldNumbers[ell] && newNumbers[k] < newNumbers[ell]) - attempt += QString(QLatin1String(" {")) + newNumbers[k] + QString(QLatin1String(" or ")) + - newNumbers[ell] + QString(QLatin1String("?}")); + attempt += QLatin1String(" {") + newNumbers[k] + QLatin1String(" or ") + + newNumbers[ell] + QLatin1String("?}"); } } return attempt; diff --git a/tools/linguist/shared/profileevaluator.cpp b/tools/linguist/shared/profileevaluator.cpp index 0be6bec..ae46ad8 100644 --- a/tools/linguist/shared/profileevaluator.cpp +++ b/tools/linguist/shared/profileevaluator.cpp @@ -894,7 +894,7 @@ QStringList ProFileEvaluator::Private::qmakeFeaturePaths() { QStringList concat; { - const QString base_concat = QDir::separator() + QString(QLatin1String("features")); + const QString base_concat = QDir::separator() + QLatin1String("features"); concat << base_concat + QDir::separator() + QLatin1String("mac"); concat << base_concat + QDir::separator() + QLatin1String("macx"); concat << base_concat + QDir::separator() + QLatin1String("unix"); @@ -903,7 +903,7 @@ QStringList ProFileEvaluator::Private::qmakeFeaturePaths() concat << base_concat + QDir::separator() + QLatin1String("qnx6"); concat << base_concat; } - const QString mkspecs_concat = QDir::separator() + QString(QLatin1String("mkspecs")); + const QString mkspecs_concat = QDir::separator() + QLatin1String("mkspecs"); QStringList feature_roots; QByteArray mkspec_path = qgetenv("QMAKEFEATURES"); if (!mkspec_path.isNull()) diff --git a/tools/linguist/shared/proparserutils.h b/tools/linguist/shared/proparserutils.h index c27c3c0..3eab43f 100644 --- a/tools/linguist/shared/proparserutils.h +++ b/tools/linguist/shared/proparserutils.h @@ -282,7 +282,7 @@ static QStringList split_value_list(const QString &vals, bool do_semicolon=false static QStringList qmake_mkspec_paths() { QStringList ret; - const QString concat = QDir::separator() + QString(QLatin1String("mkspecs")); + const QString concat = QDir::separator() + QLatin1String("mkspecs"); QByteArray qmakepath = qgetenv("QMAKEPATH"); if (!qmakepath.isEmpty()) { const QStringList lst = splitPathList(QString::fromLocal8Bit(qmakepath)); diff --git a/tools/pixeltool/qpixeltool.cpp b/tools/pixeltool/qpixeltool.cpp index 6de7741..c55cbd1 100644 --- a/tools/pixeltool/qpixeltool.cpp +++ b/tools/pixeltool/qpixeltool.cpp @@ -179,13 +179,13 @@ void QPixelTool::paintEvent(QPaintEvent *) if (m_displayZoom) { render_string(&p, w, h, - QString(QLatin1String("Zoom: x%1")).arg(m_zoom), + QString::fromLatin1("Zoom: x%1").arg(m_zoom), Qt::AlignTop | Qt::AlignRight); } if (m_displayGridSize) { render_string(&p, w, h, - QString(QLatin1String("Grid size: %1")).arg(m_gridSize), + QString::fromLatin1("Grid size: %1").arg(m_gridSize), Qt::AlignBottom | Qt::AlignLeft); } diff --git a/tools/porting/src/logger.cpp b/tools/porting/src/logger.cpp index fb44de7..bbeac9c 100644 --- a/tools/porting/src/logger.cpp +++ b/tools/porting/src/logger.cpp @@ -60,8 +60,8 @@ SourcePointLogEntry::SourcePointLogEntry(QString type, QString location, QString QString SourcePointLogEntry::description() const { return QLatin1String("In file ") + file + - QLatin1String(" at line ") + QString(QLatin1String("%1")).arg(line + 1) + //line count is zero based, adjust here. - QLatin1String(" column ") + QString(QLatin1String("%1")).arg(column) + + QLatin1String(" at line ") + QString::number(line + 1) + //line count is zero based, adjust here. + QLatin1String(" column ") + QString::number(column) + QLatin1String(": ") + text ; } @@ -127,7 +127,7 @@ QStringList Logger::fullReport() commitSection(); QStringList report; report << QLatin1String("Log for qt3to4 on ") + QDateTime::currentDateTime().toString() + - QLatin1String(". Number of log entries: ") + QString(QLatin1String("%1")).arg(logEntries.size()); + QLatin1String(". Number of log entries: ") + QString::number(logEntries.size()); foreach(LogEntry *logEntry, logEntries) { report << logEntry->description(); } diff --git a/tools/qdoc3/config.cpp b/tools/qdoc3/config.cpp index c8488f3..aa6b454 100644 --- a/tools/qdoc3/config.cpp +++ b/tools/qdoc3/config.cpp @@ -751,7 +751,7 @@ void Config::load(Location location, const QString& fileName) word += QChar(c.digitValue()); SKIP_CHAR(); } - else if ((metaCharPos = QString(QLatin1String("abfnrtv")).indexOf(c)) != -1) { + else if ((metaCharPos = QString::fromLatin1("abfnrtv").indexOf(c)) != -1) { word += "\a\b\f\n\r\t\v"[metaCharPos]; SKIP_CHAR(); } diff --git a/tools/shared/qttoolbardialog/qttoolbardialog.cpp b/tools/shared/qttoolbardialog/qttoolbardialog.cpp index f15c4bc..9c54e75 100644 --- a/tools/shared/qttoolbardialog/qttoolbardialog.cpp +++ b/tools/shared/qttoolbardialog/qttoolbardialog.cpp @@ -637,10 +637,10 @@ QToolBar *QtFullToolBarManager::createToolBar(const QString &toolBarName) return 0; QToolBar *toolBar = new QToolBar(toolBarName, mainWindow()); int i = 1; - const QString prefix = QLatin1String("_Custom_Toolbar_"); - QString name = QString(QLatin1String("%1%2")).arg(prefix).arg(i); + const QString prefix = QLatin1String("_Custom_Toolbar_%1"); + QString name = prefix.arg(i); while (d_ptr->toolBarByName(name)) - name = QString(QLatin1String("%1%2")).arg(prefix).arg(++i); + name = prefix.arg(++i); toolBar->setObjectName(name); mainWindow()->addToolBar(toolBar); d_ptr->customToolBars.append(toolBar); -- cgit v0.12 From cd6fa8abed473936af55055a3ebe209bb7241a85 Mon Sep 17 00:00:00 2001 From: Christoph Feck Date: Mon, 11 May 2009 21:58:22 +0200 Subject: Respect PM_ScrollView_ScrollBarSpacing in QAbstractScrollArea::minimumSizeHint() Reviewed-by: Olivier Goffart Request-url: http://qt.gitorious.org/qt/qt/merge_requests/382 --- src/gui/widgets/qabstractscrollarea.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/widgets/qabstractscrollarea.cpp b/src/gui/widgets/qabstractscrollarea.cpp index 0d8b4de..5eed745 100644 --- a/src/gui/widgets/qabstractscrollarea.cpp +++ b/src/gui/widgets/qabstractscrollarea.cpp @@ -1265,6 +1265,12 @@ QSize QAbstractScrollArea::minimumSizeHint() const int hsbExt = d->hbar->sizeHint().height(); int vsbExt = d->vbar->sizeHint().width(); int extra = 2 * d->frameWidth; + QStyleOption opt; + opt.initFrom(this); + if ((d->frameStyle != QFrame::NoFrame) + && style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents, &opt, this)) { + extra += style()->pixelMetric(QStyle::PM_ScrollView_ScrollBarSpacing, &opt, this); + } return QSize(d->scrollBarContainers[Qt::Horizontal]->sizeHint().width() + vsbExt + extra, d->scrollBarContainers[Qt::Vertical]->sizeHint().height() + hsbExt + extra); } -- cgit v0.12 From abed949f0de16c94a146a965a13b38493cde6671 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Thu, 28 May 2009 11:29:34 +0200 Subject: BT: aboutQt dialog is too big. Make use of setInformativeText in qmessagebox for aboutQt dialog for now. Proper fix might be to add scrollable widget to the dialog, or split the about info into several pieces, though it cannot be done in a patch release. Task-number: 254464 Reviewed-by: Trenton Schulz --- src/gui/dialogs/qmessagebox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp index fb3bcb8..b121a8f 100644 --- a/src/gui/dialogs/qmessagebox.cpp +++ b/src/gui/dialogs/qmessagebox.cpp @@ -1723,7 +1723,7 @@ void QMessageBox::aboutQt(QWidget *parent, const QString &title) QMessageBox *msgBox = new QMessageBox(parent); msgBox->setAttribute(Qt::WA_DeleteOnClose); msgBox->setWindowTitle(title.isEmpty() ? tr("About Qt") : title); - msgBox->setText(translatedTextAboutQt); + msgBox->setInformativeText(translatedTextAboutQt); QPixmap pm(QLatin1String(":/trolltech/qmessagebox/images/qtlogo-64.png")); if (!pm.isNull()) -- cgit v0.12 From b2a1e5938e1abf45d70cbfa7ec1ab0c21c01911d Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 27 May 2009 10:19:44 +0200 Subject: support for -ltcg configure switch for Windows CE builds Additionally we turn -ltcg on by default on Windows CE. See commit 56191830 for details. Reviewed-by: mauricek BT: yes --- mkspecs/common/wince.conf | 7 +++++-- tools/configure/configureapp.cpp | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mkspecs/common/wince.conf b/mkspecs/common/wince.conf index d017cae..d6e4ba7 100644 --- a/mkspecs/common/wince.conf +++ b/mkspecs/common/wince.conf @@ -19,7 +19,8 @@ QMAKE_YACCFLAGS = -d QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t- QMAKE_CFLAGS_WARN_ON = -W3 QMAKE_CFLAGS_WARN_OFF = -W0 -QMAKE_CFLAGS_RELEASE = -O2 -GL -MD +QMAKE_CFLAGS_RELEASE = -O2 -MD +QMAKE_CFLAGS_LTCG = -GL QMAKE_CFLAGS_DEBUG = -DDEBUG -D_DEBUG -Zi -MDd QMAKE_CFLAGS_YACC = @@ -34,6 +35,7 @@ QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189 QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_STL_ON = -EHsc QMAKE_CXXFLAGS_STL_OFF = @@ -55,8 +57,9 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< QMAKE_LINK = link QMAKE_LFLAGS = /NOLOGO /NODEFAULTLIB:OLDNAMES.LIB -QMAKE_LFLAGS_RELEASE = /LTCG /INCREMENTAL:NO +QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO QMAKE_LFLAGS_DEBUG = /DEBUG +QMAKE_LFLAGS_LTCG = /LTCG QMAKE_LIBS_NETWORK = ws2.lib QMAKE_LIBS_OPENGL = QMAKE_LIBS_COMPAT = diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 91344c8..a6b06a6 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -1326,6 +1326,7 @@ void Configure::applySpecSpecifics() dictionary[ "WEBKIT" ] = "no"; dictionary[ "PHONON" ] = "yes"; dictionary[ "DIRECTSHOW" ] = "no"; + dictionary[ "LTCG" ] = "yes"; // We only apply MMX/IWMMXT for mkspecs we know they work if (dictionary[ "XQMAKESPEC" ].startsWith("wincewm")) { dictionary[ "MMX" ] = "yes"; -- cgit v0.12 From 4b45c38a19145f5235d93fa9d1577615cdfc162e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 28 May 2009 10:58:58 +0200 Subject: Moved QGL2PaintEngineExPrivate into GL2 paint engine header file. Reviewed-by: Tom --- src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h | 5 ++ .../gl2paintengineex/qpaintengineex_opengl2.cpp | 91 ---------------------- .../gl2paintengineex/qpaintengineex_opengl2_p.h | 90 +++++++++++++++++++++ src/opengl/qglpixelbuffer.cpp | 3 +- 4 files changed, 96 insertions(+), 93 deletions(-) diff --git a/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h b/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h index a83f13e..35566ca 100644 --- a/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h +++ b/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h @@ -50,6 +50,9 @@ // We mean it. // +#ifndef QGL2PEXVERTEXARRAY_P_H +#define QGL2PEXVERTEXARRAY_P_H + #include #include @@ -120,3 +123,5 @@ private: inline void curveToArray(const QGLPoint &cp1, const QGLPoint &cp2, const QGLPoint &ep, GLfloat inverseScale); }; + +#endif diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index f7dbed3..5b33421 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -62,7 +62,6 @@ and use the correct program when we really need it. */ - #include "qpaintengineex_opengl2_p.h" #include //for memcpy @@ -83,101 +82,11 @@ extern QImage qt_imageForBrush(int brushStyle, bool invert); //in qbrush.cpp - -#include - -enum EngineMode { - ImageDrawingMode, - TextDrawingMode, - BrushDrawingMode -}; - static const GLuint QT_BRUSH_TEXTURE_UNIT = 0; static const GLuint QT_IMAGE_TEXTURE_UNIT = 0; //Can be the same as brush texture unit static const GLuint QT_MASK_TEXTURE_UNIT = 1; static const GLuint QT_BACKGROUND_TEXTURE_UNIT = 2; -class QGL2PaintEngineExPrivate : public QPaintEngineExPrivate -{ - Q_DECLARE_PUBLIC(QGL2PaintEngineEx) -public: - QGL2PaintEngineExPrivate(QGL2PaintEngineEx *q_ptr) : - q(q_ptr), - width(0), height(0), - ctx(0), - currentBrush( &(q->state()->brush) ), - inverseScale(1), - shaderManager(0) - { } - - ~QGL2PaintEngineExPrivate(); - - void updateBrushTexture(); - void updateBrushUniforms(); - void updateMatrix(); - void updateCompositionMode(); - void updateTextureFilter(GLenum target, GLenum wrapMode, bool smoothPixmapTransform); - - void setBrush(const QBrush* brush); - - void transferMode(EngineMode newMode); - - // fill, drawOutline, drawTexture & drawCachedGlyphs are the rendering entry points: - void fill(const QVectorPath &path); - void drawOutline(const QVectorPath& path); - void drawTexture(const QGLRect& dest, const QGLRect& src, const QSize &textureSize); - void drawCachedGlyphs(const QPointF &p, const QTextItemInt &ti); - - void drawVertexArrays(QGL2PEXVertexArray& vertexArray, GLenum primitive); - // ^ draws whatever is in the vertex array - void composite(const QGLRect& boundingRect); - // ^ Composites the bounding rect onto dest buffer - void fillStencilWithVertexArray(QGL2PEXVertexArray& vertexArray, bool useWindingFill); - // ^ Calls drawVertexArrays to render into stencil buffer - void cleanStencilBuffer(const QGLRect& area); - - void prepareForDraw(bool srcPixelsAreOpaque); - - inline void useSimpleShader(); - inline QColor premultiplyColor(QColor c, GLfloat opacity); - - QGL2PaintEngineEx* q; - QGLDrawable drawable; - int width, height; - QGLContext *ctx; - - EngineMode mode; - - // Dirty flags - bool matrixDirty; // Implies matrix uniforms are also dirty - bool compositionModeDirty; - bool brushTextureDirty; - bool brushUniformsDirty; - bool simpleShaderMatrixUniformDirty; - bool shaderMatrixUniformDirty; - bool stencilBuferDirty; - - const QBrush* currentBrush; // May not be the state's brush! - - GLfloat inverseScale; - - QGL2PEXVertexArray vertexCoordinateArray; - QGL2PEXVertexArray textureCoordinateArray; - - GLfloat staticVertexCoordinateArray[8]; - GLfloat staticTextureCoordinateArray[8]; - - GLfloat pmvMatrix[4][4]; - - QGLEngineShaderManager* shaderManager; - - // Clipping & state stuff stolen from QOpenGLPaintEngine: - void updateDepthClip(); - void systemStateChanged(); - uint use_system_clip : 1; -}; - - ////////////////////////////////// Private Methods ////////////////////////////////////////// QGL2PaintEngineExPrivate::~QGL2PaintEngineExPrivate() diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h index ccf89f0..34ab6b3 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h @@ -53,7 +53,17 @@ // We mean it. // +#include + #include +#include +#include + +enum EngineMode { + ImageDrawingMode, + TextDrawingMode, + BrushDrawingMode +}; class QGL2PaintEngineExPrivate; @@ -119,4 +129,84 @@ private: Q_DISABLE_COPY(QGL2PaintEngineEx) }; +class QGL2PaintEngineExPrivate : public QPaintEngineExPrivate +{ + Q_DECLARE_PUBLIC(QGL2PaintEngineEx) +public: + QGL2PaintEngineExPrivate(QGL2PaintEngineEx *q_ptr) : + q(q_ptr), + width(0), height(0), + ctx(0), + currentBrush( &(q->state()->brush) ), + inverseScale(1), + shaderManager(0) + { } + + ~QGL2PaintEngineExPrivate(); + + void updateBrushTexture(); + void updateBrushUniforms(); + void updateMatrix(); + void updateCompositionMode(); + void updateTextureFilter(GLenum target, GLenum wrapMode, bool smoothPixmapTransform); + + void setBrush(const QBrush* brush); + + void transferMode(EngineMode newMode); + + // fill, drawOutline, drawTexture & drawCachedGlyphs are the rendering entry points: + void fill(const QVectorPath &path); + void drawOutline(const QVectorPath& path); + void drawTexture(const QGLRect& dest, const QGLRect& src, const QSize &textureSize); + void drawCachedGlyphs(const QPointF &p, const QTextItemInt &ti); + + void drawVertexArrays(QGL2PEXVertexArray& vertexArray, GLenum primitive); + // ^ draws whatever is in the vertex array + void composite(const QGLRect& boundingRect); + // ^ Composites the bounding rect onto dest buffer + void fillStencilWithVertexArray(QGL2PEXVertexArray& vertexArray, bool useWindingFill); + // ^ Calls drawVertexArrays to render into stencil buffer + void cleanStencilBuffer(const QGLRect& area); + + void prepareForDraw(bool srcPixelsAreOpaque); + + inline void useSimpleShader(); + inline QColor premultiplyColor(QColor c, GLfloat opacity); + + QGL2PaintEngineEx* q; + QGLDrawable drawable; + int width, height; + QGLContext *ctx; + + EngineMode mode; + + // Dirty flags + bool matrixDirty; // Implies matrix uniforms are also dirty + bool compositionModeDirty; + bool brushTextureDirty; + bool brushUniformsDirty; + bool simpleShaderMatrixUniformDirty; + bool shaderMatrixUniformDirty; + bool stencilBuferDirty; + + const QBrush* currentBrush; // May not be the state's brush! + + GLfloat inverseScale; + + QGL2PEXVertexArray vertexCoordinateArray; + QGL2PEXVertexArray textureCoordinateArray; + + GLfloat staticVertexCoordinateArray[8]; + GLfloat staticTextureCoordinateArray[8]; + + GLfloat pmvMatrix[4][4]; + + QGLEngineShaderManager* shaderManager; + + // Clipping & state stuff stolen from QOpenGLPaintEngine: + void updateDepthClip(); + void systemStateChanged(); + uint use_system_clip : 1; +}; + #endif diff --git a/src/opengl/qglpixelbuffer.cpp b/src/opengl/qglpixelbuffer.cpp index efc58f2..483856a 100644 --- a/src/opengl/qglpixelbuffer.cpp +++ b/src/opengl/qglpixelbuffer.cpp @@ -76,13 +76,12 @@ \sa {opengl/pbuffers}{Pbuffers Example} */ +#include #include #include #include -#include - #ifndef QT_OPENGL_ES_2 #include #endif -- cgit v0.12 From 218c9883f5b1f7e7eb9e6272460223088bfaf305 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 28 May 2009 11:53:15 +0200 Subject: QStateMachine: better way to get the sender signalIndex The QObject internals have changed, and the mutex that need to be locked to access the senders list is not the same anymore, and not accessible form qstatemachine.cpp But we do not need to loop over the senders list anyway because this is done in sender() We also do not need to lock in order to access the currentSender Reviewed-by: Eskil --- src/corelib/statemachine/qstatemachine.cpp | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index 185fb7d..84619d7 100644 --- a/src/corelib/statemachine/qstatemachine.cpp +++ b/src/corelib/statemachine/qstatemachine.cpp @@ -1301,22 +1301,6 @@ void QStateMachinePrivate::unregisterTransition(QAbstractTransition *transition) #endif } -static int senderSignalIndex(const QObject *sender) -{ - QObjectPrivate *d = QObjectPrivate::get(const_cast(sender)); - QMutexLocker(&d->threadData->mutex); - if (!d->currentSender) - return -1; - - // Return -1 if d->currentSender isn't in d->senders - bool found = false; - for (int i = 0; !found && i < d->senders.count(); ++i) - found = (d->senders.at(i)->sender == d->currentSender->sender); - if (!found) - return -1; - return d->currentSender->signal; -} - void QStateMachinePrivate::registerSignalTransition(QSignalTransition *transition) { Q_Q(QStateMachine); @@ -2087,10 +2071,15 @@ int QSignalEventGenerator::qt_metacall(QMetaObject::Call _c, int _id, void **_a) switch (_id) { case 0: { // ### in Qt 4.6 we can use QObject::senderSignalIndex() - int signalIndex = senderSignalIndex(this); + QObjectPrivate *d = static_cast(d_ptr); + int signalIndex = -1; + QObject *sender = this->sender(); + if (sender && d->currentSender) + signalIndex = d->currentSender->signal; + Q_ASSERT(signalIndex != -1); QStateMachine *machine = qobject_cast(parent()); - QStateMachinePrivate::get(machine)->handleTransitionSignal(sender(), signalIndex, _a); + QStateMachinePrivate::get(machine)->handleTransitionSignal(sender, signalIndex, _a); break; } default: ; -- cgit v0.12 From d2377967485a9c0ba397bbbab250689b61e529f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20G=C3=A2teau?= Date: Sun, 17 May 2009 14:34:35 +0200 Subject: Do not deduce scrollbar extent twice if scrollbar policy is Qt::ScrollBarAlwaysOn Request-url: http://qt.gitorious.org/qt/qt/merge_requests/432 Reviewed-by: Olivier Goffart Reviewed-by: Thierry --- src/gui/itemviews/qlistview.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp index 1071c1d..8b50d0e 100644 --- a/src/gui/itemviews/qlistview.cpp +++ b/src/gui/itemviews/qlistview.cpp @@ -1973,10 +1973,16 @@ void QListViewPrivate::prepareItemsLayout() int frameAroundContents = 0; if (q->style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents)) frameAroundContents = q->style()->pixelMetric(QStyle::PM_DefaultFrameWidth) * 2; - int verticalMargin = vbarpolicy==Qt::ScrollBarAlwaysOff ? 0 : - q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, q->verticalScrollBar()) + frameAroundContents; - int horizontalMargin = hbarpolicy==Qt::ScrollBarAlwaysOff ? 0 : - q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, q->horizontalScrollBar()) + frameAroundContents; + + // maximumViewportSize() already takes scrollbar into account if policy is + // Qt::ScrollBarAlwaysOn but scrollbar extent must be deduced if policy + // is Qt::ScrollBarAsNeeded + int verticalMargin = vbarpolicy==Qt::ScrollBarAsNeeded + ? q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, q->verticalScrollBar()) + frameAroundContents + : 0; + int horizontalMargin = hbarpolicy==Qt::ScrollBarAsNeeded + ? q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, q->horizontalScrollBar()) + frameAroundContents + : 0; layoutBounds.adjust(0, 0, -verticalMargin, -horizontalMargin); -- cgit v0.12 From 4db48cbc4860010813b988b77d34a2606a444a3c Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Thu, 28 May 2009 10:20:34 +0200 Subject: Fix build on X11/OpenGL ES 2.0 Reviewed-By: TrustMe --- src/opengl/qwindowsurface_gl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index a3422b5..965c7a5 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -405,8 +405,8 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint & drawTexture(rect, d_ptr->tex_id, window()->size(), rect); } } -#endif } +#endif d_ptr->paintedRegion = QRegion(); context()->swapBuffers(); -- cgit v0.12 From ce5f9bc2a6b1945abdbdc4106be048eb9cbb7102 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Thu, 28 May 2009 10:21:48 +0200 Subject: Print the error string when surface creation fails Reviewed-By: TrustMe --- src/opengl/qegl_x11egl.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/opengl/qegl_x11egl.cpp b/src/opengl/qegl_x11egl.cpp index 8efe7e7..c703900 100644 --- a/src/opengl/qegl_x11egl.cpp +++ b/src/opengl/qegl_x11egl.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include "qegl_p.h" #if defined(QT_OPENGL_ES) || defined(QT_OPENVG) @@ -80,8 +81,10 @@ bool QEglContext::createSurface(QPaintDevice *device) surf = eglCreateWindowSurface(dpy, cfg, windowDrawable, 0); else surf = eglCreatePixmapSurface(dpy, cfg, pixmapDrawable, 0); + if (surf == EGL_NO_SURFACE) { - qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", eglGetError()); + qWarning() << "QEglContext::createSurface(): Unable to create EGL surface:" + << errorString(eglGetError()); return false; } return true; -- cgit v0.12 From 7ff70350f485f815bbcb2412631b636485ebe37d Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Thu, 28 May 2009 10:35:43 +0200 Subject: Send ParentChanged event to QGLWidgets when the wId changes on EGL EGL has window surfaces which are bound to a particular window ID. When that window ID changes, the EGL surface must be re-created. This is achieved by sending the QGLWidget a ParentChanged event. Reviewed-By: Trond --- src/gui/kernel/qwidget.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index d6e5cce..5538c11 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -9203,11 +9203,12 @@ void QWidget::setParent(QWidget *parent, Qt::WindowFlags f) d->resolveLayoutDirection(); d->resolveLocale(); - // Note: GL widgets under Windows will always need a ParentChange - // event to handle recreation/rebinding of the GL context, hence - // the (f & Qt::MSWindowsOwnDC) clause + // Note: GL widgets under WGL or EGL will always need a ParentChange + // event to handle recreation/rebinding of the GL context, hence the + // (f & Qt::MSWindowsOwnDC) clause (which is set on QGLWidgets on all + // platforms). if (newParent -#ifdef Q_WS_WIN +#if defined(Q_WS_WIN) || defined(QT_OPENGL_ES) || (f & Qt::MSWindowsOwnDC) #endif ) { -- cgit v0.12 From 54aaf1f72e11ba4d7e38bbde127a4630aa27df23 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Thu, 28 May 2009 10:42:20 +0200 Subject: Make WA_TranslucentBackground work for QGLWidgets on X11/EGL Reviewed-By: TrustMe --- src/opengl/qgl_x11egl.cpp | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp index 514e763..3c745b8 100644 --- a/src/opengl/qgl_x11egl.cpp +++ b/src/opengl/qgl_x11egl.cpp @@ -243,13 +243,24 @@ void QGLWidget::setContext(QGLContext *context, const QGLContext* shareContext, return; } - - // Create the EGL Context (which will also choose the config for us) if (d->glcx) d->glcx->doneCurrent(); QGLContext* oldcx = d->glcx; d->glcx = context; + if (parentWidget()) { + // force creation of delay-created widgets + parentWidget()->winId(); + if (parentWidget()->x11Info().screen() != x11Info().screen()) + d_func()->xinfo = parentWidget()->d_func()->xinfo; + } + + // If the application has set WA_TranslucentBackground and not explicitly set + // the alpha buffer size to zero, modify the format so it have an alpha channel + QGLFormat& fmt = d->glcx->d_func()->glFormat; + if (testAttribute(Qt::WA_TranslucentBackground) && fmt.alphaBufferSize() == -1) + fmt.setAlphaBufferSize(1); + bool createFailed = false; if (!d->glcx->isValid()) { if (!d->glcx->create(shareContext ? shareContext : oldcx)) @@ -267,15 +278,6 @@ void QGLWidget::setContext(QGLContext *context, const QGLContext* shareContext, return; } - - - // Make sure native winIds are avaliable - if (parentWidget()) { - parentWidget()->winId(); - if (parentWidget()->x11Info().screen() != x11Info().screen()) - d_func()->xinfo = parentWidget()->d_func()->xinfo; - } - bool visible = isVisible(); if (visible) hide(); @@ -384,6 +386,7 @@ void QGLWidget::setContext(QGLContext *context, const QGLContext* shareContext, a.colormap = XCreateColormap(x11Info().display(), p, vi.visual, AllocNone); valueMask |= CWColormap; } + Window w = XCreateWindow(x11Info().display(), p, x(), y(), width(), height(), 0, vi.depth, InputOutput, vi.visual, valueMask, &a); @@ -406,6 +409,7 @@ void QGLWidget::setContext(QGLContext *context, const QGLContext* shareContext, if (visible) show(); + XFlush(X11->display); d->glcx->setWindowCreated(true); } -- cgit v0.12 From 389ca4b5931efbf2bcac050ec80ec7971b61c857 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 28 May 2009 13:17:27 +0200 Subject: Compile fix with namespaces. --- examples/webkit/fancybrowser/mainwindow.h | 2 +- src/corelib/kernel/qsharedmemory_unix.cpp | 2 -- src/gui/graphicsview/qgraphicsitem_p.h | 4 ++-- src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp | 4 ++++ src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h | 4 ++++ src/opengl/gl2paintengineex/qglengineshadermanager.cpp | 4 +++- src/opengl/gl2paintengineex/qglgradientcache.cpp | 4 ++++ src/opengl/gl2paintengineex/qglgradientcache_p.h | 4 +++- src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 7 ++++++- src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h | 4 ++++ 10 files changed, 31 insertions(+), 8 deletions(-) diff --git a/examples/webkit/fancybrowser/mainwindow.h b/examples/webkit/fancybrowser/mainwindow.h index 2e1068c..ba0bede 100644 --- a/examples/webkit/fancybrowser/mainwindow.h +++ b/examples/webkit/fancybrowser/mainwindow.h @@ -41,8 +41,8 @@ #include -QT_BEGIN_NAMESPACE class QWebView; +QT_BEGIN_NAMESPACE class QLineEdit; QT_END_NAMESPACE diff --git a/src/corelib/kernel/qsharedmemory_unix.cpp b/src/corelib/kernel/qsharedmemory_unix.cpp index 12f21b7..9187ad3 100644 --- a/src/corelib/kernel/qsharedmemory_unix.cpp +++ b/src/corelib/kernel/qsharedmemory_unix.cpp @@ -51,8 +51,6 @@ #ifndef QT_NO_SHAREDMEMORY -QT_BEGIN_NAMESPACE - #include #include #include diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index 62e0411..bd81fe5 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -423,10 +423,10 @@ public: QGraphicsItem *q_ptr; }; -Q_DECLARE_METATYPE(QGraphicsItemPrivate::DecomposedTransform *) - QT_END_NAMESPACE +Q_DECLARE_METATYPE(QGraphicsItemPrivate::DecomposedTransform *) + #endif // QT_NO_GRAPHICSVIEW #endif diff --git a/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp b/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp index f237847..560ad3a 100644 --- a/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp +++ b/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp @@ -43,6 +43,8 @@ #include +QT_BEGIN_NAMESPACE + void QGL2PEXVertexArray::clear() { vertexArray.reset(); @@ -160,3 +162,5 @@ void QGL2PEXVertexArray::curveToArray(const QGLPoint &cp1, const QGLPoint &cp2, } } } + +QT_END_NAMESPACE diff --git a/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h b/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h index 35566ca..d7a9f73 100644 --- a/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h +++ b/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h @@ -59,6 +59,8 @@ #include #include +QT_BEGIN_NAMESPACE + class QGLPoint { public: @@ -124,4 +126,6 @@ private: inline void curveToArray(const QGLPoint &cp1, const QGLPoint &cp2, const QGLPoint &ep, GLfloat inverseScale); }; +QT_END_NAMESPACE + #endif diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp index 514aac0..f64af85 100644 --- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp +++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp @@ -47,6 +47,8 @@ #endif +QT_BEGIN_NAMESPACE + const char* QGLEngineShaderManager::qglEngineShaderSourceCode[] = { 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, @@ -462,4 +464,4 @@ void QGLEngineShaderManager::compileNamedShader(QGLEngineShaderManager::ShaderNa compiledShaders[name] = newShader; } - +QT_END_NAMESPACE diff --git a/src/opengl/gl2paintengineex/qglgradientcache.cpp b/src/opengl/gl2paintengineex/qglgradientcache.cpp index 2239c2f..f1a8850 100644 --- a/src/opengl/gl2paintengineex/qglgradientcache.cpp +++ b/src/opengl/gl2paintengineex/qglgradientcache.cpp @@ -44,6 +44,8 @@ #include "qglgradientcache_p.h" +QT_BEGIN_NAMESPACE + void QGL2GradientCache::cleanCache() { QGLGradientColorTableHash::const_iterator it = cache.constBegin(); for (; it != cache.constEnd(); ++it) { @@ -180,3 +182,5 @@ void QGL2GradientCache::generateGradientColorTable(const QGradient& gradient, ui // Make sure the last color stop is represented at the end of the table colorTable[size-1] = last_color; } + +QT_END_NAMESPACE diff --git a/src/opengl/gl2paintengineex/qglgradientcache_p.h b/src/opengl/gl2paintengineex/qglgradientcache_p.h index 6acaa00..9bf58c7 100644 --- a/src/opengl/gl2paintengineex/qglgradientcache_p.h +++ b/src/opengl/gl2paintengineex/qglgradientcache_p.h @@ -54,6 +54,8 @@ #include #include +QT_BEGIN_NAMESPACE + class QGL2GradientCache : public QObject { Q_OBJECT @@ -104,5 +106,5 @@ public slots: } }; - +QT_END_NAMESPACE diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 5b33421..338919e 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -80,7 +80,11 @@ #include "qgl2pexvertexarray_p.h" -extern QImage qt_imageForBrush(int brushStyle, bool invert); //in qbrush.cpp +#include + +QT_BEGIN_NAMESPACE + +extern QImage qt_imageForBrush(int brushStyle, bool invert); static const GLuint QT_BRUSH_TEXTURE_UNIT = 0; static const GLuint QT_IMAGE_TEXTURE_UNIT = 0; //Can be the same as brush texture unit @@ -1328,3 +1332,4 @@ QOpenGL2PaintEngineState::~QOpenGL2PaintEngineState() { } +QT_END_NAMESPACE diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h index 34ab6b3..ef62390 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h @@ -65,6 +65,8 @@ enum EngineMode { BrushDrawingMode }; +QT_BEGIN_NAMESPACE + class QGL2PaintEngineExPrivate; @@ -209,4 +211,6 @@ public: uint use_system_clip : 1; }; +QT_END_NAMESPACE + #endif -- cgit v0.12 From 3331605529d2d81145259fd56d03bb59c480cac5 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 28 May 2009 13:18:00 +0200 Subject: Introduce a new class QStringBuilder to speed up the creation of QString objects from smaller chunks. The QStringBuilder class: QStringBuilder uses expression templates (using the '%' operator) to postpone any actual concatenation until it is assigned to an actual QString. At that time it knows the exact sizes of all chunks, can compute the required space, allocates once a QString of appriopriate size and then copies over the chunk data one-by-one. In addition, QLatin1Literal is a drop-in replacement for QLatin1String (which we can't change for compatibility reasons) that knows its size, therefore saving a few cycles when computing the size of the resulting string. Some further saved cycles stem from inlining and reduced reference counting logic (the QString created from a QStringBuilder has typically ref count equal to 1, while QString::append() needs an extra test) Minor changes to the existing QString class: - Introduce QString constructor to create an uninitialized QString of a given size. This particular constructor is used by QStringBuilder class. - Introduce a QT_USE_FAST_CONCATENATION macro to disable the existing overloads of operator+() and helps finding the places where they are used in code. - Introduce QT_USE_FAST_OPERATOR_PLUS. This also disables the existing overloads of operator+() and creates a new templated operator+() with identical implementation of operator%(). This allows code that is compilable QT_CAST_{TO,FROM}_ASCII to use QStringBuilder almost transparently. The only case that is not covered is creating objects like QUrl that are implicitly constructible from a QString from a QStringBuilder result. This needs to be converted explicitly to a QString first, e.g. by using QUrl url(QString(QLatin1String("http://") + hostName)); Reviewed-by: MariusSO --- src/corelib/tools/qstring.cpp | 17 ++ src/corelib/tools/qstring.h | 15 +- src/corelib/tools/qstringbuilder.cpp | 135 +++++++++ src/corelib/tools/qstringbuilder.h | 207 ++++++++++++++ src/corelib/tools/tools.pri | 2 + tests/benchmarks/qstringbuilder/main.cpp | 304 +++++++++++++++++++++ tests/benchmarks/qstringbuilder/qstringbuilder.pro | 12 + 7 files changed, 689 insertions(+), 3 deletions(-) create mode 100644 src/corelib/tools/qstringbuilder.cpp create mode 100644 src/corelib/tools/qstringbuilder.h create mode 100644 tests/benchmarks/qstringbuilder/main.cpp create mode 100644 tests/benchmarks/qstringbuilder/qstringbuilder.pro diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 29509c5..c64e1d6 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -944,6 +944,23 @@ QString::QString(int size, QChar ch) } } +/*! + Constructs a string of the given \a size without initializing the + characters. This is only used in \c QStringBuilder::toString(). + + \internal +*/ + +QString::QString(int size, Uninitialized) +{ + d = (Data*) qMalloc(sizeof(Data)+size*sizeof(QChar)); + d->ref = 1; + d->alloc = d->size = size; + d->clean = d->asciiCache = d->simpletext = d->righttoleft = d->capacity = 0; + d->data = d->array; + d->array[size] = '\0'; +} + /*! \fn QString::QString(const QLatin1String &str) Constructs a copy of the Latin-1 string \a str. diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h index 69c4f2f..7c0d6a3 100644 --- a/src/corelib/tools/qstring.h +++ b/src/corelib/tools/qstring.h @@ -579,6 +579,9 @@ public: bool isSimpleText() const { if (!d->clean) updateProperties(); return d->simpletext; } bool isRightToLeft() const { if (!d->clean) updateProperties(); return d->righttoleft; } + struct Uninitialized {}; + QString(int size, Uninitialized); + private: #if defined(QT_NO_CAST_FROM_ASCII) && !defined(Q_NO_DECLARED_NOT_DEFINED) QString &operator+=(const char *s); @@ -1001,13 +1004,15 @@ inline int QByteArray::findRev(const QString &s, int from) const # endif // QT3_SUPPORT #endif // QT_NO_CAST_TO_ASCII +#ifndef QT_USE_FAST_OPERATOR_PLUS +# ifndef QT_USE_FAST_CONCATENATION inline const QString operator+(const QString &s1, const QString &s2) { QString t(s1); t += s2; return t; } inline const QString operator+(const QString &s1, QChar s2) { QString t(s1); t += s2; return t; } inline const QString operator+(QChar s1, const QString &s2) { QString t(s1); t += s2; return t; } -#ifndef QT_NO_CAST_FROM_ASCII +# ifndef QT_NO_CAST_FROM_ASCII inline QT_ASCII_CAST_WARN const QString operator+(const QString &s1, const char *s2) { QString t(s1); t += QString::fromAscii(s2); return t; } inline QT_ASCII_CAST_WARN const QString operator+(const char *s1, const QString &s2) @@ -1020,7 +1025,9 @@ inline QT_ASCII_CAST_WARN const QString operator+(const QByteArray &ba, const QS { QString t = QString::fromAscii(ba.constData(), qstrnlen(ba.constData(), ba.size())); t += s; return t; } inline QT_ASCII_CAST_WARN const QString operator+(const QString &s, const QByteArray &ba) { QString t(s); t += QString::fromAscii(ba.constData(), qstrnlen(ba.constData(), ba.size())); return t; } -#endif +# endif // QT_NO_CAST_FROM_ASCII +# endif // QT_USE_FAST_CONCATENATION +#endif // QT_USE_FAST_OPERATOR_PLUS #ifndef QT_NO_STL inline std::string QString::toStdString() const @@ -1229,6 +1236,8 @@ inline int QStringRef::localeAwareCompare(const QStringRef &s1, const QStringRef QT_END_NAMESPACE -QT_END_HEADER +#ifdef QT_USE_FAST_CONCATENATION +#include +#endif #endif // QSTRING_H diff --git a/src/corelib/tools/qstringbuilder.cpp b/src/corelib/tools/qstringbuilder.cpp new file mode 100644 index 0000000..b807a89 --- /dev/null +++ b/src/corelib/tools/qstringbuilder.cpp @@ -0,0 +1,135 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the $MODULE$ of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qstringbuilder.h" + +/*! + \class QLatin1Literal + \reentrant + \since 4.6 + + \brief The QLatin1Literal class provides a thin wrapper around string + literals used in source code. + + \ingroup tools + \ingroup shared + \ingroup text + \mainclass + + Unlike \c QLatin1String, a \c QLatin1Literal can retrieve its size + without iterating over the literal. + + The main use of \c QLatin1Literal is in conjunction with \c QStringBuilder + to reduce the number of reallocations needed to build up a string from + smaller chunks. + + \sa QStringBuilder, QLatin1String, QString, QStringRef +*/ + +/*! \fn QLatin1Literal::QLatin1Literal(const char(&string)[]) + + Constructs a new literal from the given \a string. +*/ + +/*! \fn int QLatin1Literal::size() const + + Returns the number of characters in the literal \i{excluding} the trailing + NUL char. +*/ + +/*! \fn char *QLatin1Literal::data() const + + Returns a pointer to the first character of the string literal. + The string literal is terminated by a NUL character. +*/ + +/*! \fn QLatin1Literal::operator QString() const + + Converts the \c QLatin1Literal into a \c QString object. +*/ + + + +/*! + \class QStringBuilder + \reentrant + \since 4.6 + + \brief QStringBuilder is a template class that provides a facility to build + up QStrings from smaller chunks. + + \ingroup tools + \ingroup shared + \ingroup text + \mainclass + + When creating strings from smaller chunks, typically \c QString::operator+() + is used, resulting in \i{n - 1} reallocations when operating on \i{n} chunks. + + QStringBuilder uses expression templates to collect the individual parts, + compute the total size, allocate memory for the resulting QString object, + and copy the contents of the chunks into the result. + + The QStringBuilder class is not to be used explicitly in user code. + Instances of the class are created as return values of the operator%() + function, acting on objects of type \c QString, \c QLatin1String, + \c QLatin1Literal, \c \QStringRef, \c QChar, + \c QLatin1Char, and \c char. + + Concatenating strings with operator%() generally yields better + performance then using \c QString::operator+() on the same chunks + if there are three or more of them, and performs equally well in other + cases. + + \sa QLatin1Literal, QString +*/ + +/* !fn template QStringBuilder operator%(const A &a, const B &b) + + Returns a \c QStringBuilder object that is converted to a QString object + when assigned to a variable of QString type or passed to a function that + takes a QString parameter. + + This function is usable with arguments of type \c QString, + \c QLatin1String, \c QLatin1Literal, \c QStringRef, + \c QChar, \c QLatin1Char, and \c char. +*/ + diff --git a/src/corelib/tools/qstringbuilder.h b/src/corelib/tools/qstringbuilder.h new file mode 100644 index 0000000..1e67b7d --- /dev/null +++ b/src/corelib/tools/qstringbuilder.h @@ -0,0 +1,207 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the $MODULE$ of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QSTRINGBUILDER_H +#define QSTRINGBUILDER_H + +#include + +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Core) + +// ### Qt 5: merge with QLatin1String +class QLatin1Literal +{ +public: + template + QLatin1Literal(const char (&str)[N]) : m_size(N - 1), m_data(str) {} + + inline int size() const { return m_size; } + inline const char *data() const { return m_data; } + +private: + const int m_size; + const char *m_data; +}; + + +template class QConcatenable {}; + +template +class QStringBuilder +{ +public: + QStringBuilder(const A &a_, const B &b_) : a(a_), b(b_) {} + + operator QString() const + { + QString s(QConcatenable< QStringBuilder >::size(*this), + QString::Uninitialized()); + + QChar *d = s.data(); + QConcatenable< QStringBuilder >::appendTo(*this, d); + return s; + } + QByteArray toLatin1() const { return QString(*this).toLatin1(); } + + const A &a; + const B &b; +}; + + +template <> struct QConcatenable +{ + typedef char type; + static int size(const char) { return 1; } + static inline void appendTo(const char c, QChar *&out) + { + *out++ = QLatin1Char(c); + } +}; + +template <> struct QConcatenable +{ + typedef QLatin1Char type; + static int size(const QLatin1Char) { return 1; } + static inline void appendTo(const QLatin1Char c, QChar *&out) + { + *out++ = c; + } +}; + +template <> struct QConcatenable +{ + typedef QChar type; + static int size(const QChar) { return 1; } + static inline void appendTo(const QChar c, QChar *&out) + { + *out++ = c; + } +}; + +template <> struct QConcatenable +{ + typedef QLatin1String type; + static int size(const QLatin1String &a) { return qstrlen(a.latin1()); } + static inline void appendTo(const QLatin1String &a, QChar *&out) + { + for (const char *s = a.latin1(); *s; ) + *out++ = QLatin1Char(*s++); + } + +}; + +template <> struct QConcatenable +{ + typedef QLatin1Literal type; + static int size(const QLatin1Literal &a) { return a.size(); } + static inline void appendTo(const QLatin1Literal &a, QChar *&out) + { + for (const char *s = a.data(); *s; ) + *out++ = QLatin1Char(*s++); + } +}; + +template <> struct QConcatenable +{ + typedef QString type; + static int size(const QString &a) { return a.size(); } + static inline void appendTo(const QString &a, QChar *&out) + { + const int n = a.size(); + memcpy(out, (char*)a.constData(), sizeof(QChar) * n); + out += n; + } +}; + +template <> struct QConcatenable +{ + typedef QStringRef type; + static int size(const QStringRef &a) { return a.size(); } + static inline void appendTo(QStringRef a, QChar *&out) + { + const int n = a.size(); + memcpy(out, (char*)a.constData(), sizeof(QChar) * n); + out += n; + } +}; + +template +struct QConcatenable< QStringBuilder > +{ + typedef QStringBuilder type; + static int size(const type &p) + { + return QConcatenable::size(p.a) + QConcatenable::size(p.b); + } + static inline void appendTo(const QStringBuilder &p, QChar *&out) + { + QConcatenable::appendTo(p.a, out); + QConcatenable::appendTo(p.b, out); + } +}; + +template +QStringBuilder::type, typename QConcatenable::type> +operator%(const A &a, const B &b) +{ + return QStringBuilder(a, b); +} + +#ifdef QT_USE_FAST_OPERATOR_PLUS +template +QStringBuilder::type, typename QConcatenable::type> +operator+(const A &a, const B &b) +{ + return QStringBuilder(a, b); +} +#endif + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QSTRINGBUILDER_H diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri index 90287cb..aea0c6c 100644 --- a/src/corelib/tools/tools.pri +++ b/src/corelib/tools/tools.pri @@ -32,6 +32,7 @@ HEADERS += \ tools/qsize.h \ tools/qstack.h \ tools/qstring.h \ + tools/qstringbuilder.h \ tools/qstringlist.h \ tools/qstringmatcher.h \ tools/qtextboundaryfinder.h \ @@ -62,6 +63,7 @@ SOURCES += \ tools/qsharedpointer.cpp \ tools/qsize.cpp \ tools/qstring.cpp \ + tools/qstringbuilder.cpp \ tools/qstringlist.cpp \ tools/qtextboundaryfinder.cpp \ tools/qtimeline.cpp \ diff --git a/tests/benchmarks/qstringbuilder/main.cpp b/tests/benchmarks/qstringbuilder/main.cpp new file mode 100644 index 0000000..cb76925 --- /dev/null +++ b/tests/benchmarks/qstringbuilder/main.cpp @@ -0,0 +1,304 @@ + +#include "qstringbuilder.h" + +#include +#include + +#include + + +#define COMPARE(a, b) QCOMPARE(a, b) +//#define COMPARE(a, b) + +#define SEP(s) qDebug() << "\n\n-------- " s " ---------"; +#define L(s) QLatin1String(s) + +class tst_qstringbuilder : public QObject +{ + Q_OBJECT + +public: + tst_qstringbuilder() + : l1literal("some string literal"), + l1string("some string literal"), + ba("some string literal"), + string(l1string), + stringref(&string, 2, 10), + achar('c') + {} + + +public: + enum { N = 10000 }; + + int run_traditional() + { + int s = 0; + for (int i = 0; i < N; ++i) { +#if 0 + s += QString(l1string + l1string).size(); + s += QString(l1string + l1string + l1string).size(); + s += QString(l1string + l1string + l1string + l1string).size(); + s += QString(l1string + l1string + l1string + l1string + l1string).size(); +#endif + s += QString(achar + l1string + achar).size(); + } + return s; + } + + int run_builder() + { + int s = 0; + for (int i = 0; i < N; ++i) { +#if 0 + s += QString(l1literal % l1literal).size(); + s += QString(l1literal % l1literal % l1literal).size(); + s += QString(l1literal % l1literal % l1literal % l1literal).size(); + s += QString(l1literal % l1literal % l1literal % l1literal % l1literal).size(); +#endif + s += QString(achar % l1literal % achar).size(); + } + return s; + } + +private slots: + + void separator_0() { + qDebug() << "\nIn each block the QStringBuilder based result appear first, " + "QStringBased second.\n"; + } + + void separator_1() { SEP("literal + literal (builder first)"); } + + void b_2_l1literal() { + QBENCHMARK { r = l1literal % l1literal; } + COMPARE(r, l1string + l1string); + } + void s_2_l1string() { + QBENCHMARK { r = l1string + l1string; } + COMPARE(r, QString(l1literal % l1literal)); + } + + + void separator_2() { SEP("2 strings"); } + + void b_2_string() { + QBENCHMARK { r = string % string; } + COMPARE(r, string + string); + } + void s_2_string() { + QBENCHMARK { r = string + string; } + COMPARE(r, QString(string % string)); + } + + + void separator_2c() { SEP("2 string refs"); } + + void b_2_stringref() { + QBENCHMARK { r = stringref % stringref; } + COMPARE(r, stringref.toString() + stringref.toString()); + } + void s_2_stringref() { + QBENCHMARK { r = stringref.toString() + stringref.toString(); } + COMPARE(r, QString(stringref % stringref)); + } + + + void separator_2b() { SEP("3 strings"); } + + void b_3_string() { + QBENCHMARK { r = string % string % string; } + COMPARE(r, string + string + string); + } + void s_3_string() { + QBENCHMARK { r = string + string + string; } + COMPARE(r, QString(string % string % string)); + } + + + void separator_2a() { SEP("string + literal (builder first)"); } + + void b_string_l1literal() { + QBENCHMARK { r = string % l1literal; } + COMPARE(r, string + l1string); + } + void b_string_l1string() { + QBENCHMARK { r = string % l1string; } + COMPARE(r, string + l1string); + } + void s_string_l1literal() { + QBENCHMARK { r = string + l1string; } + COMPARE(r, QString(string % l1literal)); + } + void s_string_l1string() { + QBENCHMARK { r = string + l1string; } + COMPARE(r, QString(string % l1literal)); + } + + + void separator_3() { SEP("3 literals"); } + + void b_3_l1literal() { + QBENCHMARK { r = l1literal % l1literal % l1literal; } + COMPARE(r, l1string + l1string + l1string); + } + void s_3_l1string() { + QBENCHMARK { r = l1string + l1string + l1string; } + COMPARE(r, QString(l1literal % l1literal % l1literal)); + } + + + void separator_4() { SEP("4 literals"); } + + void b_4_l1literal() { + QBENCHMARK { r = l1literal % l1literal % l1literal % l1literal; } + COMPARE(r, l1string + l1string + l1string + l1string); + } + void s_4_l1string() { + QBENCHMARK { r = l1string + l1string + l1string + l1string; } + COMPARE(r, QString(l1literal % l1literal % l1literal % l1literal)); + } + + + void separator_5() { SEP("5 literals"); } + + void b_5_l1literal() { + QBENCHMARK { r = l1literal % l1literal % l1literal % l1literal %l1literal; } + COMPARE(r, l1string + l1string + l1string + l1string + l1string); + } + + void s_5_l1string() { + QBENCHMARK { r = l1string + l1string + l1string + l1string + l1string; } + COMPARE(r, QString(l1literal % l1literal % l1literal % l1literal % l1literal)); + } + + + void separator_6() { SEP("4 chars"); } + + void b_string_4_char() { + QBENCHMARK { r = string + achar + achar + achar + achar; } + COMPARE(r, QString(string % achar % achar % achar % achar)); + } + + void s_string_4_char() { + QBENCHMARK { r = string + achar + achar + achar + achar; } + COMPARE(r, QString(string % achar % achar % achar % achar)); + } + + + void separator_7() { SEP("char + string + char"); } + + void b_char_string_char() { + QBENCHMARK { r = achar + string + achar; } + COMPARE(r, QString(achar % string % achar)); + } + + void s_char_string_char() { + QBENCHMARK { r = achar + string + achar; } + COMPARE(r, QString(achar % string % achar)); + } + + void separator_8() { SEP("string.arg"); } + + void b_string_arg() { + const QString pattern = l1string + "%1" + l1string; + QBENCHMARK { r = l1literal % string % l1literal; } + COMPARE(r, l1string + string + l1string); + } + + void s_string_arg() { + const QString pattern = l1string + "%1" + l1string; + QBENCHMARK { r = pattern.arg(string); } + COMPARE(r, l1string + string + l1string); + } + + void s_bytearray_arg() { + QByteArray result; + QBENCHMARK { result = ba + ba + ba; } + } + + + void separator_9() { SEP("QString::reserve()"); } + + void b_reserve() { + QBENCHMARK { + r.clear(); + r = string % string % string % string; + } + COMPARE(r, string + string + string + string); + } + void b_reserve_lit() { + QBENCHMARK { + r.clear(); + r = string % l1literal % string % string; + } + COMPARE(r, string + string + string + string); + } + void s_reserve() { + QBENCHMARK { + r.clear(); + r.reserve(string.size() + string.size() + string.size() + string.size()); + r += string; + r += string; + r += string; + r += string; + } + COMPARE(r, string + string + string + string); + } + void s_reserve_lit() { + QBENCHMARK { + r.clear(); + //r.reserve(string.size() + qstrlen(l1string.latin1()) + // + string.size() + string.size()); + r.reserve(1024); + r += string; + r += l1string; + r += string; + r += string; + } + COMPARE(r, string + string + string + string); + } + +private: + const QLatin1Literal l1literal; + const QLatin1String l1string; + const QByteArray ba; + const QString string; + const QStringRef stringref; + const QLatin1Char achar; + + QString r; +}; + + +//void operator%(QString, int) {} + +int main(int argc, char *argv[]) +{ + //qDebug() << (QString("xx") * QLatin1String("y")).toString(); + //42 % 3; // Sanity test, should always work. + //QString("x") % 2; // Sanity test, should only compile when the + // operator%(QString, int) is visible. + + if (argc == 2 && (argv[1] == L("--run-builder") || argv[1] == L("-b"))) { + tst_qstringbuilder test; + return test.run_builder(); + } + + if (argc == 2 && (argv[1] == L("--run-traditional") || argv[1] == L("-t"))) { + tst_qstringbuilder test; + return test.run_traditional(); + } + + if (argc == 1) { + QCoreApplication app(argc, argv); + QStringList args = app.arguments(); + tst_qstringbuilder test; + return QTest::qExec(&test, argc, argv); + } + + qDebug() << "Usage: " << argv[0] << " [--run-builder|-r|--run-traditional|-t]"; +} + + +#include "main.moc" diff --git a/tests/benchmarks/qstringbuilder/qstringbuilder.pro b/tests/benchmarks/qstringbuilder/qstringbuilder.pro new file mode 100644 index 0000000..79171b4 --- /dev/null +++ b/tests/benchmarks/qstringbuilder/qstringbuilder.pro @@ -0,0 +1,12 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qstringbuilder + +QMAKE_CXXFLAGS += -g +QMAKE_CFLAGS += -g + +QT -= gui + +CONFIG += release + +SOURCES += main.cpp -- cgit v0.12 From 8ed5931925b4e8ed8f098b5c36e1378f95d7d25a Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 28 May 2009 13:40:59 +0200 Subject: BT: Support saving forms with resources more than once in Qt Jambi When a form is loaded, Designer will set the path to the resource as an absolute path rather than the path actually stored in the file. There is code to work around this to make file paths relative when saving the file later on, but no work around for Qt Jambi. So when saving Qt Jambi forms, you would get an absolute path to the resource which contains the location of the resource file (.jar or on disk) This of course breaks the concept of resources, as the .jui file was no longer portable. The fix is to special case Qt Jambi resources and set the relative path when loading them. The patch has no effect on regular Designer. Task-number: 254621 Reviewed-by: Kai Koehne --- .../components/formeditor/qdesigner_resource.cpp | 34 ++++++++++++++-------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/tools/designer/src/components/formeditor/qdesigner_resource.cpp b/tools/designer/src/components/formeditor/qdesigner_resource.cpp index 75a53b7..064da9b 100644 --- a/tools/designer/src/components/formeditor/qdesigner_resource.cpp +++ b/tools/designer/src/components/formeditor/qdesigner_resource.cpp @@ -159,6 +159,7 @@ private: QDesignerFormEditorInterface *m_core; DesignerPixmapCache *m_pixmapCache; DesignerIconCache *m_iconCache; + const QDesignerLanguageExtension *m_lang; bool m_saveRelative; mutable QMap m_usedQrcFiles; mutable QMap m_loadedQrcFiles; @@ -168,13 +169,18 @@ QDesignerResourceBuilder::QDesignerResourceBuilder(QDesignerFormEditorInterface m_core(core), m_pixmapCache(pixmapCache), m_iconCache(iconCache), + m_lang(qt_extension(core->extensionManager(), core)), m_saveRelative(true) { } -static inline void setIconPixmap(QIcon::Mode m, QIcon::State s, const QDir &workingDirectory, const QString &v, PropertySheetIconValue &icon) +static inline void setIconPixmap(QIcon::Mode m, QIcon::State s, const QDir &workingDirectory, + QString path, PropertySheetIconValue &icon, + const QDesignerLanguageExtension *lang = 0) { - icon.setPixmap(m, s, PropertySheetPixmapValue(QFileInfo(workingDirectory, v).absoluteFilePath())); + if (lang == 0 || !lang->isLanguageResource(path)) + path = QFileInfo(workingDirectory, path).absoluteFilePath(); + icon.setPixmap(m, s, PropertySheetPixmapValue(path)); } QVariant QDesignerResourceBuilder::loadResource(const QDir &workingDirectory, const DomProperty *property) const @@ -184,7 +190,11 @@ QVariant QDesignerResourceBuilder::loadResource(const QDir &workingDirectory, co PropertySheetPixmapValue pixmap; DomResourcePixmap *dp = property->elementPixmap(); if (!dp->text().isEmpty()) { - pixmap.setPath(QFileInfo(workingDirectory, dp->text()).absoluteFilePath()); + if (m_lang != 0 && m_lang->isLanguageResource(dp->text())) { + pixmap.setPath(dp->text()); + } else { + pixmap.setPath(QFileInfo(workingDirectory, dp->text()).absoluteFilePath()); + } #ifdef OLD_RESOURCE_FORMAT if (dp->hasAttributeResource()) m_loadedQrcFiles.insert(QFileInfo(workingDirectory, dp->attributeResource()).absoluteFilePath(), false); @@ -198,24 +208,24 @@ QVariant QDesignerResourceBuilder::loadResource(const QDir &workingDirectory, co DomResourceIcon *di = property->elementIconSet(); if (const int flags = iconStateFlags(di)) { // new, post 4.4 format if (flags & NormalOff) - setIconPixmap(QIcon::Normal, QIcon::Off, workingDirectory, di->elementNormalOff()->text(), icon); + setIconPixmap(QIcon::Normal, QIcon::Off, workingDirectory, di->elementNormalOff()->text(), icon, m_lang); if (flags & NormalOn) - setIconPixmap(QIcon::Normal, QIcon::On, workingDirectory, di->elementNormalOn()->text(), icon); + setIconPixmap(QIcon::Normal, QIcon::On, workingDirectory, di->elementNormalOn()->text(), icon, m_lang); if (flags & DisabledOff) - setIconPixmap(QIcon::Disabled, QIcon::Off, workingDirectory, di->elementDisabledOff()->text(), icon); + setIconPixmap(QIcon::Disabled, QIcon::Off, workingDirectory, di->elementDisabledOff()->text(), icon, m_lang); if (flags & DisabledOn) - setIconPixmap(QIcon::Disabled, QIcon::On, workingDirectory, di->elementDisabledOn()->text(), icon); + setIconPixmap(QIcon::Disabled, QIcon::On, workingDirectory, di->elementDisabledOn()->text(), icon, m_lang); if (flags & ActiveOff) - setIconPixmap(QIcon::Active, QIcon::Off, workingDirectory, di->elementActiveOff()->text(), icon); + setIconPixmap(QIcon::Active, QIcon::Off, workingDirectory, di->elementActiveOff()->text(), icon, m_lang); if (flags & ActiveOn) - setIconPixmap(QIcon::Active, QIcon::On, workingDirectory, di->elementActiveOn()->text(), icon); + setIconPixmap(QIcon::Active, QIcon::On, workingDirectory, di->elementActiveOn()->text(), icon, m_lang); if (flags & SelectedOff) - setIconPixmap(QIcon::Selected, QIcon::Off, workingDirectory, di->elementSelectedOff()->text(), icon); + setIconPixmap(QIcon::Selected, QIcon::Off, workingDirectory, di->elementSelectedOff()->text(), icon, m_lang); if (flags & SelectedOn) - setIconPixmap(QIcon::Selected, QIcon::On, workingDirectory, di->elementSelectedOn()->text(), icon); + setIconPixmap(QIcon::Selected, QIcon::On, workingDirectory, di->elementSelectedOn()->text(), icon, m_lang); } else { #ifdef OLD_RESOURCE_FORMAT - setIconPixmap(QIcon::Normal, QIcon::Off, workingDirectory, di->text(), icon); + setIconPixmap(QIcon::Normal, QIcon::Off, workingDirectory, di->text(), icon, m_lang); if (di->hasAttributeResource()) m_loadedQrcFiles.insert(QFileInfo(workingDirectory, di->attributeResource()).absoluteFilePath(), false); #endif -- cgit v0.12 From 6b75c19e42cd7ffd6d8c0716aa9b1251be28b3e7 Mon Sep 17 00:00:00 2001 From: Robert Griebl Date: Thu, 28 May 2009 13:59:36 +0200 Subject: Forgot to close the TTY handle. Reviewed-by: TrustMe --- src/gui/embedded/qkbdtty_qws.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/embedded/qkbdtty_qws.cpp b/src/gui/embedded/qkbdtty_qws.cpp index 5c0dec8..31489cf 100644 --- a/src/gui/embedded/qkbdtty_qws.cpp +++ b/src/gui/embedded/qkbdtty_qws.cpp @@ -209,6 +209,7 @@ QWSTtyKbPrivate::~QWSTtyKbPrivate() ::ioctl(m_tty_fd, KDSKBMODE, K_XLATE); #endif tcsetattr(m_tty_fd, TCSANOW, &m_tty_attr); + QT_CLOSE(m_tty_fd); } } -- cgit v0.12 From 27d979b0ea39922e6e2ae3a3cc6a4d45c9c8f0e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 28 May 2009 13:45:42 +0200 Subject: Fixed incorrect handling of composition modes in GL2 paint engine. Even if the source pixels are opaque we have to enable blending for the non-trivial composition modes. Some of the composition modes are independent of source alpha and depend on destination alpha for example. Reviewed-by: Tom --- .../gl2paintengineex/qpaintengineex_opengl2.cpp | 31 +++++++--------------- .../gl2paintengineex/qpaintengineex_opengl2_p.h | 2 +- 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 338919e..75422a2 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -425,7 +425,7 @@ static inline void setCoords(GLfloat *coords, const QGLRect &rect) coords[7] = rect.bottom; } -void QGL2PaintEngineExPrivate::drawTexture(const QGLRect& dest, const QGLRect& src, const QSize &textureSize) +void QGL2PaintEngineExPrivate::drawTexture(const QGLRect& dest, const QGLRect& src, const QSize &textureSize, bool opaque) { transferMode(ImageDrawingMode); @@ -434,7 +434,7 @@ void QGL2PaintEngineExPrivate::drawTexture(const QGLRect& dest, const QGLRect& s // Setup for texture drawing shaderManager->setSrcPixelType(QGLEngineShaderManager::ImageSrc); shaderManager->setTextureCoordsEnabled(true); - prepareForDraw(false); // ### + prepareForDraw(opaque); shaderManager->currentProgram()->setUniformValue("imageTexture", QT_IMAGE_TEXTURE_UNIT); @@ -634,11 +634,12 @@ void QGL2PaintEngineExPrivate::prepareForDraw(bool srcPixelsAreOpaque) updateMatrix(); const bool stateHasOpacity = q->state()->opacity < 0.99f; - if ( (!srcPixelsAreOpaque || stateHasOpacity) && - q->state()->compositionMode() != QPainter::CompositionMode_Source) - glEnable(GL_BLEND); - else + if (q->state()->compositionMode() == QPainter::CompositionMode_Source + || (q->state()->compositionMode() == QPainter::CompositionMode_SourceOver + && srcPixelsAreOpaque && !stateHasOpacity)) glDisable(GL_BLEND); + else + glEnable(GL_BLEND); bool useGlobalOpacityUniform = stateHasOpacity; if (stateHasOpacity && (mode != ImageDrawingMode)) { @@ -822,12 +823,7 @@ void QGL2PaintEngineEx::drawPixmap(const QRectF& dest, const QPixmap & pixmap, c ctx->d_func()->bindTexture(pixmap, GL_TEXTURE_2D, GL_RGBA, true); //FIXME: we should use hasAlpha() instead, but that's SLOW at the moment - if ((state()->opacity < 0.99f) || pixmap.hasAlphaChannel()) - glEnable(GL_BLEND); - else - glDisable(GL_BLEND); - - d->drawTexture(dest, src, pixmap.size()); + d->drawTexture(dest, src, pixmap.size(), !pixmap.hasAlphaChannel()); } void QGL2PaintEngineEx::drawImage(const QRectF& dest, const QImage& image, const QRectF& src, @@ -841,12 +837,7 @@ void QGL2PaintEngineEx::drawImage(const QRectF& dest, const QImage& image, const glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT); ctx->d_func()->bindTexture(image, GL_TEXTURE_2D, GL_RGBA, true); - if ((state()->opacity < 0.99f) || image.hasAlphaChannel()) - glEnable(GL_BLEND); - else - glDisable(GL_BLEND); - - d->drawTexture(dest, src, image.size()); + d->drawTexture(dest, src, image.size(), !image.hasAlphaChannel()); } void QGL2PaintEngineEx::drawTextItem(const QPointF &p, const QTextItem &textItem) @@ -1022,10 +1013,8 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev) source->bind(false); - glDisable(GL_BLEND); - QRect rect(0, 0, source->width(), source->height()); - d->drawTexture(QRectF(rect), QRectF(rect), rect.size()); + d->drawTexture(QRectF(rect), QRectF(rect), rect.size(), true); } updateClipRegion(QRegion(), Qt::NoClip); diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h index ef62390..dececa3 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h @@ -159,7 +159,7 @@ public: // fill, drawOutline, drawTexture & drawCachedGlyphs are the rendering entry points: void fill(const QVectorPath &path); void drawOutline(const QVectorPath& path); - void drawTexture(const QGLRect& dest, const QGLRect& src, const QSize &textureSize); + void drawTexture(const QGLRect& dest, const QGLRect& src, const QSize &textureSize, bool opaque); void drawCachedGlyphs(const QPointF &p, const QTextItemInt &ti); void drawVertexArrays(QGL2PEXVertexArray& vertexArray, GLenum primitive); -- cgit v0.12 From 353afc392b843519023f27753b45b2e6fd9467ff Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Thu, 28 May 2009 13:11:29 +0200 Subject: Don't assume the tty was in K_XLATE when application started Instead, query the mode at startup, store it and restore it on exit. Reviewed-By: TrustMe Task-number: 254194 --- src/gui/embedded/qkbdtty_qws.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/embedded/qkbdtty_qws.cpp b/src/gui/embedded/qkbdtty_qws.cpp index b588e55..7c162bc 100644 --- a/src/gui/embedded/qkbdtty_qws.cpp +++ b/src/gui/embedded/qkbdtty_qws.cpp @@ -97,6 +97,7 @@ private slots: private: QWSPC101KeyboardHandler *handler; struct termios origTermData; + int originalKbdMode; }; QWSTtyKeyboardHandler::QWSTtyKeyboardHandler(const QString &device) @@ -156,6 +157,7 @@ QWSTtyKbPrivate::QWSTtyKbPrivate(QWSPC101KeyboardHandler *h, const QString &devi tcgetattr(kbdFD, &termdata); #if defined(Q_OS_LINUX) + ioctl(kbdFD, KDGKBMODE, &originalKbdMode); # ifdef QT_QWS_USE_KEYCODES ioctl(kbdFD, KDSKBMODE, K_MEDIUMRAW); # else @@ -202,7 +204,7 @@ QWSTtyKbPrivate::~QWSTtyKbPrivate() { if (kbdFD >= 0) { #if defined(Q_OS_LINUX) - ioctl(kbdFD, KDSKBMODE, K_XLATE); + ioctl(kbdFD, KDSKBMODE, originalKbdMode); #endif tcsetattr(kbdFD, TCSANOW, &origTermData); ::close(kbdFD); -- cgit v0.12 From eb54435ac5717c854d6c737bca19ae23c00da045 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 28 May 2009 14:33:52 +0200 Subject: Removed dead code ifdefed with QDOC2DOX These changes were added to qdoc in the days when we thought we might switch to doxygen. Now we have taken the approach of making qdoc output be more doxygen-like, so this ifdefed code is now dead. --- tools/qdoc3/codeparser.cpp | 13 - tools/qdoc3/cppcodeparser.cpp | 22 - tools/qdoc3/doc.cpp | 1980 +---------------------------------------- tools/qdoc3/doc.h | 177 ---- tools/qdoc3/main.cpp | 50 -- 5 files changed, 2 insertions(+), 2240 deletions(-) diff --git a/tools/qdoc3/codeparser.cpp b/tools/qdoc3/codeparser.cpp index 9a58bc6..f0ff27e 100644 --- a/tools/qdoc3/codeparser.cpp +++ b/tools/qdoc3/codeparser.cpp @@ -241,19 +241,6 @@ void CodeParser::processCommonMetaCommand(const Location &location, if (node->type() == Node::Fake) { FakeNode *fake = static_cast(node); fake->setTitle(arg); -#ifdef QDOC2DOX - /* qdoc -> doxygen. - I think this must be done here, because there can be multiple - "\externalpage" and "\title" metacommands in a single qdoc - comment, which means, among other things, that the "\title" - commands are not inserted into the metacommand map used by - the Doc class. I'm sure there4 is a better way to do this in - the DoxWriter class using the information in the FakeNode, - but I don't have time to figure it out right now. - */ - if (DoxWriter::isDoxPass(1)) - DoxWriter::insertTitle(fake,arg); -#endif } else location.warning(tr("Ignored '\\%1'").arg(COMMAND_TITLE)); diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp index 1ad5843..8baef0c 100644 --- a/tools/qdoc3/cppcodeparser.cpp +++ b/tools/qdoc3/cppcodeparser.cpp @@ -589,22 +589,6 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc, // ### split(" ") hack is there to support header file syntax QStringList paths = arg.split(" "); QStringList path = paths[0].split("::"); - -#if QDOC2DOX - // qdoc -> doxygen. - if (Doc::isDoxPass(1)) { - if (command == COMMAND_PROPERTY) { - Doc::insertProperty(path); - } - else if (command == COMMAND_VARIABLE) { - Doc::insertVariable(path); - } - else if (command == COMMAND_ENUM) { - // zzz - } - } -#endif - Node *node = 0; if (!usedNamespaces.isEmpty()) { foreach (const QString &usedNamespace, usedNamespaces) { @@ -1753,12 +1737,6 @@ bool CppCodeParser::matchDocsAndStuff() readToken(); Doc::trimCStyleComment(start_loc,comment); - /* - qdoc --> doxygen - We must also remember the location of the end - of the comment, so we can construct a diff for - it. - */ Location end_loc(location()); /* diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp index 397fbfa..f0a4c12 100644 --- a/tools/qdoc3/doc.cpp +++ b/tools/qdoc3/doc.cpp @@ -515,14 +515,7 @@ void DocParser::parse(const QString& source, break; case CMD_BADCODE: leavePara(); -#ifdef QDOC2DOX - if (DoxWriter::isDoxPass()) - append(Atom::CodeBad,getUnmarkedCode(CMD_BADCODE)); - else - append(Atom::CodeBad,getCode(CMD_BADCODE, marker)); -#else append(Atom::CodeBad,getCode(CMD_BADCODE, marker)); -#endif break; case CMD_BASENAME: leavePara(); @@ -538,17 +531,8 @@ void DocParser::parse(const QString& source, case CMD_C: enterPara(); x = untabifyEtc(getArgument(true)); -#ifdef QDOC2DOX - if (DoxWriter::isDoxPass()) - append(Atom::C, x); - else { - marker = CodeMarker::markerForCode(x); - append(Atom::C, marker->markedUpCode(x, 0, "")); - } -#else marker = CodeMarker::markerForCode(x); append(Atom::C, marker->markedUpCode(x, 0, "")); -#endif break; case CMD_CAPTION: leavePara(); @@ -559,14 +543,7 @@ void DocParser::parse(const QString& source, break; case CMD_CODE: leavePara(); -#ifdef QDOC2DOX - if (DoxWriter::isDoxPass()) - append(Atom::Code, getUnmarkedCode(CMD_CODE)); - else - append(Atom::Code, getCode(CMD_CODE, marker)); -#else append(Atom::Code, getCode(CMD_CODE, marker)); -#endif break; #ifdef QDOC_QML case CMD_QML: @@ -579,17 +556,6 @@ void DocParser::parse(const QString& source, #endif case CMD_CODELINE: { -#ifdef QDOC2DOX - if (!quoting && !DoxWriter::isDoxPass()) { - if (priv->text.lastAtom()->type() == Atom::Code - && priv->text.lastAtom()->string().endsWith("\n\n")) - priv->text.lastAtom()->chopString(); - appendToCode("\n"); - } lse { - append(Atom::CodeQuoteCommand, cmdStr); - append(Atom::CodeQuoteArgument, " "); - } -#else if (!quoting) { if (priv->text.lastAtom()->type() == Atom::Code && priv->text.lastAtom()->string().endsWith("\n\n")) @@ -600,37 +566,10 @@ void DocParser::parse(const QString& source, append(Atom::CodeQuoteCommand, cmdStr); append(Atom::CodeQuoteArgument, " "); } -#endif } break; case CMD_DOTS: { -#ifdef QDOC2DOX - if (DoxWriter::isDoxPass()) { - append(Atom::CodeQuoteCommand, cmdStr); - append(Atom::CodeQuoteArgument, " ..."); - } - else if (!quoting) { - if (priv->text.lastAtom()->type() == Atom::Code - && priv->text.lastAtom()->string().endsWith("\n\n")) - priv->text.lastAtom()->chopString(); - - QString arg = getOptionalArgument(); - int indent = 4; - if (!arg.isEmpty()) - indent = arg.toInt(); - for (int i = 0; i < indent; ++i) - appendToCode(" "); - appendToCode("...\n"); - } - else { - append(Atom::CodeQuoteCommand, cmdStr); - QString arg = getOptionalArgument(); - if (arg.isEmpty()) - arg = "4"; - append(Atom::CodeQuoteArgument, arg); - } -#else if (!quoting) { if (priv->text.lastAtom()->type() == Atom::Code && priv->text.lastAtom()->string().endsWith("\n\n")) @@ -651,7 +590,6 @@ void DocParser::parse(const QString& source, arg = "4"; append(Atom::CodeQuoteArgument, arg); } -#endif } break; case CMD_ELSE: @@ -953,19 +891,8 @@ void DocParser::parse(const QString& source, break; case CMD_OLDCODE: leavePara(); -#ifdef QDOC2DOX - if (DoxWriter::isDoxPass()) { - append(Atom::CodeOld, getUnmarkedCode(CMD_OLDCODE)); - append(Atom::CodeNew, getUnmarkedCode(CMD_NEWCODE)); - } - else { - append(Atom::CodeOld, getCode(CMD_OLDCODE, marker)); - append(Atom::CodeNew, getCode(CMD_NEWCODE, marker)); - } -#else append(Atom::CodeOld, getCode(CMD_OLDCODE, marker)); append(Atom::CodeNew, getCode(CMD_NEWCODE, marker)); -#endif break; case CMD_OMIT: getUntilEnd(cmd); @@ -1147,18 +1074,6 @@ void DocParser::parse(const QString& source, { QString snippet = getArgument(); QString identifier = getRestOfLine(); -#ifdef QDOC2DOX - if (quoting || DoxWriter::isDoxPass()) { - append(Atom::SnippetCommand, cmdStr); - append(Atom::SnippetLocation, snippet); - append(Atom::SnippetIdentifier, identifier); - } - else { - Doc::quoteFromFile(location(),quoter,snippet); - appendToCode(quoter.quoteSnippet(location(), - identifier)); - } -#else if (quoting) { append(Atom::SnippetCommand, cmdStr); append(Atom::SnippetLocation, snippet); @@ -1169,7 +1084,6 @@ void DocParser::parse(const QString& source, appendToCode(quoter.quoteSnippet(location(), identifier)); } -#endif } break; case CMD_SUB: @@ -1251,7 +1165,7 @@ void DocParser::parse(const QString& source, append(Atom::FormattingRight, ATOM_FORMATTING_BOLD); append(Atom::String, " "); break; - case CMD_OVERLOAD: // qdoc --> doxygen + case CMD_OVERLOAD: priv->metacommandsUsed.insert(cmdStr); x.clear(); if (!isBlankLine()) @@ -2343,7 +2257,7 @@ QString DocParser::getCode(int cmd, CodeMarker *marker) } /*! - Used only for generating doxygen output. + Was used only for generating doxygen output. */ QString DocParser::getUnmarkedCode(int cmd) { @@ -2579,36 +2493,6 @@ QString DocParser::slashed(const QString& str) #define COMMAND_QMLBRIEF Doc::alias("qmlbrief") #endif -#ifdef QDOC2DOX -#define DOXYGEN_INDENT 2 -#define DOXYGEN_TAB_SIZE 4 -#define DOXYGEN_INDENT_STRING " " -#define DOXYGEN_TAB_STRING " " - -static QRegExp ws_rx("\\s"); -static QRegExp not_ws_rx("\\S"); - -int DoxWriter::doxPass = 0; -QString DoxWriter::currentClass; -QSet DoxWriter::anchors; -QStringMap DoxWriter::exampleTitles; -QStringMap DoxWriter::headerFileTitles; -QStringMap DoxWriter::fileTitles; -QStringMap DoxWriter::groupTitles; -QStringMap DoxWriter::moduleTitles; -QStringMap DoxWriter::pageTitles; -QStringMap DoxWriter::externalPageTitles; -QStringMap DoxWriter::exampleTitlesInverse; -QStringMap DoxWriter::headerFileTitlesInverse; -QStringMap DoxWriter::fileTitlesInverse; -QStringMap DoxWriter::groupTitlesInverse; -QStringMap DoxWriter::moduleTitlesInverse; -QStringMap DoxWriter::pageTitlesInverse; -QStringMap DoxWriter::externalPageTitlesInverse; -QStringMultiMap DoxWriter::variables; -QStringMultiMap DoxWriter::properties; -QStringMultiMap DoxWriter::enums; -#endif Doc::Doc(const Location& start_loc, const Location& end_loc, @@ -2618,15 +2502,6 @@ Doc::Doc(const Location& start_loc, priv = new DocPrivate(start_loc,end_loc,source); DocParser parser; parser.parse(source,priv,metaCommandSet); -#ifdef QDOC2DOX - if (DoxWriter::isDoxPass()) { - DoxWriter doxWriter(source,priv); - if (DoxWriter::isDoxPass(1)) - doxWriter.pass1(); - else - doxWriter.pass2(); - } -#endif } Doc::Doc(const Doc& doc) @@ -3180,1855 +3055,4 @@ void Doc::detach() priv = newPriv; } -#ifdef QDOC2DOX -/*! - Sets the doxygen writer pass to \a pass. You can use - isDoxPass(), with or without a parameter, to test if - you are in a doxygen writer run or in a specific pass - of a doxygen writer run. - - This function is only called from main() if either the - \e doxygen1 or \e doxygen2 flag is passed to qdoc3 on - the command line. - */ -void DoxWriter::setDoxPass(int pass) -{ - qDebug() << "SETTING doxygen pass to " << pass - << " in DoxWriter::setDoxPass()"; - doxPass = pass; -} - -/*! - Returns true if the doxygen pass is set to \a pass, - which means we are in the specified \a pass of a doxygen - writer run of qdoc3. - */ -bool DoxWriter::isDoxPass(int pass) { return (doxPass == pass); } - -/*! - Returns true if the doxygen pass is 1 or 2, which - means this is a doxygen writer run to transform qdoc - comments into doxygen comments. - */ -bool DoxWriter::isDoxPass() { return (doxPass > 0); } - -bool DoxWriter::conversionRequired() const -{ - /* - Loop through all the topic commands searching for - one that must be transformed to doxygen format. If - one is found, return true. - */ - QCommandMap::const_iterator i; - i = priv->metaCommandMap.constBegin(); - while (i != priv->metaCommandMap.constEnd()) { - QString s = i.key(); - if (s == "enum") - return true; - else if (s == "example") - return true; - else if (s == "externalpage") - return true; - else if (s == "group") - return true; - else if (s == "headerfile") - return true; - else if (s == "module") - return true; - else if (s == "page") - return true; - else if (s == "property") - return true; - else if (s == "typedef") - return true; - else if (s == "variable") - return true; - else if (s == "overload") - return true; - else if (s == "reimp") - return true; - else if (s == "relates") - return true; - else if (s == "macro") - return true; - else { -#if 0 - if (s == "class") - else if (s == "namespace") - else if (s == "service") - else if (s == "inheaderfile") - else if (s == "file") - else if (s == "fn") - else if (s == "contentspage") - else if (s == "nextpage") - else if (s == "previous") - else if (s == "indexpage") - else if (s == "startpage") -#endif - } - ++i; - } - - /* - Loop through all the qdoc atoms searching for one - that must be transformed to doxygen format. If one - is found, return true. - */ - const Atom* next = priv->text.firstAtom(); - while (next != 0) { - Atom::Type atomType = next->type(); - switch (atomType) { - case Atom::C: - case Atom::CaptionLeft: - case Atom::Code: - case Atom::CodeBad: - case Atom::CodeNew: - case Atom::CodeOld: - case Atom::CodeQuoteArgument: - case Atom::CodeQuoteCommand: - case Atom::FootnoteLeft: - case Atom::FormatElse: - case Atom::FormatEndif: - case Atom::FormatIf: - case Atom::GeneratedList: - case Atom::Image: - case Atom::ImageText: - case Atom::InlineImage: - case Atom::LegaleseLeft: - case Atom::LineBreak: - case Atom::Link: - case Atom::LinkNode: - case Atom::ListLeft: - case Atom::ListItemNumber: - case Atom::ListTagLeft: - case Atom::ListItemLeft: - case Atom::QuotationLeft: - case Atom::RawString: - case Atom::SectionLeft: - case Atom::SectionHeadingLeft: - case Atom::SidebarLeft: - case Atom::SnippetCommand: - case Atom::SnippetIdentifier: - case Atom::SnippetLocation: - case Atom::TableLeft: - case Atom::TableHeaderLeft: - case Atom::TableRowLeft: - case Atom::TableItemLeft: - case Atom::TableOfContents: - case Atom::Target: - return true; - case Atom::AbstractLeft: - case Atom::AbstractRight: - case Atom::AutoLink: - case Atom::BaseName: - case Atom::BriefLeft: - case Atom::BriefRight: - case Atom::CaptionRight: - case Atom::FormattingLeft: - case Atom::FormattingRight: - case Atom::Nop: - case Atom::ParaLeft: - case Atom::ParaRight: - case Atom::FootnoteRight: - case Atom::LegaleseRight: - case Atom::ListTagRight: - case Atom::ListItemRight: - case Atom::ListRight: - case Atom::QuotationRight: - case Atom::SectionRight: - case Atom::SectionHeadingRight: - case Atom::SidebarRight: - case Atom::String: - case Atom::TableRight: - case Atom::TableHeaderRight: - case Atom::TableRowRight: - case Atom::TableItemRight: - default: - break; - } - next = next->next(); - } - return false; -} - -/*! - A convenience function to write a qdoc metacommand as a - doxygen command, without conversion. i.e., some of the - qdoc metacommands don't require conversion for doxygen. - */ -void DoxWriter::writeCommand(QCommandMap::const_iterator cmd) -{ - concatenate("\\" + cmd.key() + " " + cmd.value()[0]); - newLine(); -} - -/*! - Convert the qdoc commands in the metacommand map to - doxygen format. This function is called only in pass2(). - The metacommand map contains all the metacommands that - were found in the qdoc comment that is being converted. - The metacommands are the ones that begin with the '\'. - These are not considered part of the text of the comment. - The text is converted by convertText(). - */ -void DoxWriter::convertMetaCommands() -{ - QCommandMap& metaCmdMap = priv->metaCommandMap; - QCommandMap::iterator cmd; - int c; - - currentPage.clear(); - currentFn.clear(); - currentTitle.clear(); - currentEnum.clear(); - currentProperty.clear(); - currentVariable.clear(); - currentClass.clear(); - currentExample.clear(); - currentGroup.clear(); - currentModule.clear(); - currentMacro.clear(); - currentService.clear(); - currentTypedef.clear(); - currentHeaderFile.clear(); - commentType = OtherComment; - - if ((cmd = metaCmdMap.find("class")) != metaCmdMap.end()) { - currentClass = cmd.value()[0]; - if ((c = currentClass.indexOf(' ')) > 0) - currentClass = currentClass.left(c); - writeCommand(cmd); - metaCmdMap.erase(cmd); - commentType = ClassComment; - } - else if ((cmd = metaCmdMap.find("fn")) != metaCmdMap.end()) { - currentFn = cmd.value()[0]; - writeCommand(cmd); - metaCmdMap.erase(cmd); - commentType = FnComment; - } - else if ((cmd = metaCmdMap.find("enum")) != metaCmdMap.end()) { - currentEnum = cmd.value()[0]; - if ((c = currentEnum.lastIndexOf("::")) > 0) { - currentClass = currentEnum.left(c); - currentEnum = currentEnum.right(currentEnum.size()-c-2); - qDebug() << "currentEnum =" << currentEnum; - qDebug() << "currentClass =" << currentClass; - } - writeCommand(cmd); - metaCmdMap.erase(cmd); - commentType = EnumComment; - } - else if ((cmd = metaCmdMap.find("property")) != metaCmdMap.end()) { - currentClass = cmd.value()[0]; - if ((c = currentClass.lastIndexOf("::")) > 0) { - currentProperty = currentClass.right(currentClass.size()-c-2); - currentClass = currentClass.left(c); - qDebug() << "currentProperty =" << currentProperty; - qDebug() << "currentClass =" << currentClass; - } - writeCommand(cmd); - metaCmdMap.erase(cmd); - commentType = PropertyComment; - } - else if ((cmd = metaCmdMap.find("variable")) != metaCmdMap.end()) { - currentClass = cmd.value()[0]; - if ((c = currentClass.lastIndexOf("::")) > 0) { - currentVariable = currentClass.right(currentClass.size()-c-2); - currentClass = currentClass.left(c); - qDebug() << "currentVariable =" << currentVariable; - qDebug() << "currentClass =" << currentClass; - } - concatenate("\\var " + cmd.value()[0]); - newLine(); - metaCmdMap.erase(cmd); - commentType = VariableComment; - } - - if ((cmd = metaCmdMap.find("page")) != metaCmdMap.end()) { - currentPage = cmd.value()[0]; - QString htmlFile = currentPage; - const QString* title = getPageTitle(htmlFile); - QStringList parts = htmlFile.split('.'); - metaCmdMap.erase(cmd); - if (title) { - concatenate("\\page " + parts[0] + " " + *title); - newLine(); - } - commentType = PageComment; - qDebug() << "currentPage =" << currentPage; - } - - if ((cmd = metaCmdMap.find("example")) != metaCmdMap.end()) { - currentExample = cmd.value()[0]; - metaCmdMap.erase(cmd); - commentType = ExampleComment; - qDebug() << "currentExample =" << currentExample; - } - - if ((cmd = metaCmdMap.find("macro")) != metaCmdMap.end()) { - currentMacro = cmd.value()[0]; - metaCmdMap.erase(cmd); - commentType = MacroComment; - qDebug() << "currentMacro =" << currentMacro; - } - - if ((cmd = metaCmdMap.find("group")) != metaCmdMap.end()) { - currentGroup = cmd.value()[0]; - metaCmdMap.erase(cmd); - commentType = GroupComment; - qDebug() << "currentGroup =" << currentGroup; - } - - if ((cmd = metaCmdMap.find("module")) != metaCmdMap.end()) { - currentModule = cmd.value()[0]; - metaCmdMap.erase(cmd); - commentType = ModuleComment; - qDebug() << "currentModule =" << currentModule; - } - - if ((cmd = metaCmdMap.find("headerfile")) != metaCmdMap.end()) { - currentHeaderFile = cmd.value()[0]; - metaCmdMap.erase(cmd); - commentType = HeaderFileComment; - qDebug() << "currentHeaderFile =" << currentHeaderFile; - } - - if ((cmd = metaCmdMap.find("typedef")) != metaCmdMap.end()) { - currentClass = cmd.value()[0]; - if ((c = currentClass.lastIndexOf("::")) > 0) { - currentTypedef = currentClass.right(currentClass.size()-c-2); - currentClass = currentClass.left(c); - } - metaCmdMap.erase(cmd); - commentType = TypedefComment; - qDebug() << "currentTypedef =" << currentTypedef; - qDebug() << "currentClass =" << currentClass; - } - - cmd = priv->metaCommandMap.begin(); - while (cmd != priv->metaCommandMap.end()) { - for (int i=0; itext.firstAtom(); - while (next != 0) { - next->dump(); - Atom::Type atomType = next->type(); - switch (atomType) { - case Atom::AbstractLeft: - break; - case Atom::AbstractRight: - break; - case Atom::AutoLink: - concatenate(next->string()); - break; - case Atom::BaseName: - break; - case Atom::BriefLeft: - concatenate("\\brief "); - break; - case Atom::BriefRight: - newLine(); - break; - case Atom::C: - tt(next); - break; - case Atom::CaptionLeft: - unhandled(next); - break; - case Atom::CaptionRight: - unhandled(next); - break; - case Atom::Code: - code(next); - break; - case Atom::CodeBad: - code(next); - break; - case Atom::CodeNew: - newLine(); - concatenate("you can rewrite it as"); - code(next); - break; - case Atom::CodeOld: - newLine(); - concatenate("For example, if you have code like"); - code(next); - break; - case Atom::CodeQuoteArgument: - unhandled(next); - break; - case Atom::CodeQuoteCommand: - next = codeQuoteCommand(next); - break; - case Atom::FootnoteLeft: - break; - case Atom::FootnoteRight: - break; - case Atom::FormatElse: - formatElse(); - break; - case Atom::FormatEndif: - formatEndif(); - break; - case Atom::FormatIf: - formatIf(next); - break; - case Atom::FormattingLeft: - formattingLeft(next,next->next()); - break; - case Atom::FormattingRight: - formattingRight(next,prev); - break; - case Atom::GeneratedList: - break; - case Atom::Image: - break; - case Atom::ImageText: - break; - case Atom::InlineImage: - break; - case Atom::LegaleseLeft: - break; - case Atom::LegaleseRight: - break; - case Atom::LineBreak: - break; - case Atom::Link: - next = link(next); - break; - case Atom::LinkNode: - break; - case Atom::ListLeft: - { - bool nested = false; - if (structs.isEmpty()) { - const Atom* i = next->next(); - while (i->type() != Atom::ListRight) { - if ((i->type() == Atom::ListLeft) || - (i->type() == Atom::TableLeft)) { - nested = true; - break; - } - i = i->next(); - } - } - else - nested = true; - StructDesc d(BulletList,nested); - if (next->string() == "numeric") - d.structType = NumericList; - else if (next->string() == "value") { - d.structType = ValueList; - } - else if (next->string() != "bullet") - qDebug() << "UNKNOWN LIST TYPE" << next->string(); - structs.push(d); - if (nested || (d.structType != BulletList)) { - if (d.structType == BulletList) - concatenate("
      "); - else if (d.structType == NumericList) - concatenate("
        "); - else if (d.structType == ValueList) - concatenate("
        "); - newLine(); - } - } - break; - case Atom::ListItemNumber: - structs.top().count = next->string().toInt(); - break; - case Atom::ListTagLeft: - { - structs.top().count++; - concatenate("
        "); - const Atom* n = next->next(); - if (n->type() == Atom::String) { - qDebug() << "ENUM VALUE" << n->string(); - } - else - qDebug() << "NOT EN ENUM"; - } - break; - case Atom::ListTagRight: - concatenate("
        "); - break; - case Atom::ListItemLeft: - { - newLine(); - const StructDesc& d = structs.top(); - if (d.structType == BulletList) { - if (!d.nested) - concatenate("\\arg "); - else - concatenate("
      1. "); - } - else if (d.structType == NumericList) - concatenate("
      2. "); - else if (d.structType == ValueList) - concatenate("
        "); - } - break; - case Atom::ListItemRight: - { - const StructDesc& d = structs.top(); - if (d.structType == BulletList) { - if (d.nested) { - concatenate("
      3. "); - newLine(); - } - } - else if (d.structType == NumericList) { - concatenate(""); - newLine(); - } - else if (d.structType == ValueList) { - concatenate(""); - newLine(); - } - } - break; - case Atom::ListRight: - { - if (!structs.isEmpty()) { - const StructDesc& d = structs.top(); - if (d.nested || (d.structType != BulletList)) { - if (d.structType == BulletList) - concatenate("
    "); - else if (d.structType == NumericList) - concatenate(""); - else if (d.structType == ValueList) - concatenate(""); - newLine(); - } - structs.pop(); - } - } - break; - case Atom::Nop: - // nothing. - break; - case Atom::ParaLeft: - if (structs.isEmpty()) - newLine(); - break; - case Atom::ParaRight: - { - if (structs.isEmpty()) - newLine(); - else { - const StructDesc& d = structs.top(); - if (d.nested || (d.structType != BulletList)) { - Atom::Type t = next->next()->type(); - if ((t != Atom::ListItemRight) && - (t != Atom::TableItemRight)) - newLine(); - } - else - newLine(); - } - } - break; - case Atom::QuotationLeft: - break; - case Atom::QuotationRight: - break; - case Atom::RawString: - concatenate(next->string()); - break; - case Atom::SectionLeft: - // nothing. - break; - case Atom::SectionRight: - // nothing. - break; - case Atom::SectionHeadingLeft: - next = sectionHeading(next); - break; - case Atom::SectionHeadingRight: - newLine(); - break; - case Atom::SidebarLeft: - break; - case Atom::SidebarRight: - break; - case Atom::SnippetCommand: - newLine(); - concatenate("\\snippet "); - break; - case Atom::SnippetIdentifier: - newText += next->string(); - lineLength += next->string().size(); - newLine(); - break; - case Atom::SnippetLocation: - newText += next->string() + " "; - lineLength += next->string().size() + 1; - break; - case Atom::String: - wrap(next->string()); - break; - case Atom::TableLeft: - { - bool nested = false; - if (structs.isEmpty()) { - const Atom* i = next->next(); - while (i->type() != Atom::TableRight) { - if ((i->type() == Atom::ListLeft) || - (i->type() == Atom::TableLeft)) { - nested = true; - break; - } - i = i->next(); - } - } - else - nested = true; - StructDesc d(Table,nested); - structs.push(d); - if (next->string().isEmpty()) - concatenate("
    "); - else { - QString attrs = "width=\"" + next->string() + "\""; - attrs += " align=\"center\""; - concatenate("
    "); - } - newLine(); - } - break; - case Atom::TableRight: - concatenate("
    "); - if (!structs.isEmpty()) - structs.pop(); - newLine(); - break; - case Atom::TableHeaderLeft: - concatenate(""); - if (!structs.isEmpty()) - structs.top().inTableHeader = true; - newLine(); - break; - case Atom::TableHeaderRight: - concatenate(""); - if (!structs.isEmpty()) - structs.top().inTableHeader = false; - newLine(); - break; - case Atom::TableRowLeft: - if (!structs.isEmpty()) { - structs.top().inTableRow = true; - concatenate(""); - else - concatenate("even\">"); - structs.top().odd = !structs.top().odd; - } - newLine(); - break; - case Atom::TableRowRight: - concatenate(""); - if (!structs.isEmpty()) - structs.top().inTableRow = false; - newLine(); - break; - case Atom::TableItemLeft: - if (!structs.isEmpty()) { - structs.top().inTableItem = true; - concatenate(""); - if (structs.top().inTableHeader) - concatenate(" "); - } - break; - case Atom::TableItemRight: - if (!structs.isEmpty()) { - structs.top().inTableItem = false; - if (structs.top().inTableHeader) - concatenate(" "); - concatenate(""); - } - newLine(); - break; - case Atom::TableOfContents: - break; - case Atom::Target: - { - QString text = next->string(); - text.remove(ws_rx); - newLine(); - concatenate("\\anchor "); - newText += text; - lineLength += text.size(); - newLine(); - } - break; - case Atom::UnhandledFormat: - unhandled(next); - break; - case Atom::UnknownCommand: - unhandled(next); - break; - default: - //next->dump(); - break; - } - prev = next; - next = next->next(); - } -} - -/*! - - Pass one looks for topic commands and target and section - commands, and maybe other stuff. These are serialized to - text files, which are read back in by pass2(). - */ -void DoxWriter::pass1() -{ - QCommandMap& metaCmdMap = priv->metaCommandMap; - if (!metaCmdMap.isEmpty()) { - int c; - QCommandMap::iterator cmd; - if ((cmd = metaCmdMap.find("enum")) != metaCmdMap.end()) { - commentType = EnumComment; - currentEnum = cmd.value()[0]; - if ((c = currentEnum.lastIndexOf("::")) > 0) { - currentClass = currentEnum.left(c); - currentEnum = currentEnum.right(currentEnum.size()-c-2); - qDebug() << "currentEnum =" << currentEnum; - qDebug() << "currentClass =" << currentClass; - if (enums.contains(currentEnum,currentClass)) { - qWarning() << "DoxWriter::pass1():" - << "Duplicate enum:" - << currentClass << currentEnum; - } - else - enums.insert(currentEnum,currentClass); - } - } - else if ((cmd = metaCmdMap.find("property")) != metaCmdMap.end()) { - commentType = PropertyComment; - currentClass = cmd.value()[0]; - if ((c = currentClass.lastIndexOf("::")) > 0) { - currentProperty = currentClass.right(currentClass.size()-c-2); - currentClass = currentClass.left(c); - qDebug() << "currentProperty =" << currentProperty; - qDebug() << "currentClass =" << currentClass; - if (properties.contains(currentProperty,currentClass)) { - qWarning() << "DoxWriter::pass1():" - << "Duplicate property:" - << currentClass << currentProperty; - } - else - properties.insert(currentProperty,currentClass); - } - } - else if ((cmd = metaCmdMap.find("variable")) != metaCmdMap.end()) { - commentType = VariableComment; - currentClass = cmd.value()[0]; - if ((c = currentClass.lastIndexOf("::")) > 0) { - currentVariable = currentClass.right(currentClass.size()-c-2); - currentClass = currentClass.left(c); - qDebug() << "currentVariable =" << currentVariable; - qDebug() << "currentClass =" << currentClass; - if (variables.contains(currentVariable,currentClass)) { - qWarning() << "DoxWriter::pass1():" - << "Duplicate variable:" - << currentClass << currentVariable; - } - else - variables.insert(currentVariable,currentClass); - } - } - } - - /* - */ - const Atom* next = priv->text.firstAtom(); - while (next != 0) { - switch (next->type()) { - case Atom::SectionHeadingLeft: - { - QString text; - next = next->next(); - while (next) { - if (next->type() == Atom::SectionHeadingRight) - break; - else - text += next->string(); - next = next->next(); - } - //text.remove(ws_rx); - insertAnchor(text); - } - break; - case Atom::Target: - { - QString text = next->string(); - //text.remove(ws_rx); - insertAnchor(text); - } - default: - break; - } - next = next->next(); - } -} - -/*! - Output a parsed, tokenized qdoc comment as a doxygen - comment in diff format for input to the patch command. - */ -void DoxWriter::pass2() -{ - if (!conversionRequired()) { - qDebug() << "NO CONVERSION - FILE:" << priv->start_loc.fileName() - << "START:" << priv->start_loc.lineNo() - << "END:" << priv->end_loc.lineNo() - 1; - return; - } - - /* - Transformation to doxygen required... - */ - newText = "\n/*! \n"; - convertMetaCommands(); - convertText(); - if (newText[newText.size()-1] == ' ') - newText.remove(newText.size()-1,1); - newText += " */\n"; - qDebug() << "CONVERTED COMMENT - FILE:" << priv->start_loc.fileName() - << "START:" << priv->start_loc.lineNo() - << "END:" << priv->end_loc.lineNo() - 1; - qDebug() << newText; -} - -/*! - Unparse the second parameter of a "\l" command. - */ -const Atom* DoxWriter::link(const Atom* atom) -{ - QString first_text = atom->string(); - QString second_text; - const QString* value = 0; - - const Atom* next = atom->next(Atom::FormattingLeft,Atom::LINK_); - if (next) { - next->dump(); - while (1) { - next = next->next(); - next->dump(); - if (next->type() == Atom::FormattingRight) { - if (next->string() == Atom::LINK_) - break; - else { - // ignore it. - } - } - else - second_text += next->string(); - } - int i = first_text.indexOf('#'); - if (i >= 0) - first_text = first_text.right(first_text.size() - i - 1); - //newLine(); - if ((value = getExternalPage(first_text))) { - //qDebug() << "USED AN EXTERNAL PAGE TITLE" << first_text; - QString href = ""+first_text+""; - concatenate(href); - } - else if (first_text.startsWith("http:",Qt::CaseInsensitive)) { - if (first_text == second_text) { - concatenate(first_text); - } - else { - QString href = ""+second_text+""; - concatenate(href); - } - } - else if ((value = getPageFile(first_text))) { - //qDebug() << "USED A PAGE TITLE" << first_text; - QStringList parts = (*value).split('.'); - QString ref = "\\ref " + parts[0] + " \"" + second_text + "\""; - concatenate(ref); - } - else if ((value = getGroup(first_text))) { - //qDebug() << "USED A GROUP TITLE" << first_text; - concatenate("\\ref " + *value + " \"" + second_text + "\""); - } - else if ((value = getModule(first_text))) { - //qDebug() << "USED A MODULE TITLE" << first_text; - concatenate("\\ref " + *value + " \"" + second_text + "\""); - } - else if ((value = getExamplePath(first_text))) { - //qDebug() << "USED AN EXAMPLE TITLE" << first_text; - first_text.remove(ws_rx); - QString ref = "\\ref " + first_text + " \"" + second_text + "\""; - concatenate(ref); - } - else if ((value = getFile(first_text))) { - //qDebug() << "USED A FILE TITLE" << first_text; - // I think this command is no longer available. - first_text.remove(ws_rx); - QString ref = "\\ref " + first_text + " \"" + second_text + "\""; - concatenate(ref); - } - else if ((value = getHeaderFile(first_text))) { - //qDebug() << "USED A HEADER FILE TITLE" << first_text; - first_text.remove(ws_rx); - QString ref = "\\ref " + first_text + " \"" + second_text + "\""; - concatenate(ref); - } - else if (isAnchor(first_text)) { - //qDebug() << "USED AN ANCHOR" << first_text; - first_text.remove(ws_rx); - QString ref = "\\ref " + first_text + " \"" + second_text + "\""; - concatenate(ref); - } - else if ((value = getPageTitle(first_text))) { - //qDebug() << "USED AN INVERSE PAGE TITLE" << first_text; - QStringList parts = first_text.split('.'); - QString ref = "\\ref " + parts[0] + " \"" + second_text + "\""; - concatenate(ref); - } - else if ((value = getExampleTitle(first_text))) { - //qDebug() << "USED AN INVERSE EXAMPLE TITLE" << first_text; - QString title = *value; - title.remove(ws_rx); - QString ref = "\\ref " + title + " \"" + second_text + "\""; - concatenate(ref); - } - else if ((value = getGroupTitle(first_text))) { - //qDebug() << "USED AN INVERSE GROUP TITLE" << first_text; - concatenate("\\ref " + first_text + " \"" + second_text + "\""); - } - else if ((value = getModuleTitle(first_text))) { - //qDebug() << "USED AN INVERSE MODULE TITLE" << first_text; - concatenate("\\ref " + first_text + " \"" + second_text + "\""); - } - else if ((value = getFileTitle(first_text))) { - qDebug() << "USED AN INVERSE FILE TITLE" << first_text; - } - else if ((value = getHeaderFileTitle(first_text))) { - qDebug() << "USED AN INVERSE HEADER FILE TITLE" << first_text; - } - else if ((first_text.indexOf("::") >= 0) || - (first_text.indexOf("()") >= 0) || - (first_text[0] == 'Q')) { - //qDebug() << "AUTO-LINKABLE" << first_text; - if (first_text == second_text) - concatenate(first_text); - else { - QString link = first_text + " " + second_text; - concatenate("\\link " + link + "\\endlink"); - } - } - else { - QString link; - QStringList propertyClasses; - QStringList variableClasses; - QStringList enumClasses; - bool p = isProperty(first_text,propertyClasses); - bool v = isVariable(first_text,variableClasses); - bool e = isEnum(first_text,enumClasses); - if (e) { - if (enumClasses.size() == 1) - link = enumClasses[0]; - else if (enumClasses.contains(currentClass)) - link = currentClass; - else { - QString msg = "Unqualified enum name: " + first_text; - QString details = "Classes: " + enumClasses.join(", "); - priv->start_loc.error(msg,details); - } - if (!link.isEmpty()) - qDebug() << "FOUND ENUM" << link << first_text; - } - else if (p && v) { - if (propertyClasses.size() == 1) { - if (variableClasses.size() == 1) { - if (propertyClasses[0] == variableClasses[0]) - link = propertyClasses[0]; - } - } - if (link.isEmpty()) { - if (propertyClasses.contains(currentClass) || - variableClasses.contains(currentClass)) - link = currentClass; - else { - propertyClasses += variableClasses; - QString msg = "Unqualified property or variable name: " - + first_text; - QString details = "Classes: " + - propertyClasses.join(", "); - priv->start_loc.error(msg,details); - } - } - } - else if (p) { - if (propertyClasses.size() == 1) - link = propertyClasses[0]; - else if (propertyClasses.contains(currentClass)) - link = currentClass; - else { - QString msg = "Unqualified property name: " + first_text; - QString details = "Classes: " + propertyClasses.join(", "); - priv->start_loc.error(msg,details); - } - } - else if (v) { - if (variableClasses.size() == 1) - link = variableClasses[0]; - else if (variableClasses.contains(currentClass)) - link = currentClass; - else { - QString msg = "Unqualified variable name: " + first_text; - QString details = "Classes: " + variableClasses.join(", "); - priv->start_loc.error(msg,details); - } - } - else { - qDebug() << "NOT AUTO-LINKABLE" << first_text; - QString s = first_text + " " + second_text; - concatenate("\\link " + s + "\\endlink"); - } - if (!link.isEmpty()) { - link += "::" + first_text + " " + second_text; - concatenate("\\link " + link + "\\endlink"); - } - } - } - else - qDebug() << "LINK with no second parameter!!!!"; - return next? next : atom; -} - -/*! - If the current line length is 0, the current line is - indented according to the context. - */ -void DoxWriter::indentLine() -{ - if (lineLength == 0) { - newText += DOXYGEN_INDENT_STRING; - lineLength = DOXYGEN_INDENT; - if (!structs.isEmpty()) { - for (int i=1; i maxLineLength) - newLine(); - indentLine(); - newText += text; - lineLength += text.size(); -} - -static bool punctuation(QChar c) -{ - switch (c.toAscii()) { - case '.': - case ',': - case ':': - case ';': - case '/': - case '+': - case '-': - case '?': - case '!': - case '\"': - return true; - default: - break; - } - return false; -} - -/*! - Concatenate the \a text string to the doxygen text, doing - line wrapping where necessary. - */ -void DoxWriter::wrap(QString text) -{ - int from = 0; - int to = -1; - - if ((lineLength == 0) || (lineLength >= maxLineLength)) { - if (!text.isEmpty() && (text[0] == ' ')) - text = text.right(text.size() - 1); - } - - indentLine(); - while (text.size()) { - int avail = maxLineLength - lineLength; - from = text.indexOf(' ',from); - if (from >= 0) { - if (from < avail) - to = from++; - else if (from == 1 && punctuation(text[0])) - to = from++; - else { - if (to >= 0) { - newText += text.left(to+1); - lineLength += to + 1; - text = text.right(text.size() - to - 1); - } - else { - newLine(); - indentLine(); - newText += text.left(from+1); - lineLength += from + 1; - text = text.right(text.size() - from - 1); - } - from = 0; - to = -1; - if (text.size() && (lineLength > maxLineLength)) { - newLine(); - indentLine(); - } - } - } - else - break; - } - if (text.size()) { - if (lineLength >= maxLineLength) { - newLine(); - indentLine(); - } - newText += text; - lineLength += text.size(); - } -} - -/*! - This will output something, but it depends on what the - \a atom string and the \a next atom string are. - */ -void DoxWriter::formattingLeft(const Atom* atom, const Atom* next) -{ - if (atom->string() == "parameter") { - concatenate("\\a "); - return; - } - else if (atom->string() == "underline") { - concatenate(""); - return; - } - else if (atom->string() == "superscript") { - concatenate(""); - return; - } - else if (atom->string() == "subscript") { - concatenate(""); - return; - } - int ws = -1; - if (next) - ws = next->string().indexOf(ws_rx); - if (atom->string() == "bold") { - if (ws < 0) - concatenate("\\b "); - else - concatenate(""); - } - else if (atom->string() == "italic") { - if (ws < 0) - concatenate("\\e "); - else - concatenate(""); - } - else if (atom->string() == "teletype") { - if (ws < 0) - concatenate("\\c "); - else - concatenate(""); - } - else - qDebug() << "UNHANDLED FormattingLeft: " << atom->string(); -} - -/*! - This will output something, but it depends on what the - \a atom string and the \a prev atom string are. - */ -void DoxWriter::formattingRight(const Atom* atom, const Atom* prev) -{ - if (atom->string() == "parameter") - return; - else if (atom->string() == "underline") { - concatenate(""); - return; - } - else if (atom->string() == "superscript") { - concatenate(""); - return; - } - else if (atom->string() == "subscript") { - concatenate(""); - return; - } - int ws = -1; - if (prev) - ws = prev->string().indexOf(ws_rx); - if (ws < 0) - return; - if (atom->string() == "bold") - concatenate(""); - else if (atom->string() == "italic") - concatenate(""); - else if (atom->string() == "teletype") - concatenate(""); - else - qDebug() << "UNHANDLED FormattingRight: " << atom->string(); -} - -/*! - Output a \c or a .... - */ -void DoxWriter::tt(const Atom* atom) -{ - if (atom->string().indexOf(ws_rx) < 0) { - concatenate("\\c "); - concatenate(atom->string()); - } - else { - concatenate(""); - concatenate(atom->string()); - concatenate(""); - } -} - -/*! - */ -void DoxWriter::formatIf(const Atom* atom) -{ - if (atom->string() == "HTML") { - newLine(); - concatenate("\\htmlonly"); - newLine(); - } -} - -/*! - */ -void DoxWriter::formatEndif() -{ - newLine(); - concatenate("\\endhtmlonly"); - newLine(); -} - -/*! - */ -void DoxWriter::formatElse() -{ - // nothing. -} - -/*! - Pass 1: Construct a section identifier and insert it into - the anchor set. - - Pass 2: Convert section1, section2, and section3 commands - to section, subsection, and subsubsection respectively. - Warn if a section command higher than 3 is seen. - */ -const Atom* DoxWriter::sectionHeading(const Atom* atom) -{ - QString heading_level = atom->string(); - QString heading_text; - const Atom* next = atom->next(); - while (next) { - next->dump(); - if (next->type() == Atom::SectionHeadingRight) { - if (next->string() == heading_level) - break; - else { - qDebug() << "WRONG SectionHeading number!!!!"; - } - } - else - heading_text += next->string(); - next = next->next(); - } - - QString heading_identifier = heading_text; - heading_identifier.remove(ws_rx); - - newLine(); - if (heading_level == "1") - heading_level = "\\section "; - else if (heading_level == "2") - heading_level = "\\subsection "; - else if (heading_level == "3") - heading_level = "\\subsubsection "; - else if (heading_level == "4") { - heading_level = "\\subsubsection "; - qDebug() << "WARNING section4 converted to \\subsubsection"; - } - else { - heading_level = "\\subsubsection "; - qDebug() << "WARNING section5 converted to \\subsubsection"; - } - concatenate(heading_level); - newText += heading_identifier + " "; - lineLength += heading_identifier.size() + 1; - newText += heading_text; - lineLength += heading_text.size(); - newLine(); - return next? next : atom; -} - -/*! - Report an unhandled atom. - */ -void DoxWriter::unhandled(const Atom* atom) -{ - qDebug() << "UNHANDLED ATOM"; - atom->dump(); -} - -/*! - Output a code/endcode block. - */ -void DoxWriter::code(const Atom* atom) -{ - newLine(); - concatenate("\\code"); - writeCode(atom->string()); - concatenate("\\endcode"); - newLine(); -} - -/*! - Output a code/endcode block depending on the - CodeQuote Command and CodeQuoteArgument parameters. - */ -const Atom* DoxWriter::codeQuoteCommand(const Atom* atom) -{ - QString command = atom->string(); - atom = atom->next(); - concatenate("\\code"); - if (command == "codeline") { - newLine(); - concatenate(atom->string()); - newLine(); - } - else if (command == "dots") { - newLine(); - concatenate(atom->string()); - newLine(); - } - else { - writeCode(atom->string()); - } - concatenate("\\endcode"); - return atom; -} - -/*! - Appends a block of code to the comment. - */ -void DoxWriter::writeCode(QString text) -{ - int cr_count = text.count('\n') - 1; - if (cr_count >= 0) { - int last_cr = text.lastIndexOf('\n'); - newText += text.left(last_cr); - lineCount += cr_count; - } - else - newText += text; - newLine(); -} - -/*! - Inserts \a text into the anchor set. This function is called - during doxygen pass 1. - */ -void DoxWriter::insertAnchor(const QString& text) -{ - anchors.insert(text); -} - -/*! - Returns true if \a text identifies an anchor, section, - subsection, subsubsection, or page. - */ -bool DoxWriter::isAnchor(const QString& text) -{ - return anchors.contains(text); -} - -/*! - Write the set of anchors to a file, one per line. - */ -void DoxWriter::writeAnchors() -{ - QFile file("anchors.txt"); - if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { - qWarning("Unable to open anchors.txt for writing."); - return; - } - - QTextStream out(&file); - QSet::const_iterator i = anchors.constBegin(); - while (i != anchors.constEnd()) { - out << *i << "\n"; - ++i; - } - file.close(); -} - -/*! - Read the set of anchors from the anchors file, one per line, - and insert each one into the anchor set. - */ -void DoxWriter::readAnchors() -{ - QFile file("anchors.txt"); - if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { - qWarning("Unable to open anchors.txt for reading."); - return; - } - - QTextStream in(&file); - while (!in.atEnd()) { - QString line = in.readLine(); - anchors.insert(line); - } - file.close(); -#if 0 - QSet::const_iterator i = anchors.constBegin(); - while (i != anchors.constEnd()) { - qDebug() << *i; - ++i; - } -#endif -} - -/*! - Inserts \a title into one of the title maps. \a title is - mapped to the \a node name. This function is called during - doxygen pass 1. - */ -void DoxWriter::insertTitle(FakeNode* node, const QString& title) -{ - switch (node->subType()) { - case FakeNode::Example: - if (exampleTitles.contains(title)) { - qWarning() << "DoxWriter::insertTitle():" - << "Duplicate example title:" - << title; - } - else { - exampleTitles[title] = node->name(); - exampleTitlesInverse[node->name()] = title; - } - break; - case FakeNode::HeaderFile: - if (headerFileTitles.contains(title)) { - qWarning() << "DoxWriter::insertTitle():" - << "Duplicate header file title:" - << title; - } - else { - headerFileTitles[title] = node->name(); - headerFileTitlesInverse[node->name()] = title; - } - break; - case FakeNode::File: - if (fileTitles.contains(title)) { - qWarning() << "DoxWriter::insertTitle():" - << "Duplicate file title:" - << title; - } - else { - fileTitles[title] = node->name(); - fileTitlesInverse[node->name()] = title; - } - break; - case FakeNode::Group: - if (groupTitles.contains(title)) { - qWarning() << "DoxWriter::insertTitle():" - << "Duplicate group title:" - << title; - } - else { - groupTitles[title] = node->name(); - groupTitlesInverse[node->name()] = title; - } - break; - case FakeNode::Module: - if (moduleTitles.contains(title)) { - qWarning() << "DoxWriter::insertTitle():" - << "Duplicate module title:" - << title; - } - else { - moduleTitles[title] = node->name(); - moduleTitlesInverse[node->name()] = title; - } - break; - case FakeNode::Page: - if (pageTitles.contains(title)) { - qWarning() << "DoxWriter::insertTitle():" - << "Duplicate page title:" - << title; - } - else { - pageTitles[title] = node->name(); - pageTitlesInverse[node->name()] = title; - } - break; - case FakeNode::ExternalPage: - if (externalPageTitles.contains(title)) { - qWarning() << "DoxWriter::insertTitle():" - << "Duplicate external page title:" - << title; - } - else { - externalPageTitles[title] = node->name(); - externalPageTitlesInverse[node->name()] = title; - } - break; - default: - break; - } -} - -/*! - */ -const QString* DoxWriter::getPageFile(const QString& title) -{ - QStringMapEntry entry = pageTitles.find(title); - return (entry == pageTitles.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getExamplePath(const QString& title) -{ - QStringMapEntry entry = exampleTitles.find(title); - return (entry == exampleTitles.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getFile(const QString& title) -{ - QStringMapEntry entry = fileTitles.find(title); - return (entry == fileTitles.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getHeaderFile(const QString& title) -{ - QStringMapEntry entry = headerFileTitles.find(title); - return (entry == headerFileTitles.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getGroup(const QString& title) -{ - QStringMapEntry entry = groupTitles.find(title); - return (entry == groupTitles.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getModule(const QString& title) -{ - QStringMapEntry entry = moduleTitles.find(title); - return (entry == moduleTitles.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getExternalPage(const QString& title) -{ - QStringMapEntry entry = externalPageTitles.find(title); - return (entry == externalPageTitles.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getPageTitle(const QString& text) -{ - QStringMapEntry entry = pageTitlesInverse.find(text); - return (entry == pageTitlesInverse.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getExampleTitle(const QString& text) -{ - QStringMapEntry entry = exampleTitlesInverse.find(text); - return (entry == exampleTitlesInverse.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getFileTitle(const QString& text) -{ - QStringMapEntry entry = fileTitlesInverse.find(text); - return (entry == fileTitlesInverse.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getHeaderFileTitle(const QString& text) -{ - QStringMapEntry entry = headerFileTitlesInverse.find(text); - return (entry == headerFileTitlesInverse.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getGroupTitle(const QString& text) -{ - QStringMapEntry entry = groupTitlesInverse.find(text); - return (entry == groupTitlesInverse.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getModuleTitle(const QString& text) -{ - QStringMapEntry entry = moduleTitlesInverse.find(text); - return (entry == moduleTitlesInverse.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getExternalPageTitle(const QString& text) -{ - QStringMapEntry entry = externalPageTitlesInverse.find(text); - return (entry == externalPageTitlesInverse.end()) ? 0 : &entry.value(); -} - -/*! - Serialize \a map to file \a name. - */ -void DoxWriter::writeMap(const QStringMap& map, const QString& name) -{ - - QFile file(name); - if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { - qWarning() << "Unable to open" << name << "for writing."; - return; - } - - QTextStream out(&file); - QStringMap::const_iterator i = map.constBegin(); - while (i != map.constEnd()) { - out << i.key() << "\n"; - out << i.value() << "\n"; - ++i; - } - file.close(); -} - -/*! - Read file \a name into the \a map. - */ -void DoxWriter::readMap(QStringMap& map, QStringMap& inverseMap, const QString& name) -{ - QFile file(name); - if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { - qWarning() << "Unable to open" << name << "for reading."; - return; - } - - QTextStream in(&file); - while (!in.atEnd()) { - QString title = in.readLine(); - QString value = in.readLine(); - map[title] = value; - inverseMap[value] = title; - } - file.close(); -} - -/*! - Write the sets of titles to text files, one per line. - */ -void DoxWriter::writeTitles() -{ - if (!pageTitles.isEmpty()) - writeMap(pageTitles,"pagetitles.txt"); - if (!fileTitles.isEmpty()) - writeMap(fileTitles,"filetitles.txt"); - if (!headerFileTitles.isEmpty()) - writeMap(headerFileTitles,"headerfiletitles.txt"); - if (!exampleTitles.isEmpty()) - writeMap(exampleTitles,"exampletitles.txt"); - if (!moduleTitles.isEmpty()) - writeMap(moduleTitles,"moduletitles.txt"); - if (!groupTitles.isEmpty()) - writeMap(groupTitles,"grouptitles.txt"); - if (!externalPageTitles.isEmpty()) - writeMap(externalPageTitles,"externalpagetitles.txt"); -} - -/*! - Read the sets of titles from the titles files, one per line, - and insert each one into the appropriate title set. - */ -void DoxWriter::readTitles() -{ - readMap(pageTitles,pageTitlesInverse,"pagetitles.txt"); - readMap(fileTitles,fileTitlesInverse,"filetitles.txt"); - readMap(headerFileTitles,headerFileTitlesInverse,"headerfiletitles.txt"); - readMap(exampleTitles,exampleTitlesInverse,"exampletitles.txt"); - readMap(moduleTitles,moduleTitlesInverse,"moduletitles.txt"); - readMap(groupTitles,groupTitlesInverse,"grouptitles.txt"); - readMap(externalPageTitles, - externalPageTitlesInverse, - "externalpagetitles.txt"); -} - -/*! - Serialize \a map to file \a name. - */ -void DoxWriter::writeMultiMap(const QStringMultiMap& map, const QString& name) -{ - - QFile file(name); - if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { - qWarning() << "Unable to open" << name << "for writing."; - return; - } - - QTextStream out(&file); - QStringMultiMap::const_iterator i = map.constBegin(); - while (i != map.constEnd()) { - out << i.key() << "\n"; - out << i.value() << "\n"; - ++i; - } - file.close(); -} - -/*! - Write the4 property names and variable names to text files. - */ -void DoxWriter::writeMembers() -{ - if (!variables.isEmpty()) - writeMultiMap(variables,"variables.txt"); - if (!properties.isEmpty()) - writeMultiMap(properties,"properties.txt"); - if (!enums.isEmpty()) - writeMultiMap(enums,"enums.txt"); -} - -/*! - Read file \a name into the \a map. - */ -void DoxWriter::readMultiMap(QStringMultiMap& map, const QString& name) -{ - QFile file(name); - if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { - qWarning() << "Unable to open" << name << "for reading."; - return; - } - - QTextStream in(&file); - while (!in.atEnd()) { - QString member = in.readLine(); - QString className = in.readLine(); - map.insert(member,className); - } - file.close(); -} - -/*! - Read the property names and variable names from the test files. - */ -void DoxWriter::readMembers() -{ - readMultiMap(variables,"variables.txt"); - readMultiMap(properties,"properties.txt"); - readMultiMap(enums,"enums.txt"); -} - -/*! - Return true if \a name is a property. Loads \a classes with - the names of all the classes in which \a name is a property. - */ -bool DoxWriter::isProperty(const QString& name, QStringList& classes) -{ - classes = properties.values(name); - return !classes.isEmpty(); -} - -/*! - Return true if \a name is a variable. Loads \a classes with - the names of all the classes in which \a name is a variable. - */ -bool DoxWriter::isVariable(const QString& name, QStringList& classes) -{ - classes = variables.values(name); - return !classes.isEmpty(); -} - -/*! - Return true if \a name is an enum type. Loads \a classes with - the names of all the classes in which \a name is an enum type. - */ -bool DoxWriter::isEnum(const QString& name, QStringList& classes) -{ - classes = enums.values(name); - return !classes.isEmpty(); -} -#endif - QT_END_NAMESPACE diff --git a/tools/qdoc3/doc.h b/tools/qdoc3/doc.h index 6cb6f0a..2c1d29e 100644 --- a/tools/qdoc3/doc.h +++ b/tools/qdoc3/doc.h @@ -133,183 +133,6 @@ class Doc DocPrivate *priv; }; -#ifdef QDOC2DOX - -class DoxWriter -{ - public: - DoxWriter(const QString& source, DocPrivate* docPrivate) - : commentType(OtherComment), - lineLength(0), - lineCount(0), - priv(docPrivate), - oldText(source) {} - ~DoxWriter() {} - - void pass1(); - void pass2(); - - static void setDoxPass(int pass); - static bool isDoxPass(int pass); - static bool isDoxPass(); - static void insertTitle(FakeNode* node, const QString& title); - static void writeTitles(); - static void readTitles(); - static void writeMembers(); - static void readMembers(); - static void writeAnchors(); - static void readAnchors(); - - private: - void indentLine(); - void newLine(); - void concatenate(QString text); - void wrap(QString text); - bool conversionRequired() const; - void convertMetaCommands(); - void convertText(); - const Atom* link(const Atom* atom); - void formattingLeft(const Atom* atom, const Atom* next); - void formattingRight(const Atom* atom, const Atom* prev); - void tt(const Atom* atom); - void formatIf(const Atom* atom); - void formatEndif(); - void formatElse(); - const Atom* sectionHeading(const Atom* atom); - void unhandled(const Atom* atom); - void code(const Atom* atom); - const Atom* codeQuoteCommand(const Atom* atom); - void writeCode(QString text); - void writeCommand(QCommandMap::const_iterator cmd); - - static void insertAnchor(const QString& text); - static bool isAnchor(const QString& text); - - static const QString* getPageFile(const QString& title); - static const QString* getFile(const QString& title); - static const QString* getExamplePath(const QString& title); - static const QString* getHeaderFile(const QString& title); - static const QString* getGroup(const QString& title); - static const QString* getModule(const QString& title); - static const QString* getExternalPage(const QString& title); - static const QString* getPageTitle(const QString& text); - static const QString* getFileTitle(const QString& text); - static const QString* getExampleTitle(const QString& text); - static const QString* getHeaderFileTitle(const QString& text); - static const QString* getGroupTitle(const QString& text); - static const QString* getModuleTitle(const QString& text); - static const QString* getExternalPageTitle(const QString& text); - - static bool isProperty(const QString& title, QStringList& classes); - static bool isVariable(const QString& title, QStringList& classes); - static bool isEnum(const QString& title, QStringList& classes); - - private: - static void writeMap(const QStringMap& map, const QString& name); - static void readMap(QStringMap& map, - QStringMap& inverseMap, - const QString& name); - static void writeMultiMap(const QStringMultiMap& map, const QString& name); - static void readMultiMap(QStringMultiMap& map, const QString& name); - - public: // VS 6, SunCC need this to be public - enum StructType { BulletList, NumericList, ValueList, Table }; - private: - struct StructDesc { - StructType structType; - int count; - bool nested; - bool inTableHeader; - bool inTableRow; - bool inTableItem; - bool odd; - - StructDesc() - : structType(BulletList), - count(0), - nested(false), - inTableHeader(false), - inTableRow(false), - inTableItem(false), - odd(true) { } - - StructDesc(StructType t, bool n) - : structType(t), - count(0), - nested(n), - inTableHeader(false), - inTableRow(false), - inTableItem(false), - odd(true) { } - }; - - typedef QStack StructStack; - - enum CommentType { - ClassComment, - EnumComment, - ExampleComment, - FnComment, - GroupComment, - HeaderFileComment, - MacroComment, - ModuleComment, - PageComment, - PropertyComment, - ServiceComment, - TypedefComment, - VariableComment, - OtherComment - }; - - private: - CommentType commentType; - int lineLength; - int lineCount; - DocPrivate* priv; - QString oldText; - QString newText; - StructStack structs; - - QString currentPage; - QString currentFn; - QString currentTitle; - QString currentEnum; - QString currentProperty; - QString currentVariable; - QString currentExample; - QString currentGroup; - QString currentModule; - QString currentMacro; - QString currentService; - QString currentTypedef; - QString currentHeaderFile; - static QString currentClass; - - static int doxPass; - static QSet anchors; - static QStringMap exampleTitles; - static QStringMap headerFileTitles; - static QStringMap fileTitles; - static QStringMap groupTitles; - static QStringMap moduleTitles; - static QStringMap pageTitles; - static QStringMap externalPageTitles; - static QStringMap exampleTitlesInverse; - static QStringMap headerFileTitlesInverse; - static QStringMap fileTitlesInverse; - static QStringMap groupTitlesInverse; - static QStringMap moduleTitlesInverse; - static QStringMap pageTitlesInverse; - static QStringMap externalPageTitlesInverse; - - static QStringMultiMap variables; - static QStringMultiMap properties; - static QStringMultiMap enums; -}; - -#endif - QT_END_NAMESPACE #endif diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp index 5c247fa..514d06e 100644 --- a/tools/qdoc3/main.cpp +++ b/tools/qdoc3/main.cpp @@ -98,8 +98,6 @@ static bool slow = false; static QStringList defines; static QHash trees; -//static int doxygen = 0; - /*! Find the Tree for language \a lang and return a pointer to it. If there is no Tree for language \a lang in the Tree table, add @@ -224,18 +222,6 @@ static void processQdocconfFile(const QString &fileName) QString lang = config.getString(CONFIG_LANGUAGE); Location langLocation = config.lastLocation(); -#ifdef QDOC2DOX - // qdoc -> doxygen - if (doxygen == 2) { - qDebug() << "READING anchors.txt"; - DoxWriter::readAnchors(); - qDebug() << "READING title maps"; - DoxWriter::readTitles(); - qDebug() << "READING member multimaps"; - DoxWriter::readMembers(); - } -#endif - /* Initialize the tree where all the parsed sources will be stored. The tree gets built as the source files are parsed, and then the @@ -322,17 +308,6 @@ static void processQdocconfFile(const QString &fileName) tree->resolveGroups(); tree->resolveTargets(); -#ifdef QDOC2DOX - // qdoc -> doxygen - if (doxygen == 1) { - DoxWriter::writeAnchors(); - DoxWriter::writeTitles(); - DoxWriter::writeMembers(); - } - - if (doxygen == 0) { -#endif - /* Now the tree has been built, and all the stuff that needed resolving has been resolved. Now it is time to traverse @@ -357,11 +332,6 @@ static void processQdocconfFile(const QString &fileName) tree->setVersion(""); Generator::terminate(); - -#ifdef QDOC2DOX - } -#endif - CodeParser::terminate(); CodeMarker::terminate(); CppToQsConverter::terminate(); @@ -456,26 +426,6 @@ int main(int argc, char **argv) else if (opt == "-slow") { slow = true; } - -#ifdef QDOC2DOX - else if (opt == "-doxygen1") { - // qdoc -> doxygen - // Don't use this; it isn't ready yet. - // Now it's a fossil. - qDebug() << "doxygen pass 1"; - doxygen = 1; - DoxWriter::setDoxPass(1); - } - else if (opt == "-doxygen2") { - // qdoc -> doxygen - // Don't use this; it isn't ready yet. - // Now it's a fossil. - qDebug() << "doxygen pass 2"; - doxygen = 2; - DoxWriter::setDoxPass(2); - } -#endif - else { qdocFiles.append(opt); } -- cgit v0.12 From 49108bbc2bf79157f1be0f837db08f72408764cb Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Thu, 28 May 2009 14:46:03 +0200 Subject: small cleanup on the sub-attaq demo removed declaration of properties that are already declared in Qt --- examples/animation/sub-attaq/boat.h | 3 +-- examples/animation/sub-attaq/bomb.h | 3 +-- examples/animation/sub-attaq/graphicsscene.h | 2 +- examples/animation/sub-attaq/qanimationstate.h | 2 +- examples/animation/sub-attaq/submarine.h | 2 +- examples/animation/sub-attaq/torpedo.h | 3 +-- 6 files changed, 6 insertions(+), 9 deletions(-) diff --git a/examples/animation/sub-attaq/boat.h b/examples/animation/sub-attaq/boat.h index 08a9fa2..b412739 100644 --- a/examples/animation/sub-attaq/boat.h +++ b/examples/animation/sub-attaq/boat.h @@ -59,7 +59,6 @@ QT_END_NAMESPACE class Boat : public QGraphicsWidget { Q_OBJECT -Q_PROPERTY(QPointF pos READ pos WRITE setPos) public: enum Movement { None = 0, @@ -85,7 +84,7 @@ public: virtual int type() const; -Q_SIGNALS: +signals: void boatDestroyed(); void boatExecutionFinished(); diff --git a/examples/animation/sub-attaq/bomb.h b/examples/animation/sub-attaq/bomb.h index 226d056..cfd42e5 100644 --- a/examples/animation/sub-attaq/bomb.h +++ b/examples/animation/sub-attaq/bomb.h @@ -51,7 +51,6 @@ class PixmapItem; class Bomb : public QGraphicsWidget { Q_OBJECT -Q_PROPERTY(QPointF pos READ pos WRITE setPos) public: enum Direction { Left = 0, @@ -61,7 +60,7 @@ public: void launch(Direction direction); void destroy(); -Q_SIGNALS: +signals: void bombExplosed(); void bombExecutionFinished(); diff --git a/examples/animation/sub-attaq/graphicsscene.h b/examples/animation/sub-attaq/graphicsscene.h index 8b0ea96..1e6618a 100644 --- a/examples/animation/sub-attaq/graphicsscene.h +++ b/examples/animation/sub-attaq/graphicsscene.h @@ -90,7 +90,7 @@ public: void clearScene(); QGraphicsPixmapItem *addWelcomeItem(const QPixmap &pm); -Q_SIGNALS: +signals: void subMarineDestroyed(int); void allSubMarineDestroyed(int); diff --git a/examples/animation/sub-attaq/qanimationstate.h b/examples/animation/sub-attaq/qanimationstate.h index e5322ad..72bb2d9 100644 --- a/examples/animation/sub-attaq/qanimationstate.h +++ b/examples/animation/sub-attaq/qanimationstate.h @@ -70,7 +70,7 @@ public: void setAnimation(QAbstractAnimation *animation); QAbstractAnimation* animation() const; -Q_SIGNALS: +signals: void animationFinished(); protected: diff --git a/examples/animation/sub-attaq/submarine.h b/examples/animation/sub-attaq/submarine.h index 4001603..b8dd2da 100644 --- a/examples/animation/sub-attaq/submarine.h +++ b/examples/animation/sub-attaq/submarine.h @@ -75,7 +75,7 @@ public: virtual int type() const; -Q_SIGNALS: +signals: void subMarineDestroyed(); void subMarineExecutionFinished(); void subMarineStateChanged(); diff --git a/examples/animation/sub-attaq/torpedo.h b/examples/animation/sub-attaq/torpedo.h index 4a0f457..f5ab614 100644 --- a/examples/animation/sub-attaq/torpedo.h +++ b/examples/animation/sub-attaq/torpedo.h @@ -53,14 +53,13 @@ class PixmapItem; class Torpedo : public QGraphicsWidget { Q_OBJECT -Q_PROPERTY(QPointF pos READ pos WRITE setPos) public: Torpedo(QGraphicsItem * parent = 0, Qt::WindowFlags wFlags = 0); void launch(); void setCurrentSpeed(int speed); void destroy(); -Q_SIGNALS: +signals: void torpedoExplosed(); void torpedoExecutionFinished(); -- cgit v0.12 From 1bf86e118a168c9aa6bed95bbe4b095f36e4a3cb Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Thu, 28 May 2009 15:03:40 +0200 Subject: Polished aboutQt dialog a little bit. Splitted text in the AboutQt dialog into several chunks to make use of advanced qmessagebox text fields Reviewed-By: Trenton Schulz --- src/gui/dialogs/qmessagebox.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp index 6790c3d..1734e85 100644 --- a/src/gui/dialogs/qmessagebox.cpp +++ b/src/gui/dialogs/qmessagebox.cpp @@ -1684,10 +1684,13 @@ void QMessageBox::aboutQt(QWidget *parent, const QString &title) } #endif - QString translatedTextAboutQt; - translatedTextAboutQt = QMessageBox::tr( + QString translatedTextAboutQtCaption; + translatedTextAboutQtCaption = QMessageBox::tr( "

    About Qt

    " "

    This program uses Qt version %1.

    " + ).arg(QLatin1String(QT_VERSION_STR)); + QString translatedTextAboutQtText; + translatedTextAboutQtText = QMessageBox::tr( "

    Qt is a C++ toolkit for cross-platform application " "development.

    " "

    Qt provides single-source portability across MS Windows, " @@ -1715,12 +1718,12 @@ void QMessageBox::aboutQt(QWidget *parent, const QString &title) "

    Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).

    " "

    Qt is a Nokia product. See www.qtsoftware.com/qt " "for more information.

    " - ).arg(QLatin1String(QT_VERSION_STR)); - + ); QMessageBox *msgBox = new QMessageBox(parent); msgBox->setAttribute(Qt::WA_DeleteOnClose); msgBox->setWindowTitle(title.isEmpty() ? tr("About Qt") : title); - msgBox->setInformativeText(translatedTextAboutQt); + msgBox->setText(translatedTextAboutQtCaption); + msgBox->setInformativeText(translatedTextAboutQtText); QPixmap pm(QLatin1String(":/trolltech/qmessagebox/images/qtlogo-64.png")); if (!pm.isNull()) -- cgit v0.12 From 7f353ae912a935b9837cd5a00de295ec64a220af Mon Sep 17 00:00:00 2001 From: Brad Hards Date: Mon, 25 May 2009 21:49:12 +1000 Subject: Remove duplicate qpdf_p.h include. --- src/gui/text/qfontengine_ft.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index 6f5ee1f..a93c391 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -54,8 +54,6 @@ #include #include -#include - #include "qfontengine_ft_p.h" #include #include FT_FREETYPE_H -- cgit v0.12 From 83f4dc2ab88f64460cd8742a5d70ee6fb46e44a9 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Thu, 28 May 2009 15:55:48 +0200 Subject: oops, build was broken on embedded --- src/gui/text/qfontengine_qpf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/text/qfontengine_qpf.cpp b/src/gui/text/qfontengine_qpf.cpp index 28eb362..8222b7f 100644 --- a/src/gui/text/qfontengine_qpf.cpp +++ b/src/gui/text/qfontengine_qpf.cpp @@ -320,7 +320,7 @@ QFontEngineQPF::QFontEngineQPF(const QFontDef &def, int fileDescriptor, QFontEng + QString::number(fontDef.pixelSize) + QLatin1Char('_') + QString::number(fontDef.weight) + (fontDef.style != QFont::StyleNormal ? - QLatin1String("_italic") : QLatin1String()) + QLatin1String("_italic") : QLatin1String("")) + QLatin1String(".qsf"); fileName.replace(QLatin1Char(' '), QLatin1Char('_')); fileName.prepend(qws_fontCacheDir()); -- cgit v0.12 From 4a44a8b4be1ba827ccaee8bf19903c6adb9c0900 Mon Sep 17 00:00:00 2001 From: Brad Hards Date: Tue, 26 May 2009 13:38:42 +1000 Subject: Fix build when compiling Qt using -no-opengl configuration. --- examples/animation/sub-attaq/mainwindow.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/animation/sub-attaq/mainwindow.cpp b/examples/animation/sub-attaq/mainwindow.cpp index 9cf9eb5..5e8e259 100644 --- a/examples/animation/sub-attaq/mainwindow.cpp +++ b/examples/animation/sub-attaq/mainwindow.cpp @@ -44,9 +44,12 @@ #include "graphicsscene.h" //Qt -#include -#ifndef QT_NO_OPENGL -#include +#ifdef QT_NO_OPENGL + #include + #include + #include +#else + #include #endif MainWindow::MainWindow() : QMainWindow(0) -- cgit v0.12 From f22350c32392da6b3dc2af2c9079d312f262f441 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 28 May 2009 16:35:24 +0200 Subject: QStringBuilder benchmark: make testing of the drop-in replacement operator+() easier. This adds a few explicit QString(...) casts around operator+() based expressions to make them acceptable for QCOMPARE. --- tests/benchmarks/qstringbuilder/main.cpp | 34 +++++++++++----------- tests/benchmarks/qstringbuilder/qstringbuilder.pro | 4 +++ 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/tests/benchmarks/qstringbuilder/main.cpp b/tests/benchmarks/qstringbuilder/main.cpp index cb76925..8eb4e78 100644 --- a/tests/benchmarks/qstringbuilder/main.cpp +++ b/tests/benchmarks/qstringbuilder/main.cpp @@ -72,7 +72,7 @@ private slots: void b_2_l1literal() { QBENCHMARK { r = l1literal % l1literal; } - COMPARE(r, l1string + l1string); + COMPARE(r, QString(l1string + l1string)); } void s_2_l1string() { QBENCHMARK { r = l1string + l1string; } @@ -84,7 +84,7 @@ private slots: void b_2_string() { QBENCHMARK { r = string % string; } - COMPARE(r, string + string); + COMPARE(r, QString(string + string)); } void s_2_string() { QBENCHMARK { r = string + string; } @@ -96,7 +96,7 @@ private slots: void b_2_stringref() { QBENCHMARK { r = stringref % stringref; } - COMPARE(r, stringref.toString() + stringref.toString()); + COMPARE(r, QString(stringref.toString() + stringref.toString())); } void s_2_stringref() { QBENCHMARK { r = stringref.toString() + stringref.toString(); } @@ -108,7 +108,7 @@ private slots: void b_3_string() { QBENCHMARK { r = string % string % string; } - COMPARE(r, string + string + string); + COMPARE(r, QString(string + string + string)); } void s_3_string() { QBENCHMARK { r = string + string + string; } @@ -120,11 +120,11 @@ private slots: void b_string_l1literal() { QBENCHMARK { r = string % l1literal; } - COMPARE(r, string + l1string); + COMPARE(r, QString(string + l1string)); } void b_string_l1string() { QBENCHMARK { r = string % l1string; } - COMPARE(r, string + l1string); + COMPARE(r, QString(string + l1string)); } void s_string_l1literal() { QBENCHMARK { r = string + l1string; } @@ -140,7 +140,7 @@ private slots: void b_3_l1literal() { QBENCHMARK { r = l1literal % l1literal % l1literal; } - COMPARE(r, l1string + l1string + l1string); + COMPARE(r, QString(l1string + l1string + l1string)); } void s_3_l1string() { QBENCHMARK { r = l1string + l1string + l1string; } @@ -152,7 +152,7 @@ private slots: void b_4_l1literal() { QBENCHMARK { r = l1literal % l1literal % l1literal % l1literal; } - COMPARE(r, l1string + l1string + l1string + l1string); + COMPARE(r, QString(l1string + l1string + l1string + l1string)); } void s_4_l1string() { QBENCHMARK { r = l1string + l1string + l1string + l1string; } @@ -164,7 +164,7 @@ private slots: void b_5_l1literal() { QBENCHMARK { r = l1literal % l1literal % l1literal % l1literal %l1literal; } - COMPARE(r, l1string + l1string + l1string + l1string + l1string); + COMPARE(r, QString(l1string + l1string + l1string + l1string + l1string)); } void s_5_l1string() { @@ -201,15 +201,15 @@ private slots: void separator_8() { SEP("string.arg"); } void b_string_arg() { - const QString pattern = l1string + "%1" + l1string; + const QString pattern = l1string + QLatin1String("%1") + l1string; QBENCHMARK { r = l1literal % string % l1literal; } - COMPARE(r, l1string + string + l1string); + COMPARE(r, QString(l1string + string + l1string)); } void s_string_arg() { - const QString pattern = l1string + "%1" + l1string; + const QString pattern = l1string + QLatin1String("%1") + l1string; QBENCHMARK { r = pattern.arg(string); } - COMPARE(r, l1string + string + l1string); + COMPARE(r, QString(l1string + string + l1string)); } void s_bytearray_arg() { @@ -225,14 +225,14 @@ private slots: r.clear(); r = string % string % string % string; } - COMPARE(r, string + string + string + string); + COMPARE(r, QString(string + string + string + string)); } void b_reserve_lit() { QBENCHMARK { r.clear(); r = string % l1literal % string % string; } - COMPARE(r, string + string + string + string); + COMPARE(r, QString(string + string + string + string)); } void s_reserve() { QBENCHMARK { @@ -243,7 +243,7 @@ private slots: r += string; r += string; } - COMPARE(r, string + string + string + string); + COMPARE(r, QString(string + string + string + string)); } void s_reserve_lit() { QBENCHMARK { @@ -256,7 +256,7 @@ private slots: r += string; r += string; } - COMPARE(r, string + string + string + string); + COMPARE(r, QString(string + string + string + string)); } private: diff --git a/tests/benchmarks/qstringbuilder/qstringbuilder.pro b/tests/benchmarks/qstringbuilder/qstringbuilder.pro index 79171b4..02daaaa 100644 --- a/tests/benchmarks/qstringbuilder/qstringbuilder.pro +++ b/tests/benchmarks/qstringbuilder/qstringbuilder.pro @@ -2,6 +2,10 @@ load(qttest_p4) TEMPLATE = app TARGET = tst_qstringbuilder +# Uncomment to test compilation of the drop-in +# replacement operator+() +#DEFINES += QT_USE_FAST_OPERATOR_PLUS + QMAKE_CXXFLAGS += -g QMAKE_CFLAGS += -g -- cgit v0.12 From 866813b6779a27e974c30d1023a5d734fa0318c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 28 May 2009 19:06:42 +0200 Subject: Fixed bug in GL graphics system when painting to pixmaps. Make sure the correct texture unit is active when copying from the pixmap to the FBO in begin(). --- src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 75422a2..e7b6ee4 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1009,8 +1009,11 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev) } glClear(GL_COLOR_BUFFER_BIT); } else if (source) { + QGLContext *ctx = d->ctx; + d->transferMode(ImageDrawingMode); + glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT); source->bind(false); QRect rect(0, 0, source->width(), source->height()); -- cgit v0.12 From 24e904b2ef438bafb24456f934ea93497f43f5c1 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 29 May 2009 08:18:29 +1000 Subject: Further optimized fast scaling of ARGB8565 images onto RGB16 images. This improves performance on embedded. Reviewed-by: Samuel --- src/gui/painting/qblendfunctions.cpp | 6 +++--- src/gui/painting/qdrawhelper_p.h | 10 ++++++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp index f83ff7b..4bdaf0b 100644 --- a/src/gui/painting/qblendfunctions.cpp +++ b/src/gui/painting/qblendfunctions.cpp @@ -105,10 +105,10 @@ struct Blend_RGB16_on_RGB16_ConstAlpha { }; struct Blend_ARGB24_on_RGB16_SourceAlpha { - inline void write(quint16 *dst, qargb8565 src) { + inline void write(quint16 *dst, const qargb8565 &src) { const uint alpha = src.alpha(); if (alpha) { - quint16 s = qrgb565(src).rawValue(); + quint16 s = src.rawValue16(); if (alpha < 255) s += BYTE_MUL_RGB16(*dst, 255 - alpha); *dst = s; @@ -125,7 +125,7 @@ struct Blend_ARGB24_on_RGB16_SourceAndConstAlpha { src = src.byte_mul(src.alpha(m_alpha)); const uint alpha = src.alpha(); if (alpha) { - quint16 s = qrgb565(src).rawValue(); + quint16 s = src.rawValue16(); if (alpha < 255) s += BYTE_MUL_RGB16(*dst, 255 - alpha); *dst = s; diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h index 019402a..38fee8d 100644 --- a/src/gui/painting/qdrawhelper_p.h +++ b/src/gui/painting/qdrawhelper_p.h @@ -447,6 +447,7 @@ public: inline bool operator==(const qargb8565 &v) const; inline quint32 rawValue() const; + inline quint16 rawValue16() const; private: friend class qrgb565; @@ -463,7 +464,7 @@ public: inline explicit qrgb565(quint32p v); inline explicit qrgb565(quint32 v); - inline explicit qrgb565(qargb8565 v); + inline explicit qrgb565(const qargb8565 &v); inline operator quint32() const; inline operator quint16() const; @@ -569,6 +570,11 @@ quint32 qargb8565::rawValue() const return (data[2] << 16) | (data[1] << 8) | data[0]; } +quint16 qargb8565::rawValue16() const +{ + return (data[2] << 8) | data[1]; +} + qrgb565::qrgb565(quint32p v) { *this = qrgb565(quint32(v)); @@ -583,7 +589,7 @@ qrgb565::qrgb565(quint32 v) data = (r & 0xf800) | (g & 0x07e0)| (b & 0x001f); } -qrgb565::qrgb565(qargb8565 v) +qrgb565::qrgb565(const qargb8565 &v) { data = (v.data[2] << 8) | v.data[1]; } -- cgit v0.12 From 890ea9c9cf35e4b3f7d9ad08bd6cba76b42f407e Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Fri, 29 May 2009 08:22:01 +1000 Subject: Fixed WinCE compile, perhaps. Fix obvious typo: frosmUtf16 -> fromUtf16 --- src/winmain/qtmain_win.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/winmain/qtmain_win.cpp b/src/winmain/qtmain_win.cpp index b83b324..e5b3259 100644 --- a/src/winmain/qtmain_win.cpp +++ b/src/winmain/qtmain_win.cpp @@ -110,7 +110,7 @@ int APIENTRY WinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR /*cmdPara #if defined(Q_OS_WINCE) TCHAR uniqueAppID[256]; GetModuleFileName(0, uniqueAppID, 255); - QString uid = QString::frosmUtf16((const unsigned short *)uniqueAppID).toLower().replace(QLatin1Char('\\'), QLatin1Char('_')); + QString uid = QString::fromUtf16((const unsigned short *)uniqueAppID).toLower().replace(QLatin1Char('\\'), QLatin1Char('_')); // If there exists an other instance of this application // it will be the owner of a mutex with the unique ID. -- cgit v0.12 From 89d3ccf6d07d6f66dd62b66c35bdfa5218afafae Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 29 May 2009 08:32:29 +1000 Subject: Export symbol needed by the declarative module. Reviewed-by: Leo --- src/corelib/animation/qvariantanimation_p.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/corelib/animation/qvariantanimation_p.h b/src/corelib/animation/qvariantanimation_p.h index 2c559cf..aee2324 100644 --- a/src/corelib/animation/qvariantanimation_p.h +++ b/src/corelib/animation/qvariantanimation_p.h @@ -102,7 +102,8 @@ public: void updateInterpolator(); - static QVariantAnimation::Interpolator getInterpolator(int interpolationType); + //XXX this is needed by dui + static Q_CORE_EXPORT QVariantAnimation::Interpolator getInterpolator(int interpolationType); }; //this should make the interpolation faster -- cgit v0.12 From 9088aeae9daf02546769377853824397458ba822 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Fri, 29 May 2009 08:54:20 +1000 Subject: Fixed compile of Qt/Embedded. Fix what looks like the result of a `git merge' gone wrong. --- src/gui/embedded/qkbdtty_qws.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/embedded/qkbdtty_qws.cpp b/src/gui/embedded/qkbdtty_qws.cpp index 3489278..7f10e14 100644 --- a/src/gui/embedded/qkbdtty_qws.cpp +++ b/src/gui/embedded/qkbdtty_qws.cpp @@ -210,7 +210,7 @@ QWSTtyKbPrivate::~QWSTtyKbPrivate() { if (m_tty_fd >= 0) { #if defined(Q_OS_LINUX) - ::ioctl(kbdFD, KDSKBMODE, m_originalKbdMode); + ::ioctl(m_tty_fd, KDSKBMODE, m_originalKbdMode); #endif tcsetattr(m_tty_fd, TCSANOW, &m_tty_attr); } -- cgit v0.12 From 8acc20e525d589e0c4450fbd60141e8b9c3f40e9 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Fri, 29 May 2009 15:23:17 +1000 Subject: Fixed compile with MinGW. MinGW 3.4.5 can't figure out the automatic QLatin1Char -> QString conversion in this code. --- src/corelib/io/qfsfileengine_win.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp index 790f1eb..9da9e66 100644 --- a/src/corelib/io/qfsfileengine_win.cpp +++ b/src/corelib/io/qfsfileengine_win.cpp @@ -1770,10 +1770,10 @@ QString QFSFileEngine::fileName(FileName file) const if(slash == -1) { if(d->filePath.length() >= 2 && d->filePath.at(1) == QLatin1Char(':')) return d->filePath.left(2); - return QLatin1Char('.'); + return QString(QLatin1Char('.')); } else { if(!slash) - return QLatin1Char('/'); + return QString(QLatin1Char('/')); if(slash == 2 && d->filePath.length() >= 2 && d->filePath.at(1) == QLatin1Char(':')) slash++; return d->filePath.left(slash); @@ -1831,7 +1831,7 @@ QString QFSFileEngine::fileName(FileName file) const if (slash == -1) ret = QDir::currentPath(); else if (slash == 0) - ret = QLatin1Char('/'); + ret = QString(QLatin1Char('/')); ret = ret.left(slash); } return ret; -- cgit v0.12 From b946da648af0c5fa1c73fe1e57b0b1e08fb14d13 Mon Sep 17 00:00:00 2001 From: Norwegian Rock Cat Date: Tue, 26 May 2009 18:31:01 +0200 Subject: Ensure a hierarchy of menus fade out together. On Mac OS X, when you have a large hierarchies of menus and you select the item at the end of the hierarchy. It will flash and then the rest will fade out at the same time. Qt would do a phased approach which was what no one expected. Introduce a QMacWindowFader class that can hold an arbitrary number of qwidgets and then on command fade them all down pased on the set duration. The API is a bit clumsy but is prefect for this internal API. Task-#: 251700 Reviewed-by: Richard Moe Gustavsen --- src/gui/kernel/qt_cocoa_helpers_mac.mm | 79 ++++++++++++++++++++++++++-------- src/gui/kernel/qt_mac_p.h | 15 +++++++ src/gui/widgets/qmenu.cpp | 40 +++++++++++------ src/gui/widgets/qmenu_p.h | 2 +- 4 files changed, 103 insertions(+), 33 deletions(-) diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index 9165836..554e9d5 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -88,6 +88,52 @@ QT_BEGIN_NAMESPACE +Q_GLOBAL_STATIC(QMacWindowFader, macwindowFader); + +QMacWindowFader::QMacWindowFader() + : m_duration(0.250) +{ +} + +QMacWindowFader *QMacWindowFader::currentFader() +{ + return macwindowFader(); +} + +void QMacWindowFader::registerWindowToFade(QWidget *window) +{ + m_windowsToFade.append(window); +} + +void QMacWindowFader::performFade() +{ + const QWidgetList myWidgetsToFade = m_windowsToFade; + const int widgetCount = myWidgetsToFade.count(); +#if QT_MAC_USE_COCOA + QMacCocoaAutoReleasePool pool; + [NSAnimationContext beginGrouping]; + [[NSAnimationContext currentContext] setDuration:NSTimeInterval(m_duration)]; +#endif + + for (int i = 0; i < widgetCount; ++i) { + QWidget *widget = m_windowsToFade.at(i); + OSWindowRef window = qt_mac_window_for(widget); +#if QT_MAC_USE_COCOA + [[window animator] setAlphaValue:0.0]; + QTimer::singleShot(qRound(m_duration * 1000), widget, SLOT(hide())); +#else + TransitionWindowOptions options = {0, m_duration, 0, 0}; + TransitionWindowWithOptions(window, kWindowFadeTransitionEffect, kWindowHideTransitionAction, + 0, 1, &options); +#endif + } +#if QT_MAC_USE_COCOA + [NSAnimationContext endGrouping]; +#endif + m_duration = 0.250; + m_windowsToFade.clear(); +} + extern bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event); // qapplication.cpp; extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); // qcocoaview.mm extern QWidget * mac_mouse_grabber; @@ -95,29 +141,26 @@ extern QWidget * mac_mouse_grabber; void macWindowFade(void * /*OSWindowRef*/ window, float durationSeconds) { OSWindowRef wnd = static_cast(window); - if( wnd ) { + if (wnd) { + QWidget *widget; #if QT_MAC_USE_COCOA - QMacCocoaAutoReleasePool pool; - [NSAnimationContext beginGrouping]; - [[wnd animator] setAlphaValue:0.0]; - if (durationSeconds > 0) { - [[NSAnimationContext currentContext] setDuration:NSTimeInterval(durationSeconds)]; - } else { - durationSeconds = [[NSAnimationContext currentContext] duration]; - } - [NSAnimationContext endGrouping]; - QTimer::singleShot(qRound(durationSeconds * 1000), [wnd QT_MANGLE_NAMESPACE(qt_qwidget)], SLOT(hide())); + widget = [wnd QT_MANGLE_NAMESPACE(qt_qwidget)]; #else - if (durationSeconds <= 0) - durationSeconds = 0.15; - TransitionWindowOptions options = {0, durationSeconds, 0, 0}; - TransitionWindowWithOptions(wnd, kWindowFadeTransitionEffect, kWindowHideTransitionAction, 0, 1, &options); + const UInt32 kWidgetCreatorQt = kEventClassQt; + enum { + kWidgetPropertyQWidget = 'QWId' //QWidget * + }; + if (GetWindowProperty(static_cast(window), kWidgetCreatorQt, kWidgetPropertyQWidget, sizeof(widget), 0, &widget) != noErr) + widget = 0; #endif - } + if (widget) { + QMacWindowFader::currentFader()->setFadeDuration(durationSeconds); + QMacWindowFader::currentFader()->registerWindowToFade(widget); + QMacWindowFader::currentFader()->performFade(); + } + } } - - bool macWindowIsTextured( void * /*OSWindowRef*/ window ) { OSWindowRef wnd = static_cast(window); diff --git a/src/gui/kernel/qt_mac_p.h b/src/gui/kernel/qt_mac_p.h index ca995dc..3b0f546 100644 --- a/src/gui/kernel/qt_mac_p.h +++ b/src/gui/kernel/qt_mac_p.h @@ -120,6 +120,21 @@ public: } }; +// Class for chaining to gether a bunch of fades. It pretty much is only used for qmenu fading. +class QMacWindowFader +{ + QWidgetList m_windowsToFade; + float m_duration; + Q_DISABLE_COPY(QMacWindowFader) +public: + QMacWindowFader(); // PLEASE DON'T CALL THIS. + static QMacWindowFader *currentFader(); + void registerWindowToFade(QWidget *window); + void setFadeDuration(float durationInSecs) { m_duration = durationInSecs; } + float fadeDuration() const { return m_duration; } + void performFade(); +}; + class Q_GUI_EXPORT QMacCocoaAutoReleasePool { private: diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp index 3004841..50100af 100644 --- a/src/gui/widgets/qmenu.cpp +++ b/src/gui/widgets/qmenu.cpp @@ -398,9 +398,12 @@ QRect QMenuPrivate::actionRect(QAction *act) const return ret; } +static const float MenuFadeTimeInSec = 0.150; + void QMenuPrivate::hideUpToMenuBar() { Q_Q(QMenu); + bool fadeMenus = q->style()->styleHint(QStyle::SH_Menu_FadeOutOnHide); if (!tornoff) { QWidget *caused = causedPopup.widget; hideMenu(q); //hide after getting causedPopup @@ -415,8 +418,9 @@ void QMenuPrivate::hideUpToMenuBar() if (QMenu *m = qobject_cast(caused)) { caused = m->d_func()->causedPopup.widget; if (!m->d_func()->tornoff) - hideMenu(m); - m->d_func()->setCurrentAction(0); + hideMenu(m, fadeMenus); + if (!fadeMenus) // Mac doesn't clear the action until after hidden. + m->d_func()->setCurrentAction(0); } else { #ifndef QT_NO_TOOLBUTTON if (qobject_cast(caused) == 0) @@ -425,26 +429,32 @@ void QMenuPrivate::hideUpToMenuBar() caused = 0; } } +#if defined(Q_WS_MAC) + if (fadeMenus) { + QEventLoop eventLoop; + QTimer::singleShot(int(MenuFadeTimeInSec * 1000), &eventLoop, SLOT(quit())); + QMacWindowFader::currentFader()->performFade(); + eventLoop.exec(); + } +#endif } setCurrentAction(0); } -void QMenuPrivate::hideMenu(QMenu *menu) +void QMenuPrivate::hideMenu(QMenu *menu, bool justRegister) { if (!menu) return; - #if !defined(QT_NO_EFFECTS) menu->blockSignals(true); aboutToHide = true; // Flash item which is about to trigger (if any). if (menu->style()->styleHint(QStyle::SH_Menu_FlashTriggeredItem) - && currentAction && currentAction == actionAboutToTrigger) { - + && currentAction && currentAction == actionAboutToTrigger + && menu->actions().contains(currentAction)) { QEventLoop eventLoop; QAction *activeAction = currentAction; - // Deselect and wait 60 ms. menu->setActiveAction(0); QTimer::singleShot(60, &eventLoop, SLOT(quit())); eventLoop.exec(); @@ -458,22 +468,24 @@ void QMenuPrivate::hideMenu(QMenu *menu) // Fade out. if (menu->style()->styleHint(QStyle::SH_Menu_FadeOutOnHide)) { // ### Qt 4.4: - // Should be something like: q->transitionWindow(Qt::FadeOutTransition, 150); + // Should be something like: q->transitionWindow(Qt::FadeOutTransition, MenuFadeTimeInSec); // Hopefully we'll integrate qt/research/windowtransitions into main before 4.4. // Talk to Richard, Trenton or Bjoern. #if defined(Q_WS_MAC) - macWindowFade(qt_mac_window_for(menu)); // FIXME - what is the default duration for view animations + if (justRegister) { + QMacWindowFader::currentFader()->setFadeDuration(MenuFadeTimeInSec); + QMacWindowFader::currentFader()->registerWindowToFade(menu); + } else { + macWindowFade(qt_mac_window_for(menu), MenuFadeTimeInSec); + } - // Wait for the transition to complete. - QEventLoop eventLoop; - QTimer::singleShot(150, &eventLoop, SLOT(quit())); - eventLoop.exec(); #endif // Q_WS_MAC } aboutToHide = false; menu->blockSignals(false); #endif // QT_NO_EFFECTS - menu->hide(); + if (!justRegister) + menu->hide(); } void QMenuPrivate::popupAction(QAction *action, int delay, bool activateFirst) diff --git a/src/gui/widgets/qmenu_p.h b/src/gui/widgets/qmenu_p.h index edfeee7..9654126 100644 --- a/src/gui/widgets/qmenu_p.h +++ b/src/gui/widgets/qmenu_p.h @@ -220,7 +220,7 @@ public: virtual QList > calcCausedStack() const; QMenuCaused causedPopup; void hideUpToMenuBar(); - void hideMenu(QMenu *menu); + void hideMenu(QMenu *menu, bool delay = true); //index mappings inline QAction *actionAt(int i) const { return q_func()->actions().at(i); } -- cgit v0.12 From 7de43fbe1dda9dd823483412cd66c44a6932023b Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Fri, 29 May 2009 11:12:37 +0200 Subject: Mac: App menus reactivated when a sheet is used on a modal dialog. We need to check all window anchestors of the sheet to make sure that there it is not in effekt application modal Task-number: 254543 Reviewed-by: Trenton Schulz --- src/gui/widgets/qmenu_mac.mm | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/gui/widgets/qmenu_mac.mm b/src/gui/widgets/qmenu_mac.mm index cce083f..87c886c 100644 --- a/src/gui/widgets/qmenu_mac.mm +++ b/src/gui/widgets/qmenu_mac.mm @@ -1829,6 +1829,9 @@ OSMenuRef QMenuBar::macMenu() { return d_func()->macMenu(); } */ static bool qt_mac_is_ancestor(QWidget* possibleAncestor, QWidget *child) { + if (!possibleAncestor) + return false; + QWidget * current = child->parentWidget(); while (current != 0) { if (current == possibleAncestor) @@ -1847,22 +1850,19 @@ static bool qt_mac_should_disable_menu(QMenuBar *menuBar, QWidget *modalWidget) { if (modalWidget == 0 || menuBar == 0) return false; - const Qt::WindowModality modality = modalWidget->windowModality(); - if (modality == Qt::ApplicationModal) { - return true; - } else if (modality == Qt::WindowModal) { - QWidget * parent = menuBar->parentWidget(); - - // Special case for the global menu bar: It's not associated - // with a window so don't disable it. - if (parent == 0) - return false; - // Disable menu entries in menu bars that belong to ancestors of - // the modal widget, leave entries in unrelated menu bars enabled. - return qt_mac_is_ancestor(parent, modalWidget); + // If there is an application modal window on + // screen, the entries of the menubar should be disabled: + QWidget *w = modalWidget; + while (w) { + if (w->isVisible() && w->windowModality() == Qt::ApplicationModal) + return true; + w = w->parentWidget(); } - return false; // modality == NonModal + + // INVARIANT: modalWidget is window modal. Disable menu entries + // if the menu bar belongs to an ancestor of modalWidget: + return qt_mac_is_ancestor(menuBar->parentWidget(), modalWidget); } static void cancelAllMenuTracking() -- cgit v0.12 From 766cf07cbe7ebfda01dad163bb070fff7e3077d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Fri, 29 May 2009 11:58:32 +0200 Subject: Call QFormBuilderExtra::instance less Reviewed-by: Friedemann Kleint --- tools/designer/src/lib/uilib/formbuilder.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/designer/src/lib/uilib/formbuilder.cpp b/tools/designer/src/lib/uilib/formbuilder.cpp index 414eb14..5a771b7 100644 --- a/tools/designer/src/lib/uilib/formbuilder.cpp +++ b/tools/designer/src/lib/uilib/formbuilder.cpp @@ -120,7 +120,8 @@ QFormBuilder::~QFormBuilder() */ QWidget *QFormBuilder::create(DomWidget *ui_widget, QWidget *parentWidget) { - QFormBuilderExtra::instance(this)->setProcessingLayoutWidget(false); + QFormBuilderExtra *fb = QFormBuilderExtra::instance(this); + fb->setProcessingLayoutWidget(false); if (ui_widget->attributeClass() == QFormBuilderStrings::instance().qWidgetClass && !ui_widget->hasAttributeNative() && parentWidget #ifndef QT_NO_MAINWINDOW @@ -145,7 +146,7 @@ QWidget *QFormBuilder::create(DomWidget *ui_widget, QWidget *parentWidget) && !qobject_cast(parentWidget) #endif ) - QFormBuilderExtra::instance(this)->setProcessingLayoutWidget(true); + fb->setProcessingLayoutWidget(true); return QAbstractFormBuilder::create(ui_widget, parentWidget); } @@ -369,9 +370,10 @@ QWidget *QFormBuilder::create(DomUI *ui, QWidget *parentWidget) */ QLayout *QFormBuilder::create(DomLayout *ui_layout, QLayout *layout, QWidget *parentWidget) { + QFormBuilderExtra *fb = QFormBuilderExtra::instance(this); // Is this a temporary layout widget used to represent QLayout hierarchies in Designer? // Set its margins to 0. - bool layoutWidget = QFormBuilderExtra::instance(this)->processingLayoutWidget(); + bool layoutWidget = fb->processingLayoutWidget(); QLayout *l = QAbstractFormBuilder::create(ui_layout, layout, parentWidget); if (layoutWidget) { const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); @@ -392,7 +394,7 @@ QLayout *QFormBuilder::create(DomLayout *ui_layout, QLayout *layout, QWidget *pa bottom = prop->elementNumber(); l->setContentsMargins(left, top, right, bottom); - QFormBuilderExtra::instance(this)->setProcessingLayoutWidget(false); + fb->setProcessingLayoutWidget(false); } return l; } -- cgit v0.12