Merge commit 'origin/1.3'

Conflicts:
	src/plugins/debugger/debuggermanager.h
	src/plugins/qmleditor/qmleditorplugin.cpp
	src/plugins/qt4projectmanager/qt4runconfiguration.cpp
This commit is contained in:
con
2009-11-11 16:14:29 +01:00
75 changed files with 786 additions and 608 deletions

View File

@@ -70,7 +70,7 @@
<message>
<location filename="../../../src/plugins/bineditor/bineditorplugin.cpp" line="+446"/>
<source>&amp;Undo</source>
<translation>&amp;Rückgangig</translation>
<translation>&amp;Rückgängig</translation>
</message>
<message>
<location line="+3"/>
@@ -360,7 +360,7 @@
<message>
<location filename="../../../src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp" line="+123"/>
<source>CMake Wizard</source>
<translation>CMake Assistent</translation>
<translation>CMake-Assistent</translation>
</message>
</context>
<context>
@@ -696,7 +696,7 @@
<message>
<location line="+3"/>
<source>&amp;Undo</source>
<translation>&amp;Rückgangig</translation>
<translation>&amp;Rückgängig</translation>
</message>
<message>
<location line="+3"/>
@@ -734,7 +734,7 @@
<translation>Die Datei wurde geändert. Möchten Sie die Änderungen rückgängig machen?</translation>
</message>
<message>
<location line="+78"/>
<location line="+80"/>
<source>The commit list spans several repositories (%1). Please commit them one by one.</source>
<translation>Die abzugebenden Dateien umfassen mehrere Repositories. Bitte geben Sie sie einzeln ab.</translation>
</message>
@@ -754,7 +754,7 @@
<translation>Es konnte keine temporäre Datei erstellt werden: %1</translation>
</message>
<message>
<location line="+105"/>
<location line="+108"/>
<source>Project status</source>
<translation>Status des Projekts</translation>
</message>
@@ -796,7 +796,7 @@
<message>
<location line="+3"/>
<source>The process terminated abnormally.</source>
<translation>Der Prozess wurde in unnormaler Weise beendet.</translation>
<translation type="unfinished">Der Prozess wurde in anormaler Weise beendet.</translation>
</message>
<message>
<location line="+3"/>
@@ -907,7 +907,7 @@
<context>
<name>CVSPlugin</name>
<message>
<location filename="../../../src/plugins/cvs/cvsplugin.cpp" line="-1039"/>
<location filename="../../../src/plugins/cvs/cvsplugin.cpp" line="-1044"/>
<source>Cannot find repository for &apos;%1&apos;</source>
<translation>Das Repository der Datei &apos;%1&apos; konnte nicht gefunden werden</translation>
</message>
@@ -1170,7 +1170,7 @@
<location/>
<source>When this option is checked, &apos;Step Into&apos; compresses several steps into one in certain situations, leading to &apos;less noisy&apos; debugging. So will, e.g., the atomic
reference counting code be skipped, and a single &apos;Step Into&apos; for a signal emission will end up directly in the slot connected to it.</source>
<translation>Diese Option bewirkt, dass &apos;Einzelschritt in&apos; in bestimmten Situationen mehrere Schritte zusammenfaßt, was das Debuggen beschleunigt. Zum Beispiel wird der Code des atomaren Referenzzählung übersprungen; und bei der Emission eines Signals gelangt man zum verbundenen Slot.</translation>
<translation>Diese Option bewirkt, dass &apos;Einzelschritt in&apos; in bestimmten Situationen mehrere Schritte zusammenfasst, was das Debuggen beschleunigt. Zum Beispiel wird der Code des atomaren Referenzzählung übersprungen; und bei der Emission eines Signals gelangt man zum verbundenen Slot.</translation>
</message>
<message>
<location/>
@@ -1190,7 +1190,7 @@
<message>
<location/>
<source>Use alternating row colors in debug views</source>
<translation>Alternierende Farben für Debugansichten benutzen</translation>
<translation>Alternierende Farben für Debug-Ansichten benutzen</translation>
</message>
<message>
<location/>
@@ -1670,7 +1670,7 @@ Sollen sie überschrieben werden?</translation>
<message>
<location line="+7"/>
<source>Split Top/Bottom</source>
<translation>Open/unten teilen</translation>
<translation type="unfinished">Oben/unten teilen</translation>
</message>
<message>
<location line="+7"/>
@@ -1863,7 +1863,7 @@ Sollen sie überschrieben werden?</translation>
<translation>Ausgaben</translation>
</message>
<message>
<location line="+161"/>
<location line="+162"/>
<source>&amp;File</source>
<translation>&amp;Datei</translation>
</message>
@@ -1949,7 +1949,7 @@ Sollen sie überschrieben werden?</translation>
<location line="+5"/>
<location line="+4"/>
<source>&amp;Undo</source>
<translation>&amp;Rückgangig</translation>
<translation>&amp;Rückgängig</translation>
</message>
<message>
<location line="+5"/>
@@ -2194,7 +2194,7 @@ Sollen sie überschrieben werden?</translation>
<message>
<location line="+35"/>
<source>Plugin Details of %1</source>
<translation>Pluginbeschreibung zu %1</translation>
<translation>Beschreibung zu %1</translation>
</message>
<message>
<location line="+20"/>
@@ -2342,19 +2342,19 @@ Sollen sie überschrieben werden?</translation>
<context>
<name>CppEditor::Internal::CPPEditor</name>
<message>
<location filename="../../../src/plugins/cppeditor/cppeditor.cpp" line="+615"/>
<location filename="../../../src/plugins/cppeditor/cppeditor.cpp" line="+616"/>
<source>Sort alphabetically</source>
<translation>Alphabetisch sortieren</translation>
</message>
<message>
<location line="+163"/>
<location line="+188"/>
<source>This change cannot be undone.</source>
<translation>Diese Änderung kann nicht rückgängig gemacht werden.</translation>
</message>
<message>
<location line="+1"/>
<source>Yes, I know what I am doing.</source>
<translation>Ja, Ich bin mir dessen bewußt.</translation>
<translation>Ja, Ich bin mir dessen bewusst.</translation>
</message>
</context>
<context>
@@ -2402,7 +2402,7 @@ Sollen sie überschrieben werden?</translation>
<context>
<name>CppEditor::Internal::CppPlugin</name>
<message>
<location filename="../../../src/plugins/cppeditor/cppplugin.cpp" line="+174"/>
<location filename="../../../src/plugins/cppeditor/cppplugin.cpp" line="+189"/>
<source>C++</source>
<translation>C++</translation>
</message>
@@ -2437,7 +2437,7 @@ Sollen sie überschrieben werden?</translation>
<translation>Erzeugt C++-Header- und Quelldatei für eine neue Klasse</translation>
</message>
<message>
<location line="+11"/>
<location line="+12"/>
<source>Follow Symbol under Cursor</source>
<translation>Symbol unter Einfügemarke verfolgen</translation>
</message>
@@ -2461,6 +2461,11 @@ Sollen sie überschrieben werden?</translation>
<source>Rename Symbol under Cursor</source>
<translation>Symbol unter Einfügemarke umbenennen</translation>
</message>
<message>
<location line="+12"/>
<source>Update code model</source>
<translation>Code-Modell aktualisieren</translation>
</message>
</context>
<context>
<name>CppFileSettingsPage</name>
@@ -2537,7 +2542,7 @@ Sollen sie überschrieben werden?</translation>
<message>
<location filename="../../../src/plugins/cpptools/cppcurrentdocumentfilter.h" line="+53"/>
<source>Methods in current Document</source>
<translation>Methoden im aktuellenDokument</translation>
<translation>Methoden im aktuellen Dokument</translation>
</message>
</context>
<context>
@@ -2583,7 +2588,7 @@ Sollen sie überschrieben werden?</translation>
<context>
<name>CppTools::Internal::CppFindReferences</name>
<message>
<location filename="../../../src/plugins/cpptools/cppfindreferences.cpp" line="+239"/>
<location filename="../../../src/plugins/cpptools/cppfindreferences.cpp" line="+235"/>
<source>Searching...</source>
<translation>Suche...</translation>
</message>
@@ -2599,7 +2604,7 @@ Sollen sie überschrieben werden?</translation>
<context>
<name>CppTools::Internal::CppModelManager</name>
<message>
<location filename="../../../src/plugins/cpptools/cppmodelmanager.cpp" line="+319"/>
<location filename="../../../src/plugins/cpptools/cppmodelmanager.cpp" line="+327"/>
<source>Scanning</source>
<translation>Suche</translation>
</message>
@@ -2620,7 +2625,7 @@ Sollen sie überschrieben werden?</translation>
<context>
<name>CppTools::Internal::CppToolsPlugin</name>
<message>
<location filename="../../../src/plugins/cpptools/cpptoolsplugin.cpp" line="+120"/>
<location filename="../../../src/plugins/cpptools/cpptoolsplugin.cpp" line="+126"/>
<source>&amp;C++</source>
<translation>&amp;C++</translation>
</message>
@@ -2858,7 +2863,7 @@ Sollen sie überschrieben werden?</translation>
<message>
<location line="-58"/>
<source>Process ID</source>
<translation>Prozess-Id&apos;</translation>
<translation>Prozess-Id</translation>
</message>
<message>
<location line="+1"/>
@@ -2986,7 +2991,7 @@ Sollen sie überschrieben werden?</translation>
<message>
<location line="+6"/>
<source>Breakpoint will only be hit after being ignored so many times.</source>
<translation>Der Haltepunkt wird ausgelöst, nachdem er vorherh so viele Male übersprungen wurde.</translation>
<translation>Der Haltepunkt wird ausgelöst, nachdem er vorher so viele Male übersprungen wurde.</translation>
</message>
</context>
<context>
@@ -3156,7 +3161,7 @@ Sollen sie überschrieben werden?</translation>
<translation>Die Ausführung des Prozesses kann nicht fortgesetzt werden: %1</translation>
</message>
<message>
<location line="+24"/>
<location line="+31"/>
<source>Reverse stepping is not implemented.</source>
<translation>Die Funktionalität für &apos;Einzelschritt rückwärts&apos; ist nicht implementiert.</translation>
</message>
@@ -3166,17 +3171,16 @@ Sollen sie überschrieben werden?</translation>
<translation>Für den Thread %1 ist kein Einzelschritt möglich.</translation>
</message>
<message>
<location line="+27"/>
<location line="+37"/>
<source>Stepping %1</source>
<translation>Führe Schritt aus (%1)</translation>
</message>
<message>
<location line="+63"/>
<source>Running to 0x%1...</source>
<translation>Ausführung bis zur Adresse 0x%1...</translation>
<translation type="obsolete">Ausführung bis zur Adresse 0x%1...</translation>
</message>
<message>
<location line="+67"/>
<location line="+94"/>
<source>Running requested...</source>
<translation>Fortsetzung angefordert...</translation>
</message>
@@ -3257,7 +3261,7 @@ Sollen sie überschrieben werden?</translation>
<message>
<location line="+1"/>
<source>debugger call</source>
<translation>Debuggeraufruf</translation>
<translation>Debugger-Aufruf</translation>
</message>
<message>
<location line="+5"/>
@@ -3557,7 +3561,7 @@ Sollen sie überschrieben werden?</translation>
<context>
<name>Debugger::Internal::DebuggerRunControlFactory</name>
<message>
<location filename="../../../src/plugins/debugger/debuggerrunner.cpp" line="+79"/>
<location filename="../../../src/plugins/debugger/debuggerrunner.cpp" line="+80"/>
<source>Debug</source>
<translation>Debuggen</translation>
</message>
@@ -3565,7 +3569,7 @@ Sollen sie überschrieben werden?</translation>
<context>
<name>Debugger::Internal::DebuggerRunControl</name>
<message>
<location line="+108"/>
<location line="+123"/>
<source>Debugger</source>
<translation>Debugger</translation>
</message>
@@ -3575,7 +3579,7 @@ Sollen sie überschrieben werden?</translation>
<message>
<location filename="../../../src/plugins/debugger/debuggeractions.cpp" line="+118"/>
<source>Debugger properties...</source>
<translation>Debuggereinstellungen...</translation>
<translation>Debugger-Einstellungen...</translation>
</message>
<message>
<location line="+6"/>
@@ -3710,7 +3714,7 @@ Sollen sie überschrieben werden?</translation>
<message>
<location line="+9"/>
<source>Show address data in stack view when debugging</source>
<translation>Addressen im Stack-Fenster anzeigen</translation>
<translation>Adressen im Stack-Fenster anzeigen</translation>
</message>
<message>
<location line="+1"/>
@@ -3776,7 +3780,7 @@ Sollen sie überschrieben werden?</translation>
<message>
<location line="+3"/>
<source>The last waitFor...() function timed out. The state of QProcess is unchanged, and you can try calling waitFor...() again.</source>
<translation>Zeitüberschreitung bei der letzten waitFor...()-Funktion. Der Status des QProcess ist unverändert, und waitFor...() kann nocheinmal gerufen.</translation>
<translation>Zeitüberschreitung bei der letzten waitFor...()-Funktion. Der Status des QProcess ist unverändert, und waitFor...() kann noch einmal gerufen.</translation>
</message>
<message>
<location line="+4"/>
@@ -3834,7 +3838,7 @@ Sollen sie überschrieben werden?</translation>
<translation>Der Prozess konnte nicht gestartet werden.</translation>
</message>
<message>
<location line="+417"/>
<location line="+423"/>
<source>&lt;p&gt;The inferior stopped because it received a signal from the Operating System.&lt;p&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;Signal name : &lt;/td&gt;&lt;td&gt;%1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Signal meaning : &lt;/td&gt;&lt;td&gt;%2&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</source>
<translation>&lt;p&gt;Der Prozess wurde nach Erhalt eines Signals vom Betriebssystem angehalten.&lt;p&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;Name des Signals : &lt;/td&gt;&lt;td&gt;%1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bedeutung : &lt;/td&gt;&lt;td&gt;%2&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</translation>
</message>
@@ -3850,7 +3854,7 @@ Sollen sie überschrieben werden?</translation>
<translation>Signal erhalten</translation>
</message>
<message>
<location line="-763"/>
<location line="-769"/>
<source>Reading %1...</source>
<translation>Lese %1...</translation>
</message>
@@ -3860,12 +3864,12 @@ Sollen sie überschrieben werden?</translation>
<translation>Sprung ausgeführt/ Angehalten.</translation>
</message>
<message>
<location line="+164"/>
<location line="+165"/>
<source>Loading %1...</source>
<translation>Lade %1...</translation>
</message>
<message>
<location line="+79"/>
<location line="+84"/>
<source>Stopped at breakpoint.</source>
<translation>An Haltepunkt angehalten.</translation>
</message>
@@ -3889,12 +3893,12 @@ Das Debuggen wird wahrscheinlich nicht richtig funktionieren.
Es wird empfohlen, gdb 6.7 oder später zu benutzen.</translation>
</message>
<message>
<location line="-560"/>
<location line="-566"/>
<source>Processing queued commands.</source>
<translation>Kommando-Warteschlange wird abgearbeitet.</translation>
</message>
<message>
<location line="+504"/>
<location line="+510"/>
<location line="+109"/>
<source>Stopped.</source>
<translation>Angehalten.</translation>
@@ -3984,7 +3988,7 @@ Es wird empfohlen, gdb 6.7 oder später zu benutzen.</translation>
</translation>
</message>
<message>
<location line="-2855"/>
<location line="-2861"/>
<source>An unknown error in the Gdb process occurred. </source>
<translation>Im Gdb-Prozess trat ein unbekannter Fehler auf.</translation>
</message>
@@ -4012,7 +4016,7 @@ Es wird empfohlen, gdb 6.7 oder später zu benutzen.</translation>
<translation>Fehler bei Ausführung: %1</translation>
</message>
<message>
<location line="+227"/>
<location line="+228"/>
<source>Program exited with exit code %1.</source>
<translation>Das Programm wurde beendet, Rückgabewert %1.</translation>
</message>
@@ -4027,7 +4031,7 @@ Es wird empfohlen, gdb 6.7 oder später zu benutzen.</translation>
<translation>Das Programm wurde normal beendet.</translation>
</message>
<message>
<location line="+483"/>
<location line="+488"/>
<source>Continuing after temporary stop...</source>
<translation>Setze nach temporärem Anhalten fort...</translation>
</message>
@@ -4074,7 +4078,7 @@ Es wird empfohlen, gdb 6.7 oder später zu benutzen.</translation>
<message>
<location line="+708"/>
<source>Jumping out of bogus frame...</source>
<translation>Verlasse ungültigen Stack-Frame...</translation>
<translation>Verlasse ungültigen Stack-Rahmen...</translation>
</message>
<message>
<location line="+903"/>
@@ -4145,27 +4149,27 @@ Es wird empfohlen, gdb 6.7 oder später zu benutzen.</translation>
<translation>Der Start des Adapters schlug fehl</translation>
</message>
<message>
<location line="+24"/>
<location line="+39"/>
<source>Setting breakpoints...</source>
<translation>Setze Haltepunkte...</translation>
</message>
<message>
<location line="-8"/>
<location line="-23"/>
<source>Starting inferior...</source>
<translation>Starte zu debuggenden Prozess...</translation>
</message>
<message>
<location line="+30"/>
<location line="+45"/>
<source>Inferior start failed</source>
<translation>Der Start des zu debuggenden Prozesses schlug fehl</translation>
</message>
<message>
<location line="-2963"/>
<location line="-2978"/>
<source>Inferior shutdown failed</source>
<translation>Das Beenden des zu debuggenden Prozesses schlug fehl</translation>
</message>
<message>
<location line="+2983"/>
<location line="+2998"/>
<source>Adapter crashed</source>
<translation>Der Adapter ist abgestürzt</translation>
</message>
@@ -4325,7 +4329,7 @@ Es wird empfohlen, gdb 6.7 oder später zu benutzen.</translation>
<message>
<location filename="../../../src/plugins/debugger/gdb/plaingdbadapter.cpp" line="+79"/>
<source>Cannot set up communication with child process: %1</source>
<translation>Die Kommunikation mit dem untergeordneten Prozesss konnte nicht hergestellt werden: %1</translation>
<translation>Die Kommunikation mit dem untergeordneten Prozess konnte nicht hergestellt werden: %1</translation>
</message>
<message>
<location line="+36"/>
@@ -4480,17 +4484,30 @@ Es wird empfohlen, gdb 6.7 oder später zu benutzen.</translation>
<translation>Angehalten.</translation>
</message>
</context>
<context>
<name>Debugger::Internal::SourceFilesModel</name>
<message>
<location filename="../../../src/plugins/debugger/sourcefileswindow.cpp" line="+98"/>
<source>Internal name</source>
<translation>Interner Name</translation>
</message>
<message>
<location line="+1"/>
<source>Full name</source>
<translation>Vollständiger Name</translation>
</message>
</context>
<context>
<name>Debugger::Internal::SourceFilesWindow</name>
<message>
<location filename="../../../src/plugins/debugger/sourcefileswindow.cpp" line="+175"/>
<location line="+76"/>
<source>Source Files</source>
<translation>Quelldateien</translation>
</message>
<message>
<location line="+27"/>
<source>Reload data</source>
<translation>Daten akualisieren</translation>
<translation>Daten aktualisieren</translation>
</message>
<message>
<location line="+5"/>
@@ -4710,7 +4727,7 @@ Es wird empfohlen, gdb 6.7 oder später zu benutzen.</translation>
<context>
<name>Debugger::Internal::TrkGdbAdapter</name>
<message>
<location filename="../../../src/plugins/debugger/gdb/trkgdbadapter.cpp" line="+1597"/>
<location filename="../../../src/plugins/debugger/gdb/trkgdbadapter.cpp" line="+1605"/>
<source>Process started, PID: 0x%1, thread id: 0x%2, code segment: 0x%3, data segment: 0x%4.</source>
<translation>Der Prozess wurde gestartet, PID: 0x%1, Thread-Id: 0x%2, Code-Segment: 0x%3, Datensegment: 0x%4.</translation>
</message>
@@ -4742,7 +4759,7 @@ Es wird empfohlen, gdb 6.7 oder später zu benutzen.</translation>
<message>
<location/>
<source>Communication</source>
<translation>Kommunkation</translation>
<translation>Kommunikation</translation>
</message>
<message>
<location/>
@@ -5485,7 +5502,7 @@ It also automatically sets the correct Qt version.</source>
<message>
<location line="+2"/>
<source>Could not open file for read: %1</source>
<translation>Die Datei konnte nicht zum Lesen geöffnen werden: %1</translation>
<translation>Die Datei konnte nicht zum Lesen geöffnet werden: %1</translation>
</message>
<message>
<location line="+16"/>
@@ -5655,17 +5672,17 @@ Grund: %3</translation>
<context>
<name>FakeVim::Internal::FakeVimHandler</name>
<message>
<location filename="../../../src/plugins/fakevim/fakevimhandler.cpp" line="+939"/>
<location filename="../../../src/plugins/fakevim/fakevimhandler.cpp" line="+946"/>
<source>Not implemented in FakeVim</source>
<translation>In FakeVim nicht implementiert</translation>
</message>
<message>
<location line="-695"/>
<location line="-696"/>
<source>E20: Mark &apos;%1&apos; not set</source>
<translation>E20: Die Marke &apos;%1&apos; ist nicht gesetzt</translation>
</message>
<message>
<location line="+671"/>
<location line="+672"/>
<source>%1%2%</source>
<translation>%1%2%</translation>
</message>
@@ -5738,7 +5755,7 @@ Grund: %3</translation>
<translation>Die Suche hat den Anfang erreicht, setze am Ende fort</translation>
</message>
<message>
<location line="+575"/>
<location line="+582"/>
<source>Already at oldest change</source>
<translation>Älteste Änderung erreicht</translation>
</message>
@@ -5878,7 +5895,7 @@ Grund: %3</translation>
<message>
<location/>
<source>Incremental search:</source>
<translation>Inkrimentelle Suche:</translation>
<translation>Inkrementelle Suche:</translation>
</message>
</context>
<context>
@@ -6018,7 +6035,7 @@ Grund: %3</translation>
<message>
<location line="+5"/>
<source>Replace &amp;&amp; Find Previous</source>
<translation>Ersetzen und rückwarts weitersuchen</translation>
<translation>Ersetzen und rückwärts weitersuchen</translation>
</message>
<message>
<location line="+8"/>
@@ -6529,7 +6546,7 @@ Grund: %3</translation>
<context>
<name>Git::Internal::GitClient</name>
<message>
<location filename="../../../src/plugins/git/gitclient.cpp" line="+71"/>
<location filename="../../../src/plugins/git/gitclient.cpp" line="+76"/>
<source>Note that the git plugin for QtCreator is not able to interact with the server so far. Thus, manual ssh-identification etc. will not work.</source>
<translatorcomment>Not used.</translatorcomment>
<translation type="unfinished"></translation>
@@ -6558,7 +6575,7 @@ Grund: %3</translation>
<translation>Warte auf Daten...</translation>
</message>
<message>
<location line="+100"/>
<location line="+101"/>
<source>Git Diff</source>
<translation>Git Diff</translation>
</message>
@@ -6583,7 +6600,7 @@ Grund: %3</translation>
<translation>Git Blame %1</translation>
</message>
<message numerus="yes">
<location line="+56"/>
<location line="+58"/>
<source>Unable to add %n file(s) to %1: %2</source>
<translation>
<numerusform>Keine der %n Dateien konnte zu %1 hinzugefügt werden: %2</numerusform>
@@ -6622,7 +6639,7 @@ Grund: %3</translation>
<translation>Das Kommando &apos;show&apos; konnte nicht ausgeführt werden: %1: %2</translation>
</message>
<message>
<location line="+148"/>
<location line="+149"/>
<source>Changes</source>
<translation>Änderungen</translation>
</message>
@@ -6672,12 +6689,12 @@ Grund: %3</translation>
<translation>Die Datei wurde geändert. Möchten Sie die Änderungen rückgängig machen?</translation>
</message>
<message>
<location line="+24"/>
<location line="+26"/>
<source>The file is not modified.</source>
<translation>Datei ungeändert.</translation>
</message>
<message>
<location line="+22"/>
<location line="+23"/>
<source>There are no modified files.</source>
<translation>Es gibt keine geänderten Dateien.</translation>
</message>
@@ -6685,7 +6702,7 @@ Grund: %3</translation>
<context>
<name>Git::Internal::GitPlugin</name>
<message>
<location filename="../../../src/plugins/git/gitplugin.cpp" line="+232"/>
<location filename="../../../src/plugins/git/gitplugin.cpp" line="+233"/>
<source>&amp;Git</source>
<translation>&amp;Git</translation>
</message>
@@ -6897,7 +6914,7 @@ Grund: %3</translation>
<message>
<location line="+3"/>
<source>&amp;Undo</source>
<translation>&amp;Rückgangig</translation>
<translation>&amp;Rückgängig</translation>
</message>
<message>
<location line="+3"/>
@@ -6905,7 +6922,7 @@ Grund: %3</translation>
<translation>&amp;Wiederholen</translation>
</message>
<message>
<location line="+60"/>
<location line="+65"/>
<source>Could not find working directory</source>
<translation>Das Arbeitsverzeichnis konnte nicht gefunden werden.</translation>
</message>
@@ -7655,7 +7672,7 @@ Grund: %3</translation>
<message>
<location line="+3"/>
<source>Open Link in New Tab Ctrl+LMB</source>
<translation>Link in neuem Reiter öffnen\t(Ctrl+Linke Maustaste)</translation>
<translation>Link in neuem Reiter öffnen (Strg+Linke Maustaste)</translation>
</message>
</context>
<context>
@@ -7681,7 +7698,7 @@ Grund: %3</translation>
<message>
<location filename="../../../src/plugins/debugger/debuggeroutputwindow.cpp" line="+76"/>
<source>Type Ctrl-&lt;Return&gt; to execute a line.</source>
<translation>Sie können eine Zeile mittels &lt;Ctrl-Return&gt; ausführen.</translation>
<translation>Sie können eine Zeile mittels &lt;Strg+Return&gt; ausführen.</translation>
</message>
</context>
<context>
@@ -7865,12 +7882,12 @@ in your .pro file.</source>
<message>
<location line="+1"/>
<source>C Header file</source>
<translation>C-Headerdatei</translation>
<translation>C-Header-Datei</translation>
</message>
<message>
<location line="+1"/>
<source>C++ Header file</source>
<translation>C++-Headerdatei</translation>
<translation>C++-Header-Datei</translation>
</message>
<message>
<location line="+1"/>
@@ -8584,7 +8601,7 @@ p, li { white-space: pre-wrap; }
<message>
<location line="+3"/>
<source>&amp;Undo</source>
<translation>&amp;Rückgangig</translation>
<translation>&amp;Rückgängig</translation>
</message>
<message>
<location line="+3"/>
@@ -8602,7 +8619,7 @@ p, li { white-space: pre-wrap; }
<translation>Die Datei wurde geändert. Möchten Sie die Änderungen rückgängig machen?</translation>
</message>
<message>
<location line="+93"/>
<location line="+98"/>
<source>Another submit is currently executed.</source>
<translation>Es läuft bereits ein Submit-Vorgang.</translation>
</message>
@@ -8651,7 +8668,7 @@ p, li { white-space: pre-wrap; }
<message>
<location line="+3"/>
<source>The process terminated abnormally.</source>
<translation>Der Prozess wurde in unnormaler Weise beendet.</translation>
<translation>Der Prozess wurde in abnormaler Weise beendet.</translation>
</message>
<message>
<location line="+3"/>
@@ -8782,7 +8799,7 @@ p, li { white-space: pre-wrap; }
<message>
<location/>
<source>P4 Port:</source>
<translation>P4 Portnummer:</translation>
<translation>P4 Port-Nummer:</translation>
</message>
<message>
<location filename="../../../src/plugins/perforce/settingspage.cpp" line="+106"/>
@@ -8861,7 +8878,7 @@ p, li { white-space: pre-wrap; }
<message>
<location line="+33"/>
<source>Plugin Details of %1</source>
<translation>Pluginbeschreibung zu %1</translation>
<translation>Beschreibung zu %1</translation>
</message>
<message>
<location line="+20"/>
@@ -8953,7 +8970,7 @@ p, li { white-space: pre-wrap; }
<message>
<location line="+6"/>
<source>Plugin initialization failed: %1</source>
<translation>Die Initialisierungs des Plugins schlug fehl: %1</translation>
<translation>Die Initialisierung des Plugins schlug fehl: %1</translation>
</message>
<message>
<location line="+19"/>
@@ -10006,7 +10023,7 @@ Fehler: %2</translation>
<message>
<location line="+5"/>
<source>Cannot retrieve debugging output!</source>
<translation>Es konnte keine Debugausgabe erhalten werden!</translation>
<translation>Es konnte keine Debug-Ausgabe erhalten werden!</translation>
</message>
</context>
<context>
@@ -11024,12 +11041,12 @@ unter Versionsverwaltung (%2) gestellt werden?</translation>
<message>
<location filename="../../../src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizard.cpp" line="+43"/>
<source>Qt4 Designer Custom Widget</source>
<translation>Benutzerdefinertes Widget für Qt4 Designer</translation>
<translation>Benutzerdefiniertes Widget für Qt4 Designer</translation>
</message>
<message>
<location line="+1"/>
<source>Creates a Qt4 Designer Custom Widget or a Custom Widget Collection.</source>
<translation>Erstellt ein oder mehrere benutzerdefinerte Widgets für Qt4 Designer.</translation>
<translation>Erstellt ein oder mehrere benutzerdefinierte Widgets für Qt4 Designer.</translation>
</message>
</context>
<context>
@@ -11037,7 +11054,7 @@ unter Versionsverwaltung (%2) gestellt werden?</translation>
<message>
<location filename="../../../src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizarddialog.cpp" line="+56"/>
<source>This wizard generates a Qt4 Designer Custom Widget or a Qt4 Designer Custom Widget Collection project.</source>
<translation>Dieser Wizard erstellt ein Projekt mit einem oder mehreren benutzerdefinerten Widgets für Qt4 Designer.</translation>
<translation>Dieser Wizard erstellt ein Projekt mit einem oder mehreren benutzerdefinierten Widgets für Qt4 Designer.</translation>
</message>
</context>
<context>
@@ -11405,7 +11422,7 @@ unter Versionsverwaltung (%2) gestellt werden?</translation>
<message>
<location filename="../../../src/plugins/qt4projectmanager/customwidgetwizard/plugingenerator.cpp" line="+60"/>
<source>Cannot open icon file %1.</source>
<translation>DIe Icon-Datei %1 kann nicht geöffnet werden.</translation>
<translation>Die Icon-Datei %1 kann nicht geöffnet werden.</translation>
</message>
<message>
<location line="+102"/>
@@ -11733,7 +11750,7 @@ unter Versionsverwaltung (%2) gestellt werden?</translation>
<name>Qt4ProjectManager::Internal::Qt4RunConfiguration</name>
<message>
<location filename="../../../src/plugins/qt4projectmanager/qt4runconfiguration.cpp" line="+72"/>
<location line="+458"/>
<location line="+459"/>
<source>Qt4RunConfiguration</source>
<translation>Qt4RunConfiguration</translation>
</message>
@@ -11880,7 +11897,7 @@ unter Versionsverwaltung (%2) gestellt werden?</translation>
<translation>&lt;html&gt;&lt;body&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;Datei:&lt;/td&gt;&lt;td&gt;&lt;pre&gt;%1&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Letzte Änderung:&lt;/td&gt;&lt;td&gt;%2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Größe:&lt;/td&gt;&lt;td&gt;%3 Bytes&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location line="+124"/>
<location line="+126"/>
<source>The Qt Version identified by %1 is not installed. Run make install</source>
<translation>Die Qt-Version %1 ist nicht installiert. Führen Sie make install aus</translation>
</message>
@@ -12182,7 +12199,7 @@ Bitte prüfen Sie, ob das Gerät verbunden ist und die Anwendung &apos;TRK&apos;
<message>
<location line="+8"/>
<source>Debugger for Symbian Platform</source>
<translation>Debugger für Symbian-Platform</translation>
<translation>Debugger für Symbian-Plattform</translation>
</message>
<message>
<location line="+12"/>
@@ -12552,7 +12569,7 @@ Installiere Anwendung auf &apos;%2&apos;...</translation>
<message>
<location line="+40"/>
<source>&lt;font color=&quot;#0000ff&quot;&gt;Configuration unchanged, skipping QMake step.&lt;/font&gt;</source>
<translation>&lt;font color=&quot;#0000ff&quot;&gt;Konfiguration unverändert, übersrpinge QMake-Schritt.&lt;/font&gt;</translation>
<translation>&lt;font color=&quot;#0000ff&quot;&gt;Konfiguration unverändert, überspringe QMake-Schritt.&lt;/font&gt;</translation>
</message>
</context>
<context>
@@ -12643,7 +12660,7 @@ Installiere Anwendung auf &apos;%2&apos;...</translation>
<context>
<name>Qt4ProjectManager::QtVersionManager</name>
<message>
<location filename="../../../src/plugins/qt4projectmanager/qtversionmanager.cpp" line="+351"/>
<location filename="../../../src/plugins/qt4projectmanager/qtversionmanager.cpp" line="+347"/>
<source>&lt;not found&gt;</source>
<translation>&lt;nicht gefunden&gt;</translation>
</message>
@@ -12679,7 +12696,7 @@ Installiere Anwendung auf &apos;%2&apos;...</translation>
<translation>Vorgabe:</translation>
</message>
<message>
<location line="+8"/>
<location line="+7"/>
<source>Compiler:</source>
<translation>Compiler:</translation>
</message>
@@ -12697,7 +12714,7 @@ Installiere Anwendung auf &apos;%2&apos;...</translation>
<context>
<name>QApplication</name>
<message>
<location line="+872"/>
<location line="+870"/>
<source>The Qt Version has no toolchain.</source>
<translation>Dieser Qt-Version ist keine Toolchain zugeordnet.</translation>
</message>
@@ -12868,15 +12885,14 @@ Installiere Anwendung auf &apos;%2&apos;...</translation>
<context>
<name>QtScriptEditor::Internal::QtScriptEditorActionHandler</name>
<message>
<location filename="../../../src/plugins/qtscripteditor/qtscripteditoractionhandler.cpp" line="+96"/>
<source>Qt Script Error</source>
<translation>Fehler in Qt-Skript</translation>
<translation type="obsolete">Fehler in Qt-Skript</translation>
</message>
</context>
<context>
<name>QtScriptEditor::Internal::QtScriptEditorPlugin</name>
<message>
<location filename="../../../src/plugins/qtscripteditor/qtscripteditorplugin.cpp" line="+97"/>
<location filename="../../../src/plugins/qtscripteditor/qtscripteditorplugin.cpp" line="+102"/>
<source>Creates a Qt Script file.</source>
<translation>Erzeugt eine Qt-Skript-Datei.</translation>
</message>
@@ -12891,20 +12907,18 @@ Installiere Anwendung auf &apos;%2&apos;...</translation>
<translation>Qt</translation>
</message>
<message>
<location line="+56"/>
<source>Run</source>
<translation>Ausführen</translation>
<translation type="obsolete">Ausführen</translation>
</message>
<message>
<location line="+2"/>
<source>Ctrl+R</source>
<translation>Ctrl+R</translation>
<translation type="obsolete">Ctrl+R</translation>
</message>
</context>
<context>
<name>QtScriptEditor::Internal::ScriptEditor</name>
<message>
<location filename="../../../src/plugins/qtscripteditor/qtscripteditor.cpp" line="+228"/>
<location filename="../../../src/plugins/qtscripteditor/qtscripteditor.cpp" line="+229"/>
<source>&lt;Select Symbol&gt;</source>
<translation>&lt;Symbol auswählen&gt;</translation>
</message>
@@ -13271,7 +13285,7 @@ Um es abzurufen, tippen Sie das Kürzel im Locator, gefolgt von einem Leerzeich
<message>
<location line="+12"/>
<source>&amp;Undo</source>
<translation>&amp;Rückgangig</translation>
<translation>&amp;Rückgängig</translation>
</message>
<message>
<location line="+1"/>
@@ -13544,14 +13558,12 @@ Um es abzurufen, tippen Sie das Kürzel im Locator, gefolgt von einem Leerzeich
<context>
<name>SourceFilesModel</name>
<message>
<location filename="../../../src/plugins/debugger/sourcefileswindow.cpp" line="-112"/>
<source>Internal name</source>
<translation>Interner Name</translation>
<translation type="obsolete">Interner Name</translation>
</message>
<message>
<location line="+1"/>
<source>Full name</source>
<translation>Vollständiger Name</translation>
<translation type="obsolete">Vollständiger Name</translation>
</message>
</context>
<context>
@@ -13802,7 +13814,7 @@ Um es abzurufen, tippen Sie das Kürzel im Locator, gefolgt von einem Leerzeich
<message>
<location line="+3"/>
<source>&amp;Undo</source>
<translation>&amp;Rückgangig</translation>
<translation>&amp;Rückgängig</translation>
</message>
<message>
<location line="+3"/>
@@ -13825,12 +13837,12 @@ Um es abzurufen, tippen Sie das Kürzel im Locator, gefolgt von einem Leerzeich
<translation>Die Überprüfung der Beschreibung schlug fehl. Möchten Sie den Commit trotzdem ausführen?</translation>
</message>
<message>
<location line="+204"/>
<location line="+205"/>
<source>The commit list spans several repositories (%1). Please commit them one by one.</source>
<translation>Die abzugebenden Dateien umfassen mehrere Repositories (%1). Bitte geben Sie sie einzeln ab.</translation>
</message>
<message>
<location line="+283"/>
<location line="+286"/>
<source>Executing: %1 %2
</source>
<extracomment>Executing: &lt;executable&gt; &lt;arguments&gt;</extracomment>
@@ -13838,12 +13850,12 @@ Um es abzurufen, tippen Sie das Kürzel im Locator, gefolgt von einem Leerzeich
</translation>
</message>
<message>
<location line="-363"/>
<location line="-367"/>
<source>The file has been changed. Do you want to revert it?</source>
<translation>Die Datei wurde geändert. Möchten Sie sie zurücksetzen?</translation>
</message>
<message>
<location line="+98"/>
<location line="+99"/>
<source>Another commit is currently being executed.</source>
<translation>Es läuft bereits ein Abgabevorgang.</translation>
</message>
@@ -13858,7 +13870,7 @@ Um es abzurufen, tippen Sie das Kürzel im Locator, gefolgt von einem Leerzeich
<translation>Es konnte keine temporäre Datei erstellt werden: %1</translation>
</message>
<message>
<location line="+186"/>
<location line="+189"/>
<source>Describe</source>
<translation>Beschreibe</translation>
</message>
@@ -13881,7 +13893,7 @@ Um es abzurufen, tippen Sie das Kürzel im Locator, gefolgt von einem Leerzeich
<message>
<location line="+3"/>
<source>The process terminated abnormally.</source>
<translation>Der Prozess wurde in unnormaler Weise beendet.</translation>
<translation>Der Prozess wurde in anormaler Weise beendet.</translation>
</message>
<message>
<location line="+3"/>
@@ -13963,7 +13975,7 @@ Um es abzurufen, tippen Sie das Kürzel im Locator, gefolgt von einem Leerzeich
<context>
<name>TextEditor::BaseTextEditorEditable</name>
<message>
<location line="+4311"/>
<location line="+4324"/>
<source>Line: %1, Col: %2</source>
<translation>Zeile: %1, Spalte: %2</translation>
</message>
@@ -14202,7 +14214,7 @@ Um es abzurufen, tippen Sie das Kürzel im Locator, gefolgt von einem Leerzeich
<message>
<location filename="../../../src/plugins/texteditor/codecselector.cpp" line="+72"/>
<source>Text Encoding</source>
<translation>Text Encoding</translation>
<translation>Text-Encoding</translation>
</message>
<message>
<location line="+4"/>
@@ -14355,7 +14367,7 @@ Die folgenden Encodings scheinen der Datei zu entsprechen:</translation>
<message>
<location filename="../../../src/plugins/texteditor/linenumberfilter.h" line="+52"/>
<source>Line in current document</source>
<translation>Zeile im aktuellenDokument</translation>
<translation>Zeile im aktuellen Dokument</translation>
</message>
<message>
<location filename="../../../src/plugins/texteditor/linenumberfilter.cpp" line="+55"/>
@@ -14411,7 +14423,7 @@ Die folgenden Encodings scheinen der Datei zu entsprechen:</translation>
<message>
<location filename="../../../src/plugins/texteditor/texteditoractionhandler.cpp" line="+117"/>
<source>&amp;Undo</source>
<translation>&amp;Rückgangig</translation>
<translation>&amp;Rückgängig</translation>
</message>
<message>
<location line="+2"/>
@@ -15569,7 +15581,7 @@ Namen &lt;E-Mail&gt; Alias &lt;E-Mail?</translation>
<context>
<name>VCSManager</name>
<message>
<location filename="../../../src/plugins/coreplugin/vcsmanager.cpp" line="+132"/>
<location filename="../../../src/plugins/coreplugin/vcsmanager.cpp" line="+144"/>
<source>Version Control</source>
<translation>Versionskontrolle</translation>
</message>

View File

@@ -42,6 +42,7 @@
#include <QtCore/QByteArray>
#include <QtCore/QBitArray>
#include <QtCore/QDir>
#include <QtCore/QtDebug>
/*!
@@ -108,7 +109,7 @@ private:
Document::Document(const QString &fileName)
: _fileName(fileName),
: _fileName(QDir::cleanPath(fileName)),
_globalNamespace(0),
_revision(0)
{
@@ -173,7 +174,7 @@ QStringList Document::includedFiles() const
void Document::addIncludeFile(const QString &fileName, unsigned line)
{
_includes.append(Include(fileName, line));
_includes.append(Include(QDir::cleanPath(fileName), line));
}
void Document::appendMacro(const Macro &macro)
@@ -569,3 +570,8 @@ QStringList Snapshot::dependsOn(const QString &fileName) const
return deps;
}
Document::Ptr Snapshot::value(const QString &fileName) const
{
return QMap<QString, Document::Ptr>::value(QDir::cleanPath(fileName));
}

View File

@@ -341,6 +341,7 @@ public:
QStringList dependsOn(const QString &fileName) const;
void insert(Document::Ptr doc);
Document::Ptr value(const QString &fileName) const;
using _Base::insert;

View File

@@ -121,8 +121,7 @@ void FindUsages::reportResult(unsigned tokenIndex)
const int len = tk.f.length;
if (_future) {
const QString path = QDir::toNativeSeparators(_doc->fileName());
_future->reportResult(Usage(path, line, lineText, col, len));
_future->reportResult(Usage(_doc->fileName(), line, lineText, col, len));
}
_references.append(tokenIndex);

View File

@@ -35,7 +35,7 @@
namespace Utils {
static QString toAlphaNum(const QString &s)
QTCREATOR_UTILS_EXPORT QString fileNameToCppIdentifier(const QString &s)
{
QString rc;
const int len = s.size();
@@ -55,9 +55,9 @@ static QString toAlphaNum(const QString &s)
QTCREATOR_UTILS_EXPORT QString headerGuard(const QString &file)
{
const QFileInfo fi(file);
QString rc = toAlphaNum(fi.completeBaseName()).toUpper();
QString rc = fileNameToCppIdentifier(fi.completeBaseName()).toUpper();
rc += QLatin1Char('_');
rc += toAlphaNum(fi.suffix()).toUpper();
rc += fileNameToCppIdentifier(fi.suffix()).toUpper();
return rc;
}

View File

@@ -40,6 +40,10 @@ QT_END_NAMESPACE
namespace Utils {
// Convert a file name to a Cpp identifier (stripping invalid characters
// or replacing them by an underscore).
QTCREATOR_UTILS_EXPORT QString fileNameToCppIdentifier(const QString &s);
QTCREATOR_UTILS_EXPORT QString headerGuard(const QString &file);
QTCREATOR_UTILS_EXPORT

View File

@@ -132,105 +132,122 @@ void StyleHelper::setBaseColor(const QColor &color)
}
}
void StyleHelper::verticalGradient(QPainter *painter, const QRect &spanRect, const QRect &clipRect)
static void verticalGradientHelper(QPainter *p, const QRect &spanRect, const QRect &rect)
{
QString key;
key.sprintf("mh_toolbar %d %d %d %d %d", spanRect.width(), spanRect.height(), clipRect.width(),
clipRect.height(), StyleHelper::baseColor().rgb());;
QPixmap pixmap;
QPainter *p = painter;
QRect rect = clipRect;
if (StyleHelper::usePixmapCache() && !QPixmapCache::find(key, pixmap)) {
pixmap = QPixmap(clipRect.size());
p = new QPainter(&pixmap);
rect = QRect(0, 0, clipRect.width(), clipRect.height());
}
QColor base = StyleHelper::baseColor();
QLinearGradient grad(spanRect.topRight(), spanRect.topLeft());
grad.setColorAt(0, highlightColor());
grad.setColorAt(0, StyleHelper::highlightColor());
grad.setColorAt(0.301, base);
grad.setColorAt(1, shadowColor());
grad.setColorAt(1, StyleHelper::shadowColor());
p->fillRect(rect, grad);
QColor light(255, 255, 255, 80);
p->setPen(light);
p->drawLine(rect.topRight() - QPoint(1, 0), rect.bottomRight() - QPoint(1, 0));
if (StyleHelper::usePixmapCache() && !QPixmapCache::find(key, pixmap)) {
painter->drawPixmap(clipRect.topLeft(), pixmap);
p->end();
delete p;
QPixmapCache::insert(key, pixmap);
}
}
void StyleHelper::horizontalGradient(QPainter *painter, const QRect &spanRect, const QRect &clipRect)
void StyleHelper::verticalGradient(QPainter *painter, const QRect &spanRect, const QRect &clipRect)
{
QString key;
key.sprintf("mh_toolbar %d %d %d %d %d", spanRect.width(), spanRect.height(),
clipRect.width(), clipRect.height(), StyleHelper::baseColor().rgb());
QPixmap pixmap;
QPainter *p = painter;
QRect rect = clipRect;
if (StyleHelper::usePixmapCache() && !QPixmapCache::find(key, pixmap)) {
pixmap = QPixmap(clipRect.size());
p = new QPainter(&pixmap);
rect = QRect(0, 0, clipRect.width(), clipRect.height());
}
if (StyleHelper::usePixmapCache()) {
QString key;
key.sprintf("mh_vertical %d %d %d %d %d",
spanRect.width(), spanRect.height(), clipRect.width(),
clipRect.height(), StyleHelper::baseColor().rgb());;
QPixmap pixmap;
if (!QPixmapCache::find(key, pixmap)) {
pixmap = QPixmap(clipRect.size());
QPainter p(&pixmap);
QRect rect(0, 0, clipRect.width(), clipRect.height());
verticalGradientHelper(&p, spanRect, rect);
p.end();
QPixmapCache::insert(key, pixmap);
}
painter->drawPixmap(clipRect.topLeft(), pixmap);
} else {
verticalGradientHelper(painter, spanRect, clipRect);
}
}
static void horizontalGradientHelper(QPainter *p, const QRect &spanRect, const
QRect &rect)
{
QColor base = StyleHelper::baseColor();
QLinearGradient grad(rect.topLeft(), rect.bottomLeft());
grad.setColorAt(0, highlightColor().lighter(120));
if (rect.height() == navigationWidgetHeight()) {
grad.setColorAt(0.4, highlightColor());
grad.setColorAt(0, StyleHelper::highlightColor().lighter(120));
if (rect.height() == StyleHelper::navigationWidgetHeight()) {
grad.setColorAt(0.4, StyleHelper::highlightColor());
grad.setColorAt(0.401, base);
}
grad.setColorAt(1, shadowColor());
grad.setColorAt(1, StyleHelper::shadowColor());
p->fillRect(rect, grad);
QLinearGradient shadowGradient(spanRect.topLeft(), spanRect.topRight());
shadowGradient.setColorAt(0, QColor(0, 0, 0, 30));
QColor highlight = highlightColor().lighter(130);
QColor highlight = StyleHelper::highlightColor().lighter(130);
highlight.setAlpha(100);
shadowGradient.setColorAt(0.7, highlight);
shadowGradient.setColorAt(1, QColor(0, 0, 0, 40));
p->fillRect(rect, shadowGradient);
if (StyleHelper::usePixmapCache() && !QPixmapCache::find(key, pixmap)) {
}
void StyleHelper::horizontalGradient(QPainter *painter, const QRect &spanRect, const QRect &clipRect)
{
if (StyleHelper::usePixmapCache()) {
QString key;
key.sprintf("mh_horizontal %d %d %d %d %d",
spanRect.width(), spanRect.height(), clipRect.width(),
clipRect.height(), StyleHelper::baseColor().rgb());
QPixmap pixmap;
if (!QPixmapCache::find(key, pixmap)) {
pixmap = QPixmap(clipRect.size());
QPainter p(&pixmap);
QRect rect = QRect(0, 0, clipRect.width(), clipRect.height());
horizontalGradientHelper(&p, spanRect, rect);
p.end();
QPixmapCache::insert(key, pixmap);
}
painter->drawPixmap(clipRect.topLeft(), pixmap);
p->end();
delete p;
QPixmapCache::insert(key, pixmap);
} else {
horizontalGradientHelper(painter, spanRect, clipRect);
}
}
static void menuGradientHelper(QPainter *p, const QRect &spanRect, const QRect &rect)
{
QLinearGradient grad(spanRect.topLeft(), spanRect.bottomLeft());
QColor menuColor = StyleHelper::mergedColors(StyleHelper::baseColor(), QColor(244, 244, 244), 25);
grad.setColorAt(0, menuColor.lighter(112));
grad.setColorAt(1, menuColor);
p->fillRect(rect, grad);
}
void StyleHelper::menuGradient(QPainter *painter, const QRect &spanRect, const QRect &clipRect)
{
QString key;
key.sprintf("mh_toolbar %d %d %d %d %d", spanRect.width(), spanRect.height(), clipRect.width(),
clipRect.height(), StyleHelper::baseColor().rgb());;
QPixmap pixmap;
QPainter *p = painter;
QRect rect = clipRect;
if (StyleHelper::usePixmapCache() && !QPixmapCache::find(key, pixmap)) {
pixmap = QPixmap(clipRect.size());
p = new QPainter(&pixmap);
rect = QRect(0, 0, clipRect.width(), clipRect.height());
}
if (StyleHelper::usePixmapCache()) {
QString key;
key.sprintf("mh_menu %d %d %d %d %d",
spanRect.width(), spanRect.height(), clipRect.width(),
clipRect.height(), StyleHelper::baseColor().rgb());
QLinearGradient grad(spanRect.topLeft(), spanRect.bottomLeft());
QColor menuColor = mergedColors(StyleHelper::baseColor(), QColor(244, 244, 244), 25);
grad.setColorAt(0, menuColor.lighter(112));
grad.setColorAt(1, menuColor);
p->fillRect(rect, grad);
QPixmap pixmap;
if (!QPixmapCache::find(key, pixmap)) {
pixmap = QPixmap(clipRect.size());
QPainter p(&pixmap);
QRect rect = QRect(0, 0, clipRect.width(), clipRect.height());
menuGradientHelper(&p, spanRect, rect);
p.end();
QPixmapCache::insert(key, pixmap);
}
if (StyleHelper::usePixmapCache() && !QPixmapCache::find(key, pixmap)) {
painter->drawPixmap(clipRect.topLeft(), pixmap);
p->end();
delete p;
QPixmapCache::insert(key, pixmap);
} else {
menuGradientHelper(painter, spanRect, clipRect);
}
}

View File

@@ -343,6 +343,7 @@ void EditorView::setCurrentEditor(IEditor *editor)
{
if (!editor || m_container->count() <= 0
|| m_container->indexOf(editor->widget()) == -1) {
updateEditorStatus(0);
// ### TODO the combo box m_editorList should show an empty item
return;
}
@@ -377,6 +378,13 @@ void EditorView::updateEditorStatus(IEditor *editor)
static const QIcon lockedIcon(QLatin1String(":/core/images/locked.png"));
static const QIcon unlockedIcon(QLatin1String(":/core/images/unlocked.png"));
m_lockButton->setVisible(editor != 0);
if (!editor) {
m_editorList->setToolTip(QString());
return;
}
if (editor->file()->isReadOnly()) {
m_lockButton->setIcon(lockedIcon);
m_lockButton->setEnabled(!editor->file()->fileName().isEmpty());

View File

@@ -106,6 +106,10 @@ public:
*/
virtual bool vcsDelete(const QString &filename) = 0;
signals:
void repositoryChanged(const QString &repository);
void filesChanged(const QStringList &files);
// TODO: ADD A WAY TO DETECT WHETHER A FILE IS MANAGED, e.g
// virtual bool sccManaged(const QString &filename) = 0;
};

View File

@@ -126,7 +126,7 @@ MainWindow::MainWindow() :
m_progressManager(new ProgressManagerPrivate()),
m_scriptManager(new ScriptManagerPrivate(this)),
m_variableManager(new VariableManager(this)),
m_vcsManager(new VCSManager()),
m_vcsManager(new VCSManager),
m_viewManager(0),
m_modeManager(0),
m_mimeDatabase(new MimeDatabase),
@@ -346,6 +346,7 @@ void MainWindow::extensionsInitialized()
OutputPaneManager::instance()->init();
m_actionManager->initialize();
m_vcsManager->extensionsInitialized();
readSettings();
updateContext();

View File

@@ -57,7 +57,8 @@ struct VCSManagerPrivate {
QMap<QString, IVersionControl *> m_cachedMatches;
};
VCSManager::VCSManager() :
VCSManager::VCSManager(QObject *parent) :
QObject(parent),
m_d(new VCSManagerPrivate)
{
}
@@ -67,6 +68,17 @@ VCSManager::~VCSManager()
delete m_d;
}
void VCSManager::extensionsInitialized()
{
// Change signal connections
foreach (IVersionControl *versionControl, allVersionControls()) {
connect(versionControl, SIGNAL(filesChanged(QStringList)),
this, SIGNAL(filesChanged(QStringList)));
connect(versionControl, SIGNAL(repositoryChanged(QString)),
this, SIGNAL(repositoryChanged(QString)));
}
}
void VCSManager::setVCSEnabled(const QString &directory)
{
if (debug)

View File

@@ -33,6 +33,7 @@
#include "core_global.h"
#include <QtCore/QString>
#include <QtCore/QObject>
namespace Core {
@@ -49,13 +50,16 @@ class IVersionControl;
// for the topmost directory it manages. This information is cached and
// VCSManager thus knows pretty fast which IVersionControl * is responsible.
class CORE_EXPORT VCSManager
class CORE_EXPORT VCSManager : public QObject
{
Q_OBJECT
Q_DISABLE_COPY(VCSManager)
public:
VCSManager();
explicit VCSManager(QObject *parent = 0);
virtual ~VCSManager();
void extensionsInitialized();
IVersionControl *findVersionControlForDirectory(const QString &directory);
// Enable the VCS managing a certain directory only. This should
@@ -69,6 +73,10 @@ public:
// if a failure occurs
bool showDeleteDialog(const QString &fileName);
signals:
void repositoryChanged(const QString &repository);
void filesChanged(const QStringList &files);
private:
VCSManagerPrivate *m_d;
};

View File

@@ -41,8 +41,10 @@ const char * const SWITCH_DECLARATION_DEFINITION = "CppEditor.SwitchDeclarationD
const char * const RENAME_SYMBOL_UNDER_CURSOR = "CppEditor.RenameSymbolUnderCursor";
const char * const FIND_USAGES = "CppEditor.FindUsages";
const char * const SEPARATOR = "CppEditor.Separator";
const char * const SEPARATOR2 = "CppEditor.Separator2";
const char * const FIND_REFERENCES = "CppEditor.FindReferences";
const char * const JUMP_TO_DEFINITION = "CppEditor.JumpToDefinition";
const char * const UPDATE_CODEMODEL = "CppEditor.UpdateCodeModel";
const char * const HEADER_FILE_TYPE = "CppHeaderFiles";
const char * const SOURCE_FILE_TYPE = "CppSourceFiles";

View File

@@ -52,6 +52,7 @@
#include <texteditor/texteditorsettings.h>
#include <texteditor/texteditorconstants.h>
#include <cpptools/cpptoolsconstants.h>
#include <cpptools/cppmodelmanagerinterface.h>
#include <QtCore/QFileInfo>
#include <QtCore/QSettings>
@@ -108,11 +109,26 @@ QStringList CppEditorFactory::mimeTypes() const
///////////////////////////////// CppPlugin //////////////////////////////////
static inline
Core::Command *createSeparator(Core::ActionManager *am,
QObject *parent,
const QList<int> &context,
const char *id)
{
QAction *separator = new QAction(parent);
separator->setSeparator(true);
return am->registerAction(separator, QLatin1String(id), context);
}
CppPlugin *CppPlugin::m_instance = 0;
CppPlugin::CppPlugin() :
m_actionHandler(0),
m_sortedMethodOverview(false)
m_sortedMethodOverview(false),
m_renameSymbolUnderCursorAction(0),
m_findUsagesAction(0),
m_updateCodeModelAction(0)
{
m_instance = this;
}
@@ -192,6 +208,7 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
Core::ActionContainer *contextMenu= am->createMenu(CppEditor::Constants::M_CONTEXT);
Core::Command *cmd;
Core::ActionContainer *cppToolsMenu = am->actionContainer(QLatin1String(CppTools::Constants::M_TOOLS_CPP));
QAction *jumpToDefinition = new QAction(tr("Follow Symbol under Cursor"), this);
cmd = am->registerAction(jumpToDefinition,
@@ -200,7 +217,7 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
connect(jumpToDefinition, SIGNAL(triggered()),
this, SLOT(jumpToDefinition()));
contextMenu->addAction(cmd);
am->actionContainer(CppTools::Constants::M_TOOLS_CPP)->addAction(cmd);
cppToolsMenu->addAction(cmd);
QAction *switchDeclarationDefinition = new QAction(tr("Switch between Method Declaration/Definition"), this);
cmd = am->registerAction(switchDeclarationDefinition,
@@ -209,14 +226,14 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
connect(switchDeclarationDefinition, SIGNAL(triggered()),
this, SLOT(switchDeclarationDefinition()));
contextMenu->addAction(cmd);
am->actionContainer(CppTools::Constants::M_TOOLS_CPP)->addAction(cmd);
cppToolsMenu->addAction(cmd);
m_findUsagesAction = new QAction(tr("Find Usages"), this);
cmd = am->registerAction(m_findUsagesAction, Constants::FIND_USAGES, context);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+U")));
connect(m_findUsagesAction, SIGNAL(triggered()), this, SLOT(findUsages()));
contextMenu->addAction(cmd);
am->actionContainer(CppTools::Constants::M_TOOLS_CPP)->addAction(cmd);
cppToolsMenu->addAction(cmd);
m_renameSymbolUnderCursorAction = new QAction(tr("Rename Symbol under Cursor"), this);
cmd = am->registerAction(m_renameSymbolUnderCursorAction,
@@ -224,7 +241,17 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
cmd->setDefaultKeySequence(QKeySequence("CTRL+SHIFT+R"));
connect(m_renameSymbolUnderCursorAction, SIGNAL(triggered()), this, SLOT(renameSymbolUnderCursor()));
contextMenu->addAction(cmd);
am->actionContainer(CppTools::Constants::M_TOOLS_CPP)->addAction(cmd);
cppToolsMenu->addAction(cmd);
// Update context in global context
QList<int> globalContext;
globalContext.append(Core::Constants::C_GLOBAL_ID);
cppToolsMenu->addAction(createSeparator(am, this, globalContext, CppEditor::Constants::SEPARATOR2));
m_updateCodeModelAction = new QAction(tr("Update code model"), this);
cmd = am->registerAction(m_updateCodeModelAction, QLatin1String(Constants::UPDATE_CODEMODEL), globalContext);
CppTools::CppModelManagerInterface *cppModelManager = CppTools::CppModelManagerInterface::instance();
connect(m_updateCodeModelAction, SIGNAL(triggered()), cppModelManager, SLOT(updateModifiedSourceFiles()));
cppToolsMenu->addAction(cmd);
m_actionHandler = new TextEditor::TextEditorActionHandler(CppEditor::Constants::C_CPPEDITOR,
TextEditor::TextEditorActionHandler::Format
@@ -233,10 +260,7 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
m_actionHandler->initializeActions();
QAction *separator = new QAction(this);
separator->setSeparator(true);
cmd = am->registerAction(separator, CppEditor::Constants::SEPARATOR, context);
contextMenu->addAction(cmd);
contextMenu->addAction(createSeparator(am, this, context, CppEditor::Constants::SEPARATOR));
cmd = am->command(TextEditor::Constants::AUTO_INDENT_SELECTION);
contextMenu->addAction(cmd);
@@ -308,6 +332,7 @@ void CppPlugin::onTaskStarted(const QString &type)
if (type == CppTools::Constants::TASK_INDEX) {
m_renameSymbolUnderCursorAction->setEnabled(false);
m_findUsagesAction->setEnabled(false);
m_updateCodeModelAction->setEnabled(false);
}
}
@@ -316,6 +341,7 @@ void CppPlugin::onAllTasksFinished(const QString &type)
if (type == CppTools::Constants::TASK_INDEX) {
m_renameSymbolUnderCursorAction->setEnabled(true);
m_findUsagesAction->setEnabled(true);
m_updateCodeModelAction->setEnabled(true);
}
}

View File

@@ -90,6 +90,7 @@ private:
bool m_sortedMethodOverview;
QAction *m_renameSymbolUnderCursorAction;
QAction *m_findUsagesAction;
QAction *m_updateCodeModelAction;
};
class CppEditorFactory : public Core::IEditorFactory

View File

@@ -110,7 +110,6 @@ static void find_helper(QFutureInterface<Usage> &future,
Q_ASSERT(symbolId != 0);
const QString sourceFile = QString::fromUtf8(symbol->fileName(), symbol->fileNameLength());
QStringList files(sourceFile);
if (symbol->isClass() || symbol->isForwardClassDeclaration()) {
@@ -126,9 +125,7 @@ static void find_helper(QFutureInterface<Usage> &future,
} else {
files += snapshot.dependsOn(sourceFile);
}
files.removeDuplicates();
//qDebug() << "done in:" << tm.elapsed() << "number of files to parse:" << files.size();
future.setProgressRange(0, files.size());
@@ -232,7 +229,6 @@ void CppFindReferences::findAll_helper(Symbol *symbol)
const QMap<QString, QString> wl = _modelManager->workingCopy();
Core::ProgressManager *progressManager = Core::ICore::instance()->progressManager();
QFuture<Usage> result = QtConcurrent::run(&find_helper, wl, snapshot, symbol);
m_watcher.setFuture(result);

View File

@@ -379,8 +379,8 @@ QString CppPreprocessor::tryIncludeFile(QString &fileName, IncludeType type)
}
}
foreach (const QString &includePath, m_includePaths) {
QString path = includePath;
for (int i = m_includePaths.size() - 1; i != -1; --i) {
QString path = m_includePaths.at(i);
path += QLatin1Char('/');
path += fileName;
path = QDir::cleanPath(path);
@@ -532,7 +532,7 @@ void CppPreprocessor::sourceNeeded(QString &fileName, IncludeType type,
return;
QString contents = tryIncludeFile(fileName, type);
fileName = QDir::cleanPath(fileName);
if (m_currentDoc) {
m_currentDoc->addIncludeFile(fileName, line);

View File

@@ -47,6 +47,7 @@
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/progressmanager/progressmanager.h>
#include <coreplugin/vcsmanager.h>
#include <cppeditor/cppeditorconstants.h>
#include <QtCore/QtConcurrentRun>
@@ -97,6 +98,11 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
// Objects
m_modelManager = new CppModelManager(this);
Core::VCSManager *vcsManager = core->vcsManager();
connect(vcsManager, SIGNAL(repositoryChanged(QString)),
m_modelManager, SLOT(updateModifiedSourceFiles()));
connect(vcsManager, SIGNAL(filesChanged(QStringList)),
m_modelManager, SLOT(updateModifiedSourceFiles()));
addAutoReleasedObject(m_modelManager);
m_completion = new CppCodeCompletion(m_modelManager);

View File

@@ -96,3 +96,14 @@ QString CVSControl::findTopLevelForDirectory(const QString &directory) const
{
return m_plugin->findTopLevelForDirectory(directory);
}
void CVSControl::emitRepositoryChanged(const QString &s)
{
emit repositoryChanged(s);
}
void CVSControl::emitFilesChanged(const QStringList &l)
{
emit filesChanged(l);
}

View File

@@ -56,6 +56,9 @@ public:
virtual bool vcsAdd(const QString &fileName);
virtual bool vcsDelete(const QString &filename);
void emitRepositoryChanged(const QString &s);
void emitFilesChanged(const QStringList &l);
signals:
void enabledChanged(bool);

View File

@@ -551,9 +551,11 @@ void CVSPlugin::revertCurrentFile()
QStringList args(QLatin1String("update"));
args.push_back(QLatin1String("-C"));
const CVSResponse revertResponse = runCVS(args, QStringList(file), cvsShortTimeOut, true);
const QStringList files = QStringList(file);
const CVSResponse revertResponse = runCVS(args, files, cvsShortTimeOut, true);
if (revertResponse.result == CVSResponse::Ok) {
fcb.setModifiedReload(true);
m_versionControl->emitFilesChanged(files);
}
}
@@ -734,7 +736,10 @@ void CVSPlugin::updateProject()
if (!topLevels.empty()) {
QStringList args(QLatin1String("update"));
args.push_back(QLatin1String("-dR"));
runCVS(args, topLevels, cvsLongTimeOut, true);
const CVSResponse response = runCVS(args, topLevels, cvsLongTimeOut, true);
if (response.result == CVSResponse::Ok)
foreach(const QString &topLevel, topLevels)
m_versionControl->emitRepositoryChanged(topLevel);
}
}

View File

@@ -59,6 +59,7 @@ namespace CVS {
namespace Internal {
class CVSSubmitEditor;
class CVSControl;
struct CVSResponse
{
@@ -153,7 +154,7 @@ private:
void cleanCommitMessageFile();
CVSSettings m_settings;
Core::IVersionControl *m_versionControl;
CVSControl *m_versionControl;
QString m_commitMessageFileName;
ProjectExplorer::ProjectExplorerPlugin *m_projectExplorer;

View File

@@ -1034,9 +1034,16 @@ static inline QString msgStepFailed(unsigned long executionStatus, int threadId,
return QString::fromLatin1("Thread %1: Unable to step into: %2").arg(threadId).arg(why);
}
// Step with DEBUG_STATUS_STEP_OVER ('p'-command) or
// Step out has to be done via executing 'gu'. TODO: Remove once it is
// accessible via normal API for SetExecutionStatus().
enum { CdbExtendedExecutionStatusStepOut = 7452347 };
// Step with DEBUG_STATUS_STEP_OVER ('p'-command),
// DEBUG_STATUS_STEP_INTO ('t'-trace-command) or
// CdbExtendedExecutionStatusStepOut ("gu"-command)
// its reverse equivalents in the case of single threads.
bool CdbDebugEngine::step(unsigned long executionStatus)
{
if (debugCDBExecution)
@@ -1068,7 +1075,7 @@ bool CdbDebugEngine::step(unsigned long executionStatus)
m_d->setCodeLevel(); // Step by instruction or source line
setState(InferiorRunningRequested, Q_FUNC_INFO, __LINE__);
bool success = false;
if (sameThread) { // Step event-triggering thread, use fast API
if (sameThread && executionStatus != CdbExtendedExecutionStatusStepOut) { // Step event-triggering thread, use fast API
const HRESULT hr = m_d->m_cif.debugControl->SetExecutionStatus(executionStatus);
success = SUCCEEDED(hr);
if (!success)
@@ -1077,8 +1084,18 @@ bool CdbDebugEngine::step(unsigned long executionStatus)
// Need to use a command to explicitly specify the current thread
QString command;
QTextStream str(&command);
str << '~' << m_d->m_currentThreadId << ' '
<< (executionStatus == DEBUG_STATUS_STEP_OVER ? 'p' : 't');
str << '~' << m_d->m_currentThreadId << ' ';
switch (executionStatus) {
case DEBUG_STATUS_STEP_OVER:
str << 'p';
break;
case DEBUG_STATUS_STEP_INTO:
str << 't';
break;
case CdbExtendedExecutionStatusStepOut:
str << "gu";
break;
}
manager()->showDebuggerOutput(tr("Stepping %1").arg(command));
const HRESULT hr = m_d->m_cif.debugControl->Execute(DEBUG_OUTCTL_THIS_CLIENT, command.toLatin1().constData(), DEBUG_EXECUTE_ECHO);
success = SUCCEEDED(hr);
@@ -1121,44 +1138,8 @@ void CdbDebugEngine::nextIExec()
void CdbDebugEngine::stepOutExec()
{
if (debugCDBExecution)
qDebug() << "stepOutExec";
// emulate gdb 'exec-finish' (exec until return of current function)
// by running up to address of the above stack frame (mostly works).
const StackHandler* sh = manager()->stackHandler();
const int idx = sh->currentIndex() + 1;
const QList<StackFrame> stackframes = sh->frames();
if (idx < 0 || idx >= stackframes.size()) {
warning(QString::fromLatin1("Cannot step out of stack frame %1.").arg(idx));
return;
}
// Set a temporary breakpoint and continue
const StackFrame& frame = stackframes.at(idx);
bool success = false;
QString errorMessage;
do {
const ULONG64 address = frame.address.toULongLong(&success, 16);
if (!success) {
errorMessage = QLatin1String("Cannot obtain address from stack frame");
break;
}
manager()->showDebuggerOutput(LogMisc, tr("Running to 0x%1...").arg(address, 0, 16));
IDebugBreakpoint2* pBP;
HRESULT hr = m_d->m_cif.debugControl->AddBreakpoint2(DEBUG_BREAKPOINT_CODE, DEBUG_ANY_ID, &pBP);
if (FAILED(hr) || !pBP) {
errorMessage = QString::fromLatin1("Cannot create temporary breakpoint: %1").arg(msgDebugEngineComResult(hr));
break;
}
pBP->SetOffset(address);
pBP->AddFlags(DEBUG_BREAKPOINT_ENABLED);
pBP->AddFlags(DEBUG_BREAKPOINT_ONE_SHOT);
if (!m_d->continueInferior(&errorMessage))
break;
success = true;
} while (false);
if (!success)
warning(msgFunctionFailed(Q_FUNC_INFO, errorMessage));
if (!manager()->isReverseDebugging())
step(CdbExtendedExecutionStatusStepOut);
}
void CdbDebugEngine::continueInferior()

View File

@@ -120,7 +120,6 @@ private:
void startWatchTimer();
void killWatchTimer();
void processTerminated(unsigned long exitCode);
bool executeDebuggerCommand(const QString &command, QString *errorMessage);
bool evaluateExpression(const QString &expression, QString *value, QString *type, QString *errorMessage);
void evaluateWatcher(WatchData *wd);
QString editorToolTip(const QString &exp, const QString &function);

View File

@@ -233,8 +233,8 @@ DebuggerSettings *DebuggerSettings::instance()
item->setSettingsKey(debugModeGroup, QLatin1String("UseCodeModel"));
item->setText(tr("Use code model"));
item->setCheckable(true);
item->setDefaultValue(false);
item->setValue(false);
item->setDefaultValue(true);
item->setValue(true);
instance->insertItem(UseCodeModel, item);
item = new SavedAction(instance);

View File

@@ -121,6 +121,7 @@ public:
QString debuggerCommand;
int toolChainType;
QString remoteDumperLib;
QString qtInstallPath;
QString dumperLibrary;
QStringList dumperLibraryLocations;

View File

@@ -31,6 +31,7 @@
#include "debuggermanager.h"
#include <projectexplorer/debugginghelper.h>
#include <projectexplorer/environment.h>
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorerconstants.h>
@@ -139,6 +140,21 @@ DebuggerRunControl::DebuggerRunControl(DebuggerManager *manager,
runConfiguration->dumperLibrary();
m_startParameters->dumperLibraryLocations =
runConfiguration->dumperLibraryLocations();
QString qmakePath = ProjectExplorer::DebuggingHelperLibrary::findSystemQt(
runConfiguration->environment());
if (!qmakePath.isEmpty()) {
QProcess proc;
QStringList args;
args.append(QLatin1String("-query"));
args.append(QLatin1String("QT_INSTALL_HEADERS"));
proc.start(qmakePath, args);
proc.waitForFinished();
QByteArray ba = proc.readAllStandardOutput().trimmed();
QFileInfo fi(QString::fromLocal8Bit(ba) + "/..");
m_startParameters->qtInstallPath = fi.absoluteFilePath();
}
}
DebuggerRunControl::DebuggerRunControl(DebuggerManager *manager, const DebuggerStartParametersPtr &startParameters)

View File

@@ -285,6 +285,8 @@ void GdbEngine::initializeVariables()
m_inbuffer.clear();
m_commandTimer->stop();
// ConverterState has no reset() function.
m_outputCodecState.~ConverterState();
new (&m_outputCodecState) QTextCodec::ConverterState();
@@ -425,6 +427,8 @@ void GdbEngine::handleResponse(const QByteArray &buff)
}
if (asyncClass == "stopped") {
handleStopResponse(result);
m_pendingLogStreamOutput.clear();
m_pendingConsoleStreamOutput.clear();
} else if (asyncClass == "running") {
// Archer has 'thread-id="all"' here
} else if (asyncClass == "library-loaded") {
@@ -1157,42 +1161,52 @@ void GdbEngine::handleStopResponse(const GdbMi &data)
}
setState(InferiorStopped);
#ifdef Q_OS_LINUX
// For some reason, attaching to a stopped process causes *two* stops
// when trying to continue (kernel i386 2.6.24-23-ubuntu, gdb 6.8).
// Interestingly enough, on MacOSX no signal is delivered at all.
if (!m_entryPoint.isEmpty()) {
if (reason == "signal-received"
&& data.findChild("signal-name").data() == "SIGSTOP") {
GdbMi frameData = data.findChild("frame");
if (frameData.findChild("addr").data() == m_entryPoint) {
continueInferiorInternal();
return;
}
}
// We are past the initial stops. No need to waste time on further checks.
m_entryPoint.clear();
}
#endif
// Due to LD_PRELOADing the dumpers, these events can occur even before
// reaching the entry point. So handle it before the entry point hacks below.
if (reason.isEmpty() && m_gdbVersion < 70000 && !m_isMacGdb) {
// On Linux it reports "Stopped due to shared library event\n", but
// on Windows it simply forgets about it. Thus, we identify the response
// based on it having no frame information.
if (!data.findChild("frame").isValid()) {
m_modulesListOutdated = m_sourcesListOutdated = true;
// Each stop causes a roundtrip and button flicker, so prevent
// a flood of useless stops. Will be automatically re-enabled.
postCommand(_("set stop-on-solib-events 0"));
#if 0
// The related code (handleAqcuiredInferior()) is disabled as well.
// When re-enabling, try something to avoid spurious source list updates
// due to unrelated no-reason stops.
const QByteArray &msg = data.findChild("consolestreamoutput").data();
if (msg.contains("Stopped due to shared library event") || reason.isEmpty()) {
m_modulesListOutdated = m_sourcesListOutdated = true;
if (theDebuggerBoolSetting(SelectedPluginBreakpoints)) {
QString dataStr = _(data.toString());
debugMessage(_("SHARED LIBRARY EVENT: ") + dataStr);
QString pat = theDebuggerStringSetting(SelectedPluginBreakpointsPattern);
debugMessage(_("PATTERN: ") + pat);
postCommand(_("sharedlibrary ") + pat);
// The related code (handleAqcuiredInferior()) is disabled as well.
if (theDebuggerBoolSetting(SelectedPluginBreakpoints)) {
QString dataStr = _(data.toString());
debugMessage(_("SHARED LIBRARY EVENT: ") + dataStr);
QString pat = theDebuggerStringSetting(SelectedPluginBreakpointsPattern);
debugMessage(_("PATTERN: ") + pat);
postCommand(_("sharedlibrary ") + pat);
showStatusMessage(tr("Loading %1...").arg(dataStr));
}
#endif
continueInferiorInternal();
showStatusMessage(tr("Loading %1...").arg(dataStr));
return;
}
// fall through
}
#ifdef Q_OS_LINUX
if (!m_entryPoint.isEmpty()) {
GdbMi frameData = data.findChild("frame");
if (frameData.findChild("addr").data() == m_entryPoint) {
// There are two expected reasons for getting here:
// 1) For some reason, attaching to a stopped process causes *two* SIGSTOPs
// when trying to continue (kernel i386 2.6.24-23-ubuntu, gdb 6.8).
// Interestingly enough, on MacOSX no signal is delivered at all.
// 2) The explicit tbreak at the entry point we set to query the PID.
// Gdb <= 6.8 reports a frame but no reason, 6.8.50+ reports everything.
// The case of the user really setting a breakpoint at _start is simply
// unsupported.
if (!inferiorPid()) // For programs without -pthread under gdb <= 6.8.
postCommand(_("info proc"), CB(handleInfoProc));
continueInferiorInternal();
return;
}
// We are past the initial stop(s). No need to waste time on further checks.
m_entryPoint.clear();
}
#endif
@@ -1270,11 +1284,6 @@ void GdbEngine::handleStop1(const GdbMi &data)
if (m_sourcesListOutdated)
reloadSourceFilesInternal(); // This needs to be done before fullName() may need it
// Older gdb versions do not produce "library loaded" messages
// so the breakpoint update is not triggered.
if (m_gdbVersion < 70000 && !m_isMacGdb)
postCommand(_("-break-list"), CB(handleBreakList));
QByteArray reason = data.findChild("reason").data();
if (reason == "breakpoint-hit") {
showStatusMessage(tr("Stopped at breakpoint."));
@@ -1292,8 +1301,8 @@ void GdbEngine::handleStop1(const GdbMi &data)
"signal from the Operating System.<p>"
"<table><tr><td>Signal name : </td><td>%1</td></tr>"
"<tr><td>Signal meaning : </td><td>%2</td></tr></table>")
.arg(name.isEmpty() ? tr(" <Unknown> ") : _(name))
.arg(meaning.isEmpty() ? tr(" <Unknown> ") : _(meaning));
.arg(name.isEmpty() ? tr(" <Unknown> ", "name") : _(name))
.arg(meaning.isEmpty() ? tr(" <Unknown> ", "meaning") : _(meaning));
showMessageBox(QMessageBox::Information,
tr("Signal received"), msg);
}
@@ -1337,6 +1346,18 @@ void GdbEngine::handleStop1(const GdbMi &data)
manager()->reloadRegisters();
}
#ifdef Q_OS_LINUX
void GdbEngine::handleInfoProc(const GdbResponse &response)
{
if (response.resultClass == GdbResultDone) {
static QRegExp re(_("\\bprocess ([0-9]+)\n"));
QTC_ASSERT(re.isValid(), return);
if (re.indexIn(_(response.data.findChild("consolestreamoutput").data())) != -1)
maybeHandleInferiorPidChanged(re.cap(1));
}
}
#endif
void GdbEngine::handleShowVersion(const GdbResponse &response)
{
//qDebug () << "VERSION 2:" << response.data.findChild("consolestreamoutput").data();
@@ -1399,7 +1420,6 @@ void GdbEngine::handleExecContinue(const GdbResponse &response)
} else {
if (state() == InferiorRunningRequested_Kill) {
setState(InferiorStopped);
m_commandsToRunOnTemporaryBreak.clear();
shutdown();
return;
}
@@ -1416,7 +1436,6 @@ void GdbEngine::handleExecContinue(const GdbResponse &response)
} else {
showMessageBox(QMessageBox::Critical, tr("Execution Error"),
tr("Cannot continue debugged process:\n") + QString::fromLocal8Bit(msg));
m_commandsToRunOnTemporaryBreak.clear();
shutdown();
}
}
@@ -1461,6 +1480,7 @@ void GdbEngine::shutdown()
// fall-through
case AdapterStartFailed: // Adapter "did something", but it did not help
if (m_gdbProc.state() == QProcess::Running) {
m_commandsToRunOnTemporaryBreak.clear();
postCommand(_("-gdb-exit"), GdbEngine::ExitRequest, CB(handleGdbExit));
} else {
setState(DebuggerNotReady);
@@ -1470,6 +1490,7 @@ void GdbEngine::shutdown()
case InferiorRunning:
case InferiorStopping:
case InferiorStopped:
m_commandsToRunOnTemporaryBreak.clear();
postCommand(_(m_gdbAdapter->inferiorShutdownCommand()),
NeedsStop | LosesChild, CB(handleInferiorShutdown));
break;
@@ -1478,6 +1499,7 @@ void GdbEngine::shutdown()
case InferiorShutDown:
case InferiorShutdownFailed: // Whatever
case InferiorUnrunnable:
m_commandsToRunOnTemporaryBreak.clear();
postCommand(_("-gdb-exit"), GdbEngine::ExitRequest, CB(handleGdbExit));
setState(EngineShuttingDown); // Do it after posting the command!
break;
@@ -1510,6 +1532,7 @@ void GdbEngine::handleGdbExit(const GdbResponse &response)
{
if (response.resultClass == GdbResultExit) {
debugMessage(_("GDB CLAIMS EXIT; WAITING"));
m_commandsDoneCallback = 0;
// don't set state here, this will be handled in handleGdbFinished()
} else {
QString msg = m_gdbAdapter->msgGdbStopFailed(_(response.data.findChild("msg").data()));
@@ -2238,6 +2261,8 @@ void GdbEngine::reloadModulesInternal()
{
m_modulesListOutdated = false;
postCommand(_("info shared"), NeedsStop, CB(handleModulesList));
if (m_gdbVersion < 70000 && !m_isMacGdb)
postCommand(_("set stop-on-solib-events 1"));
}
void GdbEngine::handleModulesList(const GdbResponse &response)
@@ -2278,7 +2303,7 @@ void GdbEngine::handleModulesList(const GdbResponse &response)
module.symbolsRead = (item.findChild("state").data() == "Y");
module.startAddress = _(item.findChild("loaded_addr").data());
//: End address of loaded module
module.endAddress = tr("<unknown>");
module.endAddress = tr("<unknown>", "address");
modules.append(module);
}
}
@@ -2306,6 +2331,8 @@ void GdbEngine::reloadSourceFilesInternal()
m_sourcesListOutdated = false;
postCommand(_("-file-list-exec-source-files"), NeedsStop, CB(handleQuerySources));
postCommand(_("-break-list"), CB(handleBreakList));
if (m_gdbVersion < 70000 && !m_isMacGdb)
postCommand(_("set stop-on-solib-events 1"));
}
@@ -4450,6 +4477,21 @@ void GdbEngine::handleAdapterStarted()
void GdbEngine::handleInferiorPrepared()
{
const QString qtInstallPath = m_startParameters->qtInstallPath;
if (!qtInstallPath.isEmpty()) {
QString qtBuildPath =
#if defined(Q_OS_WIN)
_("C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_create_more/Troll/4.6/qt");
#elif defined(Q_OS_MAC)
QString();
#else
_("/var/tmp/qt-x11-src-4.6.0");
#endif
if (!qtBuildPath.isEmpty())
postCommand(_("set substitute-path %1 %2")
.arg(qtBuildPath).arg(qtInstallPath));
}
// Initial attempt to set breakpoints
showStatusMessage(tr("Setting breakpoints..."));
attemptBreakpointSynchronization();

View File

@@ -302,6 +302,8 @@ private: ////////// Inferior Management //////////
void maybeHandleInferiorPidChanged(const QString &pid);
#ifdef Q_OS_LINUX
void handleInfoProc(const GdbResponse &response);
QByteArray m_entryPoint;
#endif

View File

@@ -110,6 +110,13 @@ void PlainGdbAdapter::handleFileExecAndSymbols(const GdbResponse &response)
{
QTC_ASSERT(state() == InferiorStarting, qDebug() << state());
if (response.resultClass == GdbResultDone) {
#ifdef Q_OS_LINUX
// Old gdbs do not announce the PID for programs without pthreads.
// Note that successfully preloading the debugging helpers will
// automatically load pthreads, so this will be unnecessary.
if (m_engine->m_gdbVersion < 70000)
m_engine->postCommand(_("info target"), CB(handleInfoTarget));
#endif
emit inferiorPrepared();
} else {
QString msg = tr("Starting executable failed:\n") +
@@ -118,6 +125,29 @@ void PlainGdbAdapter::handleFileExecAndSymbols(const GdbResponse &response)
}
}
#ifdef Q_OS_LINUX
void PlainGdbAdapter::handleInfoTarget(const GdbResponse &response)
{
if (response.resultClass == GdbResultDone) {
// [some leading stdout here]
// >&" Entry point: 0x80831f0 0x08048134 - 0x08048147 is .interp\n"
// [some trailing stdout here]
QString msg = _(response.data.findChild("consolestreamoutput").data());
QRegExp needle(_("\\bEntry point: 0x([0-9a-f]+)\\b"));
if (needle.indexIn(msg) != -1) {
m_engine->m_entryPoint =
"0x" + needle.cap(1).toLatin1().rightJustified(sizeof(void *) * 2, '0');
m_engine->postCommand(_("tbreak *0x") + needle.cap(1));
// Do nothing here - inferiorPrepared handles the sequencing.
} else {
emit inferiorStartFailed(_("Parsing start address failed"));
}
} else if (response.resultClass == GdbResultError) {
emit inferiorStartFailed(_("Fetching start address failed"));
}
}
#endif
void PlainGdbAdapter::startInferiorPhase2()
{
setState(InferiorRunningRequested);

View File

@@ -62,6 +62,9 @@ public:
private:
void handleFileExecAndSymbols(const GdbResponse &response);
void handleExecRun(const GdbResponse &response);
#ifdef Q_OS_LINUX
void handleInfoTarget(const GdbResponse &response);
#endif
OutputCollector m_outputCollector;
};

View File

@@ -197,9 +197,17 @@ TrkGdbAdapter::TrkGdbAdapter(GdbEngine *engine, const TrkOptionsPtr &options) :
m_running(false),
m_trkDevice(new trk::TrkDevice),
m_gdbAckMode(true),
m_verbose(2),
m_verbose(0),
m_bufferedMemoryRead(true)
{
const QByteArray trkVerbose = qgetenv("QTC_TRK_VERBOSE");
if (!trkVerbose.isEmpty()) {
bool ok;
m_verbose = trkVerbose.toInt(&ok);
if (!ok)
m_verbose = 1;
}
m_gdbServer = 0;
m_gdbConnection = 0;
#ifdef Q_OS_WIN

View File

@@ -214,6 +214,12 @@ struct Range
: beginPos(qMin(b, e)), endPos(qMax(b, e)), rangemode(m)
{}
QString toString() const
{
return QString("%1-%2 (mode: %3)").arg(beginPos).arg(endPos)
.arg(rangemode);
}
int beginPos;
int endPos;
RangeMode rangemode;
@@ -660,6 +666,7 @@ void FakeVimHandler::Private::restoreWidget()
EventResult FakeVimHandler::Private::handleKey(int key, int unmodified,
const QString &text)
{
//qDebug() << " CURSOR POS: " << m_undoCursorPosition;
m_undoCursorPosition[m_tc.document()->availableUndoSteps()] = m_tc.position();
//qDebug() << "KEY: " << key << text << "POS: " << m_tc.position();
if (m_mode == InsertMode)
@@ -1947,7 +1954,7 @@ void FakeVimHandler::Private::handleExCommand(const QString &cmd0)
firstPositionInLine(endLine), RangeLineMode);
QString contents = text(range);
m_tc = tc;
qDebug() << "LINES: " << beginLine << endLine;
//qDebug() << "LINES: " << beginLine << endLine;
bool handled = false;
emit q->writeFileRequested(&handled, fileName, contents);
// nobody cared, so act ourselves
@@ -2500,8 +2507,12 @@ QString FakeVimHandler::Private::text(const Range &range) const
}
if (range.rangemode == RangeLineMode) {
QTextCursor tc = m_tc;
tc.setPosition(firstPositionInLine(lineForPosition(range.beginPos)), MoveAnchor);
tc.setPosition(firstPositionInLine(lineForPosition(range.endPos)+1), KeepAnchor);
int firstPos = firstPositionInLine(lineForPosition(range.beginPos));
int lastLine = lineForPosition(range.endPos);
int lastPos = lastLine == m_tc.document()->lastBlock().blockNumber() + 1
? lastPositionInDocument() : firstPositionInLine(lastLine + 1);
tc.setPosition(firstPos, MoveAnchor);
tc.setPosition(lastPos, KeepAnchor);
return tc.selection().toPlainText();
}
// FIXME: Performance?
@@ -2591,7 +2602,7 @@ void FakeVimHandler::Private::removeText(const Range &range)
beginEditBlock();
for (int i = beginLine; i <= endLine && block.isValid(); ++i) {
int bCol = qMin(beginColumn, block.length() - 1);
int eCol = qMin(endColumn, block.length() - 1);
int eCol = qMin(endColumn + 1, block.length() - 1);
tc.setPosition(block.position() + bCol, MoveAnchor);
tc.setPosition(block.position() + eCol, KeepAnchor);
fixMarks(block.position() + bCol, tc.selectionStart() - tc.selectionEnd());
@@ -2635,7 +2646,8 @@ void FakeVimHandler::Private::pasteText(bool afterCursor)
case RangeBlockMode: {
beginEditBlock();
QTextBlock block = m_tc.block();
moveRight();
if (afterCursor)
moveRight();
QTextCursor tc = m_tc;
const int col = tc.position() - block.position();
//for (int i = lines.size(); --i >= 0; ) {
@@ -2644,10 +2656,10 @@ void FakeVimHandler::Private::pasteText(bool afterCursor)
tc.movePosition(StartOfLine, MoveAnchor);
if (col >= block.length()) {
tc.movePosition(EndOfLine, MoveAnchor);
fixMarks(position(), QString(col - line.size() + 1, QChar(' ')).length());
fixMarks(position(), col - line.size() + 1);
tc.insertText(QString(col - line.size() + 1, QChar(' ')));
} else {
tc.movePosition(Right, MoveAnchor, col);
tc.movePosition(Right, MoveAnchor, col - 1 + afterCursor);
}
qDebug() << "INSERT " << line << " AT " << tc.position()
<< "COL: " << col;
@@ -2656,12 +2668,13 @@ void FakeVimHandler::Private::pasteText(bool afterCursor)
tc.movePosition(StartOfLine, MoveAnchor);
tc.movePosition(Down, MoveAnchor, 1);
if (tc.position() >= lastPositionInDocument() - 1) {
fixMarks(position(), QString(QChar('\n')).length());
fixMarks(position(), 1);
tc.insertText(QString(QChar('\n')));
tc.movePosition(Up, MoveAnchor, 1);
}
block = block.next();
}
moveLeft();
endEditBlock();
break;
}
@@ -2727,6 +2740,7 @@ QWidget *FakeVimHandler::Private::editor() const
void FakeVimHandler::Private::undo()
{
//qDebug() << " CURSOR POS: " << m_undoCursorPosition;
int current = m_tc.document()->availableUndoSteps();
//endEditBlock();
EDITOR(undo());

View File

@@ -109,7 +109,7 @@ int SearchResultTreeItemDelegate::drawLineNumber(QPainter *painter, const QStyle
painter->setPen(isSelected ?
option.palette.color(cg, QPalette::HighlightedText) : Qt::darkGray);
painter->drawText(lineNumberAreaRect.adjusted(0, 0, -lineNumberAreaHorizontalPadding, 0),
Qt::AlignRight, QString::number(lineNumber));
Qt::AlignRight | Qt::AlignVCenter, QString::number(lineNumber));
return lineNumberAreaWidth;
}

View File

@@ -33,6 +33,7 @@
#include <QtGui/QApplication>
#include <QtGui/QFont>
#include <QtGui/QFontMetrics>
#include <QtGui/QColor>
#include <QtGui/QPalette>
#include <QtCore/QDir>
@@ -45,7 +46,7 @@ SearchResultTreeModel::SearchResultTreeModel(QObject *parent)
, m_lastAppendedResultFile(0)
, m_showReplaceUI(false)
{
m_rootItem = new SearchResultTreeItem();
m_rootItem = new SearchResultTreeItem;
m_textEditorFont = QFont("Courier");
}
@@ -61,7 +62,9 @@ void SearchResultTreeModel::setShowReplaceUI(bool show)
void SearchResultTreeModel::setTextEditorFont(const QFont &font)
{
layoutAboutToBeChanged();
m_textEditorFont = font;
layoutChanged();
}
Qt::ItemFlags SearchResultTreeModel::flags(const QModelIndex &index) const
@@ -143,7 +146,13 @@ QVariant SearchResultTreeModel::data(const QModelIndex &index, int role) const
QVariant result;
if (item->itemType() == SearchResultTreeItem::ResultRow)
if (role == Qt::SizeHintRole)
{
const int appFontHeight = QApplication::fontMetrics().height();
const int editorFontHeight = QFontMetrics(m_textEditorFont).height();
result = QSize(0, qMax(appFontHeight, editorFontHeight));
}
else if (item->itemType() == SearchResultTreeItem::ResultRow)
{
const SearchResultTextRow *row = static_cast<const SearchResultTextRow *>(item);
result = data(row, role);
@@ -243,7 +252,7 @@ QVariant SearchResultTreeModel::data(const SearchResultFile *file, int role) con
break;
case ItemDataRoles::FileNameRole:
case Qt::ToolTipRole:
result = file->fileName();
result = QDir::toNativeSeparators(file->fileName());
break;
case ItemDataRoles::ResultLinesCountRole:
result = file->childrenCount();
@@ -270,6 +279,10 @@ QVariant SearchResultTreeModel::headerData(int section, Qt::Orientation orientat
void SearchResultTreeModel::appendResultFile(const QString &fileName)
{
#ifdef Q_OS_WIN
if (fileName.contains(QLatin1Char('\\')))
qWarning("SearchResultTreeModel::appendResultFile: File name with native separators added %s.\n", qPrintable(fileName));
#endif
m_lastAppendedResultFile = new SearchResultFile(fileName, m_rootItem);
if (m_showReplaceUI) {

View File

@@ -34,6 +34,7 @@
#include "gitconstants.h"
#include "gitplugin.h"
#include "gitsubmiteditor.h"
#include "gitversioncontrol.h"
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/coreconstants.h>
@@ -43,6 +44,9 @@
#include <coreplugin/progressmanager/progressmanager.h>
#include <coreplugin/uniqueidmanager.h>
#include <coreplugin/filemanager.h>
#include <coreplugin/filemanager.h>
#include <coreplugin/iversioncontrol.h>
#include <texteditor/itexteditor.h>
#include <utils/qtcassert.h>
#include <vcsbase/vcsbaseeditor.h>
@@ -55,6 +59,7 @@
#include <QtCore/QTime>
#include <QtCore/QFileInfo>
#include <QtCore/QDir>
#include <QtCore/QSignalMapper>
#include <QtGui/QMainWindow> // for msg box parent
#include <QtGui/QMessageBox>
@@ -102,7 +107,8 @@ static QString formatCommand(const QString &binary, const QStringList &args)
GitClient::GitClient(GitPlugin* plugin)
: m_msgWait(tr("Waiting for data...")),
m_plugin(plugin),
m_core(Core::ICore::instance())
m_core(Core::ICore::instance()),
m_repositoryChangedSignalMapper(0)
{
if (QSettings *s = m_core->settings()) {
m_settings.fromSettings(s);
@@ -317,7 +323,8 @@ void GitClient::checkoutBranch(const QString &workingDirectory, const QString &b
{
QStringList arguments(QLatin1String("checkout"));
arguments << branch;
executeGit(workingDirectory, arguments, 0, true);
GitCommand *cmd = executeGit(workingDirectory, arguments, 0, true);
connectRepositoryChanged(workingDirectory, cmd);
}
void GitClient::checkout(const QString &workingDirectory, const QString &fileName)
@@ -341,7 +348,8 @@ void GitClient::hardReset(const QString &workingDirectory, const QString &commit
if (!commit.isEmpty())
arguments << commit;
executeGit(workingDirectory, arguments, 0, true);
GitCommand *cmd = executeGit(workingDirectory, arguments, 0, true);
connectRepositoryChanged(workingDirectory, cmd);
}
void GitClient::addFile(const QString &workingDirectory, const QString &fileName)
@@ -500,18 +508,19 @@ GitCommand *GitClient::createCommand(const QString &workingDirectory,
}
// Execute a single command
void GitClient::executeGit(const QString &workingDirectory,
const QStringList &arguments,
VCSBase::VCSBaseEditor* editor,
bool outputToWindow,
GitCommand::TerminationReportMode tm,
int editorLineNumber)
GitCommand *GitClient::executeGit(const QString &workingDirectory,
const QStringList &arguments,
VCSBase::VCSBaseEditor* editor,
bool outputToWindow,
GitCommand::TerminationReportMode tm,
int editorLineNumber)
{
VCSBase::VCSBaseOutputWindow::instance()->appendCommand(formatCommand(QLatin1String(Constants::GIT_BINARY), arguments));
GitCommand *command = createCommand(workingDirectory, editor, outputToWindow, editorLineNumber);
command->addJob(arguments, m_settings.timeout);
command->setTerminationReportMode(tm);
command->execute();
return command;
}
// Return fixed arguments required to run
@@ -903,6 +912,8 @@ void GitClient::revert(const QStringList &files)
QString errorMessage;
switch (revertI(files, &isDirectory, &errorMessage)) {
case RevertOk:
m_plugin->versionControl()->emitFilesChanged(files);
break;
case RevertCanceled:
break;
case RevertUnchanged: {
@@ -918,7 +929,8 @@ void GitClient::revert(const QStringList &files)
void GitClient::pull(const QString &workingDirectory)
{
executeGit(workingDirectory, QStringList(QLatin1String("pull")), 0, true, GitCommand::ReportStderr);
GitCommand *cmd = executeGit(workingDirectory, QStringList(QLatin1String("pull")), 0, true, GitCommand::ReportStderr);
connectRepositoryChanged(workingDirectory, cmd);
}
void GitClient::push(const QString &workingDirectory)
@@ -952,7 +964,8 @@ void GitClient::stashPop(const QString &workingDirectory)
{
QStringList arguments(QLatin1String("stash"));
arguments << QLatin1String("pop");
executeGit(workingDirectory, arguments, 0, true);
GitCommand *cmd = executeGit(workingDirectory, arguments, 0, true);
connectRepositoryChanged(workingDirectory, cmd);
}
void GitClient::branchList(const QString &workingDirectory)
@@ -1000,3 +1013,16 @@ void GitClient::setSettings(const GitSettings &s)
m_binaryPath = m_settings.gitBinaryPath();
}
}
void GitClient::connectRepositoryChanged(const QString & repository, GitCommand *cmd)
{
// Bind command success termination with repository to changed signal
if (!m_repositoryChangedSignalMapper) {
m_repositoryChangedSignalMapper = new QSignalMapper(this);
connect(m_repositoryChangedSignalMapper, SIGNAL(mapped(QString)),
m_plugin->versionControl(), SIGNAL(repositoryChanged(QString)));
}
m_repositoryChangedSignalMapper->setMapping(cmd, repository);
connect(cmd, SIGNAL(success()), m_repositoryChangedSignalMapper, SLOT(map()),
Qt::QueuedConnection);
}

View File

@@ -33,7 +33,6 @@
#include "gitsettings.h"
#include "gitcommand.h"
#include <coreplugin/iversioncontrol.h>
#include <coreplugin/editormanager/ieditor.h>
#include <QtCore/QString>
@@ -41,6 +40,7 @@
QT_BEGIN_NAMESPACE
class QErrorMessage;
class QSignalMapper;
QT_END_NAMESPACE
namespace Core {
@@ -158,12 +158,12 @@ private:
bool outputToWindow = false,
int editorLineNumber = -1);
void executeGit(const QString &workingDirectory,
const QStringList &arguments,
VCSBase::VCSBaseEditor* editor = 0,
bool outputToWindow = false,
GitCommand::TerminationReportMode tm = GitCommand::NoReport,
int editorLineNumber = -1);
GitCommand *executeGit(const QString &workingDirectory,
const QStringList &arguments,
VCSBase::VCSBaseEditor* editor = 0,
bool outputToWindow = false,
GitCommand::TerminationReportMode tm = GitCommand::NoReport,
int editorLineNumber = -1);
bool synchronousGit(const QString &workingDirectory,
const QStringList &arguments,
@@ -173,12 +173,14 @@ private:
enum RevertResult { RevertOk, RevertUnchanged, RevertCanceled, RevertFailed };
RevertResult revertI(QStringList files, bool *isDirectory, QString *errorMessage);
void connectRepositoryChanged(const QString & repository, GitCommand *cmd);
const QString m_msgWait;
GitPlugin *m_plugin;
Core::ICore *m_core;
GitSettings m_settings;
QString m_binaryPath;
QSignalMapper *m_repositoryChangedSignalMapper;
};

View File

@@ -177,6 +177,8 @@ void GitCommand::run()
emit errorText(error);
emit finished(ok, m_cookie);
if (ok)
emit success();
// As it is used asynchronously, we need to delete ourselves
this->deleteLater();
}

View File

@@ -73,6 +73,7 @@ Q_SIGNALS:
void outputData(const QByteArray&);
void errorText(const QString&);
void finished(bool ok, const QVariant &cookie);
void success();
private:
struct Job {

View File

@@ -142,6 +142,7 @@ GitPlugin::GitPlugin() :
m_stashListAction(0),
m_branchListAction(0),
m_gitClient(0),
m_versionControl(0),
m_changeSelectionDialog(0),
m_submitActionTriggered(false)
{
@@ -215,8 +216,8 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
addAutoReleasedObject(new GitSubmitEditorFactory(&submitParameters));
GitVersionControl *versionControl = new GitVersionControl(m_gitClient);
addAutoReleasedObject(versionControl);
m_versionControl = new GitVersionControl(m_gitClient);
addAutoReleasedObject(m_versionControl);
addAutoReleasedObject(new CloneWizard);
addAutoReleasedObject(new Gitorious::Internal::GitoriousCloneWizard);
@@ -232,8 +233,8 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
gitContainer->menu()->setTitle(tr("&Git"));
toolsContainer->addMenu(gitContainer);
if (QAction *ma = gitContainer->menu()->menuAction()) {
ma->setEnabled(versionControl->isEnabled());
connect(versionControl, SIGNAL(enabledChanged(bool)), ma, SLOT(setVisible(bool)));
ma->setEnabled(m_versionControl->isEnabled());
connect(m_versionControl, SIGNAL(enabledChanged(bool)), ma, SLOT(setVisible(bool)));
}
Core::Command *command;
@@ -398,6 +399,11 @@ void GitPlugin::extensionsInitialized()
{
}
GitVersionControl *GitPlugin::versionControl() const
{
return m_versionControl;
}
void GitPlugin::submitEditorDiff(const QStringList &unstaged, const QStringList &staged)
{
m_gitClient->diff(m_submitRepository, QStringList(), unstaged, staged);
@@ -753,6 +759,7 @@ void GitPlugin::updateActions()
m_statusProjectAction->setEnabled(false);
m_logProjectAction->setParameter(repository);
m_logProjectAction->setEnabled(false);
m_undoProjectAction->setEnabled(false);
return;
}
@@ -772,6 +779,7 @@ void GitPlugin::updateActions()
m_statusProjectAction->setParameter(project);
m_logProjectAction->setEnabled(enabled);
m_logProjectAction->setParameter(project);
m_undoProjectAction->setEnabled(enabled);
}
void GitPlugin::showCommit()

View File

@@ -59,6 +59,7 @@ namespace Git {
namespace Internal {
class GitPlugin;
class GitVersionControl;
class GitClient;
class ChangeSelectionDialog;
class GitSubmitEditor;
@@ -96,6 +97,7 @@ public:
void setSettings(const GitSettings &s);
GitClient *gitClient() const;
GitVersionControl *versionControl() const;
public slots:
void updateActions();
@@ -159,6 +161,7 @@ private:
QAction *m_branchListAction;
GitClient *m_gitClient;
GitVersionControl *m_versionControl;
ChangeSelectionDialog *m_changeSelectionDialog;
QString m_submitRepository;
QStringList m_submitOrigCommitFiles;

View File

@@ -96,5 +96,10 @@ QString GitVersionControl::findTopLevelForDirectory(const QString &directory) co
return GitClient::findRepositoryForDirectory(directory);
}
void GitVersionControl::emitFilesChanged(const QStringList &l)
{
emit filesChanged(l);
}
} // Internal
} // Git

View File

@@ -57,6 +57,8 @@ public:
virtual bool vcsAdd(const QString &fileName);
virtual bool vcsDelete(const QString &filename);
void emitFilesChanged(const QStringList &);
signals:
void enabledChanged(bool);

View File

@@ -454,6 +454,8 @@ void PerforcePlugin::revertCurrentFile()
Core::FileChangeBlocker fcb(fileName);
fcb.setModifiedReload(true);
PerforceResponse result2 = runP4Cmd(QStringList() << QLatin1String("revert") << fileName, QStringList(), CommandToWindow|StdOutToWindow|StdErrToWindow|ErrorToWindow);
if (!result2.error)
m_versionControl->emitFilesChanged(QStringList(fileName));
}
void PerforcePlugin::diffCurrentFile()
@@ -514,7 +516,10 @@ void PerforcePlugin::updateCheckout(const QStringList &dirs)
{
QStringList args(QLatin1String("sync"));
args.append(dirs);
runP4Cmd(args, QStringList(), CommandToWindow|StdOutToWindow|StdErrToWindow|ErrorToWindow);
const PerforceResponse resp = runP4Cmd(args, QStringList(), CommandToWindow|StdOutToWindow|StdErrToWindow|ErrorToWindow);
if (!dirs.empty())
foreach(const QString &dir, dirs)
m_versionControl->emitRepositoryChanged(dir);
}
void PerforcePlugin::printOpenedFileList()

View File

@@ -94,5 +94,15 @@ QString PerforceVersionControl::findTopLevelForDirectory(const QString &director
return m_plugin->findTopLevelForDirectory(directory);
}
void PerforceVersionControl::emitRepositoryChanged(const QString &s)
{
emit repositoryChanged(s);
}
void PerforceVersionControl::emitFilesChanged(const QStringList &l)
{
emit filesChanged(l);
}
} // Internal
} // Perforce

View File

@@ -56,6 +56,9 @@ public:
virtual bool vcsAdd(const QString &fileName);
virtual bool vcsDelete(const QString &filename);
void emitRepositoryChanged(const QString &s);
void emitFilesChanged(const QStringList &l);
signals:
void enabledChanged(bool);

View File

@@ -61,7 +61,8 @@ bool RunConfiguration::isEnabled() const
{
if (!m_project)
return false;
if (!m_project->activeBuildConfiguration())
if (m_project->hasBuildSettings()
&& !m_project->activeBuildConfiguration())
return false;
return isEnabled(m_project->activeBuildConfiguration());
}

View File

@@ -762,7 +762,7 @@ TextEditor::BaseTextEditor::Link ScriptEditor::findLinkAt(const QTextCursor &cur
void ScriptEditor::contextMenuEvent(QContextMenuEvent *e)
{
QMenu *menu = createStandardContextMenu();
QMenu *menu = new QMenu();
if (Core::ActionContainer *mcontext = Core::ICore::instance()->actionManager()->actionContainer(QmlEditor::Constants::M_CONTEXT)) {
QMenu *contextMenu = mcontext->menu();
@@ -778,6 +778,8 @@ void ScriptEditor::contextMenuEvent(QContextMenuEvent *e)
connect(a, SIGNAL(triggered()), this, SLOT(renameIdUnderCursor()));
}
appendStandardContextMenuActions(menu);
menu->exec(e->globalPos());
menu->deleteLater();
}

View File

@@ -114,6 +114,13 @@ bool QmlEditorPlugin::initialize(const QStringList & /*arguments*/, QString *err
| TextEditor::TextEditorActionHandler::UnCollapseAll);
m_actionHandler->initializeActions();
Core::ActionManager *am = core->actionManager();
Core::ActionContainer *contextMenu= am->createMenu(QmlEditor::Constants::M_CONTEXT);
Core::Command *cmd = am->command(TextEditor::Constants::AUTO_INDENT_SELECTION);
contextMenu->addAction(cmd);
cmd = am->command(TextEditor::Constants::UN_COMMENT_SELECTION);
contextMenu->addAction(cmd);
m_completion = new QmlCodeCompletion(m_modelManager);
addAutoReleasedObject(m_completion);

View File

@@ -51,6 +51,17 @@ ToolChain::ToolChainType GCCEToolChain::type() const
return ToolChain::GCCE;
}
QByteArray GCCEToolChain::predefinedMacros()
{
if (m_predefinedMacros.isEmpty()) {
ProjectExplorer::GccToolChain::predefinedMacros();
m_predefinedMacros += "\n"
"#define __GCCE__\n"
"#define __SYMBIAN32__\n";
}
return m_predefinedMacros;
}
QList<HeaderPath> GCCEToolChain::systemHeaderPaths()
{
if (m_systemHeaderPaths.isEmpty()) {

View File

@@ -41,6 +41,7 @@ class GCCEToolChain : public ProjectExplorer::GccToolChain
{
public:
GCCEToolChain(S60Devices::Device device, const QString &gcceCommand);
QByteArray predefinedMacros();
QList<ProjectExplorer::HeaderPath> systemHeaderPaths();
void addToEnvironment(ProjectExplorer::Environment &env);
ProjectExplorer::ToolChain::ToolChainType type() const;

View File

@@ -77,7 +77,7 @@ QByteArray RVCTToolChain::predefinedMacros()
{
// see http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0205f/Babbacdb.html
updateVersion();
QByteArray ba = QString::fromLocal8Bit(
QByteArray ba = QString::fromLatin1(
"#define __arm__arm__\n"
"#define __ARMCC_VERSION %1%2%3%4\n"
"#define __ARRAY_OPERATORS\n"
@@ -93,10 +93,11 @@ QByteArray RVCTToolChain::predefinedMacros()
"#define __TARGET_FEATURE_HALFWORD\n"
"#define __TARGET_FEATURE_THUMB\n"
"#define _WCHAR_T\n"
"#define __SYMBIAN32__\n"
).arg(m_major, 1, 10, QLatin1Char('0'))
.arg(m_minor, 1, 10, QLatin1Char('0'))
.arg("0")
.arg(m_build, 3, 10, QLatin1Char('0')).toLocal8Bit();
.arg(m_build, 3, 10, QLatin1Char('0')).toLatin1();
return ba;
}

View File

@@ -29,6 +29,8 @@
#include "winscwtoolchain.h"
#include <QtCore/QByteArray>
#include <QtCore/QString>
#include <QtDebug>
using namespace ProjectExplorer;
@@ -50,8 +52,7 @@ ToolChain::ToolChainType WINSCWToolChain::type() const
QByteArray WINSCWToolChain::predefinedMacros()
{
// TODO
return m_predefinedMacros;
return QByteArray("#define __SYMBIAN32__\n");
}
QList<HeaderPath> WINSCWToolChain::systemHeaderPaths()
@@ -67,10 +68,8 @@ QList<HeaderPath> WINSCWToolChain::systemHeaderPaths()
QStringList WINSCWToolChain::systemIncludes() const
{
if (m_carbidePath.isEmpty()) {
qDebug() << "no carbide path set";
ProjectExplorer::Environment env = ProjectExplorer::Environment::systemEnvironment();
QString symIncludesValue = env.value("MWCSYM2INCLUDES");
qDebug() << "includes:" << symIncludesValue.split(";");
if (!symIncludesValue.isEmpty())
return symIncludesValue.split(";");
} else {

View File

@@ -57,7 +57,6 @@ private:
QString m_deviceId;
QString m_deviceName;
QString m_deviceRoot;
QByteArray m_predefinedMacros;
QList<ProjectExplorer::HeaderPath> m_systemHeaderPaths;
};

View File

@@ -110,6 +110,8 @@ bool Qt4RunConfiguration::isEnabled(ProjectExplorer::BuildConfiguration *configu
if (type == ProjectExplorer::ToolChain::GCC_MAEMO)
return false;
#endif
#else
Q_UNUSED(configuration);
#endif
return true;
}

View File

@@ -399,7 +399,9 @@ void QtOptionsPageWidget::updateState()
m_ui->qmakePath->setEnabled(enabled && !isAutodetected);
m_ui->mingwPath->setEnabled(enabled);
m_ui->mwcPath->setEnabled(enabled);
m_ui->s60SDKPath->setEnabled(enabled && !isAutodetected);
bool s60SDKPathEnabled = enabled &&
(isAutodetected ? version->s60SDKDirectory().isEmpty() : true);
m_ui->s60SDKPath->setEnabled(s60SDKPathEnabled);
m_ui->gccePath->setEnabled(enabled);
const bool hasLog = enabled && !m_ui->qtdirList->currentItem()->data(2, Qt::UserRole).toString().isEmpty();

View File

@@ -128,11 +128,9 @@ QtVersionManager::QtVersionManager()
autodetectionSource);
version->setMingwDirectory(s->value("MingwDirectory").toString());
version->setMsvcVersion(s->value("msvcVersion").toString());
#ifdef QTCREATOR_WITH_S60
version->setMwcDirectory(s->value("MwcDirectory").toString());
version->setS60SDKDirectory(s->value("S60SDKDirectory").toString());
version->setGcceDirectory(s->value("GcceDirectory").toString());
#endif
m_versions.append(version);
}
s->endArray();
@@ -266,11 +264,9 @@ void QtVersionManager::writeVersionsIntoSettings()
s->setValue("isAutodetected", version->isAutodetected());
if (version->isAutodetected())
s->setValue("autodetectionSource", version->autodetectionSource());
#ifdef QTCREATOR_WITH_S60
s->setValue("MwcDirectory", version->mwcDirectory());
s->setValue("S60SDKDirectory", version->s60SDKDirectory());
s->setValue("GcceDirectory", version->gcceDirectory());
#endif
}
s->endArray();
}
@@ -1219,7 +1215,6 @@ void QtVersion::updateToolChainAndMkspec() const
m_toolChainUpToDate = true;
}
#ifdef QTCREATOR_WITH_S60
QString QtVersion::mwcDirectory() const
{
return m_mwcDirectory;
@@ -1248,7 +1243,6 @@ void QtVersion::setGcceDirectory(const QString &directory)
{
m_gcceDirectory = directory;
}
#endif
QString QtVersion::mingwDirectory() const
{

View File

@@ -92,14 +92,13 @@ public:
// Returns the PREFIX, BINPREFIX, DOCPREFIX and similar information
QHash<QString,QString> versionInfo() const;
#ifdef QTCREATOR_WITH_S60
QString mwcDirectory() const;
void setMwcDirectory(const QString &directory);
QString s60SDKDirectory() const;
void setS60SDKDirectory(const QString &directory);
QString gcceDirectory() const;
void setGcceDirectory(const QString &directory);
#endif
QString mingwDirectory() const;
void setMingwDirectory(const QString &directory);
QString msvcVersion() const;
@@ -153,11 +152,10 @@ private:
bool m_isAutodetected;
QString m_autodetectionSource;
bool m_hasDebuggingHelper;
#ifdef QTCREATOR_WITH_S60
QString m_mwcDirectory;
QString m_s60SDKDirectory;
QString m_gcceDirectory;
#endif
mutable bool m_toolChainUpToDate;
mutable QString m_mkspec; // updated lazily

View File

@@ -28,6 +28,7 @@
**************************************************************************/
#include "qtprojectparameters.h"
#include <utils/codegeneration.h>
#include <QtCore/QTextStream>
#include <QtCore/QDir>
@@ -108,7 +109,7 @@ QString createMacro(const QString &name, const QString &suffix)
if (extensionPosition != -1)
rc.truncate(extensionPosition);
rc += suffix;
return rc;
return Utils::fileNameToCppIdentifier(rc);
}
QString QtProjectParameters::exportMacro(const QString &projectName)

View File

@@ -40,6 +40,7 @@
#include "parser/javascriptast_p.h"
#include <indenter.h>
#include <utils/uncommentselection.h>
#include <coreplugin/icore.h>
#include <coreplugin/actionmanager/actionmanager.h>
@@ -395,7 +396,7 @@ void ScriptEditor::createToolBar(ScriptEditorEditable *editable)
void ScriptEditor::contextMenuEvent(QContextMenuEvent *e)
{
QMenu *menu = createStandardContextMenu();
QMenu *menu = new QMenu();
if (Core::ActionContainer *mcontext = Core::ICore::instance()->actionManager()->actionContainer(QtScriptEditor::Constants::M_CONTEXT)) {
QMenu *contextMenu = mcontext->menu();
@@ -403,9 +404,15 @@ void ScriptEditor::contextMenuEvent(QContextMenuEvent *e)
menu->addAction(action);
}
appendStandardContextMenuActions(menu);
menu->exec(e->globalPos());
delete menu;
}
void ScriptEditor::unCommentSelection()
{
Utils::unCommentSelection(this);
}
} // namespace Internal
} // namespace QtScriptEditor

View File

@@ -95,6 +95,8 @@ public:
QList<Declaration> declarations() const;
QStringList words() const;
void unCommentSelection(); // from basetexteditor
public slots:
virtual void setFontSettings(const TextEditor::FontSettings &);

View File

@@ -13,14 +13,12 @@ HEADERS += qtscripteditor.h \
qtscripteditorfactory.h \
qtscripteditorplugin.h \
qtscripthighlighter.h \
qtscripteditoractionhandler.h \
qtscriptcodecompletion.h
SOURCES += qtscripteditor.cpp \
qtscripteditorfactory.cpp \
qtscripteditorplugin.cpp \
qtscripthighlighter.cpp \
qtscripteditoractionhandler.cpp \
qtscriptcodecompletion.cpp
RESOURCES += qtscripteditor.qrc

View File

@@ -1,100 +0,0 @@
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (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 http://qt.nokia.com/contact.
**
**************************************************************************/
#include "qtscripteditoractionhandler.h"
#include "qtscripteditorconstants.h"
#include "qtscripteditor.h"
#include <coreplugin/icore.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/scriptmanager/scriptmanager.h>
#include <QtCore/QDebug>
#include <QtGui/QAction>
#include <QtGui/QMainWindow>
#include <QtGui/QMessageBox>
static QAction *actionFromId(const QString &id)
{
Core::Command *cmd = Core::ICore::instance()->actionManager()->command(id);
if (!cmd)
return 0;
return cmd->action();
}
namespace QtScriptEditor {
namespace Internal {
QtScriptEditorActionHandler::QtScriptEditorActionHandler()
: TextEditor::TextEditorActionHandler(QLatin1String(QtScriptEditor::Constants::C_QTSCRIPTEDITOR),
Format),
m_runAction(0)
{
}
void QtScriptEditorActionHandler::createActions()
{
TextEditor::TextEditorActionHandler::createActions();
m_runAction = actionFromId(QLatin1String(QtScriptEditor::Constants::RUN));
connect(m_runAction, SIGNAL(triggered()), this, SLOT(run()));
}
void QtScriptEditorActionHandler::run()
{
typedef Core::ScriptManager::Stack Stack;
if (!currentEditor())
return;
const QString script = currentEditor()->toPlainText();
// run
Stack errorStack;
QString errorMessage;
if (Core::ICore::instance()->scriptManager()->runScript(script, &errorMessage, &errorStack))
return;
// try to find a suitable error line in the stack
// ignoring 0 and other files (todo: open other files?)
int errorLineNumber = 0;
if (const int numFrames = errorStack.size()) {
for (int f = 0; f < numFrames; f++) {
if (errorStack[f].lineNumber && errorStack[f].fileName.isEmpty()) {
errorLineNumber = errorStack[f].lineNumber;
break;
}
}
}
if (errorLineNumber)
currentEditor()->gotoLine(errorLineNumber);
QMessageBox::critical(Core::ICore::instance()->mainWindow(), tr("Qt Script Error"), errorMessage);
}
} // namespace Internal
} // namespace QtScriptEditor

View File

@@ -1,58 +0,0 @@
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (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 http://qt.nokia.com/contact.
**
**************************************************************************/
#ifndef QTSCRIPTDITORACTIONHANDLER_H
#define QTSCRIPTDITORACTIONHANDLER_H
#include <texteditor/texteditoractionhandler.h>
namespace QtScriptEditor {
namespace Internal {
class QtScriptEditorActionHandler : public TextEditor::TextEditorActionHandler
{
Q_OBJECT
public:
QtScriptEditorActionHandler();
private:
virtual void createActions();
private slots:
void run();
private:
QAction *m_runAction;
};
} // namespace Internal
} // namespace QtScriptEditor
#endif // QTSCRIPTDITORACTIONHANDLER_H

View File

@@ -34,8 +34,6 @@ namespace QtScriptEditor {
namespace Constants {
const char * const M_CONTEXT = "Qt Script Editor.ContextMenu";
const char * const RUN = "QtScriptEditor.Run";
const char * const RUN_SEP = "QtScriptEditor.Run.Separator";
const char * const C_QTSCRIPTEDITOR = "Qt Script Editor";
const char * const C_QTSCRIPTEDITOR_MIMETYPE = "application/javascript";

View File

@@ -29,11 +29,14 @@
#include "qtscripteditorfactory.h"
#include "qtscripteditor.h"
#include "qtscripteditoractionhandler.h"
#include "qtscripteditorconstants.h"
#include "qtscripteditorplugin.h"
#include <coreplugin/icore.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <texteditor/texteditorconstants.h>
#include <QtCore/QFileInfo>
#include <QtCore/QDebug>
@@ -45,14 +48,12 @@ QtScriptEditorFactory::QtScriptEditorFactory(const Context &context, QObject *pa
: Core::IEditorFactory(parent),
m_kind(QLatin1String(C_QTSCRIPTEDITOR)),
m_mimeTypes(QLatin1String(QtScriptEditor::Constants::C_QTSCRIPTEDITOR_MIMETYPE)),
m_context(context),
m_actionHandler(new QtScriptEditorActionHandler)
m_context(context)
{
}
QtScriptEditorFactory::~QtScriptEditorFactory()
{
delete m_actionHandler;
}
QString QtScriptEditorFactory::kind() const

View File

@@ -63,8 +63,6 @@ private:
const QString m_kind;
const QStringList m_mimeTypes;
const Context m_context;
TextEditor::TextEditorActionHandler *m_actionHandler;
};
} // namespace Internal

View File

@@ -88,6 +88,11 @@ bool QtScriptEditorPlugin::initialize(const QStringList & /*arguments*/, QString
m_context = m_scriptcontext;
m_context << core->uniqueIDManager()->uniqueIdentifier(TextEditor::Constants::C_TEXTEDITOR);
m_actionHandler = new TextEditor::TextEditorActionHandler(QtScriptEditor::Constants::C_QTSCRIPTEDITOR,
TextEditor::TextEditorActionHandler::Format
| TextEditor::TextEditorActionHandler::UnCommentSelection
| TextEditor::TextEditorActionHandler::UnCollapseAll);
registerActions();
m_editor = new QtScriptEditorFactory(m_context, this);
@@ -104,10 +109,6 @@ bool QtScriptEditorPlugin::initialize(const QStringList & /*arguments*/, QString
wizardParameters, this);
addObject(m_wizard);
m_actionHandler = new TextEditor::TextEditorActionHandler(QtScriptEditor::Constants::C_QTSCRIPTEDITOR,
TextEditor::TextEditorActionHandler::Format
| TextEditor::TextEditorActionHandler::UnCommentSelection
| TextEditor::TextEditorActionHandler::UnCollapseAll);
m_completion = new QtScriptCodeCompletion();
addAutoReleasedObject(m_completion);
@@ -145,18 +146,13 @@ void QtScriptEditorPlugin::initializeEditor(QtScriptEditor::Internal::ScriptEdit
void QtScriptEditorPlugin::registerActions()
{
Core::ActionManager *am = Core::ICore::instance()->actionManager();
Core::ActionContainer *mcontext = am->createMenu(QtScriptEditor::Constants::M_CONTEXT);
QAction *action = new QAction(this);
action->setSeparator(true);
Core::Command *cmd = am->registerAction(action, QtScriptEditor::Constants::RUN_SEP, m_scriptcontext);
mcontext->addAction(cmd, Core::Constants::G_DEFAULT_THREE);
action = new QAction(tr("Run"), this);
cmd = am->registerAction(action, QtScriptEditor::Constants::RUN, m_scriptcontext);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+R")));
mcontext->addAction(cmd, Core::Constants::G_DEFAULT_THREE);
m_actionHandler->initializeActions();
Core::ActionManager *am = Core::ICore::instance()->actionManager();
Core::ActionContainer *contextMenu= am->createMenu(QtScriptEditor::Constants::M_CONTEXT);
Core::Command *cmd = am->command(TextEditor::Constants::AUTO_INDENT_SELECTION);
contextMenu->addAction(cmd);
cmd = am->command(TextEditor::Constants::UN_COMMENT_SELECTION);
contextMenu->addAction(cmd);
}
Q_EXPORT_PLUGIN(QtScriptEditorPlugin)

View File

@@ -96,3 +96,13 @@ QString SubversionControl::findTopLevelForDirectory(const QString &directory) co
{
return m_plugin->findTopLevelForDirectory(directory);
}
void SubversionControl::emitRepositoryChanged(const QString &s)
{
emit repositoryChanged(s);
}
void SubversionControl::emitFilesChanged(const QStringList &l)
{
emit filesChanged(l);
}

View File

@@ -56,6 +56,9 @@ public:
virtual bool vcsAdd(const QString &fileName);
virtual bool vcsDelete(const QString &filename);
void emitRepositoryChanged(const QString &);
void emitFilesChanged(const QStringList &);
signals:
void enabledChanged(bool);

View File

@@ -574,6 +574,7 @@ void SubversionPlugin::revertCurrentFile()
const SubversionResponse revertResponse = runSvn(args, subversionShortTimeOut, true);
if (!revertResponse.error) {
fcb.setModifiedReload(true);
m_versionControl->emitFilesChanged(QStringList(file));
}
}
@@ -750,7 +751,10 @@ void SubversionPlugin::updateProject()
QStringList args(QLatin1String("update"));
args.push_back(QLatin1String(nonInteractiveOptionC));
args.append(topLevels);
runSvn(args, subversionLongTimeOut, true);
const SubversionResponse response = runSvn(args, subversionLongTimeOut, true);
if (!response.error)
foreach(const QString &repo, topLevels)
m_versionControl->emitRepositoryChanged(repo);
}
void SubversionPlugin::annotateCurrentFile()

View File

@@ -56,6 +56,7 @@ namespace Subversion {
namespace Internal {
class SubversionSubmitEditor;
class SubversionControl;
struct SubversionResponse
{
@@ -131,7 +132,7 @@ private:
const QStringList m_svnDirectories;
SubversionSettings m_settings;
Core::IVersionControl *m_versionControl;
SubversionControl *m_versionControl;
QString m_commitMessageFileName;
ProjectExplorer::ProjectExplorerPlugin *m_projectExplorer;

View File

@@ -2489,8 +2489,6 @@ void BaseTextEditor::extraAreaPaintEvent(QPaintEvent *e)
int markWidth = 0;
if (d->m_marksVisible)
markWidth += fm.lineSpacing();
// if (documentLayout->doubleMarkCount)
// markWidth += fm.lineSpacing() / 3;
const int collapseColumnWidth = d->m_codeFoldingVisible ? collapseBoxWidth(fm): 0;
const int extraAreaWidth = d->m_extraArea->width() - collapseColumnWidth;
@@ -2519,6 +2517,12 @@ void BaseTextEditor::extraAreaPaintEvent(QPaintEvent *e)
nextVisibleBlockNumber = nextVisibleBlock.blockNumber();
}
if (bottom < e->rect().top()) {
block = nextVisibleBlock;
blockNumber = nextVisibleBlockNumber;
continue;
}
painter.setPen(pal.color(QPalette::Dark));
if (d->m_codeFoldingVisible || d->m_marksVisible) {
@@ -3411,6 +3415,16 @@ void BaseTextEditor::reindent(QTextDocument *doc, const QTextCursor &cursor)
const QTextBlock end = doc->findBlock(cursor.selectionEnd()).next();
const TabSettings &ts = d->m_document->tabSettings();
// skip empty blocks
while (block.isValid() && block != end) {
QString bt = block.text();
if (ts.firstNonSpace(bt) < bt.size())
break;
indentBlock(doc, block, QChar::Null);
block = block.next();
}
int previousIndentation = ts.indentationColumn(block.text());
indentBlock(doc, block, QChar::Null);
int currentIndentation = ts.indentationColumn(block.text());
@@ -4654,6 +4668,7 @@ void BaseTextEditor::insertFromMimeData(const QMimeData *source)
}
cursor.beginEditBlock();
cursor.removeSelectedText();
bool insertAtBeginningOfLine = ts.cursorIsAtBeginningOfLine(cursor);
@@ -4664,8 +4679,6 @@ void BaseTextEditor::insertFromMimeData(const QMimeData *source)
return;
}
cursor.removeSelectedText();
int reindentBlockStart = cursor.blockNumber() + (insertAtBeginningOfLine?0:1);
bool hasFinalNewline = (text.endsWith(QLatin1Char('\n'))

View File

@@ -1,28 +1,27 @@
bin/Qt3Supportd4.dll
bin/qmake.exe
bin/QtCore4.dll
bin/QtCored4.dll
bin/QtGuid4.dll
bin/QtHelpd4.dll
bin/QtMultimediad4.dll
bin/QtNetworkd4.dll
bin/QtOpenGLd4.dll
bin/QtScriptd4.dll
bin/QtScriptToolsd4.dll
bin/QtSqld4.dll
bin/QtSvgd4.dll
bin/QtTestd4.dll
bin/QtWebKitd4.dll
bin/QtXmld4.dll
bin/QtXmlPatternsd4.dll
plugins/accessible/qtaccessiblecompatwidgetsd4.dll
plugins/accessible/qtaccessiblewidgetsd4.dll
plugins/codecs/qcncodecsd4.dll
plugins/codecs/qjpcodecsd4.dll
plugins/codecs/qkrcodecsd4.dll
plugins/codecs/qtwcodecsd4.dll
plugins/iconengines/qsvgicond4.dll
plugins/imageformats/qgifd4.dll
plugins/imageformats/qjpegd4.dll
plugins/imageformats/qmngd4.dll
plugins/imageformats/qsvgd4.dll
plugins/imageformats/qtiffd4.dll
plugins/sqldrivers/qsqlited4.dll
%%
mkspecs/default/qmake.conf
demos/shared/libdemo_shared.prl
lib/libQt3Support.prl
lib/libQtAssistantClient.prl
lib/libQtCLucene.prl
lib/libQtCore.prl
lib/libQtDBus.prl
lib/libQtDesignerComponents.prl
lib/libQtDesigner.prl
lib/libQtGui.prl
lib/libQtHelp.prl
lib/libQtMultimedia.prl
lib/libQtNetwork.prl
lib/libQtOpenGL.prl
lib/libQtScript.prl
lib/libQtScriptTools.prl
lib/libQtSql.prl
lib/libQtSvg.prl
lib/libQtTest.prl
lib/libQtUiTools.prl
lib/libQtWebKit.prl
lib/libQtXmlPatterns.prl
lib/libQtXml.prl

View File

@@ -38,7 +38,7 @@
#include <QtCore/QDebug>
#ifdef Q_OS_WIN
# define QT_INSTALL_DIR "C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_create_more/Troll/4.5.0/qt";
# define QT_INSTALL_DIR "C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_create_more/Troll/4.6/qt";
const char * const oldInstallBase = QT_INSTALL_DIR;
const char * const oldSourceBase = QT_INSTALL_DIR;
@@ -170,6 +170,7 @@ bool patchDebugLibrariesWithQtPath(const char *baseQtPath)
{ "/bin/QtGuid4.dll" },
{ "/bin/QtHelpd4.dll" },
{ "/bin/QtNetworkd4.dll" },
{ "/bin/QtNetworkd4.dll" },
{ "/bin/QtOpenGLd4.dll" },
{ "/bin/QtScriptd4.dll" },
{ "/bin/QtScriptToolsd4.dll" },
@@ -179,20 +180,6 @@ bool patchDebugLibrariesWithQtPath(const char *baseQtPath)
{ "/bin/QtWebKitd4.dll" },
{ "/bin/QtXmld4.dll" },
{ "/bin/QtXmlPatternsd4.dll" },
{ "/lib/Qt3Supportd4.dll" },
{ "/lib/QtCored4.dll" },
{ "/lib/QtGuid4.dll" },
{ "/lib/QtHelpd4.dll" },
{ "/lib/QtNetworkd4.dll" },
{ "/lib/QtOpenGLd4.dll" },
{ "/lib/QtScriptd4.dll" },
{ "/lib/QtScriptToolsd4.dll" },
{ "/lib/QtSqld4.dll" },
{ "/lib/QtSvgd4.dll" },
{ "/lib/QtTestd4.dll" },
{ "/lib/QtWebKitd4.dll" },
{ "/lib/QtXmld4.dll" },
{ "/lib/QtXmlPatternsd4.dll" },
{ "/plugins/accessible/qtaccessiblecompatwidgetsd4.dll" },
{ "/plugins/accessible/qtaccessiblewidgetsd4.dll" },
{ "/plugins/codecs/qcncodecsd4.dll" },
@@ -445,26 +432,27 @@ bool patchDebugLibrariesWithQtPath(const char *baseQtPath)
{ "/examples/xmlpatterns/filetree/filetree" },
{ "/examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel" },
{ "/examples/xmlpatterns/recipes/recipes" },
{ "/lib/libQt3Support.so.4.5.0" },
{ "/lib/libQtAssistantClient.so.4.5.0" },
{ "/lib/libQtCLucene.so.4.5.0" },
{ "/lib/libQtCore.so.4.5.0" },
{ "/lib/libQtDBus.so.4.5.0" },
{ "/lib/libQtDesigner.so.4.5.0" },
{ "/lib/libQtDesignerComponents.so.4.5.0" },
{ "/lib/libQtGui.so.4.5.0" },
{ "/lib/libQtHelp.so.4.5.0" },
{ "/lib/libQtNetwork.so.4.5.0" },
{ "/lib/libQtOpenGL.so.4.5.0" },
{ "/lib/libQtScript.so.4.5.0" },
{ "/lib/libQtScriptTools.so.4.5.0" },
{ "/lib/libQtSql.so.4.5.0" },
{ "/lib/libQtSvg.so.4.5.0" },
{ "/lib/libQtTest.so.4.5.0" },
{ "/lib/libQt3Support.so" },
{ "/lib/libQtAssistantClient.so" },
{ "/lib/libQtCLucene.so" },
{ "/lib/libQtCore.so" },
{ "/lib/libQtDBus.so" },
{ "/lib/libQtDesigner.so" },
{ "/lib/libQtDesignerComponents.so" },
{ "/lib/libQtGui.so" },
{ "/lib/libQtHelp.so" },
{ "/lib/libQtMultimedia.so" },
{ "/lib/libQtNetwork.so" },
{ "/lib/libQtOpenGL.so" },
{ "/lib/libQtScript.so" },
{ "/lib/libQtScriptTools.so" },
{ "/lib/libQtSql.so" },
{ "/lib/libQtSvg.so" },
{ "/lib/libQtTest.so" },
{ "/lib/libQtUiTools.a" },
{ "/lib/libQtWebKit.so.4.5.0" },
{ "/lib/libQtXml.so.4.5.0" },
{ "/lib/libQtXmlPatterns.so.4.5.0" },
{ "/lib/libQtWebKit.so" },
{ "/lib/libQtXml.so" },
{ "/lib/libQtXmlPatterns.so" },
{ "/plugins/accessible/libqtaccessiblecompatwidgets.so" },
{ "/plugins/accessible/libqtaccessiblewidgets.so" },
{ "/plugins/codecs/libqcncodecs.so" },
@@ -572,6 +560,7 @@ const char * const textFileFileNames[] =
"/lib/libQtDesigner.prl",
"/lib/libQtGui.prl",
"/lib/libQtHelp.prl",
"/lib/libQtMultimedia.prl",
"/lib/libQtNetwork.prl",
"/lib/libQtOpenGL.prl",
"/lib/libQtScript.prl",