Merge commit 'origin/1.2'
Conflicts: src/plugins/coreplugin/welcomemode.ui
@@ -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
|
||||
|
||||
@@ -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>"
|
||||
|
||||
@@ -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}"/" \
|
||||
|
||||
@@ -61,11 +61,9 @@ static const WCHAR *debuggerRegistryDefaultValueNameC = L"Debugger.Default";
|
||||
|
||||
static const char *linkC = "http://msdn.microsoft.com/en-us/library/cc266343.aspx";
|
||||
|
||||
#ifdef __GNUC__
|
||||
static inline QString wCharToQString(const WCHAR *w) { return QString::fromUtf16(reinterpret_cast<const ushort *>(w)); }
|
||||
#ifdef __GNUC__
|
||||
#define RRF_RT_ANY 0x0000ffff // no type restriction
|
||||
#else
|
||||
static inline QString wCharToQString(const WCHAR *w) { return QString::fromUtf16(w); }
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ExtensionSystem::Internal::PluginDetailsView</class>
|
||||
<widget class="QWidget" name="ExtensionSystem::Internal::PluginDetailsView">
|
||||
@@ -10,16 +11,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout">
|
||||
<property name="leftMargin" >
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<property name="margin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
@@ -33,8 +25,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="name" >
|
||||
</widget>
|
||||
<widget class="QLabel" name="name"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
@@ -47,8 +38,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="version" >
|
||||
</widget>
|
||||
<widget class="QLabel" name="version"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
@@ -61,8 +51,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="compatVersion" >
|
||||
</widget>
|
||||
<widget class="QLabel" name="compatVersion"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
@@ -75,8 +64,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="vendor" >
|
||||
</widget>
|
||||
<widget class="QLabel" name="vendor"/>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
@@ -90,6 +78,9 @@
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="url">
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
@@ -126,7 +117,7 @@
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
@@ -157,8 +148,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QLabel" name="copyright" >
|
||||
</widget>
|
||||
<widget class="QLabel" name="copyright"/>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<layout class="QVBoxLayout">
|
||||
@@ -177,7 +167,7 @@
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>17</width>
|
||||
<height>13</height>
|
||||
@@ -214,7 +204,7 @@
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
QString ideRev;
|
||||
#ifdef IDE_REVISION
|
||||
//: 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<br/>"
|
||||
"Based on Qt %2 (%3 bit)<br/>"
|
||||
"<br/>"
|
||||
"Built on " __DATE__ " at " __TIME__ "<br />"
|
||||
#ifdef IDE_REVISION
|
||||
"From revision %5<br/>"
|
||||
#endif
|
||||
"Built on %4 at %5<br />"
|
||||
"<br/>"
|
||||
"%8"
|
||||
"<br/>"
|
||||
"Copyright 2008-%3 %4. All rights reserved.<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);
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
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 && 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));
|
||||
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()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
Before Width: | Height: | Size: 182 B After Width: | Height: | Size: 153 B |
BIN
src/plugins/find/images/regexp.png
Normal file
|
After Width: | Height: | Size: 152 B |
|
Before Width: | Height: | Size: 210 B After Width: | Height: | Size: 146 B |
|
Before Width: | Height: | Size: 158 B After Width: | Height: | Size: 198 B |
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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
|
||||
@@ -71,12 +71,11 @@ QWidget *FilterSettingsPage::createPage(QWidget *parent)
|
||||
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;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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 (!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,82 +604,66 @@ 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) {
|
||||
id = context->contextHelpId();
|
||||
links = m_contextHelpEngine->linksForIdentifier(id);
|
||||
}
|
||||
|
||||
HelpViewer *viewer = 0;
|
||||
if (placeHolder && !Core::RightPaneWidget::instance()->hasFocus()) {
|
||||
Core::RightPaneWidget::instance()->setShown(true);
|
||||
viewer = m_helpViewerForSideBar;
|
||||
} else {
|
||||
viewer = m_centralWidget->currentHelpViewer();
|
||||
m_core->modeManager()->activateMode(QLatin1String(Constants::ID_MODE_HELP));
|
||||
activateHelpMode();
|
||||
}
|
||||
|
||||
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());
|
||||
} else {
|
||||
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();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// No context object
|
||||
if (useSideBar) {
|
||||
Core::RightPaneWidget::instance()->setShown(true);
|
||||
viewer = m_helpViewerForSideBar;
|
||||
} else {
|
||||
viewer = m_centralWidget->currentHelpViewer();
|
||||
activateHelpMode();
|
||||
}
|
||||
|
||||
if (viewer) {
|
||||
viewer->setSource(QUrl());
|
||||
viewer->setHtml(tr("<html><head><title>No Documentation</title></head><body><br/><br/><center>No"
|
||||
" documentation available.</center></body></html>"));
|
||||
//activateIndex();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||