Merge commit 'origin/master'

This commit is contained in:
dt
2009-05-18 12:23:27 +02:00
35 changed files with 2796 additions and 3532 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -2301,6 +2301,11 @@ p {
</context> </context>
<context> <context>
<name>CppFileSettingsPage</name> <name>CppFileSettingsPage</name>
<message>
<location filename="../../../src/plugins/cpptools/cpptoolsconstants.h" line="+52"/>
<source>File naming conventions</source>
<translation>Convenzioni sul nome dei file</translation>
</message>
<message> <message>
<location filename="../../../src/plugins/cpptools/cppfilesettingspage.ui"/> <location filename="../../../src/plugins/cpptools/cppfilesettingspage.ui"/>
<source>Header suffix:</source> <source>Header suffix:</source>
@@ -4053,6 +4058,11 @@ L&apos;utilizzo di gdb 6.7 o successivi è fortemente consigliato.</translation>
</context> </context>
<context> <context>
<name>DebuggingHelperOptionPage</name> <name>DebuggingHelperOptionPage</name>
<message>
<location filename="../../../src/plugins/debugger/debuggerplugin.cpp" line="-596"/>
<source>Debugging Helper</source>
<translation>Helper del Debug</translation>
</message>
<message> <message>
<location filename="../../../src/plugins/debugger/dumperoptionpage.ui"/> <location filename="../../../src/plugins/debugger/dumperoptionpage.ui"/>
<source>This will enable nice display of Qt and Standard Library objects in the Locals&amp;Watchers view</source> <source>This will enable nice display of Qt and Standard Library objects in the Locals&amp;Watchers view</source>
@@ -4438,8 +4448,8 @@ La ricompilazione del progetto potrebbe aiutare.</translation>
<name>DocSettingsPage</name> <name>DocSettingsPage</name>
<message> <message>
<location filename="../../../src/plugins/help/docsettingspage.ui"/> <location filename="../../../src/plugins/help/docsettingspage.ui"/>
<source>Registered Documentation:</source> <source>Registered Documentation</source>
<translation>Documentazione Registrata:</translation> <translation>Documentazione Registrata</translation>
</message> </message>
<message> <message>
<location/> <location/>
@@ -10218,337 +10228,119 @@ Per eseguire la ricerca, scrivi questo prefisso, uno spazio e poi il termine da
</message> </message>
</context> </context>
<context> <context>
<name>SimpleProEditor</name> <name>QtModulesInfo</name>
<message> <message>
<location filename="../../../src/plugins/qt4projectmanager/speinfo.cpp" line="+59"/>
<source>Debug and Release</source>
<translation>Debug e Release</translation>
</message>
<message>
<location line="+7"/>
<source>Debug specific</source>
<translation>Specifico del Debug</translation>
</message>
<message>
<location line="+7"/>
<source>Release specific</source>
<translation>Specifico del Release</translation>
</message>
<message>
<location line="+9"/>
<source>All platforms</source>
<translation>Tutte le piattaforme</translation>
</message>
<message>
<location line="+7"/>
<source>MS Windows specific</source>
<translation>Specifico di MS Windows</translation>
</message>
<message>
<location line="+7"/>
<source>Linux/Unix specific</source>
<translation>Specifico di Linux/Unix</translation>
</message>
<message>
<location line="+7"/>
<source>Mac OSX specific</source>
<translation>Specifico di Max OSX</translation>
</message>
<message>
<location line="+13"/>
<source>Target Options</source>
<translation>Opzioni Destinazione</translation>
</message>
<message>
<location line="+3"/>
<source>Type and name of the target.</source>
<translation>Tipo e nome della destinazione.</translation>
</message>
<message>
<location line="+13"/>
<source>Preprocessor Definitions</source>
<translation>Definizioni del Preprocessore</translation>
</message>
<message>
<location line="+3"/>
<source>Setting of the preprocessor definitions.</source>
<translation>Impostazione delle definizioni del preprocessore.</translation>
</message>
<message>
<location line="+14"/>
<source>Include path</source>
<translation>Percorso degli Include</translation>
</message>
<message>
<location line="+3"/>
<source>Setting of the pathes where the header files are located.</source>
<translation>Impostazione dei percorsi dove si trovano i file header.</translation>
</message>
<message>
<location line="+13"/>
<source>Libraries</source>
<translation>Librerie</translation>
</message>
<message>
<location line="+3"/>
<source>Defining the libraries to link the target against and the pathes where these are located.</source>
<translation>Definizione delle librerie con cui linkare la destinazione a dei percorsi che le contengono.</translation>
</message>
<message>
<location line="+14"/>
<source>Source Files</source>
<translation>File Sorgenti</translation>
</message>
<message>
<location line="+17"/>
<source>Header Files</source>
<translation>File Header</translation>
</message>
<message>
<location line="+17"/>
<source>Forms</source>
<translation>Form</translation>
</message>
<message>
<location line="+16"/>
<source>Qt Modules</source>
<translation>Moduli Qt</translation>
</message>
<message>
<location line="+3"/>
<source>Setting up which of the Qt modules will be used in the target application.</source>
<translation>Imposta quali moduli Qt saranno usati nell&apos;applicazione di destinazione.</translation>
</message>
<message>
<location line="+14"/>
<source>Resource files</source>
<translation>File delle Risorse</translation>
</message>
<message>
<location line="+12"/>
<source>Target name</source>
<translation>Nome Destinazione</translation>
</message>
<message>
<location line="+3"/>
<source>The name of the resulting target.</source>
<translation>Il nome della destinazione.</translation>
</message>
<message>
<location line="+9"/>
<source>Configuration</source>
<translation>Configurazione</translation>
</message>
<message>
<location line="+3"/>
<source>Configuration.</source>
<translation>Configurazione.</translation>
</message>
<message>
<location line="+9"/>
<source>Destination directory</source>
<translation>Cartella di Destinazione</translation>
</message>
<message>
<location line="+3"/>
<source>Where the resulting target will be created.</source>
<translation>La destinazione sarà creata qui dentro.</translation>
</message>
<message>
<location line="+15"/>
<source>QtCore Module</source> <source>QtCore Module</source>
<translation>Modulo QtCore</translation> <translation>Modulo QtCore</translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>Core non-GUI classes used by other modules</source> <source>Core non-GUI classes used by other modules</source>
<translation>Classi di Core, non-GUI, usate dagli altri moduli</translation> <translation>Classi di Core, non-GUI, usate dagli altri moduli</translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>QtGui Module</source> <source>QtGui Module</source>
<translation>Modulo QtGui</translation> <translation>Modulo QtGui</translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>Graphical user interface components</source> <source>Graphical user interface components</source>
<translation>Componenti dell&apos;interfaccia grafica</translation> <translation>Componenti dell&apos;interfaccia grafica</translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>QtNetwork Module</source> <source>QtNetwork Module</source>
<translation>Modulo QtNetwork</translation> <translation>Modulo QtNetwork</translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>Classes for network programming</source> <source>Classes for network programming</source>
<translation>Classi per la programmazione della rete</translation> <translation>Classi per la programmazione della rete</translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>QtOpenGL Module</source> <source>QtOpenGL Module</source>
<translation>Modulo QtOpenGL</translation> <translation>Modulo QtOpenGL</translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>OpenGL support classes</source> <source>OpenGL support classes</source>
<translation>Classi per il supporto OpenGL</translation> <translation>Classi per il supporto OpenGL</translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>QtSql Module</source> <source>QtSql Module</source>
<translation>Modulo QtSql</translation> <translation>Modulo QtSql</translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>Classes for database integration using SQL</source> <source>Classes for database integration using SQL</source>
<translation>Classi per l&apos;integrazione con database SQL</translation> <translation>Classi per l&apos;integrazione con database SQL</translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>QtScript Module</source> <source>QtScript Module</source>
<translation>Modulo QtScript</translation> <translation>Modulo QtScript</translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>Classes for evaluating Qt Scripts</source> <source>Classes for evaluating Qt Scripts</source>
<translation>Classi per l&apos;esecuzione di Qt Script</translation> <translation>Classi per l&apos;esecuzione di Qt Script</translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>QtSvg Module</source> <source>QtSvg Module</source>
<translation>Modulo QtSvg</translation> <translation>Modulo QtSvg</translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>Classes for displaying the contents of SVG files</source> <source>Classes for displaying the contents of SVG files</source>
<translation>Classi per la visualizzazione del contenuto di file SVG</translation> <translation>Classi per la visualizzazione del contenuto di file SVG</translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>QtWebKit Module</source> <source>QtWebKit Module</source>
<translation>Modulo QtWebKit</translation> <translation>Modulo QtWebKit</translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>Classes for displaying and editing Web content</source> <source>Classes for displaying and editing Web content</source>
<translation>Classi per la visualizzazione e modifica del contenuto Web</translation> <translation>Classi per la visualizzazione e modifica del contenuto Web</translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>QtXml Module</source> <source>QtXml Module</source>
<translation>Modulo QtXml</translation> <translation>Modulo QtXml</translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>Classes for handling XML</source> <source>Classes for handling XML</source>
<translation>Classi per la gestione di XML</translation> <translation>Classi per la gestione di XML</translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>QtXmlPatterns Module</source> <source>QtXmlPatterns Module</source>
<translation>Modulo QtXmlPatterns</translation> <translation>Modulo QtXmlPatterns</translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>An XQuery/XPath engine for XML and custom data models</source> <source>An XQuery/XPath engine for XML and custom data models</source>
<translation>Un motore XQuery/XPath per XML e modelli di dati speciali</translation> <translation>Un motore XQuery/XPath per XML e modelli di dati speciali</translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>Phonon Module</source> <source>Phonon Module</source>
<translation>Modulo Phonon</translation> <translation>Modulo Phonon</translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>Multimedia framework classes</source> <source>Multimedia framework classes</source>
<translation>Classi del framework multimediale</translation> <translation>Classi del framework multimediale</translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>Qt3Support Module</source> <source>Qt3Support Module</source>
<translation>Modulo Qt3Support</translation> <translation>Modulo Qt3Support</translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>Classes that ease porting from Qt 3 to Qt 4</source> <source>Classes that ease porting from Qt 3 to Qt 4</source>
<translation>Classi che facilitano il porting da Qt 3 a Qt 4</translation> <translation>Classi che facilitano il porting da Qt 3 a Qt 4</translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>QtTest Module</source> <source>QtTest Module</source>
<translation>Modulo QtTest</translation> <translation>Modulo QtTest</translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>Tool classes for unit testing</source> <source>Tool classes for unit testing</source>
<translation>Classi di ausilio per lo unit testing</translation> <translation>Classi di ausilio per lo unit testing</translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>QtDBus module</source> <source>QtDBus module</source>
<translation>Modulo QtDBus</translation> <translation>Modulo QtDBus</translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>Classes for Inter-Process Communication using the D-Bus</source> <source>Classes for Inter-Process Communication using the D-Bus</source>
<translation>Classi per la comunicazione-intra-processo usando il D-Bus</translation> <translation>Classi per la comunicazione-intra-processo usando il D-Bus</translation>
</message> </message>
<message>
<location line="+15"/>
<source>Application</source>
<translation>Applicazione</translation>
</message>
<message>
<location line="+3"/>
<source>Create a standalone application</source>
<translation>Crea un&apos;applicazione</translation>
</message>
<message>
<location line="+13"/>
<source>Dynamic Library</source>
<translation>Libreria Condivisa</translation>
</message>
<message>
<location line="+3"/>
<source>Create a dynamic library for usage in other applications</source>
<translation>Crea una libreria condivisa per l&apos;uso in altre applicazioni</translation>
</message>
<message>
<location line="+13"/>
<source>Static Library</source>
<translation>Libreria Statica</translation>
</message>
<message>
<location line="+3"/>
<source>Create a static library for usage in other applications</source>
<translation>Crea una libreria statica per l&apos;uso in altre applicazioni</translation>
</message>
<message>
<location line="+10"/>
<source>Add Operator</source>
<translation>Operatore di Aggiunta</translation>
</message>
<message>
<location line="+7"/>
<source>Remove Operator</source>
<translation>Operatore di Rimozione</translation>
</message>
<message>
<location line="+7"/>
<source>Replace Operator</source>
<translation>Operatore di Sostituzione</translation>
</message>
<message>
<location line="+7"/>
<source>Set Operator</source>
<translation>Operatore di Assegnazione</translation>
</message>
<message>
<location line="+7"/>
<source>Unique Add Operator</source>
<translation>Operatore di Aggiunta Unica</translation>
</message>
</context> </context>
<context> <context>
<name>Snippets::Internal::SnippetsPlugin</name> <name>Snippets::Internal::SnippetsPlugin</name>
@@ -11749,6 +11541,11 @@ Queste codifiche dovrebbero andare bene:</translation>
<source>Prompt to submit</source> <source>Prompt to submit</source>
<translation>Prompt del submit</translation> <translation>Prompt del submit</translation>
</message> </message>
<message>
<location/>
<source>Common</source>
<translation>Comune</translation>
</message>
<message> <message>
<location/> <location/>
<source>Wrap submit message at:</source> <source>Wrap submit message at:</source>

View File

@@ -2224,6 +2224,11 @@ background-image: url(:/core/images/welcomemode/feedback-bar-background.png);
</context> </context>
<context> <context>
<name>CppFileSettingsPage</name> <name>CppFileSettingsPage</name>
<message>
<location filename="../../../src/plugins/cpptools/cpptoolsconstants.h" line="+51"/>
<source>File naming conventions</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<location filename="../../../src/plugins/cpptools/cppfilesettingspage.ui"/> <location filename="../../../src/plugins/cpptools/cppfilesettingspage.ui"/>
<source>Form</source> <source>Form</source>
@@ -3713,6 +3718,11 @@ Using gdb 6.7 or later is strongly recommended.</source>
</context> </context>
<context> <context>
<name>DebuggingHelperOptionPage</name> <name>DebuggingHelperOptionPage</name>
<message>
<location filename="../../../src/plugins/debugger/debuggerplugin.cpp" line="-596"/>
<source>Debugging Helper</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<location filename="../../../src/plugins/debugger/dumperoptionpage.ui"/> <location filename="../../../src/plugins/debugger/dumperoptionpage.ui"/>
<source>Form</source> <source>Form</source>
@@ -4112,7 +4122,7 @@ Rebuilding the project might help.</source>
</message> </message>
<message> <message>
<location/> <location/>
<source>Registered Documentation:</source> <source>Registered Documentation</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
@@ -10000,337 +10010,119 @@ To do this you type this shortcut and a space in the QuickOpen entry field, and
</message> </message>
</context> </context>
<context> <context>
<name>SimpleProEditor</name> <name>QtModulesInfo</name>
<message> <message>
<location filename="../../../src/plugins/qt4projectmanager/speinfo.cpp" line="+59"/>
<source>Debug and Release</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+7"/>
<source>Debug specific</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+7"/>
<source>Release specific</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+9"/>
<source>All platforms</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+7"/>
<source>MS Windows specific</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+7"/>
<source>Linux/Unix specific</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+7"/>
<source>Mac OSX specific</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+13"/>
<source>Target Options</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
<source>Type and name of the target.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+13"/>
<source>Preprocessor Definitions</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
<source>Setting of the preprocessor definitions.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+14"/>
<source>Include path</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
<source>Setting of the pathes where the header files are located.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+13"/>
<source>Libraries</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
<source>Defining the libraries to link the target against and the pathes where these are located.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+14"/>
<source>Source Files</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+17"/>
<source>Header Files</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+17"/>
<source>Forms</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+16"/>
<source>Qt Modules</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
<source>Setting up which of the Qt modules will be used in the target application.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+14"/>
<source>Resource files</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+12"/>
<source>Target name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
<source>The name of the resulting target.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+9"/>
<source>Configuration</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
<source>Configuration.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+9"/>
<source>Destination directory</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
<source>Where the resulting target will be created.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+15"/>
<source>QtCore Module</source> <source>QtCore Module</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>Core non-GUI classes used by other modules</source> <source>Core non-GUI classes used by other modules</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>QtGui Module</source> <source>QtGui Module</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>Graphical user interface components</source> <source>Graphical user interface components</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>QtNetwork Module</source> <source>QtNetwork Module</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>Classes for network programming</source> <source>Classes for network programming</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>QtOpenGL Module</source> <source>QtOpenGL Module</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>OpenGL support classes</source> <source>OpenGL support classes</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>QtSql Module</source> <source>QtSql Module</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>Classes for database integration using SQL</source> <source>Classes for database integration using SQL</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>QtScript Module</source> <source>QtScript Module</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>Classes for evaluating Qt Scripts</source> <source>Classes for evaluating Qt Scripts</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>QtSvg Module</source> <source>QtSvg Module</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>Classes for displaying the contents of SVG files</source> <source>Classes for displaying the contents of SVG files</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>QtWebKit Module</source> <source>QtWebKit Module</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>Classes for displaying and editing Web content</source> <source>Classes for displaying and editing Web content</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>QtXml Module</source> <source>QtXml Module</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>Classes for handling XML</source> <source>Classes for handling XML</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>QtXmlPatterns Module</source> <source>QtXmlPatterns Module</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>An XQuery/XPath engine for XML and custom data models</source> <source>An XQuery/XPath engine for XML and custom data models</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>Phonon Module</source> <source>Phonon Module</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>Multimedia framework classes</source> <source>Multimedia framework classes</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>Qt3Support Module</source> <source>Qt3Support Module</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>Classes that ease porting from Qt 3 to Qt 4</source> <source>Classes that ease porting from Qt 3 to Qt 4</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>QtTest Module</source> <source>QtTest Module</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>Tool classes for unit testing</source> <source>Tool classes for unit testing</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+13"/>
<source>QtDBus module</source> <source>QtDBus module</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+3"/>
<source>Classes for Inter-Process Communication using the D-Bus</source> <source>Classes for Inter-Process Communication using the D-Bus</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location line="+15"/>
<source>Application</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
<source>Create a standalone application</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+13"/>
<source>Dynamic Library</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
<source>Create a dynamic library for usage in other applications</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+13"/>
<source>Static Library</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
<source>Create a static library for usage in other applications</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+10"/>
<source>Add Operator</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+7"/>
<source>Remove Operator</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+7"/>
<source>Replace Operator</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+7"/>
<source>Set Operator</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+7"/>
<source>Unique Add Operator</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>Snippets::Internal::SnippetsPlugin</name> <name>Snippets::Internal::SnippetsPlugin</name>
@@ -11505,6 +11297,11 @@ The following encodings are likely to fit:</source>
<source>Form</source> <source>Form</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location/>
<source>Common</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<location/> <location/>
<source>Prompt to submit</source> <source>Prompt to submit</source>

View File

@@ -47,6 +47,7 @@
*/ */
#include "pp.h" #include "pp.h"
#include "pp-cctype.h"
#include <Lexer.h> #include <Lexer.h>
#include <Token.h> #include <Token.h>
@@ -702,7 +703,7 @@ bool Preprocessor::markGeneratedTokens(bool markGeneratedTokens,
++it; ++it;
for (; it != end; ++it) { for (; it != end; ++it) {
if (! std::isspace(*it)) if (! pp_isspace(*it))
out(' '); out(' ');
else else
@@ -773,7 +774,7 @@ void Preprocessor::preprocess(const QByteArray &fileName, const QByteArray &sour
++it; ++it;
for (; it != end; ++it) { for (; it != end; ++it) {
if (std::isspace(*it)) if (pp_isspace(*it))
out(*it); out(*it);
else else

View File

@@ -0,0 +1,61 @@
#include "parameteraction.h"
namespace Core {
namespace Utils {
ParameterAction::ParameterAction(const QString &emptyText,
const QString &parameterText,
EnablingMode mode,
QObject* parent) :
QAction(emptyText, parent),
m_emptyText(emptyText),
m_parameterText(parameterText),
m_enablingMode(mode)
{
}
QString ParameterAction::emptyText() const
{
return m_emptyText;
}
void ParameterAction::setEmptyText(const QString &t)
{
m_emptyText = t;
}
QString ParameterAction::parameterText() const
{
return m_parameterText;
}
void ParameterAction::setParameterText(const QString &t)
{
m_parameterText = t;
}
ParameterAction::EnablingMode ParameterAction::enablingMode() const
{
return m_enablingMode;
}
void ParameterAction::setEnablingMode(EnablingMode m)
{
m_enablingMode = m;
}
void ParameterAction::setParameter(const QString &p)
{
const bool enabled = !p.isEmpty();
if (enabled) {
setText(m_parameterText.arg(p));
} else {
setText(m_emptyText);
}
if (m_enablingMode == EnabledWithParameter)
setEnabled(enabled);
}
}
}

View File

@@ -0,0 +1,85 @@
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Qt Software Information (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
**
**************************************************************************/
#ifndef PARAMETERACTION_H
#define PARAMETERACTION_H
#include "utils_global.h"
#include <QtGui/QAction>
namespace Core {
namespace Utils {
/* ParameterAction: Intended for actions that act on a 'current',
* string-type parameter (typically file name) and have 2 states:
* 1) <no current parameter> displaying "Do XX" (empty text)
* 2) <parameter present> displaying "Do XX with %1".
* Provides a slot to set the parameter, changing display
* and enabled state accordingly.
* The text passed in should already be translated; parameterText
* should contain a %1 where the parameter is to be inserted. */
class QTCREATOR_UTILS_EXPORT ParameterAction : public QAction
{
Q_ENUMS(EnablingMode)
Q_PROPERTY(QString emptyText READ emptyText WRITE setEmptyText)
Q_PROPERTY(QString parameterText READ parameterText WRITE setParameterText)
Q_PROPERTY(EnablingMode enablingMode READ enablingMode WRITE setEnablingMode)
Q_OBJECT
public:
enum EnablingMode { AlwaysEnabled, EnabledWithParameter };
explicit ParameterAction(const QString &emptyText,
const QString &parameterText,
EnablingMode em = AlwaysEnabled,
QObject* parent = 0);
QString emptyText() const;
void setEmptyText(const QString &);
QString parameterText() const;
void setParameterText(const QString &);
EnablingMode enablingMode() const;
void setEnablingMode(EnablingMode m);
public slots:
void setParameter(const QString &);
private:
QString m_emptyText;
QString m_parameterText;
EnablingMode m_enablingMode;
};
}
}
#endif // PARAMETERACTION_H

View File

@@ -29,7 +29,8 @@ SOURCES += \
synchronousprocess.cpp \ synchronousprocess.cpp \
submitfieldwidget.cpp \ submitfieldwidget.cpp \
consoleprocess.cpp \ consoleprocess.cpp \
uncommentselection.cpp uncommentselection.cpp \
parameteraction.cpp
win32 { win32 {
SOURCES += abstractprocess_win.cpp \ SOURCES += abstractprocess_win.cpp \
@@ -66,7 +67,8 @@ HEADERS += \
consoleprocess.h \ consoleprocess.h \
synchronousprocess.h \ synchronousprocess.h \
submitfieldwidget.h \ submitfieldwidget.h \
uncommentselection.h uncommentselection.h \
parameteraction.h
FORMS += filewizardpage.ui \ FORMS += filewizardpage.ui \
projectintropage.ui \ projectintropage.ui \

View File

@@ -163,7 +163,7 @@ WelcomeMode::WelcomeMode() :
m_d->ui.sitesTreeWidget->addItem(tr("Qt Labs"), QLatin1String("http://labs.qtsoftware.com")); m_d->ui.sitesTreeWidget->addItem(tr("Qt Labs"), QLatin1String("http://labs.qtsoftware.com"));
m_d->ui.sitesTreeWidget->addItem(tr("Qt Git Hosting"), QLatin1String("http://qt.gitorious.org")); m_d->ui.sitesTreeWidget->addItem(tr("Qt Git Hosting"), QLatin1String("http://qt.gitorious.org"));
m_d->ui.sitesTreeWidget->addItem(tr("Qt Centre"), QLatin1String("http://www.qtcentre.org")); m_d->ui.sitesTreeWidget->addItem(tr("Qt Centre"), QLatin1String("http://www.qtcentre.org"));
m_d->ui.sitesTreeWidget->addItem(tr("Qt/S60 at Forum Nokia"), QLatin1String("http://discussion.forum.nokia.com/forum/forumdisplay.php?f=196")); m_d->ui.sitesTreeWidget->addItem(tr("Qt for S60 at Forum Nokia"), QLatin1String("http://discussion.forum.nokia.com/forum/forumdisplay.php?f=196"));
m_d->ui.tutorialTreeWidget->addItem(tr("Qt Creator - A quick tour"), m_d->ui.tutorialTreeWidget->addItem(tr("Qt Creator - A quick tour"),
QString("qthelp://com.nokia.qtcreator.%1%2/doc/index.html").arg(IDE_VERSION_MAJOR).arg(IDE_VERSION_MINOR)); QString("qthelp://com.nokia.qtcreator.%1%2/doc/index.html").arg(IDE_VERSION_MAJOR).arg(IDE_VERSION_MINOR));
@@ -314,13 +314,15 @@ void WelcomeMode::slotFeedback()
void WelcomeMode::slotNextTip() void WelcomeMode::slotNextTip()
{ {
QStringList tips = tipsOfTheDay(); QStringList tips = tipsOfTheDay();
m_d->ui.didYouKnowTextBrowser->setText(tips.at((++m_d->currentTip)%tips.count())); m_d->currentTip = ((m_d->currentTip+1)%tips.count());
m_d->ui.didYouKnowTextBrowser->setText(tips.at(m_d->currentTip));
} }
void WelcomeMode::slotPrevTip() void WelcomeMode::slotPrevTip()
{ {
QStringList tips = tipsOfTheDay(); QStringList tips = tipsOfTheDay();
m_d->ui.didYouKnowTextBrowser->setText(tips.at((--m_d->currentTip)%tips.count())); m_d->currentTip = ((m_d->currentTip-1)+tips.count())%tips.count();
m_d->ui.didYouKnowTextBrowser->setText(tips.at(m_d->currentTip));
} }
QStringList WelcomeMode::tipsOfTheDay() QStringList WelcomeMode::tipsOfTheDay()

View File

@@ -10,6 +10,18 @@
<height>258</height> <height>258</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout" >
<item>
<widget class="QGroupBox" name="groupBox" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Maximum" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title" >
<string>General</string>
</property>
<layout class="QFormLayout" name="formLayout" > <layout class="QFormLayout" name="formLayout" >
<item row="0" column="0" > <item row="0" column="0" >
<widget class="QLabel" name="label" > <widget class="QLabel" name="label" >
@@ -31,19 +43,6 @@
<item row="1" column="1" > <item row="1" column="1" >
<widget class="QLineEdit" name="userEdit" /> <widget class="QLineEdit" name="userEdit" />
</item> </item>
<item row="2" column="0">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="1" > <item row="2" column="1" >
<widget class="QCheckBox" name="clipboardBox" > <widget class="QCheckBox" name="clipboardBox" >
<property name="text" > <property name="text" >
@@ -51,19 +50,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="1" > <item row="3" column="1" >
<widget class="QCheckBox" name="displayBox" > <widget class="QCheckBox" name="displayBox" >
<property name="text" > <property name="text" >
@@ -71,7 +57,10 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0" colspan="2"> </layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer" > <spacer name="verticalSpacer" >
<property name="orientation" > <property name="orientation" >
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>

View File

@@ -12,8 +12,16 @@
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout" > <layout class="QVBoxLayout" name="verticalLayout" >
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <widget class="QGroupBox" name="groupBox" >
<item> <property name="sizePolicy" >
<sizepolicy vsizetype="Maximum" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title" >
<string>File naming conventions</string>
</property>
<layout class="QFormLayout" name="formLayout" > <layout class="QFormLayout" name="formLayout" >
<property name="fieldGrowthPolicy" > <property name="fieldGrowthPolicy" >
<enum>QFormLayout::ExpandingFieldsGrow</enum> <enum>QFormLayout::ExpandingFieldsGrow</enum>
@@ -28,19 +36,6 @@
<item row="0" column="1" > <item row="0" column="1" >
<widget class="QComboBox" name="headerSuffixComboBox" /> <widget class="QComboBox" name="headerSuffixComboBox" />
</item> </item>
<item row="2" column="0">
<widget class="QLabel" name="lowerCaseFileNamesLabel">
<property name="toolTip">
<string>This determines how the file names of the class wizards are generated (&quot;MyClass.h&quot; versus &quot;myclass.h&quot;).</string>
</property>
<property name="text">
<string>Lower case file names:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="lowerCaseFileNamesCheckBox"/>
</item>
<item row="1" column="0" > <item row="1" column="0" >
<widget class="QLabel" name="sourceSuffixLabel" > <widget class="QLabel" name="sourceSuffixLabel" >
<property name="text" > <property name="text" >
@@ -51,22 +46,15 @@
<item row="1" column="1" > <item row="1" column="1" >
<widget class="QComboBox" name="sourceSuffixComboBox" /> <widget class="QComboBox" name="sourceSuffixComboBox" />
</item> </item>
</layout> <item row="2" column="1" >
</item> <widget class="QCheckBox" name="lowerCaseFileNamesCheckBox" >
<item> <property name="text" >
<spacer name="horizontalSpacer"> <string>Lower case file names</string>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" stdset="0"> </widget>
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item> </item>
</layout> </layout>
</widget>
</item> </item>
<item> <item>
<spacer name="verticalSpacer" > <spacer name="verticalSpacer" >

View File

@@ -430,6 +430,14 @@ void DebuggerManager::init()
m_threadsDock = createDockForWidget(m_threadsWindow); m_threadsDock = createDockForWidget(m_threadsWindow);
QSplitter *localsAndWatchers = new QSplitter(Qt::Vertical, 0);
localsAndWatchers->setWindowTitle(m_localsWindow->windowTitle());
localsAndWatchers->addWidget(m_localsWindow);
localsAndWatchers->addWidget(m_watchersWindow);
localsAndWatchers->setStretchFactor(0, 3);
localsAndWatchers->setStretchFactor(1, 1);
m_watchDock = createDockForWidget(localsAndWatchers);
setStatus(DebuggerProcessNotReady); setStatus(DebuggerProcessNotReady);
} }
@@ -457,17 +465,6 @@ IDebuggerManagerAccessForEngines *DebuggerManager::engineInterface()
return dynamic_cast<IDebuggerManagerAccessForEngines *>(this); return dynamic_cast<IDebuggerManagerAccessForEngines *>(this);
} }
void DebuggerManager::createDockWidgets()
{
QSplitter *localsAndWatchers = new QSplitter(Qt::Vertical, 0);
localsAndWatchers->setWindowTitle(m_localsWindow->windowTitle());
localsAndWatchers->addWidget(m_localsWindow);
localsAndWatchers->addWidget(m_watchersWindow);
localsAndWatchers->setStretchFactor(0, 3);
localsAndWatchers->setStretchFactor(1, 1);
m_watchDock = createDockForWidget(localsAndWatchers);
}
void DebuggerManager::createNewDock(QWidget *widget) void DebuggerManager::createNewDock(QWidget *widget)
{ {
QDockWidget *dockWidget = new QDockWidget(widget->windowTitle(), m_mainWindow); QDockWidget *dockWidget = new QDockWidget(widget->windowTitle(), m_mainWindow);
@@ -482,12 +479,13 @@ QDockWidget *DebuggerManager::createDockForWidget(QWidget *widget)
{ {
QDockWidget *dockWidget = new QDockWidget(widget->windowTitle(), m_mainWindow); QDockWidget *dockWidget = new QDockWidget(widget->windowTitle(), m_mainWindow);
dockWidget->setObjectName(widget->windowTitle()); dockWidget->setObjectName(widget->windowTitle());
dockWidget->setFeatures(QDockWidget::DockWidgetClosable); dockWidget->setFeatures(QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetFloatable);
dockWidget->setTitleBarWidget(new QWidget(dockWidget)); dockWidget->setTitleBarWidget(new QWidget(dockWidget));
dockWidget->setWidget(widget); dockWidget->setWidget(widget);
connect(dockWidget->toggleViewAction(), SIGNAL(toggled(bool)), connect(dockWidget->toggleViewAction(), SIGNAL(triggered()),
this, SLOT(dockToggled(bool)), Qt::QueuedConnection); this, SLOT(dockActionTriggered()), Qt::QueuedConnection);
m_dockWidgets.append(dockWidget); m_dockWidgets.append(dockWidget);
m_dockWidgetActiveState.append(false);
return dockWidget; return dockWidget;
} }
@@ -518,11 +516,30 @@ void DebuggerManager::setSimpleDockWidgetArrangement()
m_outputDock->hide(); m_outputDock->hide();
} }
void DebuggerManager::updateDockWidgetActiveStates()
{
for (int i = 0; i < m_dockWidgets.size(); ++i) {
m_dockWidgetActiveState[i] = m_dockWidgets.at(i)->isVisible();
}
}
void DebuggerManager::setFloatingDockWidgetsVisible(bool visible)
{
for (int i = 0; i < m_dockWidgets.size(); ++i) {
QDockWidget *dockWidget = m_dockWidgets.at(i);
if (dockWidget->isFloating() && m_dockWidgetActiveState.at(i)) {
dockWidget->setVisible(visible);
}
}
if (visible)
updateDockWidgetActiveStates(); // we can't do that earlier, because the dock widgets are not visible at startup
}
void DebuggerManager::setLocked(bool locked) void DebuggerManager::setLocked(bool locked)
{ {
const QDockWidget::DockWidgetFeatures features = const QDockWidget::DockWidgetFeatures features =
(locked) ? QDockWidget::DockWidgetClosable : (locked) ? QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetFloatable :
QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetClosable; QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetFloatable;
foreach (QDockWidget *dockWidget, m_dockWidgets) { foreach (QDockWidget *dockWidget, m_dockWidgets) {
QWidget *titleBarWidget = dockWidget->titleBarWidget(); QWidget *titleBarWidget = dockWidget->titleBarWidget();
@@ -537,11 +554,16 @@ void DebuggerManager::setLocked(bool locked)
} }
} }
void DebuggerManager::dockToggled(bool on) void DebuggerManager::dockActionTriggered()
{ {
QDockWidget *dw = qobject_cast<QDockWidget *>(sender()->parent()); QDockWidget *dw = qobject_cast<QDockWidget *>(sender()->parent());
if (on && dw) if (dw) {
if (dw->isVisible())
dw->raise(); dw->raise();
int index = m_dockWidgets.indexOf(dw);
if (index >= 0)
m_dockWidgetActiveState[index] = dw->isVisible();
}
} }
QAbstractItemModel *DebuggerManager::threadsModel() QAbstractItemModel *DebuggerManager::threadsModel()

View File

@@ -217,7 +217,9 @@ public slots:
void setSimpleDockWidgetArrangement(); void setSimpleDockWidgetArrangement();
void setLocked(bool locked); void setLocked(bool locked);
void dockToggled(bool on); void setFloatingDockWidgetsVisible(bool visible);
void updateDockWidgetActiveStates();
void dockActionTriggered();
void setBusyCursor(bool on); void setBusyCursor(bool on);
void queryCurrentTextEditor(QString *fileName, int *lineNumber, QObject **ed); void queryCurrentTextEditor(QString *fileName, int *lineNumber, QObject **ed);
@@ -316,7 +318,6 @@ private:
// //
QWidget *threadsWindow() const { return m_threadsWindow; } QWidget *threadsWindow() const { return m_threadsWindow; }
QList<QDockWidget*> dockWidgets() const { return m_dockWidgets; } QList<QDockWidget*> dockWidgets() const { return m_dockWidgets; }
void createDockWidgets();
virtual bool qtDumperLibraryEnabled() const; virtual bool qtDumperLibraryEnabled() const;
virtual QString qtDumperLibraryName() const; virtual QString qtDumperLibraryName() const;
@@ -400,6 +401,7 @@ private:
QDockWidget *m_threadsDock; QDockWidget *m_threadsDock;
QDockWidget *m_watchDock; QDockWidget *m_watchDock;
QList<QDockWidget*> m_dockWidgets; QList<QDockWidget*> m_dockWidgets;
QList<bool> m_dockWidgetActiveState;
BreakHandler *m_breakHandler; BreakHandler *m_breakHandler;
DisassemblerHandler *m_disassemblerHandler; DisassemblerHandler *m_disassemblerHandler;

View File

@@ -173,10 +173,6 @@ class DebugMode : public Core::BaseMode
public: public:
DebugMode(QObject *parent = 0); DebugMode(QObject *parent = 0);
~DebugMode(); ~DebugMode();
// IMode
void activated() {}
void shutdown() {}
}; };
DebugMode::DebugMode(QObject *parent) DebugMode::DebugMode(QObject *parent)
@@ -409,8 +405,6 @@ DebuggerPlugin::~DebuggerPlugin()
void DebuggerPlugin::shutdown() void DebuggerPlugin::shutdown()
{ {
if (m_debugMode)
m_debugMode->shutdown(); // saves state including manager information
QTC_ASSERT(m_manager, /**/); QTC_ASSERT(m_manager, /**/);
if (m_manager) if (m_manager)
m_manager->shutdown(); m_manager->shutdown();
@@ -758,12 +752,11 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
toolBarAddingLayout->addWidget(rightPaneSplitter); toolBarAddingLayout->addWidget(rightPaneSplitter);
toolBarAddingLayout->addWidget(debugToolBar); toolBarAddingLayout->addWidget(debugToolBar);
m_manager->createDockWidgets();
m_manager->setSimpleDockWidgetArrangement(); m_manager->setSimpleDockWidgetArrangement();
readSettings(); readSettings();
connect(ModeManager::instance(), SIGNAL(currentModeChanged(Core::IMode*)), connect(ModeManager::instance(), SIGNAL(currentModeChanged(Core::IMode*)),
this, SLOT(focusCurrentEditor(Core::IMode*))); this, SLOT(onModeChanged(Core::IMode*)));
m_debugMode->widget()->setFocusProxy(EditorManager::instance()); m_debugMode->widget()->setFocusProxy(EditorManager::instance());
addObject(m_debugMode); addObject(m_debugMode);
@@ -1047,10 +1040,13 @@ void DebuggerPlugin::readSettings()
m_manager->mainWindow()->restoreState(ba); m_manager->mainWindow()->restoreState(ba);
} }
void DebuggerPlugin::focusCurrentEditor(IMode *mode) void DebuggerPlugin::onModeChanged(IMode *mode)
{ {
if (mode != m_debugMode) if (mode != m_debugMode) {
m_manager->setFloatingDockWidgetsVisible(false);
return; return;
}
m_manager->setFloatingDockWidgetsVisible(true);
EditorManager *editorManager = EditorManager::instance(); EditorManager *editorManager = EditorManager::instance();

View File

@@ -96,7 +96,7 @@ private slots:
void breakpointSetRemoveMarginActionTriggered(); void breakpointSetRemoveMarginActionTriggered();
void breakpointEnableDisableMarginActionTriggered(); void breakpointEnableDisableMarginActionTriggered();
void focusCurrentEditor(Core::IMode *mode); void onModeChanged(Core::IMode *mode);
void showSettingsDialog(); void showSettingsDialog();
void startExternalApplication(); void startExternalApplication();

View File

@@ -10,6 +10,12 @@
<height>434</height> <height>434</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Debugging helper</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QCheckBox" name="checkBoxUseDebuggingHelpers"> <widget class="QCheckBox" name="checkBoxUseDebuggingHelpers">
@@ -91,6 +97,13 @@
</property> </property>
</widget> </widget>
</item> </item>
</layout>
<zorder></zorder>
<zorder>checkBoxDebugDebuggingHelpers</zorder>
<zorder>checkBoxUseDebuggingHelpers</zorder>
<zorder></zorder>
</widget>
</item>
<item> <item>
<spacer name="verticalSpacer"> <spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">
@@ -105,8 +118,6 @@
</spacer> </spacer>
</item> </item>
</layout> </layout>
<zorder>checkBoxDebugDebuggingHelpers</zorder>
<zorder>checkBoxUseDebuggingHelpers</zorder>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>

View File

@@ -85,6 +85,14 @@ protected:
using Visitor::visit; using Visitor::visit;
using Visitor::endVisit; using Visitor::endVisit;
void addWords(AST::UiQualifiedId *id)
{
for (; id; id = id->next) {
if (id->name)
_words.insert(id->name->asString());
}
}
virtual bool visit(AST::UiPublicMember *node) virtual bool visit(AST::UiPublicMember *node)
{ {
if (node->name) if (node->name)
@@ -93,14 +101,6 @@ protected:
return true; return true;
} }
virtual bool visit(AST::UiObjectDefinition *node)
{
if (node->name)
_words.insert(node->name->asString());
return true;
}
virtual bool visit(AST::UiQualifiedId *node) virtual bool visit(AST::UiQualifiedId *node)
{ {
if (node->name) if (node->name)
@@ -109,14 +109,6 @@ protected:
return true; return true;
} }
virtual bool visit(AST::UiObjectBinding *node)
{
if (node->name)
_words.insert(node->name->asString());
return true;
}
virtual bool visit(AST::IdentifierExpression *node) virtual bool visit(AST::IdentifierExpression *node)
{ {
if (node->name) if (node->name)
@@ -302,8 +294,8 @@ protected:
init(&decl, node); init(&decl, node);
decl.text.fill(QLatin1Char(' '), _depth); decl.text.fill(QLatin1Char(' '), _depth);
if (node->name) if (node->qualifiedObjectNameId)
decl.text.append(node->name->asString()); decl.text.append(asString(node->qualifiedObjectNameId));
else else
decl.text.append(QLatin1Char('?')); decl.text.append(QLatin1Char('?'));
@@ -329,8 +321,8 @@ protected:
decl.text.append(asString(node->qualifiedId)); decl.text.append(asString(node->qualifiedId));
decl.text.append(QLatin1String(": ")); decl.text.append(QLatin1String(": "));
if (node->name) if (node->qualifiedObjectNameId)
decl.text.append(node->name->asString()); decl.text.append(asString(node->qualifiedObjectNameId));
else else
decl.text.append(QLatin1Char('?')); decl.text.append(QLatin1Char('?'));

View File

@@ -47,6 +47,7 @@
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/parameteraction.h>
#include <vcsbase/basevcseditorfactory.h> #include <vcsbase/basevcseditorfactory.h>
#include <vcsbase/vcsbaseeditor.h> #include <vcsbase/vcsbaseeditor.h>
@@ -275,7 +276,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
Core::Command *command; Core::Command *command;
m_diffAction = new QAction(tr("Diff Current File"), this); m_diffAction = new Core::Utils::ParameterAction(tr("Diff Current File"), tr("Diff \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(m_diffAction, "Git.Diff", globalcontext); command = actionManager->registerAction(m_diffAction, "Git.Diff", globalcontext);
command->setAttribute(Core::Command::CA_UpdateText); command->setAttribute(Core::Command::CA_UpdateText);
#ifndef Q_OS_MAC #ifndef Q_OS_MAC
@@ -284,7 +285,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
connect(m_diffAction, SIGNAL(triggered()), this, SLOT(diffCurrentFile())); connect(m_diffAction, SIGNAL(triggered()), this, SLOT(diffCurrentFile()));
gitContainer->addAction(command); gitContainer->addAction(command);
m_statusAction = new QAction(tr("File Status"), this); m_statusAction = new Core::Utils::ParameterAction(tr("File Status"), tr("Status Related to \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(m_statusAction, "Git.Status", globalcontext); command = actionManager->registerAction(m_statusAction, "Git.Status", globalcontext);
#ifndef Q_OS_MAC #ifndef Q_OS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+S"))); command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+S")));
@@ -293,7 +294,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
connect(m_statusAction, SIGNAL(triggered()), this, SLOT(statusFile())); connect(m_statusAction, SIGNAL(triggered()), this, SLOT(statusFile()));
gitContainer->addAction(command); gitContainer->addAction(command);
m_logAction = new QAction(tr("Log File"), this); m_logAction = new Core::Utils::ParameterAction(tr("Log File"), tr("Log of \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(m_logAction, "Git.Log", globalcontext); command = actionManager->registerAction(m_logAction, "Git.Log", globalcontext);
#ifndef Q_OS_MAC #ifndef Q_OS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+L"))); command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+L")));
@@ -302,7 +303,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
connect(m_logAction, SIGNAL(triggered()), this, SLOT(logFile())); connect(m_logAction, SIGNAL(triggered()), this, SLOT(logFile()));
gitContainer->addAction(command); gitContainer->addAction(command);
m_blameAction = new QAction(tr("Blame"), this); m_blameAction = new Core::Utils::ParameterAction(tr("Blame"), tr("Blame for \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(m_blameAction, "Git.Blame", globalcontext); command = actionManager->registerAction(m_blameAction, "Git.Blame", globalcontext);
#ifndef Q_OS_MAC #ifndef Q_OS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+B"))); command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+B")));
@@ -311,7 +312,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
connect(m_blameAction, SIGNAL(triggered()), this, SLOT(blameFile())); connect(m_blameAction, SIGNAL(triggered()), this, SLOT(blameFile()));
gitContainer->addAction(command); gitContainer->addAction(command);
m_undoFileAction = new QAction(tr("Undo Changes"), this); m_undoFileAction = new Core::Utils::ParameterAction(tr("Undo Changes"), tr("Undo Changes for \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(m_undoFileAction, "Git.Undo", globalcontext); command = actionManager->registerAction(m_undoFileAction, "Git.Undo", globalcontext);
#ifndef Q_OS_MAC #ifndef Q_OS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+U"))); command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+U")));
@@ -320,7 +321,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
connect(m_undoFileAction, SIGNAL(triggered()), this, SLOT(undoFileChanges())); connect(m_undoFileAction, SIGNAL(triggered()), this, SLOT(undoFileChanges()));
gitContainer->addAction(command); gitContainer->addAction(command);
m_stageAction = new QAction(tr("Stage File for Commit"), this); m_stageAction = new Core::Utils::ParameterAction(tr("Stage File for Commit"), tr("Stage \"%1\" for Commit"), Core::Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(m_stageAction, "Git.Stage", globalcontext); command = actionManager->registerAction(m_stageAction, "Git.Stage", globalcontext);
#ifndef Q_OS_MAC #ifndef Q_OS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+A"))); command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+A")));
@@ -329,13 +330,13 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
connect(m_stageAction, SIGNAL(triggered()), this, SLOT(stageFile())); connect(m_stageAction, SIGNAL(triggered()), this, SLOT(stageFile()));
gitContainer->addAction(command); gitContainer->addAction(command);
m_unstageAction = new QAction(tr("Unstage File from Commit"), this); m_unstageAction = new Core::Utils::ParameterAction(tr("Unstage File from Commit"), tr("Unstage \"%1\" from Commit"), Core::Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(m_unstageAction, "Git.Unstage", globalcontext); command = actionManager->registerAction(m_unstageAction, "Git.Unstage", globalcontext);
command->setAttribute(Core::Command::CA_UpdateText); command->setAttribute(Core::Command::CA_UpdateText);
connect(m_unstageAction, SIGNAL(triggered()), this, SLOT(unstageFile())); connect(m_unstageAction, SIGNAL(triggered()), this, SLOT(unstageFile()));
gitContainer->addAction(command); gitContainer->addAction(command);
m_revertAction = new QAction(tr("Revert..."), this); m_revertAction = new Core::Utils::ParameterAction(tr("Revert..."), tr("Revert \"%1\"..."), Core::Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(m_revertAction, "Git.Revert", globalcontext); command = actionManager->registerAction(m_revertAction, "Git.Revert", globalcontext);
command->setAttribute(Core::Command::CA_UpdateText); command->setAttribute(Core::Command::CA_UpdateText);
connect(m_revertAction, SIGNAL(triggered()), this, SLOT(revertFile())); connect(m_revertAction, SIGNAL(triggered()), this, SLOT(revertFile()));
@@ -343,7 +344,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
gitContainer->addAction(createSeparator(actionManager, globalcontext, QLatin1String("Git.Sep.Project"), this)); gitContainer->addAction(createSeparator(actionManager, globalcontext, QLatin1String("Git.Sep.Project"), this));
m_diffProjectAction = new QAction(tr("Diff Current Project"), this); m_diffProjectAction = new Core::Utils::ParameterAction(tr("Diff Current Project"), tr("Diff Project \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(m_diffProjectAction, "Git.DiffProject", globalcontext); command = actionManager->registerAction(m_diffProjectAction, "Git.DiffProject", globalcontext);
#ifndef Q_OS_MAC #ifndef Q_OS_MAC
command->setDefaultKeySequence(QKeySequence("Alt+G,Alt+Shift+D")); command->setDefaultKeySequence(QKeySequence("Alt+G,Alt+Shift+D"));
@@ -352,13 +353,13 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
connect(m_diffProjectAction, SIGNAL(triggered()), this, SLOT(diffCurrentProject())); connect(m_diffProjectAction, SIGNAL(triggered()), this, SLOT(diffCurrentProject()));
gitContainer->addAction(command); gitContainer->addAction(command);
m_statusProjectAction = new QAction(tr("Project Status"), this); m_statusProjectAction = new Core::Utils::ParameterAction(tr("Project Status"), tr("Status Project \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(m_statusProjectAction, "Git.StatusProject", globalcontext); command = actionManager->registerAction(m_statusProjectAction, "Git.StatusProject", globalcontext);
command->setAttribute(Core::Command::CA_UpdateText); command->setAttribute(Core::Command::CA_UpdateText);
connect(m_statusProjectAction, SIGNAL(triggered()), this, SLOT(statusProject())); connect(m_statusProjectAction, SIGNAL(triggered()), this, SLOT(statusProject()));
gitContainer->addAction(command); gitContainer->addAction(command);
m_logProjectAction = new QAction(tr("Log Project"), this); m_logProjectAction = new Core::Utils::ParameterAction(tr("Log Project"), tr("Log Project \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(m_logProjectAction, "Git.LogProject", globalcontext); command = actionManager->registerAction(m_logProjectAction, "Git.LogProject", globalcontext);
#ifndef Q_OS_MAC #ifndef Q_OS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+K"))); command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+K")));
@@ -785,15 +786,14 @@ void GitPlugin::updateActions()
const QString repository = m_gitClient->findRepositoryForFile(current.absoluteFilePath()); const QString repository = m_gitClient->findRepositoryForFile(current.absoluteFilePath());
// First check for file commands and if the current file is inside // First check for file commands and if the current file is inside
// a Git-repository // a Git-repository
const QString file = fileName.isEmpty() ? tr("File") : "\"" + fileName + '"'; m_diffAction->setParameter(fileName);
m_diffAction->setText(tr("Diff %1").arg(file)); m_statusAction->setParameter(fileName);
m_statusAction->setText(tr("Status Related to %1").arg(file)); m_logAction->setParameter(fileName);
m_logAction->setText(tr("Log of %1").arg(file)); m_blameAction->setParameter(fileName);
m_blameAction->setText(tr("Blame for %1").arg(file)); m_undoFileAction->setParameter(fileName);
m_undoFileAction->setText(tr("Undo Changes for %1").arg(file)); m_stageAction->setParameter(fileName);
m_stageAction->setText(tr("Stage %1 for Commit").arg(file)); m_unstageAction->setParameter(fileName);
m_unstageAction->setText(tr("Unstage %1 from Commit").arg(file)); m_revertAction->setParameter(fileName);
m_revertAction->setText(tr("Revert %1...").arg(file));
bool enabled = !fileName.isEmpty() && !repository.isEmpty(); bool enabled = !fileName.isEmpty() && !repository.isEmpty();
m_diffAction->setEnabled(enabled); m_diffAction->setEnabled(enabled);
@@ -809,10 +809,10 @@ void GitPlugin::updateActions()
// If the file is not in a repository, the corresponding project will // If the file is not in a repository, the corresponding project will
// be neither and we can disable everything and return // be neither and we can disable everything and return
m_diffProjectAction->setEnabled(false); m_diffProjectAction->setEnabled(false);
m_diffProjectAction->setText(tr("Diff Project")); m_diffProjectAction->setParameter(repository);
m_statusProjectAction->setText(tr("Status Project")); m_statusProjectAction->setParameter(repository);
m_statusProjectAction->setEnabled(false); m_statusProjectAction->setEnabled(false);
m_logProjectAction->setText(tr("Log Project")); m_logProjectAction->setParameter(repository);
m_logProjectAction->setEnabled(false); m_logProjectAction->setEnabled(false);
return; return;
} }
@@ -822,18 +822,18 @@ void GitPlugin::updateActions()
using namespace ProjectExplorer; using namespace ProjectExplorer;
QString project; QString project;
if (m_projectExplorer) { if (m_projectExplorer) {
if (Node *node = m_projectExplorer->currentNode()) if (const Node *node = m_projectExplorer->currentNode())
if (Node *projectNode = node->projectNode()) if (const Node *projectNode = node->projectNode())
project = '"' + QFileInfo(projectNode->path()).completeBaseName() + '"'; project = QFileInfo(projectNode->path()).completeBaseName();
} }
enabled = !project.isEmpty(); enabled = !project.isEmpty();
m_diffProjectAction->setEnabled(enabled); m_diffProjectAction->setEnabled(enabled);
m_diffProjectAction->setText(tr("Diff Project %1").arg(project)); m_diffProjectAction->setParameter(project);
m_statusProjectAction->setEnabled(enabled); m_statusProjectAction->setEnabled(enabled);
m_statusProjectAction->setText(tr("Status Project %1").arg(project)); m_statusProjectAction->setParameter(project);
m_logProjectAction->setEnabled(enabled); m_logProjectAction->setEnabled(enabled);
m_logProjectAction->setText(tr("Log Project %1").arg(project)); m_logProjectAction->setParameter(project);
} }
void GitPlugin::showCommit() void GitPlugin::showCommit()

View File

@@ -52,6 +52,9 @@ namespace Core {
class IEditorFactory; class IEditorFactory;
class ICore; class ICore;
class IVersionControl; class IVersionControl;
namespace Utils {
class ParameterAction;
}
} // namespace Core } // namespace Core
namespace Git { namespace Git {
@@ -133,19 +136,19 @@ private:
static GitPlugin *m_instance; static GitPlugin *m_instance;
Core::ICore *m_core; Core::ICore *m_core;
QAction *m_diffAction; Core::Utils::ParameterAction *m_diffAction;
QAction *m_diffProjectAction; Core::Utils::ParameterAction *m_diffProjectAction;
QAction *m_statusAction; Core::Utils::ParameterAction *m_statusAction;
QAction *m_statusProjectAction; Core::Utils::ParameterAction *m_statusProjectAction;
QAction *m_logAction; Core::Utils::ParameterAction *m_logAction;
QAction *m_blameAction; Core::Utils::ParameterAction *m_blameAction;
QAction *m_logProjectAction; Core::Utils::ParameterAction *m_logProjectAction;
QAction *m_undoFileAction; Core::Utils::ParameterAction *m_undoFileAction;
QAction *m_undoProjectAction; QAction *m_undoProjectAction;
QAction *m_showAction; QAction *m_showAction;
QAction *m_stageAction; Core::Utils::ParameterAction *m_stageAction;
QAction *m_unstageAction; Core::Utils::ParameterAction *m_unstageAction;
QAction *m_revertAction; Core::Utils::ParameterAction *m_revertAction;
QAction *m_commitAction; QAction *m_commitAction;
QAction *m_pullAction; QAction *m_pullAction;
QAction *m_pushAction; QAction *m_pushAction;

View File

@@ -11,20 +11,11 @@
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout" > <layout class="QVBoxLayout" name="verticalLayout" >
<item> <item>
<widget class="QLabel" name="label" > <widget class="QGroupBox" name="groupBox">
<property name="text" > <property name="title">
<string>Registered Documentation:</string> <string>Registered Documentation</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="_3" >
<property name="spacing" >
<number>6</number>
</property>
<property name="margin" >
<number>0</number>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="QListWidget" name="docsListWidget" /> <widget class="QListWidget" name="docsListWidget" />
</item> </item>
@@ -66,6 +57,7 @@
</layout> </layout>
</item> </item>
</layout> </layout>
</widget>
</item> </item>
</layout> </layout>
</widget> </widget>

View File

@@ -48,6 +48,7 @@
#include <coreplugin/uniqueidmanager.h> #include <coreplugin/uniqueidmanager.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/synchronousprocess.h> #include <utils/synchronousprocess.h>
#include <utils/parameteraction.h>
#include <vcsbase/basevcseditorfactory.h> #include <vcsbase/basevcseditorfactory.h>
#include <vcsbase/basevcssubmiteditorfactory.h> #include <vcsbase/basevcssubmiteditorfactory.h>
#include <vcsbase/vcsbaseeditor.h> #include <vcsbase/vcsbaseeditor.h>
@@ -263,7 +264,7 @@ bool PerforcePlugin::initialize(const QStringList &arguments, QString *errorMess
Core::Command *command; Core::Command *command;
QAction *tmpaction; QAction *tmpaction;
m_editAction = new QAction(tr("Edit"), this); m_editAction = new Core::Utils::ParameterAction(tr("Edit"), tr("Edit \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
command = am->registerAction(m_editAction, PerforcePlugin::EDIT, globalcontext); command = am->registerAction(m_editAction, PerforcePlugin::EDIT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText); command->setAttribute(Core::Command::CA_UpdateText);
command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+E"))); command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+E")));
@@ -271,7 +272,7 @@ bool PerforcePlugin::initialize(const QStringList &arguments, QString *errorMess
connect(m_editAction, SIGNAL(triggered()), this, SLOT(openCurrentFile())); connect(m_editAction, SIGNAL(triggered()), this, SLOT(openCurrentFile()));
mperforce->addAction(command); mperforce->addAction(command);
m_addAction = new QAction(tr("Add"), this); m_addAction = new Core::Utils::ParameterAction(tr("Add"), tr("Add \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
command = am->registerAction(m_addAction, PerforcePlugin::ADD, globalcontext); command = am->registerAction(m_addAction, PerforcePlugin::ADD, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText); command->setAttribute(Core::Command::CA_UpdateText);
command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+A"))); command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+A")));
@@ -279,14 +280,14 @@ bool PerforcePlugin::initialize(const QStringList &arguments, QString *errorMess
connect(m_addAction, SIGNAL(triggered()), this, SLOT(addCurrentFile())); connect(m_addAction, SIGNAL(triggered()), this, SLOT(addCurrentFile()));
mperforce->addAction(command); mperforce->addAction(command);
m_deleteAction = new QAction(tr("Delete"), this); m_deleteAction = new Core::Utils::ParameterAction(tr("Delete"), tr("Delete \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
command = am->registerAction(m_deleteAction, PerforcePlugin::DELETE_FILE, globalcontext); command = am->registerAction(m_deleteAction, PerforcePlugin::DELETE_FILE, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText); command->setAttribute(Core::Command::CA_UpdateText);
command->setDefaultText(tr("Delete File")); command->setDefaultText(tr("Delete File"));
connect(m_deleteAction, SIGNAL(triggered()), this, SLOT(deleteCurrentFile())); connect(m_deleteAction, SIGNAL(triggered()), this, SLOT(deleteCurrentFile()));
mperforce->addAction(command); mperforce->addAction(command);
m_revertAction = new QAction(tr("Revert"), this); m_revertAction = new Core::Utils::ParameterAction(tr("Revert"), tr("Revert \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
command = am->registerAction(m_revertAction, PerforcePlugin::REVERT, globalcontext); command = am->registerAction(m_revertAction, PerforcePlugin::REVERT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText); command->setAttribute(Core::Command::CA_UpdateText);
command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+R"))); command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+R")));
@@ -299,14 +300,14 @@ bool PerforcePlugin::initialize(const QStringList &arguments, QString *errorMess
command = am->registerAction(tmpaction, QLatin1String("Perforce.Sep.Edit"), globalcontext); command = am->registerAction(tmpaction, QLatin1String("Perforce.Sep.Edit"), globalcontext);
mperforce->addAction(command); mperforce->addAction(command);
m_diffCurrentAction = new QAction(tr("Diff Current File"), this); m_diffCurrentAction = new Core::Utils::ParameterAction(tr("Diff Current File"), tr("Diff \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
command = am->registerAction(m_diffCurrentAction, PerforcePlugin::DIFF_CURRENT, globalcontext); command = am->registerAction(m_diffCurrentAction, PerforcePlugin::DIFF_CURRENT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText); command->setAttribute(Core::Command::CA_UpdateText);
command->setDefaultText(tr("Diff Current File")); command->setDefaultText(tr("Diff Current File"));
connect(m_diffCurrentAction, SIGNAL(triggered()), this, SLOT(diffCurrentFile())); connect(m_diffCurrentAction, SIGNAL(triggered()), this, SLOT(diffCurrentFile()));
mperforce->addAction(command); mperforce->addAction(command);
m_diffProjectAction = new QAction(tr("Diff Current Project/Session"), this); m_diffProjectAction = new Core::Utils::ParameterAction(tr("Diff Current Project/Session"), tr("Diff Project \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
command = am->registerAction(m_diffProjectAction, PerforcePlugin::DIFF_PROJECT, globalcontext); command = am->registerAction(m_diffProjectAction, PerforcePlugin::DIFF_PROJECT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText); command->setAttribute(Core::Command::CA_UpdateText);
command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+D"))); command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+D")));
@@ -351,7 +352,7 @@ bool PerforcePlugin::initialize(const QStringList &arguments, QString *errorMess
connect(m_describeAction, SIGNAL(triggered()), this, SLOT(describeChange())); connect(m_describeAction, SIGNAL(triggered()), this, SLOT(describeChange()));
mperforce->addAction(command); mperforce->addAction(command);
m_annotateCurrentAction = new QAction(tr("Annotate Current File"), this); m_annotateCurrentAction = new Core::Utils::ParameterAction(tr("Annotate Current File"), tr("Annotate \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
command = am->registerAction(m_annotateCurrentAction, PerforcePlugin::ANNOTATE_CURRENT, globalcontext); command = am->registerAction(m_annotateCurrentAction, PerforcePlugin::ANNOTATE_CURRENT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText); command->setAttribute(Core::Command::CA_UpdateText);
command->setDefaultText(tr("Annotate Current File")); command->setDefaultText(tr("Annotate Current File"));
@@ -363,7 +364,7 @@ bool PerforcePlugin::initialize(const QStringList &arguments, QString *errorMess
connect(m_annotateAction, SIGNAL(triggered()), this, SLOT(annotate())); connect(m_annotateAction, SIGNAL(triggered()), this, SLOT(annotate()));
mperforce->addAction(command); mperforce->addAction(command);
m_filelogCurrentAction = new QAction(tr("Filelog Current File"), this); m_filelogCurrentAction = new Core::Utils::ParameterAction(tr("Filelog Current File"), tr("Filelog \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
command = am->registerAction(m_filelogCurrentAction, PerforcePlugin::FILELOG_CURRENT, globalcontext); command = am->registerAction(m_filelogCurrentAction, PerforcePlugin::FILELOG_CURRENT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText); command->setAttribute(Core::Command::CA_UpdateText);
command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+F"))); command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+F")));
@@ -628,40 +629,22 @@ void PerforcePlugin::filelog(const QString &fileName)
void PerforcePlugin::updateActions() void PerforcePlugin::updateActions()
{ {
QString fileName = currentFileName(); const QString fileName = currentFileName();
QString baseName = QFileInfo(fileName).fileName(); const QString baseName = fileName.isEmpty() ? fileName : QFileInfo(fileName).fileName();
const bool hasFile = !currentFileName().isEmpty();
m_editAction->setEnabled(hasFile); m_editAction->setParameter(baseName);
m_addAction->setEnabled(hasFile); m_addAction->setParameter(baseName);
m_deleteAction->setEnabled(hasFile); m_deleteAction->setParameter(baseName);
m_revertAction->setEnabled(hasFile); m_revertAction->setParameter(baseName);
m_diffCurrentAction->setEnabled(hasFile); m_diffCurrentAction->setParameter(baseName);
m_annotateCurrentAction->setEnabled(hasFile); m_annotateCurrentAction->setParameter(baseName);
m_filelogCurrentAction->setEnabled(hasFile); m_filelogCurrentAction->setParameter(baseName);
if (hasFile) {
m_editAction->setText(tr("Edit %1").arg(baseName));
m_addAction->setText(tr("Add %1").arg(baseName));
m_deleteAction->setText(tr("Delete %1").arg(baseName));
m_revertAction->setText(tr("Revert %1").arg(baseName));
m_diffCurrentAction->setText(tr("Diff %1").arg(baseName));
m_annotateCurrentAction->setText(tr("Annotate %1").arg(baseName));
m_filelogCurrentAction->setText(tr("Filelog %1").arg(baseName));
} else {
m_editAction->setText(tr("Edit"));
m_addAction->setText(tr("Add"));
m_deleteAction->setText(tr("Delete"));
m_revertAction->setText(tr("Revert"));
m_diffCurrentAction->setText(tr("Diff"));
m_annotateCurrentAction->setText(tr("Annotate Current File"));
m_filelogCurrentAction->setText(tr("Filelog Current File"));
}
if (m_projectExplorer && m_projectExplorer->currentProject()) { if (m_projectExplorer && m_projectExplorer->currentProject()) {
m_diffProjectAction->setEnabled(true); m_diffProjectAction->setParameter(m_projectExplorer->currentProject()->name());
m_diffProjectAction->setText(tr("Diff Project %1").arg(m_projectExplorer->currentProject()->name()));
m_submitAction->setEnabled(true); m_submitAction->setEnabled(true);
} else { } else {
m_diffProjectAction->setEnabled(false); m_diffProjectAction->setParameter(QString());
m_diffProjectAction->setText(tr("Diff Current Project/Solution"));
m_submitAction->setEnabled(false); m_submitAction->setEnabled(false);
} }
m_diffAllAction->setEnabled(true); m_diffAllAction->setEnabled(true);

View File

@@ -51,6 +51,9 @@ QT_END_NAMESPACE
namespace Core { namespace Core {
class IEditorFactory; class IEditorFactory;
namespace Utils {
class ParameterAction;
}
} }
namespace Perforce { namespace Perforce {
@@ -170,21 +173,21 @@ private:
SettingsPage *m_settingsPage; SettingsPage *m_settingsPage;
QList<Core::IEditorFactory*> m_editorFactories; QList<Core::IEditorFactory*> m_editorFactories;
QAction *m_editAction; Core::Utils::ParameterAction *m_editAction;
QAction *m_addAction; Core::Utils::ParameterAction *m_addAction;
QAction *m_deleteAction; Core::Utils::ParameterAction *m_deleteAction;
QAction *m_openedAction; QAction *m_openedAction;
QAction *m_revertAction; Core::Utils::ParameterAction *m_revertAction;
QAction *m_diffCurrentAction; Core::Utils::ParameterAction *m_diffCurrentAction;
QAction *m_diffProjectAction; Core::Utils::ParameterAction *m_diffProjectAction;
QAction *m_diffAllAction; QAction *m_diffAllAction;
QAction *m_resolveAction; QAction *m_resolveAction;
QAction *m_submitAction; QAction *m_submitAction;
QAction *m_pendingAction; QAction *m_pendingAction;
QAction *m_describeAction; QAction *m_describeAction;
QAction *m_annotateCurrentAction; Core::Utils::ParameterAction *m_annotateCurrentAction;
QAction *m_annotateAction; QAction *m_annotateAction;
QAction *m_filelogCurrentAction; Core::Utils::ParameterAction *m_filelogCurrentAction;
QAction *m_filelogAction; QAction *m_filelogAction;
QAction *m_submitCurrentLogAction; QAction *m_submitCurrentLogAction;
bool m_submitActionTriggered; bool m_submitActionTriggered;

View File

@@ -79,6 +79,7 @@
#include <coreplugin/vcsmanager.h> #include <coreplugin/vcsmanager.h>
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/parameteraction.h>
#include <QtCore/QtPlugin> #include <QtCore/QtPlugin>
#include <QtCore/QDateTime> #include <QtCore/QDateTime>
@@ -438,7 +439,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
this, SLOT(updateRecentProjectMenu())); this, SLOT(updateRecentProjectMenu()));
// unload action // unload action
m_unloadAction = new QAction(tr("Close Project"), this); m_unloadAction = new Core::Utils::ParameterAction(tr("Close Project"), tr("Close Project \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
cmd = am->registerAction(m_unloadAction, Constants::UNLOAD, globalcontext); cmd = am->registerAction(m_unloadAction, Constants::UNLOAD, globalcontext);
cmd->setAttribute(Core::Command::CA_UpdateText); cmd->setAttribute(Core::Command::CA_UpdateText);
cmd->setDefaultText(m_unloadAction->text()); cmd->setDefaultText(m_unloadAction->text());
@@ -1273,12 +1274,11 @@ void ProjectExplorerPlugin::updateActions()
if (debug) if (debug)
qDebug()<<"BuildManager::isBuilding()"<<building; qDebug()<<"BuildManager::isBuilding()"<<building;
m_unloadAction->setEnabled(m_currentProject != 0);
if (m_currentProject == 0) { if (m_currentProject == 0) {
m_unloadAction->setText(tr("Close Project")); m_unloadAction->setParameter(QString());
m_buildProjectOnlyMenu->setTitle(tr("Current Project")); m_buildProjectOnlyMenu->setTitle(tr("Current Project"));
} else { } else {
m_unloadAction->setText(tr("Close Project \"%1\"").arg(m_currentProject->name())); m_unloadAction->setParameter(m_currentProject->name());
m_buildProjectOnlyMenu->setTitle(tr("Project \"%1\"").arg(m_currentProject->name())); m_buildProjectOnlyMenu->setTitle(tr("Project \"%1\"").arg(m_currentProject->name()));
} }

View File

@@ -54,6 +54,9 @@ class IFileFactory;
namespace Internal { namespace Internal {
class WelcomeMode; class WelcomeMode;
} }
namespace Utils {
class ParameterAction;
}
} }
namespace ProjectExplorer { namespace ProjectExplorer {
@@ -225,7 +228,7 @@ private:
#if 0 #if 0
QAction *m_loadAction; QAction *m_loadAction;
#endif #endif
QAction *m_unloadAction; Core::Utils::ParameterAction *m_unloadAction;
QAction *m_clearSession; QAction *m_clearSession;
QAction *m_buildProjectOnlyAction; QAction *m_buildProjectOnlyAction;
QAction *m_buildAction; QAction *m_buildAction;

View File

@@ -11,9 +11,6 @@
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
<property name="margin">
<number>0</number>
</property>
<item> <item>
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="groupBox">
<property name="title"> <property name="title">
@@ -43,6 +40,9 @@
</property> </property>
</widget> </widget>
</item> </item>
</layout>
</widget>
</item>
<item> <item>
<spacer name="verticalSpacer"> <spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">
@@ -58,9 +58,6 @@
</item> </item>
</layout> </layout>
</widget> </widget>
</item>
</layout>
</widget>
<resources/> <resources/>
<connections/> <connections/>
</ui> </ui>

View File

@@ -31,7 +31,7 @@ HEADERS = qt4projectmanagerplugin.h \
deployhelper.h \ deployhelper.h \
embeddedpropertiespage.h \ embeddedpropertiespage.h \
qt4runconfiguration.h \ qt4runconfiguration.h \
speinfo.h \ qtmodulesinfo.h \
qt4projectconfigwidget.h \ qt4projectconfigwidget.h \
qt4buildenvironmentwidget.h \ qt4buildenvironmentwidget.h \
projectloadwizard.h \ projectloadwizard.h \
@@ -64,7 +64,7 @@ SOURCES = qt4projectmanagerplugin.cpp \
deployhelper.cpp \ deployhelper.cpp \
embeddedpropertiespage.cpp \ embeddedpropertiespage.cpp \
qt4runconfiguration.cpp \ qt4runconfiguration.cpp \
speinfo.cpp \ qtmodulesinfo.cpp \
qt4projectconfigwidget.cpp \ qt4projectconfigwidget.cpp \
qt4buildenvironmentwidget.cpp \ qt4buildenvironmentwidget.cpp \
projectloadwizard.cpp \ projectloadwizard.cpp \

View File

@@ -0,0 +1,160 @@
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Qt Software Information (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
**
**************************************************************************/
#include "qtmodulesinfo.h"
#include "qglobal.h"
#include <QtCore/QtDebug>
#include <QtCore/QString>
#include <QtCore/QHash>
#include <QtCore/QCoreApplication>
using namespace Qt4ProjectManager::Internal;
struct item
{
const char * const config;
const QString name;
const QString description;
bool isDefault;
};
typedef QVector<const item*> itemVectorType;
typedef QHash<QString, const item*> itemHashType;
const itemVectorType itemVector()
{
static const struct item items[] = {
{"core",
QCoreApplication::translate("QtModulesInfo", "QtCore Module"),
QCoreApplication::translate("QtModulesInfo", "Core non-GUI classes used by other modules"),
true},
{"gui",
QCoreApplication::translate("QtModulesInfo", "QtGui Module"),
QCoreApplication::translate("QtModulesInfo", "Graphical user interface components"),
true},
{"network",
QCoreApplication::translate("QtModulesInfo", "QtNetwork Module"),
QCoreApplication::translate("QtModulesInfo", "Classes for network programming"),
false},
{"opengl",
QCoreApplication::translate("QtModulesInfo", "QtOpenGL Module"),
QCoreApplication::translate("QtModulesInfo", "OpenGL support classes"),
false},
{"sql",
QCoreApplication::translate("QtModulesInfo", "QtSql Module"),
QCoreApplication::translate("QtModulesInfo", "Classes for database integration using SQL"),
false},
{"script",
QCoreApplication::translate("QtModulesInfo", "QtScript Module"),
QCoreApplication::translate("QtModulesInfo", "Classes for evaluating Qt Scripts"),
false},
{"svg",
QCoreApplication::translate("QtModulesInfo", "QtSvg Module"),
QCoreApplication::translate("QtModulesInfo", "Classes for displaying the contents of SVG files"),
false},
{"webkit",
QCoreApplication::translate("QtModulesInfo", "QtWebKit Module"),
QCoreApplication::translate("QtModulesInfo", "Classes for displaying and editing Web content"),
false},
{"xml",
QCoreApplication::translate("QtModulesInfo", "QtXml Module"),
QCoreApplication::translate("QtModulesInfo", "Classes for handling XML"),
false},
{"xmlpatterns",
QCoreApplication::translate("QtModulesInfo", "QtXmlPatterns Module"),
QCoreApplication::translate("QtModulesInfo", "An XQuery/XPath engine for XML and custom data models"),
false},
{"phonon",
QCoreApplication::translate("QtModulesInfo", "Phonon Module"),
QCoreApplication::translate("QtModulesInfo", "Multimedia framework classes"),
false},
{"qt3support",
QCoreApplication::translate("QtModulesInfo", "Qt3Support Module"),
QCoreApplication::translate("QtModulesInfo", "Classes that ease porting from Qt 3 to Qt 4"),
false},
{"testlib",
QCoreApplication::translate("QtModulesInfo", "QtTest Module"),
QCoreApplication::translate("QtModulesInfo", "Tool classes for unit testing"),
false},
{"dbus",
QCoreApplication::translate("QtModulesInfo", "QtDBus Module"),
QCoreApplication::translate("QtModulesInfo", "Classes for Inter-Process Communication using the D-Bus",
false)}
};
const uint itemsCount = sizeof items / sizeof items[0];
itemVectorType result;
result.reserve(itemsCount);
for (int i = 0; i < itemsCount; i++)
result.append(items + i);
return result;
}
Q_GLOBAL_STATIC_WITH_INITIALIZER(itemVectorType, staticItemVector, {
*x = itemVector();
});
Q_GLOBAL_STATIC_WITH_INITIALIZER(QStringList, staticModulesList, {
const itemVectorType * const itemVector = staticItemVector();
for (int i = 0; i < itemVector->count(); i++)
x->append(QString::fromLatin1(itemVector->at(i)->config));
});
Q_GLOBAL_STATIC_WITH_INITIALIZER(itemHashType, staticItemHash, {
const itemVectorType * const itemVector = staticItemVector();
for (int i = 0; i < itemVector->count(); i++)
x->insert(QString::fromLatin1(itemVector->at(i)->config), itemVector->at(i));
});
QStringList QtModulesInfo::modules()
{
return *staticModulesList();
}
static inline const item *itemForModule(const QString &module)
{
return staticItemHash()->value(module.toLatin1().data());
}
QString QtModulesInfo::moduleName(const QString &module)
{
const item * const i = itemForModule(module);
return i?i->name:QString();
}
QString QtModulesInfo::moduleDescription(const QString &module)
{
const item * const i = itemForModule(module);
return i?i->description:QString();
}
bool QtModulesInfo::moduleIsDefault(const QString &module)
{
const item * const i = itemForModule(module);
return i?i->isDefault:false;
}

View File

@@ -0,0 +1,49 @@
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Qt Software Information (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
**
**************************************************************************/
#ifndef QTMODULESINFO_H
#define QTMODULESINFO_H
#include <QtCore/QStringList>
namespace Qt4ProjectManager {
namespace Internal {
class QtModulesInfo
{
public:
static QStringList modules();
static QString moduleName(const QString &module);
static QString moduleDescription(const QString &module);
static bool moduleIsDefault(const QString &module);
};
} // namespace Internal
} // namespace Qt4ProjectManager
#endif // QTMODULESINFO_H

View File

@@ -1,803 +0,0 @@
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Qt Software Information (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
**
**************************************************************************/
#include "speinfo.h"
#include <QtCore/QCoreApplication>
#include <QtCore/QDebug>
#include <QtCore/QVariant>
using namespace Qt4ProjectManager::Internal;
bool SPEInfo::m_listsInitialized = false;
QList<SPEInfoItem*> SPEInfo::m_configurationList;
QList<SPEInfoItem*> SPEInfo::m_platformList;
QList<SPEInfoItem*> SPEInfo::m_variableList;
QList<SPEInfoItem*> SPEInfo::m_qtmoduleList;
QList<SPEInfoItem*> SPEInfo::m_templateList;
QList<SPEInfoItem*> SPEInfo::m_operatorList;
QHash<QPair<SPEInfoItem::InfoKind, QString> ,SPEInfoItem*> SPEInfo::m_itemHash;
const QString SPEInfoItem::keyType("valuetype");
const QString SPEInfoItem::valueFile("file");
const QString SPEInfoItem::valuePath("path");
const QString SPEInfoItem::keyIncludedByDefault("includedbydefault");
const QString SPEInfoItem::keyImageFileName("imagefilename");
// Configurations (Debug, Release, ...)
class InfoItemConfigurationCross : public SPEInfoItem
{
public:
InfoItemConfigurationCross(): SPEInfoItem("", Configuration) {}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "Debug and Release"); }
};
class InfoItemConfigurationDebug : public SPEInfoItem
{
public:
InfoItemConfigurationDebug(): SPEInfoItem("debug", Configuration) {}
QString name() const {return QCoreApplication::translate("SimpleProEditor", "Debug specific");}
};
class InfoItemConfigurationRelease : public SPEInfoItem
{
public:
InfoItemConfigurationRelease(): SPEInfoItem("release", Configuration) {}
QString name() const {return QCoreApplication::translate("SimpleProEditor", "Release specific");}
};
// Platforms (Windows, Mac, ...)
class InfoItemPlatformCross : public SPEInfoItem
{
public:
InfoItemPlatformCross(): SPEInfoItem("", Platform) {}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "All platforms"); }
};
class InfoItemPlatformWindows : public SPEInfoItem
{
public:
InfoItemPlatformWindows(): SPEInfoItem("win32", Platform) {}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "MS Windows specific"); }
};
class InfoItemPlatformUnix : public SPEInfoItem
{
public:
InfoItemPlatformUnix(): SPEInfoItem("unix", Platform) {}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "Linux/Unix specific"); }
};
class InfoItemPlatformOSX : public SPEInfoItem
{
public:
InfoItemPlatformOSX(): SPEInfoItem("macx", Platform) {}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "Mac OSX specific"); }
};
// Variables (Target options, Libraries, Defines, ...)
class InfoItemVariableTargetOptions : public SPEInfoItem
{
public:
InfoItemVariableTargetOptions(): SPEInfoItem("TEMPLATE", Variable)
{
m_data.insert(keyImageFileName, ":/variableimages/images/target.png");
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "Target Options");}
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"Type and name of the target.");
}
};
class InfoItemVariableDefines : public SPEInfoItem
{
public:
InfoItemVariableDefines(): SPEInfoItem("DEFINES", Variable)
{
m_data.insert(keyImageFileName, ":/variableimages/images/defines.png");
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "Preprocessor Definitions");}
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"Setting of the preprocessor definitions.");
}
};
class InfoItemVariableIncludePath : public SPEInfoItem
{
public:
InfoItemVariableIncludePath(): SPEInfoItem("INCLUDEPATH", Variable)
{
m_data.insert(keyType, valuePath);
m_data.insert(keyImageFileName, ":/variableimages/images/includes.png");
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "Include path"); }
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"Setting of the pathes where the header files are located.");
}
};
class InfoItemVariableLibs : public SPEInfoItem
{
public:
InfoItemVariableLibs(): SPEInfoItem("LIBS", Variable)
{
m_data.insert(keyImageFileName, ":/variableimages/images/libs.png");
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "Libraries");}
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"Defining the libraries to link the target against and the pathes where these are located.");
}
};
class InfoItemVariableSources : public SPEInfoItem
{
public:
InfoItemVariableSources(): SPEInfoItem("SOURCES", Variable)
{
m_data.insert(keyType, valueFile);
m_data.insert(keyImageFileName, ":/variableimages/images/sources.png");
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "Source Files");}
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"");
}
};
class InfoItemVariableHeaders : public SPEInfoItem
{
public:
InfoItemVariableHeaders(): SPEInfoItem("HEADERS", Variable)
{
m_data.insert(keyType, valueFile);
m_data.insert(keyImageFileName, ":/variableimages/images/headers.png");
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "Header Files");}
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"");
}
};
class InfoItemVariableForms : public SPEInfoItem
{
public:
InfoItemVariableForms(): SPEInfoItem("FORMS", Variable)
{
m_data.insert(keyType, valueFile);
m_data.insert(keyImageFileName, ":/variableimages/images/forms.png");
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "Forms");}
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"");
}
};
class InfoItemVariableQtModules : public SPEInfoItem
{
public:
InfoItemVariableQtModules(): SPEInfoItem("QT", Variable)
{
m_data.insert(keyImageFileName, ":/variableimages/images/qtmodules.png");
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "Qt Modules");}
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"Setting up which of the Qt modules will be used in the target application.");
}
};
class InfoItemVariableResources : public SPEInfoItem
{
public:
InfoItemVariableResources(): SPEInfoItem("RESOURCES", Variable)
{
m_data.insert(keyType, valueFile);
m_data.insert(keyImageFileName, ":/variableimages/images/resources.png");
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "Resource files");}
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"");
}
};
class InfoItemVariableTarget : public SPEInfoItem
{
public:
InfoItemVariableTarget(): SPEInfoItem("TARGET", Variable) {}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "Target name");}
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"The name of the resulting target.");
}
};
class InfoItemVariableConfig : public SPEInfoItem
{
public:
InfoItemVariableConfig(): SPEInfoItem("CONFIG", Variable) {}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "Configuration");}
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"Configuration.");
}
};
class InfoItemVariableDestdir : public SPEInfoItem
{
public:
InfoItemVariableDestdir(): SPEInfoItem("DESTDIR", Variable) {}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "Destination directory");}
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"Where the resulting target will be created.");
}
};
// Qt modules
class InfoItemModulesCore : public SPEInfoItem
{
public:
InfoItemModulesCore(): SPEInfoItem("core", QtModule)
{
m_data.insert(keyIncludedByDefault, true);
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "QtCore Module"); }
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"Core non-GUI classes used by other modules");
}
};
class InfoItemModulesGui : public SPEInfoItem
{
public:
InfoItemModulesGui(): SPEInfoItem("gui", QtModule)
{
m_data.insert(keyIncludedByDefault, true);
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "QtGui Module"); }
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"Graphical user interface components");
}
};
class InfoItemModulesNetwork : public SPEInfoItem
{
public:
InfoItemModulesNetwork(): SPEInfoItem("network", QtModule)
{
m_data.insert(keyIncludedByDefault, false);
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "QtNetwork Module"); }
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"Classes for network programming");
}
};
class InfoItemModulesOpenGL : public SPEInfoItem
{
public:
InfoItemModulesOpenGL(): SPEInfoItem("opengl", QtModule)
{
m_data.insert(keyIncludedByDefault, false);
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "QtOpenGL Module"); }
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"OpenGL support classes");
}
};
class InfoItemModulesSql : public SPEInfoItem
{
public:
InfoItemModulesSql(): SPEInfoItem("sql", QtModule)
{
m_data.insert(keyIncludedByDefault, false);
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "QtSql Module"); }
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"Classes for database integration using SQL");
}
};
class InfoItemModulesScript : public SPEInfoItem
{
public:
InfoItemModulesScript(): SPEInfoItem("script", QtModule)
{
m_data.insert(keyIncludedByDefault, false);
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "QtScript Module"); }
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"Classes for evaluating Qt Scripts");
}
};
class InfoItemModulesSvg : public SPEInfoItem
{
public:
InfoItemModulesSvg(): SPEInfoItem("svg", QtModule)
{
m_data.insert(keyIncludedByDefault, false);
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "QtSvg Module"); }
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"Classes for displaying the contents of SVG files");
}
};
class InfoItemModulesWebKit : public SPEInfoItem
{
public:
InfoItemModulesWebKit(): SPEInfoItem("webkit", QtModule)
{
m_data.insert(keyIncludedByDefault, false);
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "QtWebKit Module"); }
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"Classes for displaying and editing Web content");
}
};
class InfoItemModulesXml : public SPEInfoItem
{
public:
InfoItemModulesXml(): SPEInfoItem("xml", QtModule)
{
m_data.insert(keyIncludedByDefault, false);
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "QtXml Module"); }
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"Classes for handling XML");
}
};
class InfoItemModulesXmlPatterns : public SPEInfoItem
{
public:
InfoItemModulesXmlPatterns(): SPEInfoItem("xmlpatterns", QtModule)
{
m_data.insert(keyIncludedByDefault, false);
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "QtXmlPatterns Module"); }
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"An XQuery/XPath engine for XML and custom data models");
}
};
class InfoItemModulesPhonon : public SPEInfoItem
{
public:
InfoItemModulesPhonon(): SPEInfoItem("phonon", QtModule)
{
m_data.insert(keyIncludedByDefault, false);
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "Phonon Module"); }
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"Multimedia framework classes");
}
};
class InfoItemModulesQt3Support : public SPEInfoItem
{
public:
InfoItemModulesQt3Support(): SPEInfoItem("qt3support", QtModule)
{
m_data.insert(keyIncludedByDefault, false);
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "Qt3Support Module"); }
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"Classes that ease porting from Qt 3 to Qt 4");
}
};
class InfoItemModulesTest : public SPEInfoItem
{
public:
InfoItemModulesTest(): SPEInfoItem("testlib", QtModule)
{
m_data.insert(keyIncludedByDefault, false);
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "QtTest Module"); }
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"Tool classes for unit testing");
}
};
class InfoItemModulesDBus : public SPEInfoItem
{
public:
InfoItemModulesDBus(): SPEInfoItem("dbus", QtModule)
{
m_data.insert(keyIncludedByDefault, false);
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "QtDBus module"); }
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"Classes for Inter-Process Communication using the D-Bus");
}
};
// Target templates
class InfoItemTemplatesApp : public SPEInfoItem
{
public:
InfoItemTemplatesApp(): SPEInfoItem("app", Template)
{
m_data.insert(keyIncludedByDefault, false);
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "Application"); }
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"Create a standalone application");
}
};
class InfoItemTemplatesDynamicLib : public SPEInfoItem
{
public:
InfoItemTemplatesDynamicLib(): SPEInfoItem("lib", Template)
{
m_data.insert(keyIncludedByDefault, false);
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "Dynamic Library"); }
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"Create a dynamic library for usage in other applications");
}
};
class InfoItemTemplatesStaticLib : public SPEInfoItem
{
public:
InfoItemTemplatesStaticLib(): SPEInfoItem("staticlib", Template)
{
m_data.insert(keyIncludedByDefault, false);
}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "Static Library"); }
QString description() const
{
return QCoreApplication::translate("SimpleProEditor",
"Create a static library for usage in other applications");
}
};
// Variable operators
class InfoItemOperatorsAdd : public SPEInfoItem
{
public:
InfoItemOperatorsAdd(): SPEInfoItem("+=", Operator) {}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "Add Operator"); }
};
class InfoItemOperatorsRemove : public SPEInfoItem
{
public:
InfoItemOperatorsRemove(): SPEInfoItem("-=", Operator) {}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "Remove Operator"); }
};
class InfoItemOperatorsReplace : public SPEInfoItem
{
public:
InfoItemOperatorsReplace(): SPEInfoItem("~=", Operator) {}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "Replace Operator"); }
};
class InfoItemOperatorsSet : public SPEInfoItem
{
public:
InfoItemOperatorsSet(): SPEInfoItem("=", Operator) {}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "Set Operator"); }
};
class InfoItemOperatorsUniqueAdd : public SPEInfoItem
{
public:
InfoItemOperatorsUniqueAdd(): SPEInfoItem("*=", Operator) {}
QString name() const { return QCoreApplication::translate("SimpleProEditor", "Unique Add Operator"); }
};
SPEInfoItem::SPEInfoItem(const QString &id, InfoKind kind)
: m_id(id)
, m_infoKind(kind)
, m_parentItem(0)
{
}
QString SPEInfoItem::name() const
{
return "";
}
QString SPEInfoItem::description() const
{
return "";
}
QVariant SPEInfoItem::data(const QString &key) const
{
return m_data.value(key);
}
const SPEInfoItem *SPEInfoItem::parentItem() const
{
return m_parentItem;
}
void SPEInfoItem::setParentItem(const SPEInfoItem *parentItem)
{
m_parentItem = parentItem;
}
bool SPEInfoItem::isAncestorOf(const SPEInfoItem *successor) const
{
const SPEInfoItem *ancestorCursor = successor;
while ((ancestorCursor = ancestorCursor->parentItem()) != NULL)
if (ancestorCursor == this)
return true;
return false;
}
QString SPEInfoItem::id() const
{
return m_id;
}
SPEInfoItem::InfoKind SPEInfoItem::infoKind() const
{
return m_infoKind;
}
SPEInfo::~SPEInfo()
{
deleteLists();
}
const QList<SPEInfoItem*> *SPEInfo::list(SPEInfoItem::InfoKind kind)
{
if (!m_listsInitialized)
initializeLists();
return
kind == SPEInfoItem::Configuration?&m_configurationList
:kind == SPEInfoItem::Platform?&m_platformList
:kind == SPEInfoItem::Variable?&m_variableList
:kind == SPEInfoItem::QtModule?&m_qtmoduleList
:kind == SPEInfoItem::Template?&m_templateList
:/*kind == SPEInfoItem::Operator?*/&m_operatorList
;
}
const SPEInfoItem *SPEInfo::defaultInfoOfKind(SPEInfoItem::InfoKind kind)
{
return list(kind)->at(0);
}
void SPEInfo::addListToHash(const QList<SPEInfoItem*> &list)
{
foreach (SPEInfoItem *item, list)
m_itemHash.insert(qMakePair(item->infoKind(), item->id()), item);
}
void SPEInfo::initializeLists()
{
InfoItemConfigurationCross *infoItemConfigurationCross = new InfoItemConfigurationCross;
InfoItemConfigurationDebug *infoItemConfigurationDebug = new InfoItemConfigurationDebug;
infoItemConfigurationDebug->setParentItem(infoItemConfigurationCross);
InfoItemConfigurationRelease *infoItemConfigurationRelease = new InfoItemConfigurationRelease;
infoItemConfigurationRelease->setParentItem(infoItemConfigurationCross);
m_configurationList
<< infoItemConfigurationCross
<< infoItemConfigurationDebug
<< infoItemConfigurationRelease;
addListToHash(m_configurationList);
InfoItemPlatformCross *infoItemPlatformCross = new InfoItemPlatformCross;
InfoItemPlatformWindows *infoItemPlatformWindows = new InfoItemPlatformWindows;
infoItemPlatformWindows->setParentItem(infoItemPlatformCross);
InfoItemPlatformUnix *infoItemPlatformUnix = new InfoItemPlatformUnix;
infoItemPlatformUnix->setParentItem(infoItemPlatformCross);
InfoItemPlatformOSX *infoItemPlatformOSX = new InfoItemPlatformOSX;
infoItemPlatformOSX->setParentItem(infoItemPlatformUnix);
m_platformList
<< infoItemPlatformCross
<< infoItemPlatformWindows
<< infoItemPlatformUnix
<< infoItemPlatformOSX;
addListToHash(m_platformList);
m_variableList
<< new InfoItemVariableTargetOptions
<< new InfoItemVariableDefines
<< new InfoItemVariableLibs
<< new InfoItemVariableIncludePath
<< new InfoItemVariableSources
<< new InfoItemVariableHeaders
<< new InfoItemVariableForms
<< new InfoItemVariableQtModules
<< new InfoItemVariableResources
<< new InfoItemVariableTarget
<< new InfoItemVariableConfig
<< new InfoItemVariableDestdir;
addListToHash(m_variableList);
m_qtmoduleList
<< new InfoItemModulesCore
<< new InfoItemModulesGui
<< new InfoItemModulesNetwork
<< new InfoItemModulesOpenGL
<< new InfoItemModulesScript
<< new InfoItemModulesSql
<< new InfoItemModulesSvg
<< new InfoItemModulesWebKit
<< new InfoItemModulesXml
<< new InfoItemModulesXmlPatterns
<< new InfoItemModulesPhonon
<< new InfoItemModulesQt3Support
<< new InfoItemModulesTest
<< new InfoItemModulesDBus;
addListToHash(m_qtmoduleList);
m_templateList
<< new InfoItemTemplatesApp
<< new InfoItemTemplatesDynamicLib
<< new InfoItemTemplatesStaticLib;
addListToHash(m_templateList);
m_operatorList
<< new InfoItemOperatorsAdd
<< new InfoItemOperatorsRemove
<< new InfoItemOperatorsReplace
<< new InfoItemOperatorsSet
<< new InfoItemOperatorsUniqueAdd;
addListToHash(m_operatorList);
m_listsInitialized = true;
}
void SPEInfo::deleteLists()
{
m_itemHash.clear();
static QList<SPEInfoItem*> *lists[] = {
&m_configurationList,
&m_platformList,
&m_variableList,
&m_qtmoduleList,
&m_templateList,
&m_operatorList
};
for (size_t i = 0; i < sizeof(lists)/sizeof(lists[0]); i++) {
qDeleteAll(*lists[i]);
lists[i]->clear();
}
m_listsInitialized = false;
}
const SPEInfoItem *SPEInfo::infoOfKindForId(SPEInfoItem::InfoKind kind,
const QString &id, const SPEInfoItem *defaultInfoItem)
{
QPair<SPEInfoItem::InfoKind, QString > keyPair = qMakePair(kind, id);
return m_itemHash.contains(keyPair)?m_itemHash.value(keyPair):defaultInfoItem;
}
const SPEInfoItem *SPEInfo::platformInfoForId(const QString &id)
{
return infoOfKindForId(SPEInfoItem::Platform, id, SPEInfo::defaultInfoOfKind(SPEInfoItem::Platform));
}
const SPEInfoItem *SPEInfo::configurationInfoForId(const QString &id)
{
return infoOfKindForId(SPEInfoItem::Configuration, id, SPEInfo::defaultInfoOfKind(SPEInfoItem::Configuration));
}
static SPEInfo speInfoInstance; // it's destructor will call deleteLists()

View File

@@ -1,113 +0,0 @@
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Qt Software Information (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
**
**************************************************************************/
#ifndef SIMPLEPROEDITORINFO_H
#define SIMPLEPROEDITORINFO_H
#include <QtCore/QHash>
#include <QtCore/QVariant>
#include <QtGui/QPixmap>
namespace Qt4ProjectManager {
namespace Internal {
class SPEInfoItem
{
public:
enum InfoKind {
Configuration,
Platform,
Variable,
QtModule,
Template,
Operator
};
SPEInfoItem(const QString &id, InfoKind kind);
virtual ~SPEInfoItem() {}
QString id() const;
InfoKind infoKind() const;
virtual QString name() const;
virtual QString description() const;
QVariant data(const QString &key) const;
const SPEInfoItem *parentItem() const;
void setParentItem(const SPEInfoItem *parentItem);
bool isAncestorOf(const SPEInfoItem *ancestor) const;
static const QString keyType;
static const QString valueFile;
static const QString valuePath;
static const QString keyIncludedByDefault;
static const QString keyImageFileName;
protected:
QHash<QString, QVariant> m_data;
private:
QString m_id;
InfoKind m_infoKind;
QPixmap m_image;
const class SPEInfoItem *m_parentItem;
};
class SPEInfo
{
public:
~SPEInfo();
static const QList<SPEInfoItem*> *list(SPEInfoItem::InfoKind kind);
static const SPEInfoItem *defaultInfoOfKind(SPEInfoItem::InfoKind kind);
static const SPEInfoItem *platformInfoForId(const QString &id);
static const SPEInfoItem *configurationInfoForId(const QString &id);
static const SPEInfoItem *infoOfKindForId(SPEInfoItem::InfoKind kind,
const QString &id, const SPEInfoItem *defaultInfoItem = NULL);
private:
static void addListToHash(const QList<SPEInfoItem*> &list);
static void initializeLists();
static void deleteLists();
static QList<SPEInfoItem*> m_configurationList;
static QList<SPEInfoItem*> m_platformList;
static QList<SPEInfoItem*> m_variableList;
static QList<SPEInfoItem*> m_qtmoduleList;
static QList<SPEInfoItem*> m_templateList;
static QList<SPEInfoItem*> m_operatorList;
static QHash<QPair<SPEInfoItem::InfoKind, QString> ,SPEInfoItem* > m_itemHash;
static bool m_listsInitialized;
};
} // namespace Internal
} // namespace Qt4ProjectManager
#endif // SIMPLEPROEDITORINFO_H

View File

@@ -29,11 +29,12 @@
#include "modulespage.h" #include "modulespage.h"
#include "speinfo.h" #include "qtmodulesinfo.h"
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <QtCore/QDebug> #include <QtCore/QDebug>
#include <QtCore/QVariant>
#include <QtGui/QCheckBox> #include <QtGui/QCheckBox>
#include <QtGui/QLabel> #include <QtGui/QLabel>
@@ -58,19 +59,19 @@ ModulesPage::ModulesPage(QWidget *parent)
QGridLayout *layout = new QGridLayout; QGridLayout *layout = new QGridLayout;
const QList<SPEInfoItem*> infoItemsList = *SPEInfo::list(SPEInfoItem::QtModule); const QStringList &modulesList = QtModulesInfo::modules();
int itemId = 0; int moduleId = 0;
int rowsCount = (infoItemsList.count() + 1) / 2; int rowsCount = (modulesList.count() + 1) / 2;
foreach (const SPEInfoItem *infoItem, infoItemsList) { foreach (const QString &module, modulesList) {
QCheckBox *moduleCheckBox = new QCheckBox(infoItem->name()); QCheckBox *moduleCheckBox = new QCheckBox(QtModulesInfo::moduleName(module));
moduleCheckBox->setToolTip(infoItem->description()); moduleCheckBox->setToolTip(QtModulesInfo::moduleDescription(module));
moduleCheckBox->setWhatsThis(infoItem->description()); moduleCheckBox->setWhatsThis(QtModulesInfo::moduleDescription(module));
registerField(infoItem->id(), moduleCheckBox); registerField(module, moduleCheckBox);
int row = itemId % rowsCount; int row = moduleId % rowsCount;
int column = itemId / rowsCount; int column = moduleId / rowsCount;
layout->addWidget(moduleCheckBox, row, column); layout->addWidget(moduleCheckBox, row, column);
m_moduleCheckBoxMap[infoItem->id()] = moduleCheckBox; m_moduleCheckBoxMap[module] = moduleCheckBox;
itemId++; moduleId++;
} }
vlayout->addLayout(layout); vlayout->addLayout(layout);
@@ -80,10 +81,10 @@ ModulesPage::ModulesPage(QWidget *parent)
// Return the key that goes into the Qt config line for a module // Return the key that goes into the Qt config line for a module
QString ModulesPage::idOfModule(const QString &module) QString ModulesPage::idOfModule(const QString &module)
{ {
const QList<SPEInfoItem*> infoItemsList = *SPEInfo::list(SPEInfoItem::QtModule); const QStringList &moduleIdList = QtModulesInfo::modules();
foreach (const SPEInfoItem *infoItem, infoItemsList) foreach (const QString &id, moduleIdList)
if (infoItem->name().startsWith(module)) if (QtModulesInfo::moduleName(id).startsWith(module))
return infoItem->id(); return id;
return QString(); return QString();
} }
@@ -114,13 +115,10 @@ void ModulesPage::setModuleEnabled(const QString &module, bool enabled) const
QString ModulesPage::modules(bool selected) const QString ModulesPage::modules(bool selected) const
{ {
QStringList modules; QStringList modules;
foreach (const QString &module, QtModulesInfo::modules()) {
const QList<SPEInfoItem*> infoItemsList = *SPEInfo::list(SPEInfoItem::QtModule); if (selected != QtModulesInfo::moduleIsDefault(module)
foreach (const SPEInfoItem *infoItem, infoItemsList) { && selected == field(module).toBool())
if (selected != infoItem->data(SPEInfoItem::keyIncludedByDefault).toBool() modules << module;
&& selected == field(infoItem->id()).toBool())
modules << infoItem->id();
} }
return modules.join(QString(QLatin1Char(' '))); return modules.join(QString(QLatin1Char(' ')));
} }

View File

@@ -13,7 +13,13 @@
<property name="windowTitle"> <property name="windowTitle">
<string>Configure Filters</string> <string>Configure Filters</string>
</property> </property>
<layout class="QGridLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Configure Filters</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QListWidget" name="filterList"> <widget class="QListWidget" name="filterList">
<property name="font"> <property name="font">
@@ -65,7 +71,10 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="1" column="0" colspan="2"> </layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout"> <layout class="QHBoxLayout">
<item> <item>
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">

View File

@@ -41,6 +41,7 @@
#include <vcsbase/vcsbaseeditor.h> #include <vcsbase/vcsbaseeditor.h>
#include <vcsbase/basevcssubmiteditorfactory.h> #include <vcsbase/basevcssubmiteditorfactory.h>
#include <utils/synchronousprocess.h> #include <utils/synchronousprocess.h>
#include <utils/parameteraction.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/coreconstants.h> #include <coreplugin/coreconstants.h>
@@ -320,7 +321,7 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe
globalcontext << core->uniqueIDManager()->uniqueIdentifier(C_GLOBAL); globalcontext << core->uniqueIDManager()->uniqueIdentifier(C_GLOBAL);
Core::Command *command; Core::Command *command;
m_addAction = new QAction(tr("Add"), this); m_addAction = new Core::Utils::ParameterAction(tr("Add"), tr("Add \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
command = ami->registerAction(m_addAction, SubversionPlugin::ADD, command = ami->registerAction(m_addAction, SubversionPlugin::ADD,
globalcontext); globalcontext);
command->setAttribute(Core::Command::CA_UpdateText); command->setAttribute(Core::Command::CA_UpdateText);
@@ -330,14 +331,14 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe
connect(m_addAction, SIGNAL(triggered()), this, SLOT(addCurrentFile())); connect(m_addAction, SIGNAL(triggered()), this, SLOT(addCurrentFile()));
subversionMenu->addAction(command); subversionMenu->addAction(command);
m_deleteAction = new QAction(tr("Delete"), this); m_deleteAction = new Core::Utils::ParameterAction(tr("Delete"), tr("Delete \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
command = ami->registerAction(m_deleteAction, SubversionPlugin::DELETE_FILE, command = ami->registerAction(m_deleteAction, SubversionPlugin::DELETE_FILE,
globalcontext); globalcontext);
command->setAttribute(Core::Command::CA_UpdateText); command->setAttribute(Core::Command::CA_UpdateText);
connect(m_deleteAction, SIGNAL(triggered()), this, SLOT(deleteCurrentFile())); connect(m_deleteAction, SIGNAL(triggered()), this, SLOT(deleteCurrentFile()));
subversionMenu->addAction(command); subversionMenu->addAction(command);
m_revertAction = new QAction(tr("Revert"), this); m_revertAction = new Core::Utils::ParameterAction(tr("Revert"), tr("Revert \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
command = ami->registerAction(m_revertAction, SubversionPlugin::REVERT, command = ami->registerAction(m_revertAction, SubversionPlugin::REVERT,
globalcontext); globalcontext);
command->setAttribute(Core::Command::CA_UpdateText); command->setAttribute(Core::Command::CA_UpdateText);
@@ -352,7 +353,7 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe
connect(m_diffProjectAction, SIGNAL(triggered()), this, SLOT(diffProject())); connect(m_diffProjectAction, SIGNAL(triggered()), this, SLOT(diffProject()));
subversionMenu->addAction(command); subversionMenu->addAction(command);
m_diffCurrentAction = new QAction(tr("Diff Current File"), this); m_diffCurrentAction = new Core::Utils::ParameterAction(tr("Diff Current File"), tr("Diff \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
command = ami->registerAction(m_diffCurrentAction, command = ami->registerAction(m_diffCurrentAction,
SubversionPlugin::DIFF_CURRENT, globalcontext); SubversionPlugin::DIFF_CURRENT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText); command->setAttribute(Core::Command::CA_UpdateText);
@@ -370,7 +371,7 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe
connect(m_commitAllAction, SIGNAL(triggered()), this, SLOT(startCommitAll())); connect(m_commitAllAction, SIGNAL(triggered()), this, SLOT(startCommitAll()));
subversionMenu->addAction(command); subversionMenu->addAction(command);
m_commitCurrentAction = new QAction(tr("Commit Current File"), this); m_commitCurrentAction = new Core::Utils::ParameterAction(tr("Commit Current File"), tr("Commit \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
command = ami->registerAction(m_commitCurrentAction, command = ami->registerAction(m_commitCurrentAction,
SubversionPlugin::COMMIT_CURRENT, globalcontext); SubversionPlugin::COMMIT_CURRENT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText); command->setAttribute(Core::Command::CA_UpdateText);
@@ -382,7 +383,7 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe
subversionMenu->addAction(createSeparator(this, ami, SubversionPlugin::SEPARATOR2, globalcontext)); subversionMenu->addAction(createSeparator(this, ami, SubversionPlugin::SEPARATOR2, globalcontext));
m_filelogCurrentAction = new QAction(tr("Filelog Current File"), this); m_filelogCurrentAction = new Core::Utils::ParameterAction(tr("Filelog Current File"), tr("Filelog \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
command = ami->registerAction(m_filelogCurrentAction, command = ami->registerAction(m_filelogCurrentAction,
SubversionPlugin::FILELOG_CURRENT, globalcontext); SubversionPlugin::FILELOG_CURRENT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText); command->setAttribute(Core::Command::CA_UpdateText);
@@ -390,7 +391,7 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe
SLOT(filelogCurrentFile())); SLOT(filelogCurrentFile()));
subversionMenu->addAction(command); subversionMenu->addAction(command);
m_annotateCurrentAction = new QAction(tr("Annotate Current File"), this); m_annotateCurrentAction = new Core::Utils::ParameterAction(tr("Annotate Current File"), tr("Annotate \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
command = ami->registerAction(m_annotateCurrentAction, command = ami->registerAction(m_annotateCurrentAction,
SubversionPlugin::ANNOTATE_CURRENT, globalcontext); SubversionPlugin::ANNOTATE_CURRENT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText); command->setAttribute(Core::Command::CA_UpdateText);
@@ -549,32 +550,21 @@ SubversionSubmitEditor *SubversionPlugin::openSubversionSubmitEditor(const QStri
void SubversionPlugin::updateActions() void SubversionPlugin::updateActions()
{ {
const QString fileName = currentFileName();
const bool hasFile = !fileName.isEmpty();
m_addAction->setEnabled(hasFile);
m_deleteAction->setEnabled(hasFile);
m_revertAction->setEnabled(hasFile);
m_diffProjectAction->setEnabled(true); m_diffProjectAction->setEnabled(true);
m_diffCurrentAction->setEnabled(hasFile);
m_commitAllAction->setEnabled(true); m_commitAllAction->setEnabled(true);
m_commitCurrentAction->setEnabled(hasFile);
m_filelogCurrentAction->setEnabled(hasFile);
m_annotateCurrentAction->setEnabled(hasFile);
m_statusAction->setEnabled(true); m_statusAction->setEnabled(true);
m_describeAction->setEnabled(true); m_describeAction->setEnabled(true);
QString baseName; const QString fileName = currentFileName();
if (hasFile) const QString baseName = fileName.isEmpty() ? fileName : QFileInfo(fileName).fileName();
baseName = QFileInfo(fileName).fileName();
m_addAction->setText(tr("Add %1").arg(baseName)); m_addAction->setParameter(baseName);
m_deleteAction->setText(tr("Delete %1").arg(baseName)); m_deleteAction->setParameter(baseName);
m_revertAction->setText(tr("Revert %1").arg(baseName)); m_revertAction->setParameter(baseName);
m_diffCurrentAction->setText(tr("Diff %1").arg(baseName)); m_diffCurrentAction->setParameter(baseName);
m_commitCurrentAction->setText(tr("Commit %1").arg(baseName)); m_commitCurrentAction->setParameter(baseName);
m_filelogCurrentAction->setText(tr("Filelog %1").arg(baseName)); m_filelogCurrentAction->setParameter(baseName);
m_annotateCurrentAction->setText(tr("Annotate %1").arg(baseName)); m_annotateCurrentAction->setParameter(baseName);
} }
void SubversionPlugin::addCurrentFile() void SubversionPlugin::addCurrentFile()

View File

@@ -52,6 +52,9 @@ QT_END_NAMESPACE
namespace Core { namespace Core {
class IEditorFactory; class IEditorFactory;
class IVersionControl; class IVersionControl;
namespace Utils {
class ParameterAction;
}
} }
namespace ProjectExplorer { namespace ProjectExplorer {
@@ -151,15 +154,15 @@ private:
SubversionOutputWindow *m_subversionOutputWindow; SubversionOutputWindow *m_subversionOutputWindow;
ProjectExplorer::ProjectExplorerPlugin *m_projectExplorer; ProjectExplorer::ProjectExplorerPlugin *m_projectExplorer;
QAction *m_addAction; Core::Utils::ParameterAction *m_addAction;
QAction *m_deleteAction; Core::Utils::ParameterAction *m_deleteAction;
QAction *m_revertAction; Core::Utils::ParameterAction *m_revertAction;
QAction *m_diffProjectAction; QAction *m_diffProjectAction;
QAction *m_diffCurrentAction; Core::Utils::ParameterAction *m_diffCurrentAction;
QAction *m_commitAllAction; QAction *m_commitAllAction;
QAction *m_commitCurrentAction; Core::Utils::ParameterAction *m_commitCurrentAction;
QAction *m_filelogCurrentAction; Core::Utils::ParameterAction *m_filelogCurrentAction;
QAction *m_annotateCurrentAction; Core::Utils::ParameterAction *m_annotateCurrentAction;
QAction *m_statusAction; QAction *m_statusAction;
QAction *m_updateProjectAction; QAction *m_updateProjectAction;
QAction *m_describeAction; QAction *m_describeAction;

View File

@@ -135,11 +135,7 @@ bool BaseTextDocument::isReadOnly() const
return true; return true;
if (m_fileName.isEmpty()) //have no corresponding file, so editing is ok if (m_fileName.isEmpty()) //have no corresponding file, so editing is ok
return false; return false;
const QFileInfo fi(m_fileName);
return m_fileIsReadOnly; return m_fileIsReadOnly;
} }
bool BaseTextDocument::isModified() const bool BaseTextDocument::isModified() const

View File

@@ -12,6 +12,10 @@
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
<item> <item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Common</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
@@ -126,6 +130,7 @@ name &lt;email&gt; alias &lt;email&gt;</string>
</spacer> </spacer>
</item> </item>
</layout> </layout>
</widget>
</item> </item>
<item> <item>
<spacer name="verticalSpacer"> <spacer name="verticalSpacer">