diff --git a/doc/qtcreator.qdoc b/doc/qtcreator.qdoc index c03cbb2924f2b266a3481a000cef8c7bb6982dd9..53f74af3ebf97260fac3e58266dd7474b534542c 100644 --- a/doc/qtcreator.qdoc +++ b/doc/qtcreator.qdoc @@ -5,7 +5,7 @@ \title Qt Creator Manual - \section1 Version 1.1.80 + \section1 Version 1.2.0 The goal of Qt Creator is to provide a cross-platform, complete Integrated Development Environment (IDE) to develop Qt projects. It is available for diff --git a/doc/qtcreator.qdocconf b/doc/qtcreator.qdocconf index 5e8dd25d7f10f33088f4f57e3ee79cf330f5fa85..f6a1d0b751d1411c74de0c75f2f9cf1e76fef485 100644 --- a/doc/qtcreator.qdocconf +++ b/doc/qtcreator.qdocconf @@ -18,15 +18,15 @@ sources.fileextensions = "qtcreator.qdoc" qhp.projects = QtCreator qhp.QtCreator.file = qtcreator.qhp -qhp.QtCreator.namespace = com.nokia.qtcreator.1180 +qhp.QtCreator.namespace = com.nokia.qtcreator.120 qhp.QtCreator.virtualFolder = doc qhp.QtCreator.indexTitle = Qt Creator qhp.QtCreator.indexRoot = qhp.QtCreator.extraFiles = classic.css \ images/qt-logo.png -qhp.QtCreator.filterAttributes = qtcreator 1.1.80 -qhp.QtCreator.customFilters.QtCreator.name = Qt Creator 1.1.80 -qhp.QtCreator.customFilters.QtCreator.filterAttributes = qtcreator 1.1.80 +qhp.QtCreator.filterAttributes = qtcreator 1.2.0 +qhp.QtCreator.customFilters.QtCreator.name = Qt Creator 1.2.0 +qhp.QtCreator.customFilters.QtCreator.filterAttributes = qtcreator 1.2.0 # macros.qdocconf @@ -202,5 +202,5 @@ HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \ "<table width=\"100%\" cellspacing=\"0\" border=\"0\"><tr class=\"address\">\n" \ "<td width=\"30%\" align=\"left\">Copyright © 2009 Nokia</td>\n" \ "<td width=\"40%\" align=\"center\"> </td>\n" \ - "<td width=\"30%\" align=\"right\"><div align=\"right\">Qt Creator 1.1.80</div></td>\n" \ + "<td width=\"30%\" align=\"right\"><div align=\"right\">Qt Creator 1.2.0</div></td>\n" \ "</tr></table></div></address>" diff --git a/scripts/replaceVersion.sh b/scripts/replaceVersion.sh index 5475bf7f1e530871d74deffa5442689140d2bb3d..7460518405a6821d9540d64e9275d31ffeacde4e 100755 --- a/scripts/replaceVersion.sh +++ b/scripts/replaceVersion.sh @@ -95,7 +95,7 @@ mv -f "${TMPFILE}" "${INSTALLER_RC}" ## Patch Info.plist TMPFILE=`mktemp versionPatch.XXXXXX` -INFO_PLIST="${SCRIPT_DIR}/share/qtcreator/Info.plist" +INFO_PLIST="${SCRIPT_DIR}/src/app/Info.plist" echo "Patching \`${INFO_PLIST}'" sed \ -e "s/"${OLD}"/"${NEW}"/" \ diff --git a/share/qtcreator/qtcdebugger/main.cpp b/share/qtcreator/qtcdebugger/main.cpp index ec4b5c71ed3b5034cbac9bca4181ea333998a860..2f1e648647a65bef04566dba1dcbf341bfbc5d01 100644 --- a/share/qtcreator/qtcdebugger/main.cpp +++ b/share/qtcreator/qtcdebugger/main.cpp @@ -61,11 +61,9 @@ static const WCHAR *debuggerRegistryDefaultValueNameC = L"Debugger.Default"; static const char *linkC = "http://msdn.microsoft.com/en-us/library/cc266343.aspx"; +static inline QString wCharToQString(const WCHAR *w) { return QString::fromUtf16(reinterpret_cast<const ushort *>(w)); } #ifdef __GNUC__ -static inline QString wCharToQString(const WCHAR *w) { return QString::fromUtf16(reinterpret_cast<const ushort*>(w)); } #define RRF_RT_ANY 0x0000ffff // no type restriction -#else -static inline QString wCharToQString(const WCHAR *w) { return QString::fromUtf16(w); } #endif diff --git a/share/qtcreator/static.pro b/share/qtcreator/static.pro index eab552a5e7dca1900383fec436c2c497eedecbfd..f55d3dd9ca2cb78fe8e9dfd89a93101b1df9384e 100644 --- a/share/qtcreator/static.pro +++ b/share/qtcreator/static.pro @@ -2,9 +2,11 @@ include(../../qtcreator.pri) TEMPLATE = app TARGET = phony_target +QT = +LIBS = isEmpty(vcproj) { - QMAKE_LINK = : IGNORE REST + QMAKE_LINK = @: IGNORE THIS LINE OBJECTS_DIR = win32:CONFIG -= embed_manifest_exe } else { diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts index f9d9d0027d41d14b0e9833d5b9cc068fd60bc064..59a6fc8a7e8a3540bdc93be08dcb360d1ccab8ce 100644 --- a/share/qtcreator/translations/qtcreator_de.ts +++ b/share/qtcreator/translations/qtcreator_de.ts @@ -121,7 +121,7 @@ <message> <location/> <source>+</source> - <translation type="unfinished"></translation> + <translation></translation> </message> <message> <location/> @@ -1763,19 +1763,18 @@ Sollen sie überschrieben werden?</translation> <translation>Anleitungen</translation> </message> <message> - <location line="+1"/> <source>Qt Demos and Examples</source> - <translation>Qt Demos und Beispiele</translation> + <translation type="obsolete">Qt Demos und Beispiele</translation> </message> <message> - <location line="+1"/> + <location line="+2"/> <source>Did you know?</source> <translation>Wussten Sie schon?</translation> </message> <message> <location line="+1"/> <source>News from the Qt Labs</source> - <translation>Neuigkeiten von Qt Labs</translation> + <translation type="unfinished">Neuigkeiten aus den Qt Labs</translation> </message> <message> <location line="+1"/> @@ -1783,7 +1782,7 @@ Sollen sie überschrieben werden?</translation> <translation>Qt Internetseiten</translation> </message> <message> - <location line="+31"/> + <location line="+36"/> <source>http://labs.trolltech.com/blogs/feed</source> <extracomment>Add localized feed here only if one exists</extracomment> <translation type="unfinished"></translation> @@ -1827,17 +1826,22 @@ Sollen sie überschrieben werden?</translation> <translation type="obsolete">Qt Creator - Schnelleinstieg</translation> </message> <message> - <location line="+2"/> + <location line="+4"/> <source>Understanding widgets</source> <translation>Widgets verstehen</translation> </message> <message> - <location line="+2"/> + <location line="-2"/> <source>Creating an address book</source> - <translation>Erstellen einer Adressbuch-Beispielanwendung</translation> + <translation>Erstellen eines Adressbuchs</translation> </message> <message> - <location line="+2"/> + <location line="-49"/> + <source>Explore Qt Examples</source> + <translation type="unfinished">Qt Beispiele öffnen</translation> + </message> + <message> + <location line="+53"/> <source>Building with qmake</source> <translation>Mit qmake arbeiten</translation> </message> @@ -1857,7 +1861,12 @@ Sollen sie überschrieben werden?</translation> <translation>%1 (zuletzt benutzt)</translation> </message> <message> - <location line="+58"/> + <location line="+63"/> + <source>Choose an example...</source> + <translation>Beispiel wählen...</translation> + </message> + <message> + <location line="+73"/> <source>New Project...</source> <translation>Neues Projekt...</translation> </message> @@ -2054,6 +2063,11 @@ background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 <source>Manage Sessions...</source> <translation>Sitzungen...</translation> </message> + <message> + <location/> + <source>Examples not installed</source> + <translation>Beispiele nicht installiert</translation> + </message> </context> <context> <name>Core::ModeManager</name> @@ -2069,12 +2083,13 @@ background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 <location filename="../../../src/plugins/coreplugin/scriptmanager/scriptmanager.cpp" line="+237"/> <source>Exception at line %1: %2 %3</source> - <translation type="unfinished"></translation> + <translation type="unfinished">Ausnahme in Zeile%1: %2 +%3</translation> </message> <message> <location line="+67"/> <source>Unknown error</source> - <translation type="unfinished"></translation> + <translation>Unbekannter Fehler</translation> </message> </context> <context> @@ -3559,7 +3574,7 @@ background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 <message> <location line="+30"/> <source>Ctrl+Shift+F11</source> - <translation type="unfinished"></translation> + <translation></translation> </message> </context> <context> @@ -3907,7 +3922,7 @@ Es wird empfohlen, gdb 6.7 oder später zu benutzen.</translation> <translation><nicht im Bereich></translation> </message> <message numerus="yes"> - <location line="+98"/> + <location line="+100"/> <source>Retrieving data for watch view (%n requests pending)...</source> <translation> <numerusform>Daten der für die Anzeige der lokalen Variablen werden empfangen (noch eine austehende Anfrage) ...</numerusform> @@ -3923,7 +3938,7 @@ Es wird empfohlen, gdb 6.7 oder später zu benutzen.</translation> </translation> </message> <message numerus="yes"> - <location line="+282"/> + <location line="+284"/> <source><%n items></source> <extracomment>In string list</extracomment> <translation> @@ -3936,7 +3951,7 @@ Es wird empfohlen, gdb 6.7 oder später zu benutzen.</translation> <translation type="obsolete">Daten der für die Anzeige der lokalen Variablen werden empfangen (noch %1 austehende Anfragen) ...</translation> </message> <message> - <location line="-346"/> + <location line="-348"/> <source>Finished retrieving data.</source> <translation>Alle Daten erhalten.</translation> </message> @@ -3956,7 +3971,7 @@ Es wird empfohlen, gdb 6.7 oder später zu benutzen.</translation> <translation>Ausgabe-Hilfsbibliothek-Initialisierung: %1</translation> </message> <message> - <location line="+165"/> + <location line="+167"/> <source><0 items></source> <translation><leer></translation> </message> @@ -4275,7 +4290,7 @@ Es wird empfohlen, gdb 6.7 oder später zu benutzen.</translation> <message> <location filename="../../../src/plugins/debugger/stackhandler.cpp" line="+97"/> <source>...</source> - <translation type="unfinished"></translation> + <translation></translation> </message> <message> <location line="+2"/> @@ -4397,7 +4412,7 @@ Es wird empfohlen, gdb 6.7 oder später zu benutzen.</translation> <message> <location filename="../../../src/plugins/debugger/tcf/tcfengine.cpp" line="+189"/> <source>%1.</source> - <translation type="unfinished"></translation> + <translation></translation> </message> <message> <location line="+381"/> @@ -4447,7 +4462,7 @@ Es wird empfohlen, gdb 6.7 oder später zu benutzen.</translation> <context> <name>Debugger::Internal::WatchHandler</name> <message> - <location line="+185"/> + <location line="+187"/> <source>Expression</source> <translation>Ausdruck</translation> </message> @@ -5276,7 +5291,7 @@ Grund: %3</translation> <context> <name>FakeVim::Internal::FakeVimHandler</name> <message> - <location filename="../../../src/plugins/fakevim/fakevimhandler.cpp" line="+827"/> + <location filename="../../../src/plugins/fakevim/fakevimhandler.cpp" line="+828"/> <source>%1,%2</source> <translation type="unfinished"></translation> </message> @@ -5292,14 +5307,14 @@ Grund: %3</translation> <translation>In FakeVim nicht implementiert</translation> </message> <message> - <location line="+120"/> - <location line="+685"/> + <location line="+127"/> + <location line="+687"/> <location line="+19"/> <source>E20: Mark '%1' not set</source> <translation>E20: Die Marke '%1' ist nicht gesetzt</translation> </message> <message> - <location line="+103"/> + <location line="+115"/> <source>File '%1' exists (add ! to override)</source> <translation>Die '%1' existiert bereits (Fügen Sie ! an, um sie zu überschreiben)</translation> </message> @@ -5314,7 +5329,7 @@ Grund: %3</translation> <translation>"%1" %2 %3L, %4C geschrieben</translation> </message> <message> - <location line="+4"/> + <location line="+8"/> <source>Cannot open file '%1' for reading</source> <translation>Die Datei '%1' kann nicht zum Lesen geöffnet werden</translation> </message> @@ -5380,7 +5395,7 @@ Grund: %3</translation> <context> <name>FakeVim::Internal::FakeVimOptionPage</name> <message> - <location filename="../../../src/plugins/fakevim/fakevimplugin.cpp" line="+112"/> + <location filename="../../../src/plugins/fakevim/fakevimplugin.cpp" line="+114"/> <source>General</source> <translation>Allgemein</translation> </message> @@ -5393,8 +5408,8 @@ Grund: %3</translation> <context> <name>FakeVim::Internal::FakeVimPluginPrivate</name> <message> - <location line="+299"/> - <location line="+141"/> + <location line="+329"/> + <location line="+146"/> <source>Quit FakeVim</source> <translation>FakeVim Beenden</translation> </message> @@ -5645,6 +5660,11 @@ Grund: %3</translation> <source>Whole Words Only</source> <translation>Ganze Worte</translation> </message> + <message> + <location line="+9"/> + <source>Use Regular Expressions</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>Find::Internal::FindWidget</name> @@ -6813,7 +6833,7 @@ Grund: %3</translation> <message> <location line="+221"/> <location line="+4"/> - <location line="+66"/> + <location line="+73"/> <source>Unfiltered</source> <translation>Kein</translation> </message> @@ -9377,43 +9397,36 @@ unter Versionsverwaltung (%2) gestellt werden?</translation> <context> <name>QrcEditor</name> <message> - <location filename="../../../src/shared/qrceditor/test/ui_qrceditor.h" line="+151"/> <source>Form</source> - <translation>Formular</translation> + <translation type="obsolete">Formular</translation> </message> <message> <location filename="../../../src/shared/qrceditor/qrceditor.ui"/> - <location filename="../../../src/shared/qrceditor/test/ui_qrceditor.h" line="+1"/> <source>Add</source> <translation>Hinzufügen</translation> </message> <message> <location/> - <location filename="../../../src/shared/qrceditor/test/ui_qrceditor.h" line="+1"/> <source>Remove</source> <translation>Entfernen</translation> </message> <message> <location/> - <location filename="../../../src/shared/qrceditor/test/ui_qrceditor.h" line="+1"/> <source>Properties</source> <translation>Eigenschaften</translation> </message> <message> <location/> - <location filename="../../../src/shared/qrceditor/test/ui_qrceditor.h" line="+1"/> <source>Prefix:</source> <translation>Präfix:</translation> </message> <message> <location/> - <location filename="../../../src/shared/qrceditor/test/ui_qrceditor.h" line="+1"/> <source>Language:</source> <translation>Sprache:</translation> </message> <message> <location/> - <location filename="../../../src/shared/qrceditor/test/ui_qrceditor.h" line="+1"/> <source>Alias:</source> <translation>Aliasname:</translation> </message> @@ -10320,7 +10333,7 @@ p, li { white-space: pre-wrap; } <context> <name>Qt4ProjectManager::QtVersionManager</name> <message> - <location filename="../../../src/plugins/qt4projectmanager/qtversionmanager.cpp" line="+245"/> + <location filename="../../../src/plugins/qt4projectmanager/qtversionmanager.cpp" line="+281"/> <source><not found></source> <translation><nicht gefunden></translation> </message> @@ -11551,7 +11564,7 @@ Um es abzurufen, tippen Sie das Kürzel im Locator, gefolgt von einem Leerzeich <context> <name>TextEditor::BaseFileFind</name> <message> - <location filename="../../../src/plugins/texteditor/basefilefind.cpp" line="+113"/> + <location filename="../../../src/plugins/texteditor/basefilefind.cpp" line="+114"/> <location line="+19"/> <source>%1 found</source> <translation>%1 gefunden</translation> @@ -11601,7 +11614,7 @@ Um es abzurufen, tippen Sie das Kürzel im Locator, gefolgt von einem Leerzeich <context> <name>TextEditor::BaseTextEditorEditable</name> <message> - <location line="+3652"/> + <location line="+3655"/> <source>Line: %1, Col: %2</source> <translation>Zeile: %1, Spalte: %2</translation> </message> @@ -11822,6 +11835,14 @@ Die folgenden Encodings scheinen der Datei zu entsprechen:</translation> <translation>Mit Encoding abspeichern</translation> </message> </context> +<context> + <name>TextEditor::Internal::FindInCurrentFile</name> + <message> + <location filename="../../../src/plugins/texteditor/findincurrentfile.cpp" line="+57"/> + <source>Current File</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>TextEditor::Internal::FindInFiles</name> <message> @@ -11933,7 +11954,7 @@ Die folgenden Encodings scheinen der Datei zu entsprechen:</translation> <translation type="obsolete">Erzeugt eine neue Textdatei (.txt)</translation> </message> <message> - <location filename="../../../src/plugins/texteditor/texteditorplugin.cpp" line="+93"/> + <location filename="../../../src/plugins/texteditor/texteditorplugin.cpp" line="+94"/> <source>Creates a text file (.txt).</source> <translation>Erzeugt eine Textdatei (.txt)</translation> </message> diff --git a/share/qtcreator/translations/translations.pro b/share/qtcreator/translations/translations.pro index a04be66aa08871da4565433eba34612c529aa24f..724af96604b919addba1550fdf06a54c9ed6fbaf 100644 --- a/share/qtcreator/translations/translations.pro +++ b/share/qtcreator/translations/translations.pro @@ -17,10 +17,10 @@ contains(QT_VERSION, ^4\.[0-5]\..*):ts.commands = @echo This Qt version is too o else:ts.commands = (cd $$IDE_SOURCE_TREE && $$LUPDATE src -ts $$TS_FILES) QMAKE_EXTRA_TARGETS += ts -contains(TEMPLATE, vc.*)|contains(TEMPLATE_PREFIX, vc):vcproj = 1 - TEMPLATE = app TARGET = phony_target2 +QT = +LIBS = updateqm.target = $$IDE_DATA_DIR/translations updateqm.input = TS_FILES @@ -32,7 +32,7 @@ updateqm.CONFIG += no_link QMAKE_EXTRA_COMPILERS += updateqm isEmpty(vcproj) { - QMAKE_LINK = : IGNORE REST + QMAKE_LINK = @: IGNORE THIS LINE OBJECTS_DIR = win32:CONFIG -= embed_manifest_exe } else { diff --git a/src/app/Info.plist b/src/app/Info.plist index 99fab3163ef7435679a96a8bb0bb20045b59fe89..5e0332b0a5f6f46b03c1189f45d31ede34a4d526 100644 --- a/src/app/Info.plist +++ b/src/app/Info.plist @@ -182,8 +182,8 @@ <key>CFBundleIdentifier</key> <string>com.nokia.qtcreator</string> <key>CFBundleVersion</key> - <string>1.1.80</string> + <string>1.2.0</string> <key>CFBundleShortVersionString</key> - <string>1.1.80</string> + <string>1.2.0</string> </dict> </plist> diff --git a/src/libs/extensionsystem/plugindetailsview.cpp b/src/libs/extensionsystem/plugindetailsview.cpp index e9e90f6e82d5a26c3e559062ac0fb40a7998231c..b8b7425330d173eee46edd4d5dad8497dcb80cbc 100644 --- a/src/libs/extensionsystem/plugindetailsview.cpp +++ b/src/libs/extensionsystem/plugindetailsview.cpp @@ -75,7 +75,8 @@ void PluginDetailsView::update(PluginSpec *spec) m_ui->version->setText(spec->version()); m_ui->compatVersion->setText(spec->compatVersion()); m_ui->vendor->setText(spec->vendor()); - m_ui->url->setText(spec->url()); + const QString link = QString::fromLatin1("<a href=\"%1\">%1</a>").arg(spec->url()); + m_ui->url->setText(link); m_ui->location->setText(QDir::toNativeSeparators(spec->filePath())); m_ui->description->setText(spec->description()); m_ui->copyright->setText(spec->copyright()); diff --git a/src/libs/extensionsystem/plugindetailsview.ui b/src/libs/extensionsystem/plugindetailsview.ui index e22d2617ac11f626a6d3b00f4978d711e94adc43..10d6e987f354488c7661b33fb7b24904ad5d70ab 100644 --- a/src/libs/extensionsystem/plugindetailsview.ui +++ b/src/libs/extensionsystem/plugindetailsview.ui @@ -1,7 +1,8 @@ -<ui version="4.0" > +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> <class>ExtensionSystem::Internal::PluginDetailsView</class> - <widget class="QWidget" name="ExtensionSystem::Internal::PluginDetailsView" > - <property name="geometry" > + <widget class="QWidget" name="ExtensionSystem::Internal::PluginDetailsView"> + <property name="geometry"> <rect> <x>0</x> <y>0</y> @@ -9,124 +10,114 @@ <height>505</height> </rect> </property> - <layout class="QGridLayout" > - <property name="leftMargin" > + <layout class="QGridLayout"> + <property name="margin"> <number>2</number> </property> - <property name="topMargin" > - <number>2</number> - </property> - <property name="rightMargin" > - <number>2</number> - </property> - <property name="bottomMargin" > - <number>2</number> - </property> - <item row="0" column="0" > - <widget class="QLabel" name="label" > - <property name="text" > + <item row="0" column="0"> + <widget class="QLabel" name="label"> + <property name="text"> <string>Name:</string> </property> - <property name="alignment" > + <property name="alignment"> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> </property> </widget> </item> - <item row="0" column="1" > - <widget class="QLabel" name="name" > - </widget> + <item row="0" column="1"> + <widget class="QLabel" name="name"/> </item> - <item row="1" column="0" > - <widget class="QLabel" name="label_2" > - <property name="text" > + <item row="1" column="0"> + <widget class="QLabel" name="label_2"> + <property name="text"> <string>Version:</string> </property> - <property name="alignment" > + <property name="alignment"> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> </property> </widget> </item> - <item row="1" column="1" > - <widget class="QLabel" name="version" > - </widget> + <item row="1" column="1"> + <widget class="QLabel" name="version"/> </item> - <item row="2" column="0" > - <widget class="QLabel" name="label_3" > - <property name="text" > + <item row="2" column="0"> + <widget class="QLabel" name="label_3"> + <property name="text"> <string>Compatibility Version:</string> </property> - <property name="alignment" > + <property name="alignment"> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> </property> </widget> </item> - <item row="2" column="1" > - <widget class="QLabel" name="compatVersion" > - </widget> + <item row="2" column="1"> + <widget class="QLabel" name="compatVersion"/> </item> - <item row="3" column="0" > - <widget class="QLabel" name="label_4" > - <property name="text" > + <item row="3" column="0"> + <widget class="QLabel" name="label_4"> + <property name="text"> <string>Vendor:</string> </property> - <property name="alignment" > + <property name="alignment"> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> </property> </widget> </item> - <item row="3" column="1" > - <widget class="QLabel" name="vendor" > - </widget> + <item row="3" column="1"> + <widget class="QLabel" name="vendor"/> </item> - <item row="4" column="0" > - <widget class="QLabel" name="label_6" > - <property name="text" > + <item row="4" column="0"> + <widget class="QLabel" name="label_6"> + <property name="text"> <string>Url:</string> </property> - <property name="alignment" > + <property name="alignment"> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> </property> </widget> </item> - <item row="4" column="1" > - <widget class="QLabel" name="url" > + <item row="4" column="1"> + <widget class="QLabel" name="url"> + <property name="openExternalLinks"> + <bool>true</bool> + </property> </widget> </item> - <item row="5" column="0" > - <widget class="QLabel" name="label_7" > - <property name="text" > + <item row="5" column="0"> + <widget class="QLabel" name="label_7"> + <property name="text"> <string>Location:</string> </property> - <property name="alignment" > + <property name="alignment"> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> </property> </widget> </item> - <item row="5" column="1" > - <widget class="QLabel" name="location" > - <property name="wordWrap" > + <item row="5" column="1"> + <widget class="QLabel" name="location"> + <property name="wordWrap"> <bool>false</bool> </property> </widget> </item> - <item row="6" column="0" > - <layout class="QVBoxLayout" > + <item row="6" column="0"> + <layout class="QVBoxLayout"> <item> - <widget class="QLabel" name="label_8" > - <property name="text" > + <widget class="QLabel" name="label_8"> + <property name="text"> <string>Description:</string> </property> - <property name="alignment" > + <property name="alignment"> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> </property> </widget> </item> <item> <spacer> - <property name="orientation" > + <property name="orientation"> <enum>Qt::Vertical</enum> </property> - <property name="sizeHint" > + <property name="sizeHint" stdset="0"> <size> <width>20</width> <height>40</height> @@ -136,48 +127,47 @@ </item> </layout> </item> - <item row="6" column="1" > - <widget class="QTextEdit" name="description" > - <property name="tabChangesFocus" > + <item row="6" column="1"> + <widget class="QTextEdit" name="description"> + <property name="tabChangesFocus"> <bool>true</bool> </property> - <property name="readOnly" > + <property name="readOnly"> <bool>true</bool> </property> </widget> </item> - <item row="7" column="0" > - <widget class="QLabel" name="label_5" > - <property name="text" > + <item row="7" column="0"> + <widget class="QLabel" name="label_5"> + <property name="text"> <string>Copyright:</string> </property> - <property name="alignment" > + <property name="alignment"> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> </property> </widget> </item> - <item row="7" column="1" > - <widget class="QLabel" name="copyright" > - </widget> + <item row="7" column="1"> + <widget class="QLabel" name="copyright"/> </item> - <item row="8" column="0" > - <layout class="QVBoxLayout" > + <item row="8" column="0"> + <layout class="QVBoxLayout"> <item> - <widget class="QLabel" name="label_9" > - <property name="text" > + <widget class="QLabel" name="label_9"> + <property name="text"> <string>License:</string> </property> - <property name="alignment" > + <property name="alignment"> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> </property> </widget> </item> <item> <spacer> - <property name="orientation" > + <property name="orientation"> <enum>Qt::Vertical</enum> </property> - <property name="sizeHint" > + <property name="sizeHint" stdset="0"> <size> <width>17</width> <height>13</height> @@ -187,34 +177,34 @@ </item> </layout> </item> - <item row="8" column="1" > - <widget class="QTextEdit" name="license" > - <property name="tabChangesFocus" > + <item row="8" column="1"> + <widget class="QTextEdit" name="license"> + <property name="tabChangesFocus"> <bool>true</bool> </property> - <property name="readOnly" > + <property name="readOnly"> <bool>true</bool> </property> </widget> </item> - <item row="9" column="0" > - <layout class="QVBoxLayout" > + <item row="9" column="0"> + <layout class="QVBoxLayout"> <item> - <widget class="QLabel" name="label_10" > - <property name="text" > + <widget class="QLabel" name="label_10"> + <property name="text"> <string>Dependencies:</string> </property> - <property name="alignment" > + <property name="alignment"> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> </property> </widget> </item> <item> <spacer> - <property name="orientation" > + <property name="orientation"> <enum>Qt::Vertical</enum> </property> - <property name="sizeHint" > + <property name="sizeHint" stdset="0"> <size> <width>20</width> <height>40</height> @@ -224,8 +214,8 @@ </item> </layout> </item> - <item row="9" column="1" > - <widget class="QListWidget" name="dependencies" /> + <item row="9" column="1"> + <widget class="QListWidget" name="dependencies"/> </item> </layout> </widget> diff --git a/src/plugins/bineditor/BinEditor.pluginspec b/src/plugins/bineditor/BinEditor.pluginspec index 8c9a018a4aa46a0a95f0bd4707ee291efc651527..78cf35d6af3ea1775ff768eb4cc9d0e5b18ac5bd 100644 --- a/src/plugins/bineditor/BinEditor.pluginspec +++ b/src/plugins/bineditor/BinEditor.pluginspec @@ -1,4 +1,4 @@ -<plugin name="BinEditor" version="1.1.80" compatVersion="1.1.80"> +<plugin name="BinEditor" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,7 +19,7 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>Binary editor component.</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="Core" version="1.1.80"/> - <dependency name="TextEditor" version="1.1.80"/> + <dependency name="Core" version="1.2.0"/> + <dependency name="TextEditor" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/plugins/bookmarks/Bookmarks.pluginspec b/src/plugins/bookmarks/Bookmarks.pluginspec index 5e86f44bb3353a90f36b776cc1f710989d9c0f9e..56a8808d8b2c7777af6a3af6761a2834d8badb4e 100644 --- a/src/plugins/bookmarks/Bookmarks.pluginspec +++ b/src/plugins/bookmarks/Bookmarks.pluginspec @@ -1,4 +1,4 @@ -<plugin name="Bookmarks" version="1.1.80" compatVersion="1.1.80"> +<plugin name="Bookmarks" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,8 +19,8 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>Bookmarks in text editors.</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="TextEditor" version="1.1.80"/> - <dependency name="ProjectExplorer" version="1.1.80"/> - <dependency name="Core" version="1.1.80"/> + <dependency name="TextEditor" version="1.2.0"/> + <dependency name="ProjectExplorer" version="1.2.0"/> + <dependency name="Core" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/plugins/cmakeprojectmanager/CMakeProjectManager.pluginspec b/src/plugins/cmakeprojectmanager/CMakeProjectManager.pluginspec index d5cd5af4fa452f4786b50857d3b00a35b8057aea..68e8891317015928965b1f2fbcafab80d65a1291 100644 --- a/src/plugins/cmakeprojectmanager/CMakeProjectManager.pluginspec +++ b/src/plugins/cmakeprojectmanager/CMakeProjectManager.pluginspec @@ -1,4 +1,4 @@ -<plugin name="CMakeProjectManager" version="1.1.80" compatVersion="1.1.80"> +<plugin name="CMakeProjectManager" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,9 +19,9 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>CMake support</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="TextEditor" version="1.1.80"/> - <dependency name="ProjectExplorer" version="1.1.80"/> - <dependency name="CppTools" version="1.1.80"/> - <dependency name="CppEditor" version="1.1.80"/> + <dependency name="TextEditor" version="1.2.0"/> + <dependency name="ProjectExplorer" version="1.2.0"/> + <dependency name="CppTools" version="1.2.0"/> + <dependency name="CppEditor" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/plugins/coreplugin/Core.pluginspec b/src/plugins/coreplugin/Core.pluginspec index 2b781ccf2a978da767d06adfde948d9cfd273901..4db5faab343c70afc2c2f928f9e06cc91fce3f4e 100644 --- a/src/plugins/coreplugin/Core.pluginspec +++ b/src/plugins/coreplugin/Core.pluginspec @@ -1,4 +1,4 @@ -<plugin name="Core" version="1.1.80" compatVersion="1.1.80"> +<plugin name="Core" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> diff --git a/src/plugins/coreplugin/coreconstants.h b/src/plugins/coreplugin/coreconstants.h index deb160f3a445a45dddeea9ee6ebbcfb55f720fec..cb4f9a1df119b22f61ccc70d3684d3050bc048c4 100644 --- a/src/plugins/coreplugin/coreconstants.h +++ b/src/plugins/coreplugin/coreconstants.h @@ -34,8 +34,8 @@ namespace Core { namespace Constants { #define IDE_VERSION_MAJOR 1 -#define IDE_VERSION_MINOR 1 -#define IDE_VERSION_RELEASE 80 +#define IDE_VERSION_MINOR 2 +#define IDE_VERSION_RELEASE 0 #define STRINGIFY_INTERNAL(x) #x #define STRINGIFY(x) STRINGIFY_INTERNAL(x) diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 407f6a42d6275b99d7ad0739765bbff3d1cf6296..e4edc05d2beb59c958c48c22c4a565619496b39a 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -772,6 +772,8 @@ bool EditorManager::closeEditors(const QList<IEditor*> editorsToClose, bool askA setCurrentView(m_d->m_splitter->findView(currentView)); if (IEditor *e = currentView->currentEditor()) activateEditor(currentView, e); + else + emit currentEditorChanged(0); } return !closingFailed; diff --git a/src/plugins/coreplugin/stylehelper.cpp b/src/plugins/coreplugin/stylehelper.cpp index 0e0daa09c8521fc56e69a520790d1f1499990815..b46f751e009da3662996a643b055711597532c38 100644 --- a/src/plugins/coreplugin/stylehelper.cpp +++ b/src/plugins/coreplugin/stylehelper.cpp @@ -214,7 +214,7 @@ void StyleHelper::menuGradient(QPainter *painter, const QRect &spanRect, const Q } QLinearGradient grad(spanRect.topLeft(), spanRect.bottomLeft()); - QColor menuColor = mergedColors(StyleHelper::baseColor(), QColor(240, 240, 240), 25); + QColor menuColor = mergedColors(StyleHelper::baseColor(), QColor(244, 244, 244), 25); grad.setColorAt(0, menuColor.lighter(112)); grad.setColorAt(1, menuColor); p->fillRect(rect, grad); diff --git a/src/plugins/coreplugin/versiondialog.cpp b/src/plugins/coreplugin/versiondialog.cpp index 06c8517a44c381e70ff9945d796e069944e433b9..1db2e863793b2f3e0b62940507e347e166f9a15e 100644 --- a/src/plugins/coreplugin/versiondialog.cpp +++ b/src/plugins/coreplugin/versiondialog.cpp @@ -36,6 +36,7 @@ #include <QtCore/QDate> #include <QtCore/QFile> +#include <QtCore/QSysInfo> #include <QtGui/QDialogButtonBox> #include <QtGui/QGridLayout> @@ -62,26 +63,28 @@ VersionDialog::VersionDialog(QWidget *parent) QString version = QLatin1String(IDE_VERSION_LONG); version += QDate(2007, 25, 10).toString(Qt::SystemLocaleDate); - const QString description = tr( - "<h3>Qt Creator %1</h3>" - "Based on Qt %2<br/>" - "<br/>" - "Built on " __DATE__ " at " __TIME__ "<br />" + QString ideRev; #ifdef IDE_REVISION - "From revision %5<br/>" + //: This gets conditionally inserted as argument %8 into the description string. + ideRev = tr("From revision %1<br/>").arg(QString::fromLatin1(IDE_REVISION_STR).left(10)); #endif + + const QString description = tr( + "<h3>Qt Creator %1</h3>" + "Based on Qt %2 (%3 bit)<br/>" "<br/>" + "Built on %4 at %5<br />" "<br/>" - "Copyright 2008-%3 %4. All rights reserved.<br/>" + "%8" + "<br/>" + "Copyright 2008-%6 %7. All rights reserved.<br/>" "<br/>" "The program is provided AS IS with NO WARRANTY OF ANY KIND, " "INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A " "PARTICULAR PURPOSE.<br/>") - .arg(version, QLatin1String(QT_VERSION_STR), QLatin1String(IDE_YEAR), (QLatin1String(IDE_AUTHOR)) -#ifdef IDE_REVISION - , QString(IDE_REVISION_STR).left(10) -#endif - ); + .arg(version, QLatin1String(QT_VERSION_STR), QString::number(QSysInfo::WordSize), + QLatin1String(__DATE__), QLatin1String(__TIME__), QLatin1String(IDE_YEAR), + (QLatin1String(IDE_AUTHOR)), ideRev); QLabel *copyRightLabel = new QLabel(description); copyRightLabel->setWordWrap(true); diff --git a/src/plugins/coreplugin/welcomemode.ui b/src/plugins/coreplugin/welcomemode.ui index d12e5524f2a8dafefdde64e2a0d94177de825838..51e2968f56ecdd0af7a217826084ccd2b43efa65 100644 --- a/src/plugins/coreplugin/welcomemode.ui +++ b/src/plugins/coreplugin/welcomemode.ui @@ -21,9 +21,16 @@ QToolButton, QPushButton, QComboBox { padding: 0px 6px; font-size: 12px; font-family: lucida sans, dejavu sans, sans serif; +} + +*{ color: black; } + QComboBox QAbstractItemView { + background-color:white; +} + QComboBox::down-arrow { image: url(:/core/images/welcomemode/combobox_arrow.png); } @@ -41,7 +48,7 @@ QToolButton:hover, QPushButton:hover, QComboBox:hover { border-image: url(:/core/images/welcomemode/btn_26_hover.png) 4; } -QToolButton:disabled, QPushButton:disabled { +QToolButton:disabled, QPushButton:disabled, QComboBox::disabled { color:gray; } @@ -187,8 +194,8 @@ QToolButton:pressed, QPushButton:pressed{ stop: 0.401 #636363, stop: 1 #4a4a4a); border: 0px solid black; - border-top: 1px solid black; - border-bottom: 1px solid black; + border-top: 1px solid #303030; + border-bottom: 1px solid #202020; color: white; height:20px; } @@ -202,7 +209,7 @@ QToolButton:hover { stop: 1 #555555); } -QToolButton:checked { +QToolButton:checked, QToolButton:checked:pressed { border-image:none; background-color: qlineargradient(x1: 0, y1: 0, x2: 0.0, y2: 1.0, stop: 0 #ffffff, @@ -363,7 +370,7 @@ QToolButton:pressed { <item> <widget class="QStackedWidget" name="stackedWidget"> <property name="currentIndex"> - <number>1</number> + <number>0</number> </property> <widget class="QWidget" name="gettingStartedPage"> <layout class="QGridLayout" name="gridLayout_9"> @@ -488,9 +495,12 @@ QToolButton:pressed { </property> <layout class="QGridLayout" name="gridLayout_8"> <property name="rightMargin"> + <number>8</number> + </property> + <property name="horizontalSpacing"> <number>0</number> </property> - <item row="0" column="0" colspan="3"> + <item row="0" column="0" colspan="4"> <widget class="QLabel" name="demoTitleLabel"> <property name="alignment"> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> @@ -515,7 +525,7 @@ QToolButton:pressed { </item> </widget> </item> - <item row="1" column="1"> + <item row="1" column="2"> <widget class="QToolButton" name="openExampleButton"> <property name="enabled"> <bool>false</bool> @@ -531,6 +541,22 @@ QToolButton:pressed { </property> </widget> </item> + <item row="1" column="1"> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>6</width> + <height>6</height> + </size> + </property> + </spacer> + </item> </layout> </widget> </item> @@ -553,7 +579,7 @@ QToolButton:pressed { </property> <layout class="QGridLayout" name="gridLayout_11"> <property name="rightMargin"> - <number>6</number> + <number>9</number> </property> <item row="0" column="0"> <widget class="QLabel" name="didYouKnowTitleLabel"> @@ -704,9 +730,12 @@ QToolButton:pressed { <string/> </property> <layout class="QGridLayout" name="gridLayout_3"> - <property name="spacing"> + <property name="horizontalSpacing"> <number>0</number> </property> + <property name="verticalSpacing"> + <number>3</number> + </property> <item row="0" column="0" colspan="3"> <widget class="QLabel" name="recentSessionsTitleLabel"> <property name="sizePolicy"> @@ -805,11 +834,14 @@ QToolButton:pressed { <string/> </property> <layout class="QGridLayout" name="gridLayout_5"> - <property name="rightMargin"> + <property name="horizontalSpacing"> <number>0</number> </property> - <property name="spacing"> - <number>0</number> + <property name="verticalSpacing"> + <number>3</number> + </property> + <property name="rightMargin"> + <number>9</number> </property> <item row="0" column="0" colspan="3"> <widget class="QLabel" name="projTitleLabel"> @@ -885,6 +917,9 @@ QToolButton:pressed { <property name="text"> <string>Create New Project...</string> </property> + <property name="flat"> + <bool>true</bool> + </property> </widget> </item> <item row="4" column="0"> @@ -1082,7 +1117,7 @@ QToolButton:pressed { <item> <layout class="QHBoxLayout" name="horizontalLayout"> <property name="rightMargin"> - <number>17</number> + <number>20</number> </property> <property name="bottomMargin"> <number>17</number> diff --git a/src/plugins/cpaster/CodePaster.pluginspec b/src/plugins/cpaster/CodePaster.pluginspec index 49c049a628232b91ddcd02787f2983d68dcc6bd0..bd5414b8bf8c237f882fb359b92b1e990f12c032 100644 --- a/src/plugins/cpaster/CodePaster.pluginspec +++ b/src/plugins/cpaster/CodePaster.pluginspec @@ -1,4 +1,4 @@ -<plugin name="CodePaster" version="1.1.80" compatVersion="1.1.80"> +<plugin name="CodePaster" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,8 +19,8 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>Codepaster plugin for pushing/fetching diff from server</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="TextEditor" version="1.1.80"/> - <dependency name="ProjectExplorer" version="1.1.80"/> - <dependency name="Core" version="1.1.80"/> + <dependency name="TextEditor" version="1.2.0"/> + <dependency name="ProjectExplorer" version="1.2.0"/> + <dependency name="Core" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/plugins/cppeditor/CppEditor.pluginspec b/src/plugins/cppeditor/CppEditor.pluginspec index 9cc8d0b446dd50d4a5106d51a70c45a9f7923071..f5a82312210255150b0e56ca29ea4d0051e2f48d 100644 --- a/src/plugins/cppeditor/CppEditor.pluginspec +++ b/src/plugins/cppeditor/CppEditor.pluginspec @@ -1,4 +1,4 @@ -<plugin name="CppEditor" version="1.1.80" compatVersion="1.1.80"> +<plugin name="CppEditor" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,8 +19,8 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>C/C++ editor component.</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="Core" version="1.1.80"/> - <dependency name="TextEditor" version="1.1.80"/> - <dependency name="CppTools" version="1.1.80"/> + <dependency name="Core" version="1.2.0"/> + <dependency name="TextEditor" version="1.2.0"/> + <dependency name="CppTools" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/plugins/cpptools/CppTools.pluginspec b/src/plugins/cpptools/CppTools.pluginspec index b97194e6fb0c31dbbd64bf73786089ee1ce2c72a..d6749f4fdada243bb866fc305c9e8dfa2e48bc05 100644 --- a/src/plugins/cpptools/CppTools.pluginspec +++ b/src/plugins/cpptools/CppTools.pluginspec @@ -1,4 +1,4 @@ -<plugin name="CppTools" version="1.1.80" compatVersion="1.1.80"> +<plugin name="CppTools" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,8 +19,8 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>Tools for analyzing C/C++ code.</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="TextEditor" version="1.1.80"/> - <dependency name="ProjectExplorer" version="1.1.80"/> - <dependency name="QuickOpen" version="1.1.80"/> + <dependency name="TextEditor" version="1.2.0"/> + <dependency name="ProjectExplorer" version="1.2.0"/> + <dependency name="QuickOpen" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/plugins/debugger/Debugger.pluginspec b/src/plugins/debugger/Debugger.pluginspec index 5f1118132540f4a205986ce1c5bb90d85e52177e..ce9598c850c114d4d4f7198f0b07d2aa6aa7f8a1 100644 --- a/src/plugins/debugger/Debugger.pluginspec +++ b/src/plugins/debugger/Debugger.pluginspec @@ -1,4 +1,4 @@ -<plugin name="Debugger" version="1.1.80" compatVersion="1.1.80"> +<plugin name="Debugger" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,10 +19,10 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>Debugger integration.</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="CppEditor" version="1.1.80"/><!-- Debugger plugin adds items to the editor's context menu --> - <dependency name="ProjectExplorer" version="1.1.80"/> - <dependency name="Core" version="1.1.80"/> - <dependency name="Find" version="1.1.80"/> + <dependency name="CppEditor" version="1.2.0"/><!-- Debugger plugin adds items to the editor's context menu --> + <dependency name="ProjectExplorer" version="1.2.0"/> + <dependency name="Core" version="1.2.0"/> + <dependency name="Find" version="1.2.0"/> </dependencyList> <argumentList> <argument name="-disable-cdb">Disable Cdb debugger engine</argument> diff --git a/src/plugins/debugger/cdb/cdbassembler.cpp b/src/plugins/debugger/cdb/cdbassembler.cpp index c23b3b628aa0c751b9bfd92e2503c368d5bdce5c..f69417ed67a48ee446b5800eb400598366a31513 100644 --- a/src/plugins/debugger/cdb/cdbassembler.cpp +++ b/src/plugins/debugger/cdb/cdbassembler.cpp @@ -65,7 +65,7 @@ bool getRegisters(CIDebugControl *ctl, return false; } Register reg; - reg.name = QString::fromUtf16(wszBuf); + reg.name = QString::fromUtf16(reinterpret_cast<const ushort *>(wszBuf)); registers->push_back(reg); } // get values diff --git a/src/plugins/debugger/cdb/cdbbreakpoint.cpp b/src/plugins/debugger/cdb/cdbbreakpoint.cpp index 4418fad1e204d63d7f78dbb36c7a4f3dcd8da0cc..3c5491c307661198f59c637d754bdfd36a3f0e4e 100644 --- a/src/plugins/debugger/cdb/cdbbreakpoint.cpp +++ b/src/plugins/debugger/cdb/cdbbreakpoint.cpp @@ -156,7 +156,7 @@ bool CDBBreakPoint::apply(CIDebugBreakpoint *ibp, QString *errorMessage) const const QString expr = expression(); if (debugCDB) qDebug() << Q_FUNC_INFO << *this << expr; - const HRESULT hr = ibp->SetOffsetExpressionWide(expr.utf16()); + const HRESULT hr = ibp->SetOffsetExpressionWide(reinterpret_cast<PCWSTR>(expr.utf16())); if (FAILED(hr)) { *errorMessage = QString::fromLatin1("Unable to set breakpoint '%1' : %2"). arg(expr, msgComFailed("SetOffsetExpressionWide", hr)); @@ -238,7 +238,7 @@ bool CDBBreakPoint::retrieve(CIDebugBreakpoint *ibp, QString *errorMessage) ibp->GetFlags(&flags); oneShot = (flags & DEBUG_BREAKPOINT_ONE_SHOT); enabled = (flags & DEBUG_BREAKPOINT_ENABLED); - const QString expr = QString::fromUtf16(wszBuf); + const QString expr = QString::fromUtf16(reinterpret_cast<const ushort *>(wszBuf)); if (!parseExpression(expr)) { *errorMessage = QString::fromLatin1("Parsing of '%1' failed.").arg(expr); return false; diff --git a/src/plugins/debugger/cdb/cdbdebugengine.cpp b/src/plugins/debugger/cdb/cdbdebugengine.cpp index c6ae43bacff96749c64ef09b33a232ce573cc3e6..20f93aff20b1545c7fde25786439e47767eb7708 100644 --- a/src/plugins/debugger/cdb/cdbdebugengine.cpp +++ b/src/plugins/debugger/cdb/cdbdebugengine.cpp @@ -618,7 +618,7 @@ bool CdbDebugEngine::startDebuggerWithExecutable(DebuggerStartMode sm, QString * qDebug() << Q_FUNC_INFO <<filename; const QFileInfo fi(filename); - m_d->m_cif.debugSymbols->AppendImagePathWide(QDir::toNativeSeparators(fi.absolutePath()).utf16()); + m_d->m_cif.debugSymbols->AppendImagePathWide(reinterpret_cast<PCWSTR>(QDir::toNativeSeparators(fi.absolutePath()).utf16())); //m_cif.debugSymbols->SetSymbolOptions(SYMOPT_CASE_INSENSITIVE | SYMOPT_UNDNAME | SYMOPT_DEBUG | SYMOPT_LOAD_LINES | SYMOPT_OMAP_FIND_NEAREST | SYMOPT_AUTO_PUBLICS); m_d->m_cif.debugSymbols->SetSymbolOptions(SYMOPT_CASE_INSENSITIVE | SYMOPT_UNDNAME | SYMOPT_LOAD_LINES | SYMOPT_OMAP_FIND_NEAREST | SYMOPT_AUTO_PUBLICS); //m_cif.debugSymbols->AddSymbolOptions(SYMOPT_CASE_INSENSITIVE | SYMOPT_UNDNAME | SYMOPT_DEFERRED_LOADS | SYMOPT_DEBUG | SYMOPT_LOAD_LINES | SYMOPT_OMAP_FIND_NEAREST | SYMOPT_AUTO_PUBLICS | SYMOPT_NO_IMAGE_SEARCH); @@ -634,10 +634,10 @@ bool CdbDebugEngine::startDebuggerWithExecutable(DebuggerStartMode sm, QString * env = reinterpret_cast<PCWSTR>(envData.data()); } const HRESULT hr = m_d->m_cif.debugClient->CreateProcess2Wide(NULL, - const_cast<PWSTR>(cmd.utf16()), + reinterpret_cast<PWSTR>(const_cast<ushort *>(cmd.utf16())), &dbgopts, sizeof(dbgopts), - sp->workingDir.utf16(), + reinterpret_cast<PCWSTR>(sp->workingDir.utf16()), env); if (FAILED(hr)) { *errorMessage = tr("Unable to create a process '%1': %2").arg(cmd, msgDebugEngineComResult(hr)); @@ -1149,7 +1149,7 @@ void CdbDebugEngine::executeDebuggerCommand(const QString &command) bool CdbDebugEnginePrivate::executeDebuggerCommand(CIDebugControl *ctrl, const QString &command, QString *errorMessage) { // output to all clients, else we do not see anything - const HRESULT hr = ctrl->ExecuteWide(DEBUG_OUTCTL_ALL_CLIENTS, command.utf16(), 0); + const HRESULT hr = ctrl->ExecuteWide(DEBUG_OUTCTL_ALL_CLIENTS, reinterpret_cast<PCWSTR>(command.utf16()), 0); if (debugCDB) qDebug() << "executeDebuggerCommand" << command << SUCCEEDED(hr); if (FAILED(hr)) { @@ -1184,7 +1184,7 @@ bool CdbDebugEnginePrivate::evaluateExpression(CIDebugControl *ctrl, // Original syntax must be restored, else setting breakpoints will fail. SyntaxSetter syntaxSetter(ctrl, DEBUG_EXPR_CPLUSPLUS); ULONG errorPosition = 0; - const HRESULT hr = ctrl->EvaluateWide(expression.utf16(), + const HRESULT hr = ctrl->EvaluateWide(reinterpret_cast<PCWSTR>(expression.utf16()), DEBUG_VALUE_INVALID, debugValue, &errorPosition); if (FAILED(hr)) { @@ -1616,7 +1616,7 @@ QStringList CdbDebugEnginePrivate::sourcePaths() const { WCHAR wszBuf[MAX_PATH]; if (SUCCEEDED(m_cif.debugSymbols->GetSourcePathWide(wszBuf, MAX_PATH, 0))) - return QString::fromUtf16(wszBuf).split(QLatin1Char(';')); + return QString::fromUtf16(reinterpret_cast<const ushort *>(wszBuf)).split(QLatin1Char(';')); return QStringList(); } @@ -1637,7 +1637,7 @@ static inline QString pathString(const QStringList &s) bool CdbDebugEnginePrivate::setSourcePaths(const QStringList &s, QString *errorMessage) { - const HRESULT hr = m_cif.debugSymbols->SetSourcePathWide(pathString(s).utf16()); + const HRESULT hr = m_cif.debugSymbols->SetSourcePathWide(reinterpret_cast<PCWSTR>(pathString(s).utf16())); if (FAILED(hr)) { if (errorMessage) *errorMessage = msgComFailed("SetSourcePathWide", hr); @@ -1650,13 +1650,13 @@ QStringList CdbDebugEnginePrivate::symbolPaths() const { WCHAR wszBuf[MAX_PATH]; if (SUCCEEDED(m_cif.debugSymbols->GetSymbolPathWide(wszBuf, MAX_PATH, 0))) - return QString::fromUtf16(wszBuf).split(QLatin1Char(';')); + return QString::fromUtf16(reinterpret_cast<const ushort *>(wszBuf)).split(QLatin1Char(';')); return QStringList(); } bool CdbDebugEnginePrivate::setSymbolPaths(const QStringList &s, QString *errorMessage) { - const HRESULT hr = m_cif.debugSymbols->SetSymbolPathWide(pathString(s).utf16()); + const HRESULT hr = m_cif.debugSymbols->SetSymbolPathWide(reinterpret_cast<PCWSTR>(pathString(s).utf16())); if (FAILED(hr)) { if (errorMessage) *errorMessage = msgComFailed("SetSymbolPathWide", hr); diff --git a/src/plugins/debugger/cdb/cdbdebugeventcallback.cpp b/src/plugins/debugger/cdb/cdbdebugeventcallback.cpp index 68a62bf33cb1f064265e656505e791631824601f..41954b4739be219ebc45b0625bd831168eadcb9a 100644 --- a/src/plugins/debugger/cdb/cdbdebugeventcallback.cpp +++ b/src/plugins/debugger/cdb/cdbdebugeventcallback.cpp @@ -342,7 +342,7 @@ STDMETHODIMP CdbDebugEventCallback::LoadModule( Q_UNUSED(TimeDateStamp) if (debugCDB > 1) qDebug() << Q_FUNC_INFO << ModuleName; - m_pEngine->m_d->handleModuleLoad(QString::fromUtf16(ModuleName)); + m_pEngine->m_d->handleModuleLoad(QString::fromUtf16(reinterpret_cast<const ushort *>(ModuleName))); return S_OK; } diff --git a/src/plugins/debugger/cdb/cdbdebugoutput.cpp b/src/plugins/debugger/cdb/cdbdebugoutput.cpp index 020812b7e0b851c390eaf20314d7dee9f9b1ea73..e9c2dbe4b29ea9b8784d480ec56a1dbfb75cc109 100644 --- a/src/plugins/debugger/cdb/cdbdebugoutput.cpp +++ b/src/plugins/debugger/cdb/cdbdebugoutput.cpp @@ -80,7 +80,7 @@ STDMETHODIMP CdbDebugOutputBase::Output( IN PCWSTR text ) { - const QString msg = QString::fromUtf16(text); + const QString msg = QString::fromUtf16(reinterpret_cast<const ushort *>(text)); output(mask, msg.trimmed()); return S_OK; } diff --git a/src/plugins/debugger/cdb/cdbdumperhelper.cpp b/src/plugins/debugger/cdb/cdbdumperhelper.cpp index 51031cf0d3093271962ee615eaf96dccba030609..e74342d4207bc2e325d8306950bc6b05f1cf478f 100644 --- a/src/plugins/debugger/cdb/cdbdumperhelper.cpp +++ b/src/plugins/debugger/cdb/cdbdumperhelper.cpp @@ -384,7 +384,7 @@ static inline bool getSymbolAddress(CIDebugSymbols *sg, QString *errorMessage) { // Get address - HRESULT hr = sg->GetOffsetByNameWide(name.utf16(), address); + HRESULT hr = sg->GetOffsetByNameWide(reinterpret_cast<PCWSTR>(name.utf16()), address); if (FAILED(hr)) { *errorMessage = msgComFailed("GetOffsetByNameWide", hr); return false; diff --git a/src/plugins/debugger/cdb/cdbmodules.cpp b/src/plugins/debugger/cdb/cdbmodules.cpp index 8aef06ae03f4066740714946febe3cda867dc819..cb9cca83a5ad18858efd8f1db0159406148bab94 100644 --- a/src/plugins/debugger/cdb/cdbmodules.cpp +++ b/src/plugins/debugger/cdb/cdbmodules.cpp @@ -59,7 +59,7 @@ bool getModuleNameList(CIDebugSymbols *syms, QStringList *modules, QString *erro WCHAR wszBuf[MAX_PATH]; for (ULONG m = 0; m < count; m++) if (SUCCEEDED(syms->GetModuleNameStringWide(DEBUG_MODNAME_IMAGE, m, 0, wszBuf, MAX_PATH - 1, 0))) - modules->push_back(QString::fromUtf16(wszBuf)); + modules->push_back(QString::fromUtf16(reinterpret_cast<const ushort *>(wszBuf))); return true; } @@ -94,7 +94,7 @@ bool getModuleList(CIDebugSymbols *syms, QList<Module> *modules, QString *errorM *errorMessage= msgComFailed("GetModuleNameStringWide", hr); return false; } - module.moduleName = QString::fromUtf16(wszBuf); + module.moduleName = QString::fromUtf16(reinterpret_cast<const ushort *>(wszBuf)); modules->push_back(module); } } @@ -109,7 +109,7 @@ bool searchSymbols(CIDebugSymbols *syms, const QString &pattern, ULONG64 handle = 0; // E_NOINTERFACE means "no match". Apparently, it does not always // set handle. - HRESULT hr = syms->StartSymbolMatchWide(pattern.utf16(), &handle); + HRESULT hr = syms->StartSymbolMatchWide(reinterpret_cast<PCWSTR>(pattern.utf16()), &handle); if (hr == E_NOINTERFACE) { if (handle) syms->EndSymbolMatch(handle); @@ -125,7 +125,7 @@ bool searchSymbols(CIDebugSymbols *syms, const QString &pattern, if (hr == E_NOINTERFACE) break; if (hr == S_OK) - matches->push_back(QString::fromUtf16(wszBuf)); + matches->push_back(QString::fromUtf16(reinterpret_cast<const ushort *>(wszBuf))); } syms->EndSymbolMatch(handle); if (matches->empty()) @@ -217,7 +217,7 @@ bool getModuleSymbols(CIDebugSymbols *syms, const QString &moduleName, Symbol symbol; symbol.name = name; ULONG64 offset = 0; - if (SUCCEEDED(syms->GetOffsetByNameWide(name.utf16(), &offset))) + if (SUCCEEDED(syms->GetOffsetByNameWide(reinterpret_cast<PCWSTR>(name.utf16()), &offset))) symbol.address = hexPrefix + QString::number(offset, 16); symbols->push_back(symbol); } diff --git a/src/plugins/debugger/cdb/cdbstacktracecontext.cpp b/src/plugins/debugger/cdb/cdbstacktracecontext.cpp index 8b842639346563faa7402db1a083f2d0983d6a05..1b3afc60741b0388bf61b1cce111f1b3fd036745 100644 --- a/src/plugins/debugger/cdb/cdbstacktracecontext.cpp +++ b/src/plugins/debugger/cdb/cdbstacktracecontext.cpp @@ -102,7 +102,7 @@ bool CdbStackTraceContext::init(unsigned long frameCount, QString * /*errorMessa frame.address = QString::fromLatin1("0x%1").arg(instructionOffset, 0, 16); m_cif->debugSymbols->GetNameByOffsetWide(instructionOffset, wszBuf, MAX_PATH, 0, 0); - frame.function = QString::fromUtf16(wszBuf); + frame.function = QString::fromUtf16(reinterpret_cast<const ushort *>(wszBuf)); ULONG ulLine; ULONG64 ul64Displacement; @@ -111,7 +111,7 @@ bool CdbStackTraceContext::init(unsigned long frameCount, QString * /*errorMessa frame.line = ulLine; // Vitally important to use canonical file that matches editormanager, // else the marker will not show. - frame.file = CDBBreakPoint::canonicalSourceFile(QString::fromUtf16(wszBuf)); + frame.file = CDBBreakPoint::canonicalSourceFile(QString::fromUtf16(reinterpret_cast<const ushort *>(wszBuf))); } m_frames.push_back(frame); } diff --git a/src/plugins/debugger/cdb/cdbsymbolgroupcontext.cpp b/src/plugins/debugger/cdb/cdbsymbolgroupcontext.cpp index 2fa25c1c12e9fb1e26b80c9ab42a91f2a670f9a9..06fe24fe5a754b2067c43ec65d08c69e0b2c0730 100644 --- a/src/plugins/debugger/cdb/cdbsymbolgroupcontext.cpp +++ b/src/plugins/debugger/cdb/cdbsymbolgroupcontext.cpp @@ -91,7 +91,7 @@ static inline QString getSymbolString(IDebugSymbolGroup2 *sg, const HRESULT hr = (sg->*wsf)(index, nameBuffer, MAX_PATH, &nameLength); if (SUCCEEDED(hr)) { nameBuffer[nameLength] = 0; - return QString::fromUtf16(nameBuffer); + return QString::fromUtf16(reinterpret_cast<const ushort *>(nameBuffer)); } return QString(); } @@ -411,7 +411,7 @@ bool CdbSymbolGroupContext::assignValue(const QString &iname, const QString &val return false; } const unsigned long index = it.value(); - const HRESULT hr = m_symbolGroup->WriteSymbolWide(index, value.utf16()); + const HRESULT hr = m_symbolGroup->WriteSymbolWide(index, reinterpret_cast<PCWSTR>(value.utf16())); if (FAILED(hr)) { *errorMessage = QString::fromLatin1("Unable to assign '%1' to '%2': %3"). arg(value, iname, msgComFailed("WriteSymbolWide", hr)); diff --git a/src/plugins/designer/Designer.pluginspec b/src/plugins/designer/Designer.pluginspec index 4b6f4c35f61698cb92565d3b77c3032c4e13de97..30725b1e8fb2da4bb25c7a61139ffea52adb5519 100644 --- a/src/plugins/designer/Designer.pluginspec +++ b/src/plugins/designer/Designer.pluginspec @@ -1,4 +1,4 @@ -<plugin name="Designer" version="1.1.80" compatVersion="1.1.80"> +<plugin name="Designer" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,8 +19,8 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>Qt Designer integration.</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="Core" version="1.1.80"/> + <dependency name="Core" version="1.2.0"/> <!-- For compiling with CPP support enabled --> - <dependency name="CppEditor" version="1.1.80"/> + <dependency name="CppEditor" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/plugins/duieditor/DuiEditor.pluginspec b/src/plugins/duieditor/DuiEditor.pluginspec index 989651ddaea4a2f6afef0c04a244de97517fca58..1f3e2111646dc400bd9c4c77c232b726b66e101b 100644 --- a/src/plugins/duieditor/DuiEditor.pluginspec +++ b/src/plugins/duieditor/DuiEditor.pluginspec @@ -1,4 +1,4 @@ -<plugin name="DuiEditor" version="1.1.80" compatVersion="1.1.80"> +<plugin name="DuiEditor" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,7 +19,7 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>Editor for DUI.</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="Core" version="1.1.80"/> - <dependency name="TextEditor" version="1.1.80"/> + <dependency name="Core" version="1.2.0"/> + <dependency name="TextEditor" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/plugins/fakevim/FakeVim.pluginspec b/src/plugins/fakevim/FakeVim.pluginspec index d57e61827ea07b2e8d151a8d4f8682d1d274595a..5d36409dd69c1a5c6e61e870ea08f15a084c754d 100644 --- a/src/plugins/fakevim/FakeVim.pluginspec +++ b/src/plugins/fakevim/FakeVim.pluginspec @@ -1,4 +1,4 @@ -<plugin name="FakeVim" version="1.1.80" compatVersion="1.1.80"> +<plugin name="FakeVim" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,9 +19,9 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>VI-style keyboard navigation.</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="CppEditor" version="1.1.80"/><!-- Plugin adds items to the editor's context menu --> - <dependency name="TextEditor" version="1.1.80"/> - <dependency name="ProjectExplorer" version="1.1.80"/> - <dependency name="Core" version="1.1.80"/> + <dependency name="CppEditor" version="1.2.0"/><!-- Plugin adds items to the editor's context menu --> + <dependency name="TextEditor" version="1.2.0"/> + <dependency name="ProjectExplorer" version="1.2.0"/> + <dependency name="Core" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/plugins/find/Find.pluginspec b/src/plugins/find/Find.pluginspec index 7e14ba17fd94de5977d7adb662038f09372f956f..bbf2d28cf5110b4efedbcc993d4993e7a3dbee2c 100644 --- a/src/plugins/find/Find.pluginspec +++ b/src/plugins/find/Find.pluginspec @@ -1,4 +1,4 @@ -<plugin name="Find" version="1.1.80" compatVersion="1.1.80"> +<plugin name="Find" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,6 +19,6 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>Provides the find widget and the hooks for find implementations.</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="Core" version="1.1.80"/> + <dependency name="Core" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/plugins/find/find.qrc b/src/plugins/find/find.qrc index db9017c2366cf9adf85f5053b4c17548cc758c2a..8466feef2467d83efe95e303005e78ae2610b63a 100644 --- a/src/plugins/find/find.qrc +++ b/src/plugins/find/find.qrc @@ -1,13 +1,7 @@ <RCC> <qresource prefix="/find" > - <file>images/all.png</file> <file>images/casesensitively.png</file> - <file>images/empty.png</file> - <file>images/expand.png</file> - <file>images/next.png</file> - <file>images/previous.png</file> - <file>images/replace_all.png</file> <file>images/wholewords.png</file> - <file>images/wordandcase.png</file> + <file>images/regexp.png</file> </qresource> </RCC> diff --git a/src/plugins/find/findtoolbar.cpp b/src/plugins/find/findtoolbar.cpp index cedfbbaf9a5c19bd6bc2dd927d5b9b33020703de..313d229ceb869d7f4bf30df3c825c1f60a0472eb 100644 --- a/src/plugins/find/findtoolbar.cpp +++ b/src/plugins/find/findtoolbar.cpp @@ -68,7 +68,10 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen m_findNextAction(0), m_findPreviousAction(0), m_replaceNextAction(0), - m_widget(new QWidget) + m_widget(new QWidget), + m_casesensitiveIcon(":/find/images/casesensitively.png"), + m_regexpIcon(":/find/images/regexp.png"), + m_wholewordsIcon(":/find/images/wholewords.png") { //setup ui m_ui.setupUi(m_widget); @@ -215,6 +218,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen lineEditMenu->addAction(m_wholeWordAction); m_regularExpressionAction = new QAction(tr("Use Regular Expressions"), this); + m_regularExpressionAction->setIcon(QIcon(":/find/images/regexp.png")); m_regularExpressionAction->setCheckable(true); m_regularExpressionAction->setChecked(false); cmd = am->registerAction(m_regularExpressionAction, Constants::REGULAR_EXPRESSIONS, globalcontext); @@ -435,21 +439,30 @@ void FindToolBar::findFlagsChanged() void FindToolBar::updateIcons() { - bool casesensitive = m_findFlags & QTextDocument::FindCaseSensitively; - bool wholewords = m_findFlags & QTextDocument::FindWholeWords; - - if (casesensitive && wholewords) { - QPixmap image = QPixmap(":/find/images/wordandcase.png"); - m_ui.findEdit->setPixmap(image); - } else if (casesensitive) { - QPixmap image = QPixmap(":/find/images/casesensitively.png"); - m_ui.findEdit->setPixmap(image); - } else if (wholewords) { - QPixmap image = QPixmap(":/find/images/wholewords.png"); - m_ui.findEdit->setPixmap(image); - } else { - m_ui.findEdit->setPixmap(QPixmap(Core::Constants::ICON_MAGNIFIER)); + bool casesensitive = m_findFlags & IFindSupport::FindCaseSensitively; + bool wholewords = m_findFlags & IFindSupport::FindWholeWords; + bool regexp = m_findFlags & IFindSupport::FindRegularExpression; + QPixmap pixmap(17, 17); + QPainter painter(&pixmap); + painter.eraseRect(0, 0, 17, 17); + int x = 16; + + if (casesensitive) { + painter.drawPixmap(x-10, 0, m_casesensitiveIcon); + x -= 6; } + if (wholewords) { + painter.drawPixmap(x-10, 0, m_wholewordsIcon); + x -= 6; + } + if (regexp) { + painter.drawPixmap(x-10, 0, m_regexpIcon); + } + if (!casesensitive && !wholewords && !regexp) { + QPixmap mag(Core::Constants::ICON_MAGNIFIER); + painter.drawPixmap(0, (pixmap.height() - mag.height()) / 2, mag); + } + m_ui.findEdit->setPixmap(pixmap); } void FindToolBar::updateFlagMenus() diff --git a/src/plugins/find/findtoolbar.h b/src/plugins/find/findtoolbar.h index 0e5d86bc9005f797ff4a5b86286380509add5c7c..11e6d1a717eb46fde365ec6d87ebaf3d5923099a 100644 --- a/src/plugins/find/findtoolbar.h +++ b/src/plugins/find/findtoolbar.h @@ -114,6 +114,10 @@ private: QAction *m_regularExpressionAction; QWidget *m_widget; IFindSupport::FindFlags m_findFlags; + + QPixmap m_casesensitiveIcon; + QPixmap m_regexpIcon; + QPixmap m_wholewordsIcon; }; } // namespace Internal diff --git a/src/plugins/find/images/casesensitively.png b/src/plugins/find/images/casesensitively.png index 93038c0523c51da7b04ea8de4bc91e8bcef52d06..029b41faa4da49c90f294d7bcb5930fd3105242f 100644 Binary files a/src/plugins/find/images/casesensitively.png and b/src/plugins/find/images/casesensitively.png differ diff --git a/src/plugins/find/images/regexp.png b/src/plugins/find/images/regexp.png new file mode 100644 index 0000000000000000000000000000000000000000..be8a5cc48cb97a8c2fbb7c1573f8bc253784b98b Binary files /dev/null and b/src/plugins/find/images/regexp.png differ diff --git a/src/plugins/find/images/wholewords.png b/src/plugins/find/images/wholewords.png index 0187023ada3c42321bdde22f1981e22946ba370d..0ffcecd963ceb70b16f9b2ed558cb649eba62d4d 100644 Binary files a/src/plugins/find/images/wholewords.png and b/src/plugins/find/images/wholewords.png differ diff --git a/src/plugins/find/images/wordandcase.png b/src/plugins/find/images/wordandcase.png index 3a34cbea83b5289c0c735b57b0a8620b8b93d62f..34c0ac319088ea57b7cbebab2974bacfa6057d77 100644 Binary files a/src/plugins/find/images/wordandcase.png and b/src/plugins/find/images/wordandcase.png differ diff --git a/src/plugins/genericprojectmanager/GenericProjectManager.pluginspec b/src/plugins/genericprojectmanager/GenericProjectManager.pluginspec index 95006db9dfd63a061aa3fb68949c5a9545d19fa4..9d570e1ead31ae00f4b5529deb27ef6f00abae5d 100644 --- a/src/plugins/genericprojectmanager/GenericProjectManager.pluginspec +++ b/src/plugins/genericprojectmanager/GenericProjectManager.pluginspec @@ -1,4 +1,4 @@ -<plugin name="GenericProjectManager" version="1.1.80" compatVersion="1.1.80"> +<plugin name="GenericProjectManager" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,9 +19,9 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>Generic support</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="TextEditor" version="1.1.80"/> - <dependency name="ProjectExplorer" version="1.1.80"/> - <dependency name="CppTools" version="1.1.80"/> - <dependency name="CppEditor" version="1.1.80"/> + <dependency name="TextEditor" version="1.2.0"/> + <dependency name="ProjectExplorer" version="1.2.0"/> + <dependency name="CppTools" version="1.2.0"/> + <dependency name="CppEditor" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/plugins/git/ScmGit.pluginspec b/src/plugins/git/ScmGit.pluginspec index 68f11d6ebe602c5fd2f32856b3d7f4bf0581cb6f..cb59cb620d57d070f4854ef43293ae29ee4db4c4 100644 --- a/src/plugins/git/ScmGit.pluginspec +++ b/src/plugins/git/ScmGit.pluginspec @@ -1,4 +1,4 @@ -<plugin name="ScmGit" version="1.1.80" compatVersion="1.1.80"> +<plugin name="ScmGit" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,9 +19,9 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>Git integration.</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="TextEditor" version="1.1.80"/> - <dependency name="ProjectExplorer" version="1.1.80"/> - <dependency name="Core" version="1.1.80"/> - <dependency name="VCSBase" version="1.1.80"/> + <dependency name="TextEditor" version="1.2.0"/> + <dependency name="ProjectExplorer" version="1.2.0"/> + <dependency name="Core" version="1.2.0"/> + <dependency name="VCSBase" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/plugins/git/gitcommand.cpp b/src/plugins/git/gitcommand.cpp index 77b945802efc37b1cf91abbc0c38acf022fa7d9c..f63073f6a47185d3811cf9ec69312d6ef489bca1 100644 --- a/src/plugins/git/gitcommand.cpp +++ b/src/plugins/git/gitcommand.cpp @@ -132,7 +132,13 @@ void GitCommand::run() if (Git::Constants::debug) qDebug() << "GitCommand::run" << j << '/' << count << m_jobs.at(j).arguments; +#ifdef Q_OS_WIN + QStringList args; + args << "/c" << m_binaryPath << m_jobs.at(j).arguments; + process.start(QLatin1String("cmd.exe"), args); +#else process.start(m_binaryPath, m_jobs.at(j).arguments); +#endif if(!process.waitForStarted()) { ok = false; error += QString::fromLatin1("Error: \"%1\" could not be started: %2").arg(m_binaryPath, process.errorString()); diff --git a/src/plugins/helloworld/HelloWorld.pluginspec b/src/plugins/helloworld/HelloWorld.pluginspec index 754f521c9f0d4e3afe58a65a77d236ebea5fa0b9..074b759d77a8c4d75bf95f6d7abe20d99e6fed52 100644 --- a/src/plugins/helloworld/HelloWorld.pluginspec +++ b/src/plugins/helloworld/HelloWorld.pluginspec @@ -1,4 +1,4 @@ -<plugin name="HelloWorld" version="1.1.80" compatVersion="1.1.80"> +<plugin name="HelloWorld" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,6 +19,6 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>Hello World sample plugin.</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="Core" version="1.1.80"/> + <dependency name="Core" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/plugins/help/Help.pluginspec b/src/plugins/help/Help.pluginspec index b96876afa8ecf4394faf30e2328cc4947cd66010..20ba09c76bfbcfed9d8094468a8d84d48d105a01 100644 --- a/src/plugins/help/Help.pluginspec +++ b/src/plugins/help/Help.pluginspec @@ -1,4 +1,4 @@ -<plugin name="Help" version="1.1.80" compatVersion="1.1.80"> +<plugin name="Help" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,8 +19,8 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>Help system.</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="Core" version="1.1.80"/> - <dependency name="Find" version="1.1.80"/> - <dependency name="QuickOpen" version="1.1.80"/> + <dependency name="Core" version="1.2.0"/> + <dependency name="Find" version="1.2.0"/> + <dependency name="QuickOpen" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/plugins/help/centralwidget.cpp b/src/plugins/help/centralwidget.cpp index 7904da10079e0ec1bd1f4bea3a57345f5196ea76..a53a67564ac27adc867763f9b23a7d9fc1fe5ada 100644 --- a/src/plugins/help/centralwidget.cpp +++ b/src/plugins/help/centralwidget.cpp @@ -113,8 +113,8 @@ CentralWidget::CentralWidget(QHelpEngine *engine, QWidget *parent) if (tabBar) { tabBar->installEventFilter(this); tabBar->setContextMenuPolicy(Qt::CustomContextMenu); - connect(tabBar, SIGNAL(customContextMenuRequested(const QPoint&)), - this, SLOT(showTabBarContextMenu(const QPoint&))); + connect(tabBar, SIGNAL(customContextMenuRequested(QPoint)), this, + SLOT(showTabBarContextMenu(QPoint))); } staticCentralWidget = this; @@ -314,7 +314,8 @@ void CentralWidget::printPreview() #ifndef QT_NO_PRINTER initPrinter(); QPrintPreviewDialog preview(printer, this); - connect(&preview, SIGNAL(paintRequested(QPrinter *)), SLOT(printPreview(QPrinter *))); + connect(&preview, SIGNAL(paintRequested(QPrinter*)), + SLOT(printPreview(QPrinter*))); preview.exec(); #endif } @@ -422,13 +423,18 @@ void CentralWidget::connectSignals() { const HelpViewer* viewer = currentHelpViewer(); if (viewer) { - connect(viewer, SIGNAL(copyAvailable(bool)), this, SIGNAL(copyAvailable(bool))); - connect(viewer, SIGNAL(forwardAvailable(bool)), this, SIGNAL(forwardAvailable(bool))); - connect(viewer, SIGNAL(backwardAvailable(bool)), this, SIGNAL(backwardAvailable(bool))); - connect(viewer, SIGNAL(sourceChanged(const QUrl&)), this, SIGNAL(sourceChanged(const QUrl&))); - connect(viewer, SIGNAL(highlighted(const QString&)), this, SIGNAL(highlighted(const QString&))); - - connect(viewer, SIGNAL(sourceChanged(const QUrl&)), this, SLOT(setTabTitle(const QUrl&))); + connect(viewer, SIGNAL(copyAvailable(bool)), this, + SIGNAL(copyAvailable(bool))); + connect(viewer, SIGNAL(forwardAvailable(bool)), this, + SIGNAL(forwardAvailable(bool))); + connect(viewer, SIGNAL(backwardAvailable(bool)), this, + SIGNAL(backwardAvailable(bool))); + connect(viewer, SIGNAL(sourceChanged(QUrl)), this, + SIGNAL(sourceChanged(QUrl))); + connect(viewer, SIGNAL(highlighted(QString)), this, + SIGNAL(highlighted(QString))); + connect(viewer, SIGNAL(sourceChanged(QUrl)), this, + SLOT(setTabTitle(QUrl))); } } diff --git a/src/plugins/help/contentstoolwindow.cpp b/src/plugins/help/contentstoolwindow.cpp deleted file mode 100644 index 65245c71f1a8b39b3a32d957e0521f6e431b9d40..0000000000000000000000000000000000000000 --- a/src/plugins/help/contentstoolwindow.cpp +++ /dev/null @@ -1,176 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** 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. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -**************************************************************************/ - -#include "contentstoolwindow.h" -#include "helpengine.h" - -#include <QtCore/QDebug> -#include <QtCore/QStack> -#include <QtGui/QFocusEvent> -#include <QtGui/QKeyEvent> - -using namespace Help::Internal; - -ContentsToolWidget::ContentsToolWidget() -{ - wasInitialized = false; - - setRootIsDecorated(true); - setItemHidden(headerItem(), true); - setUniformRowHeights(true); - setColumnCount(1); - setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - - setWindowTitle(tr("Contents")); - setWindowIcon(QIcon(":/help/images/book.png")); -} - -void ContentsToolWidget::focusInEvent(QFocusEvent *e) -{ - if (wasInitialized) { - if (e && e->reason() != Qt::MouseFocusReason - && !currentItem() && topLevelItemCount()) - setCurrentItem(topLevelItem(0)); - return; - } - wasInitialized = true; - setCursor(QCursor(Qt::WaitCursor)); - emit buildRequested(); -} - -void ContentsToolWidget::showEvent(QShowEvent *) -{ - if (wasInitialized) - return; - wasInitialized = true; - setCursor(QCursor(Qt::WaitCursor)); - emit buildRequested(); -} - -void ContentsToolWidget::keyPressEvent(QKeyEvent *e) -{ - if (e && e->key() == Qt::Key_Escape) { - emit escapePressed(); - e->accept(); - return; - } - QTreeWidget::keyPressEvent(e); -} - - -enum -{ - LinkRole = Qt::UserRole + 1000 -}; - -ContentsToolWindow::ContentsToolWindow(const QList<int> &context, HelpEngine *help) -{ - m_widget = new ContentsToolWidget; - helpEngine = help; - connect(helpEngine, SIGNAL(contentsInitialized()), this, SLOT(contentsDone())); - connect(m_widget, SIGNAL(buildRequested()), helpEngine, SLOT(buildContents())); - - m_context = context; - m_context << 0; - - connect(m_widget, SIGNAL(itemActivated(QTreeWidgetItem*,int)), this, SLOT(indexRequested())); - connect(m_widget, SIGNAL(escapePressed()), this, SIGNAL(escapePressed())); -} - -ContentsToolWindow::~ContentsToolWindow() -{ - delete m_widget; -} - -const QList<int> &ContentsToolWindow::context() const -{ - return m_context; -} - -QWidget *ContentsToolWindow::widget() -{ - return m_widget; -} - -void ContentsToolWindow::contentsDone() -{ - m_widget->setCursor(QCursor(Qt::WaitCursor)); - QList<QPair<QString, ContentList> > contentList = helpEngine->contents(); - for (QList<QPair<QString, ContentList> >::Iterator it = contentList.begin(); it != contentList.end(); ++it) { - QTreeWidgetItem *newEntry; - QTreeWidgetItem *contentEntry; - QStack<QTreeWidgetItem*> stack; - stack.clear(); - int depth = 0; - bool root = false; - - QTreeWidgetItem *lastItem[64]; - for (int j = 0; j < 64; ++j) - lastItem[j] = 0; - - ContentList lst = (*it).second; - for (ContentList::ConstIterator it = lst.begin(); it != lst.end(); ++it) { - ContentItem item = *it; - if (item.depth == 0) { - newEntry = new QTreeWidgetItem(m_widget, 0); - newEntry->setIcon(0, QIcon(QString::fromUtf8(":/help/images/book.png"))); - newEntry->setText(0, item.title); - newEntry->setData(0, LinkRole, item.reference); - stack.push(newEntry); - depth = 1; - root = true; - } else { - if (item.depth > depth && root) { - depth = item.depth; - stack.push(contentEntry); - } - if (item.depth == depth) { - contentEntry = new QTreeWidgetItem(stack.top(), lastItem[ depth ]); - lastItem[ depth ] = contentEntry; - contentEntry->setText(0, item.title); - contentEntry->setData(0, LinkRole, item.reference); - } - else if (item.depth < depth) { - stack.pop(); - depth--; - item = *(--it); - } - } - } - } - m_widget->setCursor(QCursor(Qt::ArrowCursor)); -} - -void ContentsToolWindow::indexRequested() -{ - QTreeWidgetItem *itm = m_widget->currentItem(); - if (!itm) - return; - emit showLinkRequested(itm->data(0, LinkRole).toString(), false); -} diff --git a/src/plugins/help/contentstoolwindow.h b/src/plugins/help/contentstoolwindow.h deleted file mode 100644 index d62eb27097d4567c19e8ce53512583ce61ac859e..0000000000000000000000000000000000000000 --- a/src/plugins/help/contentstoolwindow.h +++ /dev/null @@ -1,100 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** 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. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -**************************************************************************/ - -#ifndef CONTENTSTOOLWINDOW_H -#define CONTENTSTOOLWINDOW_H - -#include <coreplugin/iview.h> - -#include <QtGui/QTreeWidget> - -namespace Help { -namespace Internal { - -class HelpEngine; -class ContentsToolWindow; - -class ContentsToolWidget : public QTreeWidget -{ - Q_OBJECT - -public: - ContentsToolWidget(); - -signals: - void buildRequested(); - void escapePressed(); - -private: - friend class ContentsToolWindow; - void showEvent(QShowEvent *e); - void focusInEvent(QFocusEvent *e); - void keyPressEvent(QKeyEvent *e); - - bool wasInitialized; -}; - -class ContentsToolWindow : public Core::IView -{ - Q_OBJECT - -public: - ContentsToolWindow(const QList<int> &context, HelpEngine *help); - ~ContentsToolWindow(); - - const QList<int> &context() const; - QWidget *widget(); - - QList<QWidget*> dockToolBarWidgets() const { return QList<QWidget*>(); } - - const char *uniqueViewName() const { return "Help.ContentsToolWindow"; } - const char *globalMenuGroup() const { return "Help.Group"; } - inline QKeySequence defaultShortcut() const { return QKeySequence(); } - Qt::DockWidgetArea defaultArea() const { return Qt::RightDockWidgetArea; } - IView::ViewPosition defaultPosition() const { return IView::First; } - -signals: - void showLinkRequested(const QString &link, bool newWindow); - void escapePressed(); - -private slots: - void contentsDone(); - void indexRequested(); - -private: - HelpEngine *helpEngine; - - QList<int> m_context; - ContentsToolWidget *m_widget; -}; - -} // namespace Internal -} // namespace Help - -#endif // CONTENTSTOOLWINDOW_H diff --git a/src/plugins/help/filtersettingspage.cpp b/src/plugins/help/filtersettingspage.cpp index 9c0252a852273610ae7a23ebcd84d9401284ac9c..6ed9684a69ca0397c83655a0b6be5c2a02d8a0bf 100644 --- a/src/plugins/help/filtersettingspage.cpp +++ b/src/plugins/help/filtersettingspage.cpp @@ -35,7 +35,7 @@ #include <QtHelp/QHelpEngine> using namespace Help::Internal; - + FilterSettingsPage::FilterSettingsPage(QHelpEngine *helpEngine) : m_helpEngine(helpEngine) { @@ -67,18 +67,17 @@ QWidget *FilterSettingsPage::createPage(QWidget *parent) m_ui.setupUi(m_currentPage); m_ui.attributeWidget->header()->hide(); m_ui.attributeWidget->setRootIsDecorated(false); - + connect(m_ui.attributeWidget, SIGNAL(itemChanged(QTreeWidgetItem*, int)), this, SLOT(updateFilterMap())); connect(m_ui.filterWidget, - SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), - this, SLOT(updateAttributes(QListWidgetItem*))); - connect(m_ui.filterAddButton, SIGNAL(clicked()), - this, SLOT(addFilter())); - connect(m_ui.filterRemoveButton, SIGNAL(clicked()), - this, SLOT(removeFilter())); + SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), this, + SLOT(updateAttributes(QListWidgetItem*))); + connect(m_ui.filterAddButton, SIGNAL(clicked()), this, SLOT(addFilter())); + connect(m_ui.filterRemoveButton, SIGNAL(clicked()), this, + SLOT(removeFilter())); updateFilterPage(); - + return m_currentPage; } @@ -91,7 +90,7 @@ void FilterSettingsPage::updateFilterPage() m_ui.attributeWidget->clear(); QHelpEngineCore help(m_helpEngine->collectionFile(), 0); - help.setupData(); + help.setupData(); m_filterMapBackup.clear(); const QStringList filters = help.customFilters(); foreach (const QString filter, filters) { @@ -105,7 +104,7 @@ void FilterSettingsPage::updateFilterPage() foreach (const QString a, help.filterAttributes()) new QTreeWidgetItem(m_ui.attributeWidget, QStringList() << a); - + if (m_filterMap.keys().count()) m_ui.filterWidget->setCurrentRow(0); } @@ -132,7 +131,7 @@ void FilterSettingsPage::updateFilterMap() QString filter = m_ui.filterWidget->currentItem()->text(); if (!m_filterMap.contains(filter)) return; - + QStringList newAtts; QTreeWidgetItem *itm = 0; for (int i=0; i<m_ui.attributeWidget->topLevelItemCount(); ++i) { @@ -140,7 +139,7 @@ void FilterSettingsPage::updateFilterMap() if (itm->checkState(0) == Qt::Checked) newAtts.append(itm->text(0)); } - m_filterMap[filter] = newAtts; + m_filterMap[filter] = newAtts; } void FilterSettingsPage::addFilter() @@ -157,7 +156,7 @@ void FilterSettingsPage::addFilter() QList<QListWidgetItem*> lst = m_ui.filterWidget ->findItems(filterName, Qt::MatchCaseSensitive); - m_ui.filterWidget->setCurrentItem(lst.first()); + m_ui.filterWidget->setCurrentItem(lst.first()); } void FilterSettingsPage::removeFilter() @@ -175,7 +174,7 @@ void FilterSettingsPage::removeFilter() } void FilterSettingsPage::apply() -{ +{ // This is handled via HelpPlugin::checkForHelpChanges, which is connected // to DocSettingsPage::apply. } diff --git a/src/plugins/help/filtersettingspage.h b/src/plugins/help/filtersettingspage.h index f07a81c0b2a01ad1a5cafb1ba8475525c095e231..87e832eaad2db9a131cdd6bc35bd7a04281614d3 100644 --- a/src/plugins/help/filtersettingspage.h +++ b/src/plugins/help/filtersettingspage.h @@ -63,7 +63,7 @@ private slots: void updateFilterMap(); void updateFilterPage(); void addFilter(); - void removeFilter(); + void removeFilter(); private: QHelpEngine *m_helpEngine; diff --git a/src/plugins/help/helpengine.cpp b/src/plugins/help/helpengine.cpp deleted file mode 100644 index a58360a7a7d15b6cc97f04bdcf0edb1efa043e58..0000000000000000000000000000000000000000 --- a/src/plugins/help/helpengine.cpp +++ /dev/null @@ -1,588 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** 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. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -**************************************************************************/ - -#include "helpengine.h" -#include "config.h" - -#include <QtCore/QDebug> -#include <QtCore/QDir> -#include <QtCore/QDateTime> -#include <QtCore/QCoreApplication> - -using namespace Help::Internal; - -static bool verifyDirectory(const QString &str) -{ - QFileInfo dirInfo(str); - if (!dirInfo.exists()) - return QDir().mkdir(str); - if (!dirInfo.isDir()) { - qWarning("'%s' exists but is not a directory", str.toLatin1().constData()); - return false; - } - return true; -} - -struct IndexKeyword -{ - IndexKeyword(const QString &kw, const QString &l) - : keyword(kw), link(l) {} - IndexKeyword() : keyword(QString()), link(QString()) {} - bool operator<(const IndexKeyword &ik) const { - return keyword.toLower() < ik.keyword.toLower(); - } - bool operator<=(const IndexKeyword &ik) const { - return keyword.toLower() <= ik.keyword.toLower(); - } - bool operator>(const IndexKeyword &ik) const { - return keyword.toLower() > ik.keyword.toLower(); - } - Q_DUMMY_COMPARISON_OPERATOR(IndexKeyword) - QString keyword; - QString link; -}; - -QDataStream &operator>>(QDataStream &s, IndexKeyword &ik) -{ - s >> ik.keyword; - s >> ik.link; - return s; -} - -QDataStream &operator<<(QDataStream &s, const IndexKeyword &ik) -{ - s << ik.keyword; - s << ik.link; - return s; -} - - -/** - * Compare in a human-preferred alphanumeric way, - * e.g. 'Qt tutorial 2' will be less than 'Qt tutorial 11'. - */ -bool caseInsensitiveLessThan(const QString &as, const QString &bs) -{ - const QChar *a = as.unicode(); - const QChar *b = bs.unicode(); - int result = 0; - while (result == 0) - { - ushort aa = a->unicode(); - ushort bb = b->unicode(); - - if (aa == 0 || bb == 0) { - result = aa - bb; - break; - } - else if (a->isDigit() && b->isDigit()) - { - const QChar *a_begin = a; - const QChar *b_begin = b; - bool loop = true; - do { - if (a->isDigit()) ++a; - else if (b->isDigit()) ++b; - else loop = false; - } while (loop); - - // optimization: comparing the length of the two numbers is more efficient than constructing two qstrings. - result = (a - a_begin) - (b - b_begin); - if (result == 0) { - QString astr(a_begin, a - a_begin); - QString bstr(b_begin, b - b_begin); - long la = astr.toLong(); - long lb = bstr.toLong(); - result = la - lb; - } - } else { - aa = QChar(aa).toLower().unicode(); - bb = QChar(bb).toLower().unicode(); - result = aa - bb; - ++a; - ++b; - } - } - - return result < 0 ? true : false; -} - -/** - * \a real is kinda a hack for the smart search, need a way to match a regexp to an item - * How would you say the best match for Q.*Wiget is QWidget? - */ -QModelIndex IndexListModel::filter(const QString &s, const QString &real) -{ - QStringList list; - - int goodMatch = -1; - int perfectMatch = -1; - if (s.isEmpty()) - perfectMatch = 0; - - const QRegExp regExp(s); - QMultiMap<QString, QString>::iterator it = contents.begin(); - QString lastKey; - for (; it != contents.end(); ++it) { - if (it.key() == lastKey) - continue; - lastKey = it.key(); - const QString key = it.key(); - if (key.contains(regExp) || key.contains(s, Qt::CaseInsensitive)) { - list.append(key); - //qDebug() << regExp << regExp.indexIn(s) << s << key << regExp.matchedLength(); - if (perfectMatch == -1 && (key.startsWith(real, Qt::CaseInsensitive))) { - if (goodMatch == -1) - goodMatch = list.count() - 1; - if (s.length() == key.length()) - perfectMatch = list.count() - 1; - } else if (perfectMatch > -1 && s == key) { - perfectMatch = list.count() - 1; - } - } - } - - int bestMatch = perfectMatch; - if (bestMatch == -1) - bestMatch = goodMatch; - - bestMatch = qMax(0, bestMatch); - - // sort the new list - QString match; - if (bestMatch >= 0 && list.count() > bestMatch) - match = list[bestMatch]; - qSort(list.begin(), list.end(), caseInsensitiveLessThan); - setStringList(list); - for (int i = 0; i < list.size(); ++i) { - if (list.at(i) == match){ - bestMatch = i; - break; - } - } - return index(bestMatch, 0, QModelIndex()); -} - - - -HelpEngine::HelpEngine(QObject *parent, const QString &defaultQtVersionPath) - : QObject(parent) -{ - titleMapThread = new TitleMapThread(this); - connect(titleMapThread, SIGNAL(errorOccured(const QString&)), - this, SIGNAL(errorOccured(const QString&))); - connect(titleMapThread, SIGNAL(finished()), this, SLOT(titleMapFinished())); - indexThread = new IndexThread(this); - connect(indexThread, SIGNAL(errorOccured(const QString&)), - this, SIGNAL(errorOccured(const QString&))); - connect(indexThread, SIGNAL(finished()), this, SLOT(indexFinished())); - - indexModel = new IndexListModel(this); - - Config::loadConfig(defaultQtVersionPath); - cacheFilesPath = QDir::homePath() + QLatin1String("/.assistant"); -} - -HelpEngine::~HelpEngine() -{ - Config::configuration()->save(); -} - -void HelpEngine::init() -{ -} - -QString HelpEngine::cacheFilePath() const -{ - return cacheFilesPath; -} - -IndexListModel *HelpEngine::indices() -{ - return indexModel; -} - -void HelpEngine::buildContents() -{ - contentsOnly = true; - if (!titleMapThread->isRunning()) { - titleMapThread->start(QThread::NormalPriority); - } -} - -void HelpEngine::buildIndex() -{ - if (!titleMapThread->isRunning()) { - contentsOnly = false; - titleMapThread->start(QThread::NormalPriority); - } - if (!indexThread->isRunning()) - indexThread->start(QThread::NormalPriority); -} - -void HelpEngine::titleMapFinished() -{ - contentList = titleMapThread->contents(); - titleMap = titleMapThread->documentTitleMap(); - if (contentsOnly) { - contentsOnly = false; - emit contentsInitialized(); - } -} - -void HelpEngine::indexFinished() -{ - indexModel = indexThread->model(); - emit indexInitialized(); -} - -void HelpEngine::removeOldCacheFiles(bool onlyFulltextSearchIndex) -{ - if (!verifyDirectory(cacheFilesPath)) { - qWarning("Failed to created assistant directory"); - return; - } - QString pname = QLatin1String(".") + Config::configuration()->profileName(); - - QStringList fileList; - fileList << QLatin1String("indexdb40.dict") - << QLatin1String("indexdb40.doc"); - - if (!onlyFulltextSearchIndex) - fileList << QLatin1String("indexdb40") << QLatin1String("contentdb40"); - - QStringList::iterator it = fileList.begin(); - for (; it != fileList.end(); ++it) { - if (QFile::exists(cacheFilesPath + QDir::separator() + *it + pname)) { - QFile f(cacheFilesPath + QDir::separator() + *it + pname); - f.remove(); - } - } -} - -quint32 HelpEngine::getFileAges() -{ - QStringList addDocuFiles = Config::configuration()->docFiles(); - QStringList::const_iterator i = addDocuFiles.begin(); - - quint32 fileAges = 0; - for (; i != addDocuFiles.end(); ++i) { - QFileInfo fi(*i); - if (fi.exists()) - fileAges += fi.lastModified().toTime_t(); - } - - return fileAges; -} - -QString HelpEngine::removeAnchorFromLink(const QString &link) -{ - int i = link.length(); - int j = link.lastIndexOf('/'); - int l = link.lastIndexOf(QDir::separator()); - if (l > j) - j = l; - if (j > -1) { - QString fileName = link.mid(j+1); - int k = fileName.lastIndexOf('#'); - if (k > -1) - i = j + k + 1; - } - return link.left(i); -} - -QString HelpEngine::titleOfLink(const QString &link) -{ - QString s = HelpEngine::removeAnchorFromLink(link); - s = titleMap[s]; - if (s.isEmpty()) - return link; - return s; -} - -QString HelpEngine::home() const -{ - QString link = Config::configuration()->homePage(); - if (!link.startsWith(QLatin1String("file:"))) - link.prepend("file:"); - return link; -} - - - -TitleMapThread::TitleMapThread(HelpEngine *he) - : QThread(he) -{ - engine = he; - done = false; -} - -TitleMapThread::~TitleMapThread() -{ - -} - -void TitleMapThread::run() -{ - if (done) { - engine->mutex.lock(); - engine->titleMapDoneCondition.wakeAll(); - engine->mutex.unlock(); - return; - } - - bool needRebuild = false; - if (Config::configuration()->profileName() == QLatin1String("default")) { - const QStringList docuFiles = Config::configuration()->docFiles(); - for (QStringList::ConstIterator it = docuFiles.begin(); it != docuFiles.end(); it++) { - if (!QFile::exists(*it)) { - Config::configuration()->saveProfile(Profile::createDefaultProfile()); - Config::configuration()->loadDefaultProfile(); - needRebuild = true; - break; - } - } - } - - if (Config::configuration()->docRebuild() || needRebuild) { - engine->removeOldCacheFiles(); - Config::configuration()->setDocRebuild(false); - Config::configuration()->save(); - } - if (contentList.isEmpty()) - getAllContents(); - - titleMap.clear(); - for (QList<QPair<QString, ContentList> >::Iterator it = contentList.begin(); it != contentList.end(); ++it) { - ContentList lst = (*it).second; - foreach (ContentItem item, lst) { - titleMap[item.reference] = item.title.trimmed(); - } - } - done = true; - engine->mutex.lock(); - engine->titleMapDoneCondition.wakeAll(); - engine->mutex.unlock(); -} - -void TitleMapThread::getAllContents() -{ - QFile contentFile(engine->cacheFilePath() + QDir::separator() + QLatin1String("contentdb40.") - + Config::configuration()->profileName()); - contentList.clear(); - if (!contentFile.open(QFile::ReadOnly)) { - buildContentDict(); - return; - } - - QDataStream ds(&contentFile); - quint32 fileAges; - ds >> fileAges; - if (fileAges != engine->getFileAges()) { - contentFile.close(); - engine->removeOldCacheFiles(true); - buildContentDict(); - return; - } - QString key; - QList<ContentItem> lst; - while (!ds.atEnd()) { - ds >> key; - ds >> lst; - contentList += qMakePair(key, QList<ContentItem>(lst)); - } - contentFile.close(); - -} - -void TitleMapThread::buildContentDict() -{ - QStringList docuFiles = Config::configuration()->docFiles(); - - quint32 fileAges = 0; - for (QStringList::iterator it = docuFiles.begin(); it != docuFiles.end(); it++) { - QFile file(*it); - if (!file.exists()) { -#ifdef _SHOW_ERRORS_ - emit errorOccured(tr("Documentation file %1 does not exist!\n" - "Skipping file.").arg(QFileInfo(file).absoluteFilePath())); -#endif - continue; - } - fileAges += QFileInfo(file).lastModified().toTime_t(); - DocuParser *handler = DocuParser::createParser(*it); - if (!handler) { -#ifdef _SHOW_ERRORS_ - emit errorOccured(tr("Documentation file %1 is not compatible!\n" - "Skipping file.").arg(QFileInfo(file).absoluteFilePath())); -#endif - continue; - } - bool ok = handler->parse(&file); - file.close(); - if (ok) { - contentList += qMakePair(*it, QList<ContentItem>(handler->getContentItems())); - delete handler; - } else { -#ifdef _SHOW_ERRORS_ - QString msg = QString::fromLatin1("In file %1:\n%2") - .arg(QFileInfo(file).absoluteFilePath()) - .arg(handler->errorProtocol()); - emit errorOccured(msg); -#endif - continue; - } - } - - QFile contentOut(engine->cacheFilePath() + QDir::separator() + QLatin1String("contentdb40.") - + Config::configuration()->profileName()); - if (contentOut.open(QFile::WriteOnly)) { - QDataStream s(&contentOut); - s << fileAges; - for (QList<QPair<QString, ContentList> >::Iterator it = contentList.begin(); it != contentList.end(); ++it) { - s << *it; - } - contentOut.close(); - } -} - - -IndexThread::IndexThread(HelpEngine *he) - : QThread(he) -{ - engine = he; - indexModel = new IndexListModel(this); - indexDone = false; -} - -void IndexThread::run() -{ - if (indexDone) - return; - engine->mutex.lock(); - if (engine->titleMapThread->isRunning()) - engine->titleMapDoneCondition.wait(&(engine->mutex)); - engine->mutex.unlock(); - - keywordDocuments.clear(); - QList<IndexKeyword> lst; - QFile indexFile(engine->cacheFilePath() + QDir::separator() + QLatin1String("indexdb40.") + - Config::configuration()->profileName()); - if (!indexFile.open(QFile::ReadOnly)) { - buildKeywordDB(); - if (!indexFile.open(QFile::ReadOnly)) { -#ifdef _SHOW_ERRORS_ - emit errorOccured(tr("Failed to load keyword index file!")); -#endif - return; - } - } - - QDataStream ds(&indexFile); - quint32 fileAges; - ds >> fileAges; - if (fileAges != engine->getFileAges()) { - indexFile.close(); - buildKeywordDB(); - if (!indexFile.open(QFile::ReadOnly)) { -#ifdef _SHOW_ERRORS_ - emit errorOccured(tr("Cannot open the index file %1") - .arg(QFileInfo(indexFile).absoluteFilePath())); -#endif - return; - } - ds.setDevice(&indexFile); - ds >> fileAges; - } - ds >> lst; - indexFile.close(); - - for (int i=0; i<lst.count(); ++i) { - const IndexKeyword &idx = lst.at(i); - indexModel->addLink(idx.keyword, idx.link); - keywordDocuments << HelpEngine::removeAnchorFromLink(idx.link); - } - indexModel->publish(); - indexDone = true; -} - -void IndexThread::buildKeywordDB() -{ - QStringList addDocuFiles = Config::configuration()->docFiles(); - QStringList::iterator i = addDocuFiles.begin(); - - int steps = 0; - for (; i != addDocuFiles.end(); i++) - steps += QFileInfo(*i).size(); - - QList<IndexKeyword> lst; - quint32 fileAges = 0; - for (i = addDocuFiles.begin(); i != addDocuFiles.end(); i++) { - QFile file(*i); - if (!file.exists()) { -#ifdef _SHOW_ERRORS_ - emit errorOccured(tr("Documentation file %1 does not exist!\n" - "Skipping file.").arg(QFileInfo(file).absoluteFilePath())); -#endif - continue; - } - fileAges += QFileInfo(file).lastModified().toTime_t(); - DocuParser *handler = DocuParser::createParser(*i); - bool ok = handler->parse(&file); - file.close(); - if (!ok){ -#ifdef _SHOW_ERRORS_ - QString msg = QString::fromLatin1("In file %1:\n%2") - .arg(QFileInfo(file).absoluteFilePath()) - .arg(handler->errorProtocol()); - emit errorOccured(msg); -#endif - delete handler; - continue; - } - - QList<IndexItem*> indLst = handler->getIndexItems(); - foreach (IndexItem *indItem, indLst) { - QFileInfo fi(indItem->reference); - lst.append(IndexKeyword(indItem->keyword, indItem->reference)); - } - delete handler; - } - if (!lst.isEmpty()) - qSort(lst); - - QFile indexout(engine->cacheFilePath() + QDir::separator() + QLatin1String("indexdb40.") - + Config::configuration()->profileName()); - if (verifyDirectory(engine->cacheFilePath()) && indexout.open(QFile::WriteOnly)) { - QDataStream s(&indexout); - s << fileAges; - s << lst; - indexout.close(); - } -} diff --git a/src/plugins/help/helpengine.h b/src/plugins/help/helpengine.h deleted file mode 100644 index 11e7e79674061d677417e0af8439563034cb4332..0000000000000000000000000000000000000000 --- a/src/plugins/help/helpengine.h +++ /dev/null @@ -1,179 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** 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. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -**************************************************************************/ - -#ifndef HELPENGINE_H -#define HELPENGINE_H - -#include "docuparser.h" - -#include <QtCore/QThread> -#include <QtCore/QPair> -#include <QtCore/QMap> -#include <QtCore/QWaitCondition> -#include <QtCore/QMutex> -#include <QtGui/QStringListModel> - -namespace Help { -namespace Internal { - -class HelpEngine; - -typedef QList<ContentItem> ContentList; - -class IndexListModel: public QStringListModel -{ -public: - IndexListModel(QObject *parent = 0) - : QStringListModel(parent) {} - - void clear() { contents.clear(); setStringList(QStringList()); } - - QString description(int index) const { return stringList().at(index); } - QStringList links(int index) const { return contents.values(stringList().at(index)); } - void addLink(const QString &description, const QString &link) { contents.insert(description, link); } - - void publish() { filter(QString(), QString()); } - - QModelIndex filter(const QString &s, const QString &real); - - virtual Qt::ItemFlags flags(const QModelIndex &index) const - { return QStringListModel::flags(index) & ~Qt::ItemIsEditable; } - -private: - QMultiMap<QString, QString> contents; -}; - -class TitleMapThread : public QThread -{ - Q_OBJECT - -public: - TitleMapThread(HelpEngine *he); - ~TitleMapThread(); - void setup(); - QList<QPair<QString, ContentList> > contents() const { return contentList; } - QMap<QString, QString> documentTitleMap() const { return titleMap; } - -signals: - void errorOccured(const QString &errMsg); - -protected: - void run(); - -private: - void getAllContents(); - void buildContentDict(); - - QList<QPair<QString, ContentList> > contentList; - QMap<QString, QString> titleMap; - - HelpEngine *engine; - bool done; -}; - -class IndexThread : public QThread -{ - Q_OBJECT - -public: - IndexThread(HelpEngine *he); - void setup(); - IndexListModel *model() const { return indexModel; } - -protected: - void run(); - -signals: - void errorOccured(const QString &errMsg); - -private: - void buildKeywordDB(); - - HelpEngine *engine; - QStringList keywordDocuments; - IndexListModel *indexModel; - bool indexDone; -}; - -class HelpEngine : public QObject -{ - Q_OBJECT - -public: - HelpEngine(QObject *parent, const QString &defaultQtVersionPath); - ~HelpEngine(); - void init(); - QList<QPair<QString, ContentList> > contents() const { return contentList; } - IndexListModel *indices(); - - QString titleOfLink(const QString &link); - static QString removeAnchorFromLink(const QString &link); - - QString home() const; - -signals: - void indexInitialized(); - void contentsInitialized(); - void errorOccured(const QString &errMsg); - -public slots: - void buildContents(); - void buildIndex(); - -private slots: - void titleMapFinished(); - void indexFinished(); - -private: - friend class TitleMapThread; - friend class IndexThread; - - void removeOldCacheFiles(bool onlyFulltextSearchIndex = false); - QString cacheFilePath() const; - quint32 getFileAges(); - - QList<QPair<QString, ContentList> > contentList; - QMap<QString, QString> titleMap; - - QString cacheFilesPath; - IndexListModel *indexModel; - - QWaitCondition titleMapDoneCondition; - QMutex mutex; - - TitleMapThread *titleMapThread; - IndexThread *indexThread; - - bool contentsOnly; -}; - -} // namespace Internal -} // namespace Help - -#endif // HELPENGINE_H diff --git a/src/plugins/help/helpfindsupport.cpp b/src/plugins/help/helpfindsupport.cpp index 058a77fb2c6029e2c7e58464f73b93c5ddba718b..28c26f728a7a2d013ac50cd80a7e84f3eb41bad0 100644 --- a/src/plugins/help/helpfindsupport.cpp +++ b/src/plugins/help/helpfindsupport.cpp @@ -87,7 +87,7 @@ HelpViewerFindSupport::HelpViewerFindSupport(HelpViewer *viewer) QString HelpViewerFindSupport::currentFindString() const { QTC_ASSERT(m_viewer, return QString()); -#if !defined(QT_NO_WEBKIT) +#if !defined(QT_NO_WEBKIT) return m_viewer->selectedText(); #else return QString(); diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp index b05a2e2908811f4b653065ec1f2d5e50d538e113..661723464cb84600b3c5857842a65296866a745d 100644 --- a/src/plugins/help/helpplugin.cpp +++ b/src/plugins/help/helpplugin.cpp @@ -90,10 +90,11 @@ void HelpManager::registerDocumentation(const QStringList &fileNames) if (!hc.setupData()) qWarning() << "Could not initialize help engine:" << hc.error(); foreach (const QString &fileName, fileNames) { - if (!QFile::exists(fileName)) + if (!QFileInfo(fileName).exists()) continue; - QString fileNamespace = QHelpEngineCore::namespaceName(fileName); - if (!fileNamespace.isEmpty() && !hc.registeredDocumentations().contains(fileNamespace)) { + const QString &nameSpace = QHelpEngineCore::namespaceName(fileName); + if (!nameSpace.isEmpty() + && !hc.registeredDocumentations().contains(nameSpace)) { if (hc.registerDocumentation(fileName)) needsSetup = true; else @@ -141,7 +142,7 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error) if (!locale.isEmpty()) { QTranslator *qtr = new QTranslator(this); qtr->load(QLatin1String("assistant_") + locale, - QLibraryInfo::location(QLibraryInfo::TranslationsPath)); + QLibraryInfo::location(QLibraryInfo::TranslationsPath)); qApp->installTranslator(qtr); } @@ -157,10 +158,10 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error) QDir directory(fi.absolutePath()+"/qtcreator"); if (!directory.exists()) directory.mkpath(directory.absolutePath()); - m_helpEngine = new QHelpEngine(directory.absolutePath() - + QLatin1String("/helpcollection.qhc"), this); - connect(m_helpEngine, SIGNAL(setupFinished()), - this, SLOT(updateFilterComboBox())); + m_helpEngine = new QHelpEngine(directory.absolutePath() + + QLatin1String("/helpcollection.qhc"), this); + connect(m_helpEngine, SIGNAL(setupFinished()), this, + SLOT(updateFilterComboBox())); addAutoReleasedObject(new HelpManager(m_helpEngine)); @@ -171,8 +172,8 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error) addAutoReleasedObject(m_filterSettingsPage); connect(m_docSettingsPage, SIGNAL(documentationAdded()), m_filterSettingsPage, SLOT(updateFilterPage())); - connect(m_docSettingsPage, SIGNAL(dialogAccepted()), - this, SLOT(checkForHelpChanges())); + connect(m_docSettingsPage, SIGNAL(dialogAccepted()), this, + SLOT(checkForHelpChanges())); m_contentWidget = new ContentWindow(m_helpEngine); m_contentWidget->setWindowTitle(tr("Contents")); @@ -183,52 +184,69 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error) m_bookmarkManager = new BookmarkManager(m_helpEngine); m_bookmarkWidget = new BookmarkWidget(m_bookmarkManager, 0, false); m_bookmarkWidget->setWindowTitle(tr("Bookmarks")); - connect(m_bookmarkWidget, SIGNAL(addBookmark()), - this, SLOT(addBookmark())); + connect(m_bookmarkWidget, SIGNAL(addBookmark()), this, SLOT(addBookmark())); Core::ActionManager *am = m_core->actionManager(); Core::Command *cmd; // Add Home, Previous and Next actions (used in the toolbar) - QAction *homeAction = new QAction(QIcon(QLatin1String(":/help/images/home.png")), tr("Home"), this); + QAction *homeAction = + new QAction(QIcon(QLatin1String(":/help/images/home.png")), tr("Home"), + this); cmd = am->registerAction(homeAction, QLatin1String("Help.Home"), globalcontext); - QAction *previousAction = new QAction(QIcon(QLatin1String(":/help/images/previous.png")), + QAction *previousAction = + new QAction(QIcon(QLatin1String(":/help/images/previous.png")), tr("Previous"), this); - cmd = am->registerAction(previousAction, QLatin1String("Help.Previous"), modecontext); - cmd->setDefaultKeySequence(QKeySequence(Qt::Key_Backspace)); + cmd = am->registerAction(previousAction, QLatin1String("Help.Previous"), + modecontext); + cmd->setDefaultKeySequence(QKeySequence::Back); - QAction *nextAction = new QAction(QIcon(QLatin1String(":/help/images/next.png")), tr("Next"), this); + QAction *nextAction = + new QAction(QIcon(QLatin1String(":/help/images/next.png")), tr("Next"), + this); cmd = am->registerAction(nextAction, QLatin1String("Help.Next"), modecontext); + cmd->setDefaultKeySequence(QKeySequence::Forward); - QAction *addBookmarkAction = new QAction(QIcon(QLatin1String(":/help/images/bookmark.png")), + QAction *addBookmarkAction = + new QAction(QIcon(QLatin1String(":/help/images/bookmark.png")), tr("Add Bookmark"), this); - cmd = am->registerAction(addBookmarkAction, QLatin1String("Help.AddBookmark"), modecontext); + cmd = am->registerAction(addBookmarkAction, QLatin1String("Help.AddBookmark"), + modecontext); cmd->setDefaultKeySequence(QKeySequence(Qt::CTRL + Qt::Key_M)); // Add Index, Contents, and Context menu items and a separator to the Help menu QAction *indexAction = new QAction(tr("Index"), this); - cmd = am->registerAction(indexAction, QLatin1String("Help.Index"), globalcontext); - am->actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP); + cmd = am->registerAction(indexAction, QLatin1String("Help.Index"), + globalcontext); + am->actionContainer(Core::Constants::M_HELP)->addAction(cmd, + Core::Constants::G_HELP_HELP); QAction *contentsAction = new QAction(tr("Contents"), this); - cmd = am->registerAction(contentsAction, QLatin1String("Help.Contents"), globalcontext); - am->actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP); + cmd = am->registerAction(contentsAction, QLatin1String("Help.Contents"), + globalcontext); + am->actionContainer(Core::Constants::M_HELP)->addAction(cmd, + Core::Constants::G_HELP_HELP); QAction *searchAction = new QAction(tr("Search"), this); - cmd = am->registerAction(searchAction, QLatin1String("Help.Search"), globalcontext); - am->actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP); + cmd = am->registerAction(searchAction, QLatin1String("Help.Search"), + globalcontext); + am->actionContainer(Core::Constants::M_HELP)->addAction(cmd, + Core::Constants::G_HELP_HELP); QAction *contextAction = new QAction(tr("Context Help"), this); - cmd = am->registerAction(contextAction, QLatin1String("Help.Context"), globalcontext); + cmd = am->registerAction(contextAction, QLatin1String("Help.Context"), + globalcontext); cmd->setDefaultKeySequence(QKeySequence(Qt::Key_F1)); - am->actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP); + am->actionContainer(Core::Constants::M_HELP)->addAction(cmd, + Core::Constants::G_HELP_HELP); #ifndef Q_OS_MAC QAction *sep = new QAction(this); sep->setSeparator(true); cmd = am->registerAction(sep, QLatin1String("Help.Separator"), globalcontext); - am->actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP); + am->actionContainer(Core::Constants::M_HELP)->addAction(cmd, + Core::Constants::G_HELP_HELP); #endif m_centralWidget = new Help::Internal::CentralWidget(m_helpEngine); @@ -275,21 +293,24 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error) QMap<QString, Core::Command*> shortcutMap; QShortcut *shortcut = new QShortcut(splitter); shortcut->setWhatsThis(tr("Activate Index in Help mode")); - cmd = am->registerShortcut(shortcut, QLatin1String("Help.IndexShortcut"), modecontext); + cmd = am->registerShortcut(shortcut, QLatin1String("Help.IndexShortcut"), + modecontext); cmd->setDefaultKeySequence(QKeySequence(Qt::CTRL + Qt::Key_I)); connect(shortcut, SIGNAL(activated()), this, SLOT(activateIndex())); shortcutMap.insert(m_indexWidget->windowTitle(), cmd); shortcut = new QShortcut(splitter); shortcut->setWhatsThis(tr("Activate Contents in Help mode")); - cmd = am->registerShortcut(shortcut, QLatin1String("Help.ContentsShortcut"), modecontext); + cmd = am->registerShortcut(shortcut, QLatin1String("Help.ContentsShortcut"), + modecontext); cmd->setDefaultKeySequence(QKeySequence(Qt::CTRL + Qt::Key_T)); connect(shortcut, SIGNAL(activated()), this, SLOT(activateContents())); shortcutMap.insert(m_contentWidget->windowTitle(), cmd); shortcut = new QShortcut(splitter); shortcut->setWhatsThis(tr("Activate Search in Help mode")); - cmd = am->registerShortcut(shortcut, QLatin1String("Help.SearchShortcut"), modecontext); + cmd = am->registerShortcut(shortcut, QLatin1String("Help.SearchShortcut"), + modecontext); cmd->setDefaultKeySequence(QKeySequence(Qt::CTRL + Qt::Key_S)); connect(shortcut, SIGNAL(activated()), this, SLOT(activateSearch())); shortcutMap.insert(m_searchWidget->windowTitle(), cmd); @@ -301,23 +322,23 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error) connect(previousAction, SIGNAL(triggered()), m_centralWidget, SLOT(backward())); connect(nextAction, SIGNAL(triggered()), m_centralWidget, SLOT(forward())); connect(addBookmarkAction, SIGNAL(triggered()), this, SLOT(addBookmark())); - connect(m_contentWidget, SIGNAL(linkActivated(const QUrl&)), - m_centralWidget, SLOT(setSource(const QUrl&))); - connect(m_indexWidget, SIGNAL(linkActivated(const QUrl&)), - m_centralWidget, SLOT(setSource(const QUrl&))); - connect(m_searchWidget, SIGNAL(requestShowLink(const QUrl&)), - m_centralWidget, SLOT(setSource(const QUrl&))); - connect(m_searchWidget, SIGNAL(requestShowLinkInNewTab(const QUrl&)), - m_centralWidget, SLOT(setSourceInNewTab(const QUrl&))); - connect(m_bookmarkWidget, SIGNAL(requestShowLink(const QUrl&)), - m_centralWidget, SLOT(setSource(const QUrl&))); + connect(m_contentWidget, SIGNAL(linkActivated(QUrl)), m_centralWidget, + SLOT(setSource(QUrl))); + connect(m_indexWidget, SIGNAL(linkActivated(QUrl)), m_centralWidget, + SLOT(setSource(QUrl))); + connect(m_searchWidget, SIGNAL(requestShowLink(QUrl)), m_centralWidget, + SLOT(setSource(QUrl))); + connect(m_searchWidget, SIGNAL(requestShowLinkInNewTab(QUrl)), + m_centralWidget, SLOT(setSourceInNewTab(QUrl))); + connect(m_bookmarkWidget, SIGNAL(requestShowLink(QUrl)), m_centralWidget, + SLOT(setSource(const QUrl&))); connect(m_centralWidget, SIGNAL(backwardAvailable(bool)), previousAction, SLOT(setEnabled(bool))); connect(m_centralWidget, SIGNAL(forwardAvailable(bool)), nextAction, SLOT(setEnabled(bool))); - connect(m_centralWidget, SIGNAL(addNewBookmark(const QString&, const QString&)), - this, SLOT(addNewBookmark(const QString&, const QString&))); + connect(m_centralWidget, SIGNAL(addNewBookmark(QString, QString)), this, + SLOT(addNewBookmark(QString, QString))); QList<QAction*> actionList; actionList << previousAction @@ -337,19 +358,19 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error) connect(m_core->modeManager(), SIGNAL(currentModeChanged(Core::IMode*)), this, SLOT(modeChanged(Core::IMode*))); - connect(m_contentWidget, SIGNAL(linkActivated(const QUrl&)), - m_centralWidget, SLOT(setSource(const QUrl&))); - connect(m_indexWidget, SIGNAL(linkActivated(const QUrl&)), - m_centralWidget, SLOT(setSource(const QUrl&))); - connect(m_indexWidget, SIGNAL(linksActivated(const QMap<QString, QUrl>&, const QString&)), - m_centralWidget, SLOT(showTopicChooser(const QMap<QString, QUrl>&, const QString&))); + connect(m_contentWidget, SIGNAL(linkActivated(QUrl)), m_centralWidget, + SLOT(setSource(QUrl))); + connect(m_indexWidget, SIGNAL(linkActivated(QUrl)), m_centralWidget, + SLOT(setSource(QUrl))); + connect(m_indexWidget, SIGNAL(linksActivated(QMap<QString, QUrl>, QString)), + m_centralWidget, SLOT(showTopicChooser(QMap<QString, QUrl>, QString))); HelpIndexFilter *helpIndexFilter = new HelpIndexFilter(this, m_helpEngine); addAutoReleasedObject(helpIndexFilter); - connect(helpIndexFilter, SIGNAL(linkActivated(QUrl)), - this, SLOT(switchToHelpMode(QUrl))); - connect(helpIndexFilter, SIGNAL(linksActivated(const QMap<QString, QUrl>&, const QString&)), - this, SLOT(switchToHelpMode(const QMap<QString, QUrl>&, const QString&))); + connect(helpIndexFilter, SIGNAL(linkActivated(QUrl)), this, + SLOT(switchToHelpMode(QUrl))); + connect(helpIndexFilter, SIGNAL(linksActivated(QMap<QString, QUrl>, QString)), + this, SLOT(switchToHelpMode(QMap<QString, QUrl>, QString))); previousAction->setEnabled(m_centralWidget->isBackwardAvailable()); nextAction->setEnabled(m_centralWidget->isForwardAvailable()); @@ -364,8 +385,12 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error) void HelpPlugin::createRightPaneSideBar() { QAction *switchToHelpMode = new QAction("Go to Help Mode", this); - m_rightPaneBackwardAction = new QAction(QIcon(QLatin1String(":/help/images/previous.png")), tr("Previous"), this); - m_rightPaneForwardAction = new QAction(QIcon(QLatin1String(":/help/images/next.png")), tr("Next"), this); + m_rightPaneBackwardAction = + new QAction(QIcon(QLatin1String(":/help/images/previous.png")), + tr("Previous"), this); + m_rightPaneForwardAction = + new QAction(QIcon(QLatin1String(":/help/images/next.png")), tr("Next"), + this); QToolBar *rightPaneToolBar = new QToolBar(); rightPaneToolBar->addAction(switchToHelpMode); @@ -373,8 +398,10 @@ void HelpPlugin::createRightPaneSideBar() rightPaneToolBar->addAction(m_rightPaneForwardAction); connect(switchToHelpMode, SIGNAL(triggered()), this, SLOT(switchToHelpMode())); - connect(m_rightPaneBackwardAction, SIGNAL(triggered()), this, SLOT(rightPaneBackward())); - connect(m_rightPaneForwardAction, SIGNAL(triggered()), this, SLOT(rightPaneForward())); + connect(m_rightPaneBackwardAction, SIGNAL(triggered()), this, + SLOT(rightPaneBackward())); + connect(m_rightPaneForwardAction, SIGNAL(triggered()), this, + SLOT(rightPaneForward())); QToolButton *closeButton = new QToolButton(); closeButton->setProperty("type", QLatin1String("dockbutton")); @@ -405,6 +432,10 @@ void HelpPlugin::createRightPaneSideBar() m_core->addContextObject(new Core::BaseContext(m_helpViewerForSideBar, QList<int>() << m_core->uniqueIDManager()->uniqueIdentifier(Constants::C_HELP_SIDEBAR), this)); + connect(m_centralWidget, SIGNAL(sourceChanged(QUrl)), this, + SLOT(updateSideBarSource(QUrl))); + connect(m_centralWidget, SIGNAL(currentViewerChanged()), this, + SLOT(updateSideBarSource())); QAction *copyActionSideBar = new QAction(this); Core::Command *cmd = m_core->actionManager()->registerAction(copyActionSideBar, @@ -443,7 +474,6 @@ void HelpPlugin::activateHelpMode() void HelpPlugin::switchToHelpMode() { switchToHelpMode(m_helpViewerForSideBar->source()); - Core::RightPaneWidget::instance()->setShown(false); } void HelpPlugin::switchToHelpMode(const QUrl &source) @@ -453,7 +483,8 @@ void HelpPlugin::switchToHelpMode(const QUrl &source) m_centralWidget->setFocus(); } -void HelpPlugin::switchToHelpMode(const QMap<QString, QUrl> &urls, const QString &keyword) +void HelpPlugin::switchToHelpMode(const QMap<QString, QUrl> &urls, + const QString &keyword) { activateHelpMode(); m_centralWidget->showTopicChooser(urls, keyword); @@ -475,9 +506,11 @@ void HelpPlugin::extensionsInitialized() bool needsSetup = false; bool assistantInternalDocRegistered = false; - foreach (QString ns, m_helpEngine->registeredDocumentations()) { - if (ns == QString("com.nokia.qtcreator.%1%2") - .arg(IDE_VERSION_MAJOR).arg(IDE_VERSION_MINOR)) { + const QString &docInternal = QString("com.nokia.qtcreator.%1%2") + .arg(IDE_VERSION_MAJOR).arg(IDE_VERSION_MINOR); + const QStringList &docs = m_helpEngine->registeredDocumentations(); + foreach (const QString &ns, docs) { + if (ns == docInternal) { assistantInternalDocRegistered = true; break; } @@ -496,21 +529,22 @@ void HelpPlugin::extensionsInitialized() QHelpEngineCore hc(fi.absoluteFilePath()); hc.setupData(); QString fileNamespace = QHelpEngineCore::namespaceName(qchFileName); - if (!fileNamespace.isEmpty() && !hc.registeredDocumentations().contains(fileNamespace)) { - if (!hc.registerDocumentation(qchFileName)) - qDebug() << hc.error(); - needsSetup = true; + if (!fileNamespace.isEmpty() + && !hc.registeredDocumentations().contains(fileNamespace)) { + if (!hc.registerDocumentation(qchFileName)) + qDebug() << hc.error(); + needsSetup = true; } } - int i = m_helpEngine->customValue( - QLatin1String("UnfilteredFilterInserted")).toInt(); + QLatin1String key("UnfilteredFilterInserted"); + int i = m_helpEngine->customValue(key).toInt(); if (i != 1) { { QHelpEngineCore hc(m_helpEngine->collectionFile()); hc.setupData(); hc.addCustomFilter(tr("Unfiltered"), QStringList()); - hc.setCustomValue(QLatin1String("UnfilteredFilterInserted"), 1); + hc.setCustomValue(key, 1); } m_helpEngine->blockSignals(true); m_helpEngine->setCurrentFilter(tr("Unfiltered")); @@ -524,9 +558,15 @@ void HelpPlugin::extensionsInitialized() updateFilterComboBox(); m_bookmarkManager->setupBookmarkModels(); - if (Core::Internal::WelcomeMode *welcomeMode = qobject_cast<Core::Internal::WelcomeMode*>(m_core->modeManager()->mode(Core::Constants::MODE_WELCOME))) { - connect(welcomeMode, SIGNAL(openHelpPage(const QString&)), this, SLOT(openHelpPage(const QString&))); - connect(welcomeMode, SIGNAL(openContextHelpPage(const QString&)), this, SLOT(openContextHelpPage(QString))); + using namespace Core::Internal; + using namespace Core::Constants; + WelcomeMode *welcomeMode = + qobject_cast<WelcomeMode*>(m_core->modeManager()->mode(MODE_WELCOME)); + if (welcomeMode) { + connect(welcomeMode, SIGNAL(openHelpPage(QString)), this, + SLOT(openHelpPage(QString))); + connect(welcomeMode, SIGNAL(openContextHelpPage(QString)), this, + SLOT(openContextHelpPage(QString))); } } @@ -564,81 +604,65 @@ void HelpPlugin::openContextHelpPage(const QString &url) m_helpViewerForSideBar->setSource(QUrl(url)); } +void HelpPlugin::updateSideBarSource() +{ + const QUrl &url = m_centralWidget->currentSource(); + if (url.isValid()) + updateSideBarSource(url); +} + +void HelpPlugin::updateSideBarSource(const QUrl &newUrl) +{ + if (m_helpViewerForSideBar) + m_helpViewerForSideBar->setSource(newUrl); +} + void HelpPlugin::activateContext() { - using namespace Core; - // case 1 sidebar shown and has focus, we show whatever we have in the - // sidebar in big - RightPanePlaceHolder* placeHolder = RightPanePlaceHolder::current(); + Core::RightPanePlaceHolder* placeHolder = Core::RightPanePlaceHolder::current(); if (placeHolder && Core::RightPaneWidget::instance()->hasFocus()) { switchToHelpMode(); return; - } + } else if (m_core->modeManager()->currentMode() == m_mode) + return; - bool useSideBar = false; - if (placeHolder && !Core::RightPaneWidget::instance()->hasFocus()) - useSideBar = true; + QString id; + QMap<QString, QUrl> links; // Find out what to show - HelpViewer *viewer = 0; - if (IContext *context = m_core->currentContextObject()) { + if (Core::IContext *context = m_core->currentContextObject()) { if (!m_contextHelpEngine) { - m_contextHelpEngine = new QHelpEngineCore(m_helpEngine->collectionFile(), this); - //m_contextHelpEngine->setAutoSaveFilter(false); + m_contextHelpEngine = + new QHelpEngineCore(m_helpEngine->collectionFile(), this); m_contextHelpEngine->setupData(); m_contextHelpEngine->setCurrentFilter(tr("Unfiltered")); } - const QString &id = context->contextHelpId(); - QMap<QString, QUrl> links = m_contextHelpEngine->linksForIdentifier(id); - if (!links.isEmpty()) { - if (useSideBar) { - Core::RightPaneWidget::instance()->setShown(true); - viewer = m_helpViewerForSideBar; - } else { - viewer = m_centralWidget->currentHelpViewer(); - m_core->modeManager()->activateMode(QLatin1String(Constants::ID_MODE_HELP)); - } + id = context->contextHelpId(); + links = m_contextHelpEngine->linksForIdentifier(id); + } - if (viewer) { - QUrl source = *links.begin(); - if (viewer->source() != source) - viewer->setSource(source); - viewer->setFocus(); - } - } else { - // No link found - if (useSideBar) { - Core::RightPaneWidget::instance()->setShown(true); - viewer = m_helpViewerForSideBar; - } else { - viewer = m_centralWidget->currentHelpViewer(); - activateHelpMode(); - } - - if (viewer) { - viewer->setHtml(tr("<html><head><title>No Documentation</title></head><body><br/>" - "<center><b>%1</b><br/>No documentation available.</center></body></html>"). - arg(id)); - viewer->setSource(QUrl()); - //activateIndex(); - } - } + HelpViewer *viewer = 0; + if (placeHolder && !Core::RightPaneWidget::instance()->hasFocus()) { + Core::RightPaneWidget::instance()->setShown(true); + viewer = m_helpViewerForSideBar; } else { - // No context object - if (useSideBar) { - Core::RightPaneWidget::instance()->setShown(true); - viewer = m_helpViewerForSideBar; - } else { - viewer = m_centralWidget->currentHelpViewer(); - activateHelpMode(); - } + viewer = m_centralWidget->currentHelpViewer(); + activateHelpMode(); + } - if (viewer) { + if (viewer) { + if (links.isEmpty()) { + // No link found or no context object + viewer->setHtml(tr("<html><head><title>No Documentation</title>" + "</head><body><br/><center><b>%1</b><br/>No documentation " + "available.</center></body></html>").arg(id)); viewer->setSource(QUrl()); - viewer->setHtml(tr("<html><head><title>No Documentation</title></head><body><br/><br/><center>No" - " documentation available.</center></body></html>")); - //activateIndex(); + } else { + QUrl source = *links.begin(); + if (viewer->source() != source) + viewer->setSource(source); + viewer->setFocus(); } } } @@ -683,8 +707,8 @@ QToolBar *HelpPlugin::createToolBar() layout->addWidget(new QLabel(tr("Filtered by:"))); m_filterComboBox = new QComboBox; m_filterComboBox->setMinimumContentsLength(20); - connect(m_filterComboBox, SIGNAL(activated(const QString&)), - this, SLOT(filterDocumentation(const QString&))); + connect(m_filterComboBox, SIGNAL(activated(QString)), this, + SLOT(filterDocumentation(QString))); layout->addWidget(m_filterComboBox); toolWidget->addWidget(w); diff --git a/src/plugins/help/helpplugin.h b/src/plugins/help/helpplugin.h index b66765177bd89b5703948834291e919063eb4444..f95e0f0ece41c4bbd1707694ba38cb4fc3be4a6c 100644 --- a/src/plugins/help/helpplugin.h +++ b/src/plugins/help/helpplugin.h @@ -132,6 +132,9 @@ private slots: void openHelpPage(const QString& url); void openContextHelpPage(const QString &url); + void updateSideBarSource(); + void updateSideBarSource(const QUrl &newUrl); + private: QToolBar *createToolBar(); void createRightPaneSideBar(); diff --git a/src/plugins/help/indextoolwindow.cpp b/src/plugins/help/indextoolwindow.cpp deleted file mode 100644 index 9bdb728385afecc67052da81eaf4c7639f941b21..0000000000000000000000000000000000000000 --- a/src/plugins/help/indextoolwindow.cpp +++ /dev/null @@ -1,212 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** 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. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -**************************************************************************/ - -#include "indextoolwindow.h" -#include "helpengine.h" -#include "topicchooser.h" - -#include <QtCore/QDebug> -#include <QtGui/QKeyEvent> -#include <QtGui/QFocusEvent> -#include <QtGui/QLayout> -#include <QtGui/QLabel> -#include <QtGui/QLineEdit> -#include <QtGui/QListView> -#include <QtGui/QApplication> - -using namespace Help::Internal; - -IndexToolWidget::IndexToolWidget() -{ - wasInitialized = false; - - QVBoxLayout *layout = new QVBoxLayout(this); - layout->setMargin(0); - - QLabel *l = new QLabel(tr("Look for:"), this); - layout->addWidget(l); - - findLineEdit = new QLineEdit(this); - findLineEdit->installEventFilter(this); - layout->addWidget(findLineEdit); - - indicesView = new QListView(this); - indicesView->setLayoutMode(QListView::Batched); - indicesView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - - layout->addWidget(indicesView); - - setWindowTitle(tr("Index")); - setWindowIcon(QIcon(":/help/images/find.png")); -} - -void IndexToolWidget::focusInEvent(QFocusEvent *e) -{ - showEvent(0); - if (e && e->reason() != Qt::MouseFocusReason) { - findLineEdit->selectAll(); - findLineEdit->setFocus(); - } -} - -void IndexToolWidget::showEvent(QShowEvent *) -{ - if (!wasInitialized) { - wasInitialized = true; - setCursor(QCursor(Qt::WaitCursor)); - emit buildRequested(); - } -} - -bool IndexToolWidget::eventFilter(QObject * o, QEvent * e) -{ - if (o == findLineEdit && e->type() == QEvent::KeyPress) { - switch (static_cast<QKeyEvent*>(e)->key()) { - case Qt::Key_Up: - case Qt::Key_Down: - case Qt::Key_PageDown: - case Qt::Key_PageUp: - QApplication::sendEvent(indicesView, e); - break; - case Qt::Key_Escape: - emit escapePressed(); - break; - default: - break; - } - } - return QWidget::eventFilter(o, e); -} - - -IndexToolWindow::IndexToolWindow(const QList<int> &context, HelpEngine *help) -{ - m_context = context; - m_context << 0; - - m_widget = new IndexToolWidget; - - helpEngine = help; - connect(helpEngine, SIGNAL(indexInitialized()), this, SLOT(indexDone())); - model = 0; - - connect(m_widget->findLineEdit, SIGNAL(textEdited(const QString&)), - this, SLOT(searchInIndex(const QString &))); - connect(m_widget->findLineEdit, SIGNAL(returnPressed()), this, SLOT(indexRequested())); - connect(m_widget, SIGNAL(buildRequested()), helpEngine, SLOT(buildIndex())); - - connect(m_widget->indicesView, SIGNAL(activated(const QModelIndex&)), - this, SLOT(indexRequested())); - connect(m_widget, SIGNAL(escapePressed()), this, SIGNAL(escapePressed())); - -} - -IndexToolWindow::~IndexToolWindow() -{ - delete m_widget; -} - -const QList<int> &IndexToolWindow::context() const -{ - return m_context; -} - -QWidget *IndexToolWindow::widget() -{ - return m_widget; -} - -void IndexToolWindow::indexDone() -{ - model = helpEngine->indices(); - m_widget->indicesView->setModel(model); - m_widget->setCursor(QCursor(Qt::ArrowCursor)); -} - -void IndexToolWindow::searchInIndex(const QString &str) -{ - if (!model) - return; - QRegExp atoz("[A-Z]"); - int matches = str.count(atoz); - if (matches > 0 && !str.contains(".*")) - { - int start = 0; - QString newSearch; - for (; matches > 0; --matches) { - int match = str.indexOf(atoz, start+1); - if (match <= start) - continue; - newSearch += str.mid(start, match-start); - newSearch += ".*"; - start = match; - } - newSearch += str.mid(start); - m_widget->indicesView->setCurrentIndex(model->filter(newSearch, str)); - } - else - m_widget->indicesView->setCurrentIndex(model->filter(str, str)); -} - -void IndexToolWindow::indexRequested() -{ - if (!model) - return; - int row = m_widget->indicesView->currentIndex().row(); - if (row == -1 || row >= model->rowCount()) - return; - - QString description = model->description(row); - QStringList links = model->links(row); - - bool blocked = m_widget->findLineEdit->blockSignals(true); - m_widget->findLineEdit->setText(description); - m_widget->findLineEdit->blockSignals(blocked); - - if (links.count() == 1) { - emit showLinkRequested(links.first(), false); - } else { - qSort(links); - QStringList::Iterator it = links.begin(); - QStringList linkList; - QStringList linkNames; - for (; it != links.end(); ++it) { - linkList << *it; - linkNames << helpEngine->titleOfLink(*it); - } - QString link = TopicChooser::getLink(m_widget, linkNames, linkList, description); - if (!link.isEmpty()) - emit showLinkRequested(link, false); - } - - model->publish(); - m_widget->indicesView->setCurrentIndex(model->index(model->stringList().indexOf(description))); - m_widget->indicesView->scrollTo(m_widget->indicesView->currentIndex(), QAbstractItemView::PositionAtTop); -} - diff --git a/src/plugins/help/indextoolwindow.h b/src/plugins/help/indextoolwindow.h deleted file mode 100644 index 6ddecc986e203f03e9c4a32a0db4479f58d3358f..0000000000000000000000000000000000000000 --- a/src/plugins/help/indextoolwindow.h +++ /dev/null @@ -1,110 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** 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. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -**************************************************************************/ - -#ifndef INDEXTOOLWINDOW_H -#define INDEXTOOLWINDOW_H - -#include <coreplugin/iview.h> - -#include <QtCore/QModelIndex> -#include <QtGui/QWidget> - -class QListView; -class QLineEdit; - -namespace Help { -namespace Internal { - -class HelpEngine; -class IndexListModel; -class IndexToolWindow; - -class IndexToolWidget : public QWidget -{ - Q_OBJECT -public: - IndexToolWidget(); - -signals: - void buildRequested(); - void escapePressed(); - -private: - friend class IndexToolWindow; - - bool eventFilter(QObject * o, QEvent * e); - void showEvent(QShowEvent *e); - void focusInEvent(QFocusEvent *e); - - bool wasInitialized; - QLineEdit *findLineEdit; - QListView *indicesView; -}; - - -class IndexToolWindow : public Core::IView -{ - Q_OBJECT - -public: - IndexToolWindow(const QList<int> &context, HelpEngine *help); - ~IndexToolWindow(); - - const QList<int> &context() const; - QWidget *widget(); - - QList<QWidget*> dockToolBarWidgets() const { return QList<QWidget*>(); } - - const char *uniqueViewName() const { return "Help.IndexToolWindow"; } - const char *globalMenuGroup() const { return "Help.Group"; } - inline QKeySequence defaultShortcut() const { return QKeySequence(); } - Qt::DockWidgetArea defaultArea() const { return Qt::RightDockWidgetArea; } - IView::ViewPosition defaultPosition() const { return IView::Second; } - -signals: - void showLinkRequested(const QString &link, bool newWindow); - void escapePressed(); - -private slots: - void indexDone(); - void searchInIndex(const QString &str); - void indexRequested(); - -private: - HelpEngine *helpEngine; - IndexListModel *model; - - QList<int> m_context; - IndexToolWidget *m_widget; -}; - -} // namespace Internal -} // namespace Help - -#endif // INDEXTOOLWINDOW_H diff --git a/src/plugins/perforce/Perforce.pluginspec b/src/plugins/perforce/Perforce.pluginspec index f271d7b7c03309fefb88cd2061b43fdb814cbb21..0acab9e6205492daa3a65c2dd23a213abfbc9c8c 100644 --- a/src/plugins/perforce/Perforce.pluginspec +++ b/src/plugins/perforce/Perforce.pluginspec @@ -1,4 +1,4 @@ -<plugin name="Perforce" version="1.1.80" compatVersion="1.1.80"> +<plugin name="Perforce" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,9 +19,9 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>Perforce integration.</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="TextEditor" version="1.1.80"/> - <dependency name="ProjectExplorer" version="1.1.80"/> - <dependency name="Core" version="1.1.80"/> - <dependency name="VCSBase" version="1.1.80"/> + <dependency name="TextEditor" version="1.2.0"/> + <dependency name="ProjectExplorer" version="1.2.0"/> + <dependency name="Core" version="1.2.0"/> + <dependency name="VCSBase" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/plugins/projectexplorer/ProjectExplorer.pluginspec b/src/plugins/projectexplorer/ProjectExplorer.pluginspec index eb8ea81324e17570a4aa7160cd113b02aa6e4a62..c6c35819282b74aec3f75dc2dc6e220c5906fc85 100644 --- a/src/plugins/projectexplorer/ProjectExplorer.pluginspec +++ b/src/plugins/projectexplorer/ProjectExplorer.pluginspec @@ -1,4 +1,4 @@ -<plugin name="ProjectExplorer" version="1.1.80" compatVersion="1.1.80"> +<plugin name="ProjectExplorer" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,9 +19,9 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>ProjectExplorer framework that can be extended with different kind of project types.</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="Core" version="1.1.80"/> - <dependency name="Find" version="1.1.80"/> - <dependency name="QuickOpen" version="1.1.80"/> - <dependency name="TextEditor" version="1.1.80"/> + <dependency name="Core" version="1.2.0"/> + <dependency name="Find" version="1.2.0"/> + <dependency name="QuickOpen" version="1.2.0"/> + <dependency name="TextEditor" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp index e73fe6e6e404e22f8346b659434ab9424c9d53ed..79ba761d1cb2c9846bc55e07c2e6689ebc2c53a9 100644 --- a/src/plugins/projectexplorer/session.cpp +++ b/src/plugins/projectexplorer/session.cpp @@ -393,6 +393,8 @@ SessionManager::SessionManager(QObject *parent) this, SLOT(setEditorCodec(Core::IEditor *, QString))); connect(ProjectExplorerPlugin::instance(), SIGNAL(currentProjectChanged(ProjectExplorer::Project *)), this, SLOT(updateWindowTitle())); + connect(m_core->editorManager(), SIGNAL(currentEditorChanged(Core::IEditor*)), + this, SLOT(updateWindowTitle())); } SessionManager::~SessionManager() @@ -921,6 +923,13 @@ void SessionManager::updateWindowTitle() if (Project *currentProject = ProjectExplorerPlugin::instance()->currentProject()) windowTitle.prepend(currentProject->name() + " - "); } + if (m_core->editorManager()->currentEditor()) { + QFileInfo fi(m_core->editorManager()->currentEditor()->file()->fileName()); + windowTitle.prepend(fi.fileName() + " - "); + m_core->mainWindow()->setWindowFilePath(fi.absoluteFilePath()); + } else { + m_core->mainWindow()->setWindowFilePath(QString()); + } m_core->mainWindow()->setWindowTitle(windowTitle); } diff --git a/src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec b/src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec index 7fc7c9efffdc34ed0e88e21221de5970cc26c12c..7a8601377c47c694e892f29d7fa026748da51adb 100644 --- a/src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec +++ b/src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec @@ -1,4 +1,4 @@ -<plugin name="QmlProjectManager" version="1.1.80" compatVersion="1.1.80"> +<plugin name="QmlProjectManager" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,10 +19,10 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>Qml support</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="TextEditor" version="1.1.80"/> - <dependency name="ProjectExplorer" version="1.1.80"/> - <dependency name="CppTools" version="1.1.80"/> - <dependency name="CppEditor" version="1.1.80"/> - <dependency name="Help" version="1.1.80"/> + <dependency name="TextEditor" version="1.2.0"/> + <dependency name="ProjectExplorer" version="1.2.0"/> + <dependency name="CppTools" version="1.2.0"/> + <dependency name="CppEditor" version="1.2.0"/> + <dependency name="Help" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/plugins/qt4projectmanager/Qt4ProjectManager.pluginspec b/src/plugins/qt4projectmanager/Qt4ProjectManager.pluginspec index 4fcf00b62f85e80c5cef145d5c57b310d11526b4..16d2c09a917db61c0b72f4664317f322bbdac6ab 100644 --- a/src/plugins/qt4projectmanager/Qt4ProjectManager.pluginspec +++ b/src/plugins/qt4projectmanager/Qt4ProjectManager.pluginspec @@ -1,4 +1,4 @@ -<plugin name="Qt4ProjectManager" version="1.1.80" compatVersion="1.1.80"> +<plugin name="Qt4ProjectManager" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,11 +19,11 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>Provides project type for Qt 4 pro files and tools.</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="TextEditor" version="1.1.80"/> - <dependency name="ProjectExplorer" version="1.1.80"/> - <dependency name="CppTools" version="1.1.80"/> - <dependency name="CppEditor" version="1.1.80"/> - <dependency name="Help" version="1.1.80"/> - <dependency name="Designer" version="1.1.80"/> + <dependency name="TextEditor" version="1.2.0"/> + <dependency name="ProjectExplorer" version="1.2.0"/> + <dependency name="CppTools" version="1.2.0"/> + <dependency name="CppEditor" version="1.2.0"/> + <dependency name="Help" version="1.2.0"/> + <dependency name="Designer" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp index d820134389af425e85a3885a3943a28a2fc52ecc..761e70612fa38030fcfdff64d1dbf92f1c0139b0 100644 --- a/src/plugins/qt4projectmanager/qtversionmanager.cpp +++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp @@ -1107,7 +1107,7 @@ QString QtVersion::examplesPath() const bool QtVersion::isMSVC64Bit() const { const QString make = qmakeCommand(); - qDebug() << make; +// qDebug() << make; bool isAmd64 = false; #ifdef Q_OS_WIN32 # ifdef __GNUC__ // MinGW lacking some definitions/winbase.h diff --git a/src/plugins/qtscripteditor/QtScriptEditor.pluginspec b/src/plugins/qtscripteditor/QtScriptEditor.pluginspec index 18ac8a5a53b7bfd39b908863eccdffe398b3da40..cc18369ddcf92aa93e85163aa3166632b7c97da4 100644 --- a/src/plugins/qtscripteditor/QtScriptEditor.pluginspec +++ b/src/plugins/qtscripteditor/QtScriptEditor.pluginspec @@ -1,4 +1,4 @@ -<plugin name="QtScriptEditor" version="1.1.80" compatVersion="1.1.80"> +<plugin name="QtScriptEditor" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,7 +19,7 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>Editor for QtScript.</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="Core" version="1.1.80"/> - <dependency name="TextEditor" version="1.1.80"/> + <dependency name="Core" version="1.2.0"/> + <dependency name="TextEditor" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/plugins/quickopen/QuickOpen.pluginspec b/src/plugins/quickopen/QuickOpen.pluginspec index d5fd3bf6641a2d85006c49d22513398ba6a0200a..f94bed994b09fbb615f8629050a33dc2b6c27402 100644 --- a/src/plugins/quickopen/QuickOpen.pluginspec +++ b/src/plugins/quickopen/QuickOpen.pluginspec @@ -1,4 +1,4 @@ -<plugin name="QuickOpen" version="1.1.80" compatVersion="1.1.80"> +<plugin name="QuickOpen" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,6 +19,6 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>Provides the QuickOpen widget and the hooks for QuickOpen filter implementations.</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="Core" version="1.1.80"/> + <dependency name="Core" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/plugins/quickopen/quickopentoolwindow.cpp b/src/plugins/quickopen/quickopentoolwindow.cpp index 462e1d94df3a5feb3aed29651d8ed6e3763b08aa..139559bee34dd9fdd40ab2631b6fc828710a30f3 100644 --- a/src/plugins/quickopen/quickopentoolwindow.cpp +++ b/src/plugins/quickopen/quickopentoolwindow.cpp @@ -258,6 +258,7 @@ QuickOpenToolWindow::QuickOpenToolWindow(QuickOpenPlugin *qop) : // Explicitly hide the completion list popup. m_completionList->hide(); + setFocusProxy(m_fileLineEdit); setWindowTitle(tr("Locate...")); resize(200, 90); QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); diff --git a/src/plugins/regexp/RegExp.pluginspec b/src/plugins/regexp/RegExp.pluginspec index 4e29e8b8f452b297717627fc0787c66db96ca8ab..9db7d03cbdd3b24dff8b1f0f72fbad8ffa21735b 100644 --- a/src/plugins/regexp/RegExp.pluginspec +++ b/src/plugins/regexp/RegExp.pluginspec @@ -1,4 +1,4 @@ -<plugin name="RegExp" version="1.1.80" compatVersion="1.1.80"> +<plugin name="RegExp" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,6 +19,6 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>Regular Expression test widget.</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="Core" version="1.1.80"/> + <dependency name="Core" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/plugins/resourceeditor/ResourceEditor.pluginspec b/src/plugins/resourceeditor/ResourceEditor.pluginspec index fe7e2f47bfa775ceaab9454971aa87fc977a47e0..5a469761d911ef4f48a8908b2445b47ba2574784 100644 --- a/src/plugins/resourceeditor/ResourceEditor.pluginspec +++ b/src/plugins/resourceeditor/ResourceEditor.pluginspec @@ -1,4 +1,4 @@ -<plugin name="ResourceEditor" version="1.1.80" compatVersion="1.1.80"> +<plugin name="ResourceEditor" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,6 +19,6 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>Editor for qrc files.</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="Core" version="1.1.80"/> + <dependency name="Core" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/plugins/snippets/Snippets.pluginspec b/src/plugins/snippets/Snippets.pluginspec index b1bf8e51629000538affdcb36cbfd5e07aaf3811..c03e66f68b06fff6297897c54a43515060a960c2 100644 --- a/src/plugins/snippets/Snippets.pluginspec +++ b/src/plugins/snippets/Snippets.pluginspec @@ -1,4 +1,4 @@ -<plugin name="Snippets" version="1.1.80" compatVersion="1.1.80"> +<plugin name="Snippets" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,8 +19,8 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>Code snippet plugin.</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="Core" version="1.1.80"/> - <dependency name="TextEditor" version="1.1.80"/> - <dependency name="ProjectExplorer" version="1.1.80"/> + <dependency name="Core" version="1.2.0"/> + <dependency name="TextEditor" version="1.2.0"/> + <dependency name="ProjectExplorer" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/plugins/subversion/Subversion.pluginspec b/src/plugins/subversion/Subversion.pluginspec index 902f5483259a4d520aa3f388e801b37752195a02..9d565db0e2df45fd541eccef6c682eeeeec18976 100644 --- a/src/plugins/subversion/Subversion.pluginspec +++ b/src/plugins/subversion/Subversion.pluginspec @@ -1,4 +1,4 @@ -<plugin name="Subversion" version="1.1.80" compatVersion="1.1.80"> +<plugin name="Subversion" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,9 +19,9 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>Subversion integration.</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="TextEditor" version="1.1.80"/> - <dependency name="ProjectExplorer" version="1.1.80"/> - <dependency name="Core" version="1.1.80"/> - <dependency name="VCSBase" version="1.1.80"/> + <dependency name="TextEditor" version="1.2.0"/> + <dependency name="ProjectExplorer" version="1.2.0"/> + <dependency name="Core" version="1.2.0"/> + <dependency name="VCSBase" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/plugins/texteditor/TextEditor.pluginspec b/src/plugins/texteditor/TextEditor.pluginspec index 10d0560af4c395b4cefbcaf158ccd33a6c016dc5..c8f0d13c11353e8bcd9d54f4dec5538dcb28160b 100644 --- a/src/plugins/texteditor/TextEditor.pluginspec +++ b/src/plugins/texteditor/TextEditor.pluginspec @@ -1,4 +1,4 @@ -<plugin name="TextEditor" version="1.1.80" compatVersion="1.1.80"> +<plugin name="TextEditor" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,8 +19,8 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>Text editor framework and the implementation of the basic text editor.</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="Core" version="1.1.80"/> - <dependency name="Find" version="1.1.80"/> - <dependency name="QuickOpen" version="1.1.80"/> + <dependency name="Core" version="1.2.0"/> + <dependency name="Find" version="1.2.0"/> + <dependency name="QuickOpen" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/plugins/vcsbase/VCSBase.pluginspec b/src/plugins/vcsbase/VCSBase.pluginspec index 7123686f51b51496aa78ab95cf45372af1d7fcdc..a3d4180b35262c48930a19d7bac018357a25abb0 100644 --- a/src/plugins/vcsbase/VCSBase.pluginspec +++ b/src/plugins/vcsbase/VCSBase.pluginspec @@ -1,4 +1,4 @@ -<plugin name="VCSBase" version="1.1.80" compatVersion="1.1.80"> +<plugin name="VCSBase" version="1.2.0" compatVersion="1.2.0"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2008-2009 Nokia Corporation</copyright> <license> @@ -19,8 +19,8 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> <description>Version Control System Base Plugin</description> <url>http://www.qtsoftware.com</url> <dependencyList> - <dependency name="Core" version="1.1.80"/> - <dependency name="TextEditor" version="1.1.80"/> - <dependency name="ProjectExplorer" version="1.1.80"/> + <dependency name="Core" version="1.2.0"/> + <dependency name="TextEditor" version="1.2.0"/> + <dependency name="ProjectExplorer" version="1.2.0"/> </dependencyList> </plugin> diff --git a/src/shared/help/helpviewer.cpp b/src/shared/help/helpviewer.cpp index fc87db977605a1d21f752572d3d754bb6960ce3b..a9d989432102fda55e6a03242a630bcf437d335b 100644 --- a/src/shared/help/helpviewer.cpp +++ b/src/shared/help/helpviewer.cpp @@ -235,7 +235,7 @@ HelpViewer::HelpViewer(QHelpEngine *engine, Help::Internal::CentralWidget *paren , helpEngine(engine) , parentWidget(parent) , multiTabsAllowed(true) -{ +{ setPage(new HelpPage(parent, helpEngine, this)); settings()->setAttribute(QWebSettings::PluginsEnabled, false); settings()->setAttribute(QWebSettings::JavaEnabled, false); diff --git a/src/shared/help/helpviewer.h b/src/shared/help/helpviewer.h index b240d3ce9006a184bfbd1ed7a711af1779c3ea59..485a39a687cf67f80be45d8dbf8c360b9052c398 100644 --- a/src/shared/help/helpviewer.h +++ b/src/shared/help/helpviewer.h @@ -142,7 +142,7 @@ protected: void wheelEvent(QWheelEvent *e); private: - QVariant loadResource(int type, const QUrl &name); + QVariant loadResource(int type, const QUrl &name); void openLinkInNewTab(const QString &link); bool hasAnchorAt(const QPoint& pos); void contextMenuEvent(QContextMenuEvent *e);