diff --git a/bin/gdbmacros/gdbmacros.cpp b/bin/gdbmacros/gdbmacros.cpp index 2af0e4b23018f0677f204b6e80f230ad55d97ff6..7a304607b6ccbeb506ed3d9096733bf5cf8f8b4e 100644 --- a/bin/gdbmacros/gdbmacros.cpp +++ b/bin/gdbmacros/gdbmacros.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/doc/api/qtcreator-api.qdoc b/doc/api/qtcreator-api.qdoc index 5ac78d98069a404d33006f40cdc8572f50de2687..1cf030faaca35a55cafeada781ebb9b792f25fa9 100644 --- a/doc/api/qtcreator-api.qdoc +++ b/doc/api/qtcreator-api.qdoc @@ -4,6 +4,10 @@ Qt Creator is Qt Software's crossplatform IDE. The core of Qt Creator is basically only a \l{ExtensionSystem}{plugin loader}. + All functionality is implemented in plugins, the basis of Qt Creator is + implemented in the \l{Core} {Core} Plugin. The plugin manager provides + simple means for plugin cooperation that allow plugins to provide + hooks for other plugin's extensions. \section1 Core Libraries @@ -75,8 +79,3 @@ \generatelist functionindex */ -/*! - \group qtc - - \title Core Plugin -*/ diff --git a/doc/api/qtcreator-api.qdocconf b/doc/api/qtcreator-api.qdocconf index 92c40b8a388aa476ded07a7268420aacafb71862..476c8e6a4df098fec1d48b950815d9b819615621 100644 --- a/doc/api/qtcreator-api.qdocconf +++ b/doc/api/qtcreator-api.qdocconf @@ -6,14 +6,14 @@ language = Cpp headerdirs = . \ ../../src/libs/aggregation \ ../../src/libs/extensionsystem \ - ../../src/plugins/core \ - ../../src/plugins/core/actionmanager + ../../src/plugins/coreplugin \ + ../../src/plugins/coreplugin/actionmanager sourcedirs = . \ ../../src/libs/aggregation \ ../../src/libs/extensionsystem \ - ../../src/plugins/core \ - ../../src/plugins/core/actionmanager + ../../src/plugins/coreplugin \ + ../../src/plugins/coreplugin/actionmanager headers.fileextesnions = "*.h" sources.fileextensions = "*.cpp *.qdoc" diff --git a/doc/doc.pri b/doc/doc.pri index d8e65d4a944e286a17965c1e17e22c49b25ac04c..e9e34fe733b561ee693ab897afa04be814003186 100644 --- a/doc/doc.pri +++ b/doc/doc.pri @@ -2,7 +2,7 @@ unix { QDOC = SRCDIR=$$PWD OUTDIR=$$OUT_PWD/doc/html $$(QTDIR)/tools/qdoc3/qdoc3 HELPGENERATOR = $$(QTDIR)/bin/qhelpgenerator } else { - QDOC = $$(QTDIR)\tools\qdoc3\release\qdoc3.exe + QDOC = set SRCDIR=$$PWD&& set OUTDIR=$$OUT_PWD/doc/html&& $$(QTDIR)\tools\qdoc3\release\qdoc3.exe HELPGENERATOR = $$(QTDIR)\bin\qhelpgenerator.exe } diff --git a/doc/example/textfinder/main.cpp b/doc/example/textfinder/main.cpp index 5e73ed9d91c610f34e17c247ac330bcdb5f8e078..30fe49baf0cdbaf8a36caaa043588e53d6effdbe 100644 --- a/doc/example/textfinder/main.cpp +++ b/doc/example/textfinder/main.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/doc/example/textfinder/textfinder.cpp b/doc/example/textfinder/textfinder.cpp index c289b45e8ce48ad072a5090db6bfa70180e6d186..20050f603dd21b89df3aeb9f2bda7e1413d1e648 100644 --- a/doc/example/textfinder/textfinder.cpp +++ b/doc/example/textfinder/textfinder.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/doc/example/textfinder/textfinder.h b/doc/example/textfinder/textfinder.h index a712a1d12d2b9365b29dd9289e0a45fc0ed64d42..ebcb0fb87c3181c841fd55f3fa85e02797d49749 100644 --- a/doc/example/textfinder/textfinder.h +++ b/doc/example/textfinder/textfinder.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/doc/qtcreator.qdoc b/doc/qtcreator.qdoc index cb2964553ab3558e9747f19bd947dd2bd1635705..3c50c9d428050c7e4668c2f21e5b1dc7ad5c6b10 100644 --- a/doc/qtcreator.qdoc +++ b/doc/qtcreator.qdoc @@ -151,6 +151,26 @@ \image qtcreator-compile-pane.png + + \section1 Session Management in Qt Creator + + ### screenshot + + In Qt Creator, a session is a collection of loaded projects, opened files, + editor settings, and so on. When you run Qt Creator, you have a default + session. You can create a new session using the \gui{Session Manager...}, + available in the \gui{File -> Session} menu. + + To switch between sessions, select \gui{File -> Session}. If you do not + create and select any session, Qt Creator will always use the default + session. + +\omit + session management can also store project dependencies, thorbjorn is + currently working on it +\endomit + + \section1 Qt Help Integration Qt Creator comes fully integrated with all of Qt's documentation and diff --git a/examples/scripting/demo.js b/examples/scripting/demo.js index b823995fa6670ccf81aea5694718daf043bd84e0..804a87d0c2ebe0e70405913e425ea1564b695712 100644 --- a/examples/scripting/demo.js +++ b/examples/scripting/demo.js @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cpaster/cgi.cpp b/shared/cpaster/cgi.cpp index eeeea1ac855e3dadcde50e98f123a224c6454058..fddbbc18a28121dde6a602d800aed69c8a77a456 100644 --- a/shared/cpaster/cgi.cpp +++ b/shared/cpaster/cgi.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cpaster/cgi.h b/shared/cpaster/cgi.h index d1b904348e690ac974b23d88303889424a0f56d4..b615ee79fe17f5bebff4c30f672a2119a2b3aabb 100644 --- a/shared/cpaster/cgi.h +++ b/shared/cpaster/cgi.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cpaster/fetcher.cpp b/shared/cpaster/fetcher.cpp index 39995d899f4de2c6af5a90afa240d473f591d4d0..11cfb9d24e8ff698a5f41482d29452f29d0ff26b 100644 --- a/shared/cpaster/fetcher.cpp +++ b/shared/cpaster/fetcher.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cpaster/fetcher.h b/shared/cpaster/fetcher.h index d188412f76a13c191ac059a6918f5f7d495b2521..e532d88a1e85b241ddd887fdad5dd666605d400f 100644 --- a/shared/cpaster/fetcher.h +++ b/shared/cpaster/fetcher.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cpaster/poster.cpp b/shared/cpaster/poster.cpp index 5c20cc44c5e82c4875f8722a64676dac5cc3d850..b55cb8e8505c72a3acc09bf92e0107037f6071ff 100644 --- a/shared/cpaster/poster.cpp +++ b/shared/cpaster/poster.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cpaster/poster.h b/shared/cpaster/poster.h index f60896dbd0bef187d56b98f3880021a144458bdc..fb1121b6d60cb470d809faceccf503d9074d669e 100644 --- a/shared/cpaster/poster.h +++ b/shared/cpaster/poster.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cpaster/splitter.cpp b/shared/cpaster/splitter.cpp index 490108136f3607b2b3e098319052203a011a795b..3b79d0153a0f0ce62276b940059bde1304705a0b 100644 --- a/shared/cpaster/splitter.cpp +++ b/shared/cpaster/splitter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cpaster/splitter.h b/shared/cpaster/splitter.h index 9b333c19e0f81afbfcc1ca8622c04638fa5ed9b3..57fb3349405461f2d2f08c60df06323eaa7cbd13 100644 --- a/shared/cpaster/splitter.h +++ b/shared/cpaster/splitter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cpaster/view.cpp b/shared/cpaster/view.cpp index f1fd664b794f56a50500dbc0bff1c2ff31b9dd55..a38c57635069ce4b767e313612cc3b83d86c0535 100644 --- a/shared/cpaster/view.cpp +++ b/shared/cpaster/view.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cpaster/view.h b/shared/cpaster/view.h index f5eb4113323cf584dc183c3f086e356e3f6cf033..79485b5dbe89306b561403c29c59feb30c6a0b42 100644 --- a/shared/cpaster/view.h +++ b/shared/cpaster/view.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/AST.cpp b/shared/cplusplus/AST.cpp index 11be99ea48a1257371a3a584e5894b9669c55ca1..3d710db3669add45c8fafe9f0bcbf58288f2a0b2 100644 --- a/shared/cplusplus/AST.cpp +++ b/shared/cplusplus/AST.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -117,6 +117,9 @@ CatchClauseAST *AST::asCatchClause() ClassSpecifierAST *AST::asClassSpecifier() { return dynamic_cast<ClassSpecifierAST *>(this); } +CompoundLiteralAST *AST::asCompoundLiteral() +{ return dynamic_cast<CompoundLiteralAST *>(this); } + CompoundStatementAST *AST::asCompoundStatement() { return dynamic_cast<CompoundStatementAST *>(this); } @@ -774,6 +777,42 @@ unsigned BoolLiteralAST::lastToken() const return token + 1; } +CompoundLiteralAST *CompoundLiteralAST::clone(MemoryPool *pool) const +{ + CompoundLiteralAST *ast = new (pool) CompoundLiteralAST; + ast->lparen_token = lparen_token; + if (type_id) + ast->type_id = type_id->clone(pool); + ast->rparen_token = rparen_token; + if (initializer) + ast->initializer = initializer->clone(pool); + return ast; +} + +void CompoundLiteralAST::accept0(ASTVisitor *visitor) +{ + if (visitor->visit(this)) { + accept(type_id, visitor); + accept(initializer, visitor); + } +} + +unsigned CompoundLiteralAST::firstToken() const +{ + return lparen_token; +} + +unsigned CompoundLiteralAST::lastToken() const +{ + if (initializer) + return initializer->lastToken(); + else if (rparen_token) + return rparen_token + 1; + else if (type_id) + return type_id->lastToken(); + return lparen_token + 1; +} + BreakStatementAST *BreakStatementAST::clone(MemoryPool *pool) const { BreakStatementAST *ast = new (pool) BreakStatementAST; diff --git a/shared/cplusplus/AST.h b/shared/cplusplus/AST.h index 6607e76805b8072094d40bc4f43551d34ff57920..d7f346c5b0ce78b5da0c5c4c6bad08ebcf2499a3 100644 --- a/shared/cplusplus/AST.h +++ b/shared/cplusplus/AST.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -94,6 +94,7 @@ public: CastExpressionAST *asCastExpression(); CatchClauseAST *asCatchClause(); ClassSpecifierAST *asClassSpecifier(); + CompoundLiteralAST *asCompoundLiteral(); CompoundStatementAST *asCompoundStatement(); ConditionAST *asCondition(); ConditionalExpressionAST *asConditionalExpression(); @@ -429,6 +430,24 @@ protected: virtual void accept0(ASTVisitor *visitor); }; +class CPLUSPLUS_EXPORT CompoundLiteralAST: public ExpressionAST +{ +public: + unsigned lparen_token; + ExpressionAST *type_id; + unsigned rparen_token; + ExpressionAST *initializer; + +public: + virtual unsigned firstToken() const; + virtual unsigned lastToken() const; + + virtual CompoundLiteralAST *clone(MemoryPool *pool) const; + +protected: + virtual void accept0(ASTVisitor *visitor); +}; + class CPLUSPLUS_EXPORT QtMethodAST: public ExpressionAST { public: diff --git a/shared/cplusplus/ASTVisitor.cpp b/shared/cplusplus/ASTVisitor.cpp index 9fbf242700e79d9c115c602ecd0a2ad9a22b3b19..7b9ca1ed7faeb251e911a61803594198790a6bd2 100644 --- a/shared/cplusplus/ASTVisitor.cpp +++ b/shared/cplusplus/ASTVisitor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/ASTVisitor.h b/shared/cplusplus/ASTVisitor.h index 28097c14f704af8151d5a5a76c63f8d3b6458d93..f8d2d6790eecbe3bba01a24d1014862696cac596 100644 --- a/shared/cplusplus/ASTVisitor.h +++ b/shared/cplusplus/ASTVisitor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -104,6 +104,7 @@ public: virtual bool visit(CastExpressionAST *) { return true; } virtual bool visit(CatchClauseAST *) { return true; } virtual bool visit(ClassSpecifierAST *) { return true; } + virtual bool visit(CompoundLiteralAST *) { return true; } virtual bool visit(CompoundStatementAST *) { return true; } virtual bool visit(ConditionAST *) { return true; } virtual bool visit(ConditionalExpressionAST *) { return true; } diff --git a/shared/cplusplus/ASTfwd.h b/shared/cplusplus/ASTfwd.h index 79f794f629ed7c90235ba29911c7d3e57f710418..b4f5283a74885d072527d034c638c6c168b8302d 100644 --- a/shared/cplusplus/ASTfwd.h +++ b/shared/cplusplus/ASTfwd.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -77,6 +77,7 @@ class CaseStatementAST; class CastExpressionAST; class CatchClauseAST; class ClassSpecifierAST; +class CompoundLiteralAST; class CompoundStatementAST; class ConditionAST; class ConditionalExpressionAST; diff --git a/shared/cplusplus/Array.cpp b/shared/cplusplus/Array.cpp index e6b9c9f4fe1a5031e243aacb0575341c6a996989..7159008fd42f0dc1f25e25f913f65da20c2be6c9 100644 --- a/shared/cplusplus/Array.cpp +++ b/shared/cplusplus/Array.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/Array.h b/shared/cplusplus/Array.h index 08618fce03a077f20057594ae66d957e35b20216..c639affc89f932517d515b4947a47e96ed3f9d7c 100644 --- a/shared/cplusplus/Array.h +++ b/shared/cplusplus/Array.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/CPlusPlusForwardDeclarations.h b/shared/cplusplus/CPlusPlusForwardDeclarations.h index 78f06e647d36bcb753a80e2ed5c4890a9b71d019..31b01bfd815d4644a1ae34d9f370ec95400a7d97 100644 --- a/shared/cplusplus/CPlusPlusForwardDeclarations.h +++ b/shared/cplusplus/CPlusPlusForwardDeclarations.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/CheckDeclaration.cpp b/shared/cplusplus/CheckDeclaration.cpp index bb83b6a67068587bbcac0905e3b2462d782b28b7..610d57626f43849816ee078788eb0c0dcc58d2f2 100644 --- a/shared/cplusplus/CheckDeclaration.cpp +++ b/shared/cplusplus/CheckDeclaration.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/CheckDeclaration.h b/shared/cplusplus/CheckDeclaration.h index 6c6148ce6a5ba847b10db3a2542d86459d2b11d6..6e82678fa0182eca7ff3087349af87fce66d17c6 100644 --- a/shared/cplusplus/CheckDeclaration.h +++ b/shared/cplusplus/CheckDeclaration.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/CheckDeclarator.cpp b/shared/cplusplus/CheckDeclarator.cpp index d21f14cecf0964a2f72cc1aeeb9d6feca00f095b..13120fec589265f83e4989b174a00f10c72e9779 100644 --- a/shared/cplusplus/CheckDeclarator.cpp +++ b/shared/cplusplus/CheckDeclarator.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/CheckDeclarator.h b/shared/cplusplus/CheckDeclarator.h index 11f14c5e5018afa3c16bd28f9ee8249468dbc713..b1de623b00eb16e0efbfd0a211b06a149f19f2ec 100644 --- a/shared/cplusplus/CheckDeclarator.h +++ b/shared/cplusplus/CheckDeclarator.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/CheckExpression.cpp b/shared/cplusplus/CheckExpression.cpp index 9976cbf500e874e448cbf4eae1930d139d62cebb..e546a99a5390740ee26818d5f4b746d3168b7aa1 100644 --- a/shared/cplusplus/CheckExpression.cpp +++ b/shared/cplusplus/CheckExpression.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -333,6 +333,13 @@ bool CheckExpression::visit(QtMethodAST *ast) return false; } +bool CheckExpression::visit(CompoundLiteralAST *ast) +{ + /*FullySpecifiedType exprTy = */ semantic()->check(ast->type_id, _scope); + /*FullySpecifiedType initTy = */ semantic()->check(ast->initializer, _scope); + return false; +} + bool CheckExpression::visit(CallAST *ast) { for (ExpressionListAST *it = ast->expression_list; it; it = it->next) { diff --git a/shared/cplusplus/CheckExpression.h b/shared/cplusplus/CheckExpression.h index e018e7dc89bca032777ed6d4f942a5aa5608126a..5b5ae884b77254e4fa7cce10f439d4f4e7cbe275 100644 --- a/shared/cplusplus/CheckExpression.h +++ b/shared/cplusplus/CheckExpression.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -98,6 +98,7 @@ protected: virtual bool visit(TypeIdAST *ast); virtual bool visit(UnaryExpressionAST *ast); virtual bool visit(QtMethodAST *ast); + virtual bool visit(CompoundLiteralAST *ast); //names virtual bool visit(QualifiedNameAST *ast); diff --git a/shared/cplusplus/CheckName.cpp b/shared/cplusplus/CheckName.cpp index c2976a9aa38f6bf650580a19c0fd7e7ab922df2b..09b90f3cb804f4c777eaa4b29ee96a16e52a7d8d 100644 --- a/shared/cplusplus/CheckName.cpp +++ b/shared/cplusplus/CheckName.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/CheckName.h b/shared/cplusplus/CheckName.h index 98caed462d866e032b7b12ef19f58df5d345ad1f..4b0631b00251acdadd4b0aec487142b192d97afe 100644 --- a/shared/cplusplus/CheckName.h +++ b/shared/cplusplus/CheckName.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/CheckSpecifier.cpp b/shared/cplusplus/CheckSpecifier.cpp index dabb4f4bd216203cd66661e0dcc623d1241bce42..eeb59eebcc0aeb02f334c4283febe187f204e656 100644 --- a/shared/cplusplus/CheckSpecifier.cpp +++ b/shared/cplusplus/CheckSpecifier.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/CheckSpecifier.h b/shared/cplusplus/CheckSpecifier.h index d93c8db480814fdb8a5ff71ad99ed6049687b2ad..3e6ddc57baed3068d0eacd2f5fd7bdb6b59da0aa 100644 --- a/shared/cplusplus/CheckSpecifier.h +++ b/shared/cplusplus/CheckSpecifier.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/CheckStatement.cpp b/shared/cplusplus/CheckStatement.cpp index 7758bd0381f5b2bad56ce110fc2e9f82597fbc7b..67902ff252bb3338c50e6e7055ed06ce199d64c7 100644 --- a/shared/cplusplus/CheckStatement.cpp +++ b/shared/cplusplus/CheckStatement.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/CheckStatement.h b/shared/cplusplus/CheckStatement.h index a6f02fe39168ca6c2a6170abeeb8e9fb3c9d6540..856f64be8f80b7e7e47f6101af9071344d825d26 100644 --- a/shared/cplusplus/CheckStatement.h +++ b/shared/cplusplus/CheckStatement.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/Control.cpp b/shared/cplusplus/Control.cpp index f6b4e229c21e98046f90f44b6b6a935bcb5b64b0..e44d84a1aee801bf7daf22bf3348ae8bcb876af3 100644 --- a/shared/cplusplus/Control.cpp +++ b/shared/cplusplus/Control.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/Control.h b/shared/cplusplus/Control.h index 87015c20e80e9a9b589e7b3587c3880cc46731cb..98c1bacdd29079061706c2a8f75859db52164d15 100644 --- a/shared/cplusplus/Control.h +++ b/shared/cplusplus/Control.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/CoreTypes.cpp b/shared/cplusplus/CoreTypes.cpp index b9184b48d5cff45d76091d69c0849dd0e5eeeffa..cf5a3ca4fb7e8775f825c56f6f0e1e58bd593db9 100644 --- a/shared/cplusplus/CoreTypes.cpp +++ b/shared/cplusplus/CoreTypes.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/CoreTypes.h b/shared/cplusplus/CoreTypes.h index b05bd96e4fe9a5caaf8ffc82503b072dafd48aa4..c3c04618385010d1d60c9b5946b925b889031be5 100644 --- a/shared/cplusplus/CoreTypes.h +++ b/shared/cplusplus/CoreTypes.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/DiagnosticClient.cpp b/shared/cplusplus/DiagnosticClient.cpp index 32ade8a066cfcf8a912670c43a82140c3a08e651..12670adef93ca3951a0c098d8d8dd49f18e39e94 100644 --- a/shared/cplusplus/DiagnosticClient.cpp +++ b/shared/cplusplus/DiagnosticClient.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/DiagnosticClient.h b/shared/cplusplus/DiagnosticClient.h index de60b120c4e72bdd6fe82031bb4be7874d4897aa..6fa06887c6cd73b838d9514ffade2c53badf5ec4 100644 --- a/shared/cplusplus/DiagnosticClient.h +++ b/shared/cplusplus/DiagnosticClient.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/FullySpecifiedType.cpp b/shared/cplusplus/FullySpecifiedType.cpp index 18b556c0099b200ca05843ead2c33100c8ae5afc..71dec2934bce0a229179203fdf664b27d84d55b7 100644 --- a/shared/cplusplus/FullySpecifiedType.cpp +++ b/shared/cplusplus/FullySpecifiedType.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/FullySpecifiedType.h b/shared/cplusplus/FullySpecifiedType.h index c484b943edf8ebb83cae19aa7178da05eb2bc8a7..d156fff5ab676df6243b464e447f7cead5d6896e 100644 --- a/shared/cplusplus/FullySpecifiedType.h +++ b/shared/cplusplus/FullySpecifiedType.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/Keywords.cpp b/shared/cplusplus/Keywords.cpp index 8cf8dbbd103749175fd26b688381469c204f3bd4..180feb341db52a8886ff7017928dc0c52ecf43db 100644 --- a/shared/cplusplus/Keywords.cpp +++ b/shared/cplusplus/Keywords.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/Lexer.cpp b/shared/cplusplus/Lexer.cpp index 1f4a0f51751001f0937744391f5632299b824006..73c12524d79dcf458636db27d08bcab0df4b2475 100644 --- a/shared/cplusplus/Lexer.cpp +++ b/shared/cplusplus/Lexer.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/Lexer.h b/shared/cplusplus/Lexer.h index b6e361d3da78f7de2ec1563ad7d1284ac96bf391..4cb62493db80cc81077de9e024791707530dc1d4 100644 --- a/shared/cplusplus/Lexer.h +++ b/shared/cplusplus/Lexer.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/LiteralTable.cpp b/shared/cplusplus/LiteralTable.cpp index e448330ef8ab2b2b0924498dbca382deb4f3b9ef..21e3b2d8dd7631f902d54656c2a812275bc7fc2b 100644 --- a/shared/cplusplus/LiteralTable.cpp +++ b/shared/cplusplus/LiteralTable.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/LiteralTable.h b/shared/cplusplus/LiteralTable.h index 23de104dd8d769ce1a2a5e1d00324b6a10dc4eff..35744fe3601891b0bbc4d9889ef3aa1cb9ae4d0f 100644 --- a/shared/cplusplus/LiteralTable.h +++ b/shared/cplusplus/LiteralTable.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/Literals.cpp b/shared/cplusplus/Literals.cpp index a2d517d8b61894749f4a983b940f0d4b4873dacf..f7ac69f568a4991256807aaf7997070030f7b913 100644 --- a/shared/cplusplus/Literals.cpp +++ b/shared/cplusplus/Literals.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/Literals.h b/shared/cplusplus/Literals.h index 53e5c0dbef348b2eef4521f599a5124c148292e1..f55978b270e201decef8730dc0df718bff97e032 100644 --- a/shared/cplusplus/Literals.h +++ b/shared/cplusplus/Literals.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/MemoryPool.cpp b/shared/cplusplus/MemoryPool.cpp index a7c04691449d85ded3f11ceebb1a4c7c60a7d86e..880c6bb8846f553c94e296e2d48335d9e0ef929e 100644 --- a/shared/cplusplus/MemoryPool.cpp +++ b/shared/cplusplus/MemoryPool.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/MemoryPool.h b/shared/cplusplus/MemoryPool.h index 9647b673a6e3a8e7b47e2340c784cef86d1cf9b8..13c61c9d248d92f037870ee8ffa1b0630eff3c00 100644 --- a/shared/cplusplus/MemoryPool.h +++ b/shared/cplusplus/MemoryPool.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/Name.cpp b/shared/cplusplus/Name.cpp index 8fc1d82c01c8d7b6f47e29288c178b221621c2a3..89e875a93cb9bc29f245fb805ce1d12aa23a3c56 100644 --- a/shared/cplusplus/Name.cpp +++ b/shared/cplusplus/Name.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/Name.h b/shared/cplusplus/Name.h index ba7a359fae8ee3b4105eadf8207ed295eeaacf39..1f30a28516661d29c72746e6891292f680b60953 100644 --- a/shared/cplusplus/Name.h +++ b/shared/cplusplus/Name.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/NameVisitor.cpp b/shared/cplusplus/NameVisitor.cpp index 8573759be4a85720d24a991d2ebe88b260592cd7..d4f1af6575f2aa124919379a414e7951c1278c17 100644 --- a/shared/cplusplus/NameVisitor.cpp +++ b/shared/cplusplus/NameVisitor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/NameVisitor.h b/shared/cplusplus/NameVisitor.h index 3f8ece388598730acc35a6c3172529475bfbcd63..5cea38b9f881499506dbee9479afde23b4d39210 100644 --- a/shared/cplusplus/NameVisitor.h +++ b/shared/cplusplus/NameVisitor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/Names.cpp b/shared/cplusplus/Names.cpp index 186dfa9e17b1fd3e2362cff5cc0e6337dcc49c78..35bb84b44c234127fb93519654bf68bb1926e14d 100644 --- a/shared/cplusplus/Names.cpp +++ b/shared/cplusplus/Names.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/Names.h b/shared/cplusplus/Names.h index 18b21f14d3e0d53b21526e7d6f0c7ae0d084c15a..86e6813c6c2fd02b70707272f4ca1a658caf8a26 100644 --- a/shared/cplusplus/Names.h +++ b/shared/cplusplus/Names.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/Parser.cpp b/shared/cplusplus/Parser.cpp index 407cbc36fd8530b797cee2f181ae1708dcc988d3..ae9f39469a0671c7732d26cf3ae617a9e92e7be0 100644 --- a/shared/cplusplus/Parser.cpp +++ b/shared/cplusplus/Parser.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -57,6 +57,7 @@ #include "AST.h" #include "Literals.h" #include <cstdlib> +#include <cstring> #include <cassert> CPLUSPLUS_BEGIN_NAMESPACE @@ -1621,8 +1622,7 @@ bool Parser::parseInitializerClause(ExpressionAST *&node) ArrayInitializerAST *ast = new (_pool) ArrayInitializerAST; ast->lbrace_token = consumeToken(); parseInitializerList(ast->expression_list); - if (LA() == T_RBRACE) - ast->rbrace_token = consumeToken(); + match(T_RBRACE, &ast->rbrace_token); node = ast; return true; } @@ -2702,8 +2702,30 @@ bool Parser::parseCorePostfixExpression(ExpressionAST *&node) return true; } } - blockErrors(blocked); rewind(start); + + // look for compound literals + if (LA() == T_LPAREN) { + unsigned lparen_token = consumeToken(); + ExpressionAST *type_id = 0; + if (parseTypeId(type_id) && LA() == T_RPAREN) { + unsigned rparen_token = consumeToken(); + if (LA() == T_LBRACE) { + blockErrors(blocked); + + CompoundLiteralAST *ast = new (_pool) CompoundLiteralAST; + ast->lparen_token = lparen_token; + ast->type_id = type_id; + ast->rparen_token = rparen_token; + parseInitializerClause(ast->initializer); + node = ast; + return true; + } + } + rewind(start); + } + + blockErrors(blocked); return parsePrimaryExpression(node); } } @@ -3552,6 +3574,9 @@ bool Parser::parseObjClassInstanceVariables() bool Parser::parseObjCInterfaceMemberDeclaration() { switch (LA()) { + case T_AT_END: + return false; + case T_AT_REQUIRED: case T_AT_OPTIONAL: consumeToken(); @@ -3570,9 +3595,20 @@ bool Parser::parseObjCInterfaceMemberDeclaration() case T_MINUS: return parseObjCMethodPrototype(); - default: - return false; + case T_ENUM: + case T_CLASS: + case T_STRUCT: + case T_UNION: { + DeclarationAST *declaration = 0; + return parseSimpleDeclaration(declaration, /*accept struct declarators */ true); } + + default: { + DeclarationAST *declaration = 0; + return parseSimpleDeclaration(declaration, /*accept struct declarators */ true); + } // default + + } // switch } // objc-instance-variable-declaration ::= objc-visibility-specifier @@ -3589,7 +3625,7 @@ bool Parser::parseObjCInstanceVariableDeclaration(DeclarationAST *&node) return true; default: - return parseBlockDeclaration(node); + return parseSimpleDeclaration(node, true); } } @@ -3612,7 +3648,7 @@ bool Parser::parseObjCPropertyDeclaration(DeclarationAST *&, SpecifierAST *) } DeclarationAST *simple_declaration = 0; - parseSimpleDeclaration(simple_declaration, /*accept-struct-declarators = */ false); + parseSimpleDeclaration(simple_declaration, /*accept-struct-declarators = */ true); return true; } @@ -3736,6 +3772,19 @@ bool Parser::parseObjCKeywordDeclaration() bool Parser::parseObjCTypeQualifiers() { + if (LA() != T_IDENTIFIER) + return false; + + Identifier *id = tok().identifier; + if (! strcmp("in", id->chars()) || + ! strcmp("out", id->chars()) || + ! strcmp("inout", id->chars()) || + ! strcmp("bycopy", id->chars()) || + ! strcmp("byref", id->chars()) || + ! strcmp("oneway", id->chars())) { + consumeToken(); + return true; + } return false; } diff --git a/shared/cplusplus/Parser.h b/shared/cplusplus/Parser.h index 84bf03e74e670683d5d68316737e201c85fcb726..75fad457fad38efb7fb173f4496e169adeca7bcd 100644 --- a/shared/cplusplus/Parser.h +++ b/shared/cplusplus/Parser.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/PrettyPrinter.cpp b/shared/cplusplus/PrettyPrinter.cpp index 72338576b6b25665a6154cf6bf4090ede03592d9..6acb109dcfb41d1aa5467cee7f0ac63f1f8c1746 100644 --- a/shared/cplusplus/PrettyPrinter.cpp +++ b/shared/cplusplus/PrettyPrinter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -1281,3 +1281,13 @@ bool PrettyPrinter::visit(QtMethodAST *ast) out << ')'; return false; } + +bool PrettyPrinter::visit(CompoundLiteralAST *ast) +{ + out << '('; + accept(ast->type_id); + out << ')'; + out << ' '; + accept(ast->initializer); + return false; +} diff --git a/shared/cplusplus/PrettyPrinter.h b/shared/cplusplus/PrettyPrinter.h index 966ebacd0e60c65326f5743e094497128642ef12..c69ea2cf5449be9144f83ac6cf7987414dd3ae02 100644 --- a/shared/cplusplus/PrettyPrinter.h +++ b/shared/cplusplus/PrettyPrinter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -66,6 +66,7 @@ protected: virtual bool visit(CastExpressionAST *ast); virtual bool visit(CatchClauseAST *ast); virtual bool visit(ClassSpecifierAST *ast); + virtual bool visit(CompoundLiteralAST *ast); virtual bool visit(CompoundStatementAST *ast); virtual bool visit(ConditionAST *ast); virtual bool visit(ConditionalExpressionAST *ast); diff --git a/shared/cplusplus/Scope.cpp b/shared/cplusplus/Scope.cpp index e6a6add9e0f4408e5ee8f500361e1d20437b87f3..bdca9f8536d9175386be846db68ecbda43fbe6d7 100644 --- a/shared/cplusplus/Scope.cpp +++ b/shared/cplusplus/Scope.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/Scope.h b/shared/cplusplus/Scope.h index 8d5dd29c753ff14b5970ea2cbe3dd00ecdbde21b..44387718ff35f8a92f68c97365329b79a477cad3 100644 --- a/shared/cplusplus/Scope.h +++ b/shared/cplusplus/Scope.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/Semantic.cpp b/shared/cplusplus/Semantic.cpp index 79da36b891ca24cc2fe2c1913812c99580fa821f..41716eb5aad9457dffe71eff6bf78acc5287e963 100644 --- a/shared/cplusplus/Semantic.cpp +++ b/shared/cplusplus/Semantic.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/Semantic.h b/shared/cplusplus/Semantic.h index 113b373024cbdb7fa439fdfa9c39bd9c5e785dbb..ac7b1b8c86f158fed7274ce77563133cab38266b 100644 --- a/shared/cplusplus/Semantic.h +++ b/shared/cplusplus/Semantic.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/SemanticCheck.cpp b/shared/cplusplus/SemanticCheck.cpp index 979c7f69a35a3c91f9eb33fd541fd5bab75655ee..27b1a56429c618b0599b3492f7066e458758e253 100644 --- a/shared/cplusplus/SemanticCheck.cpp +++ b/shared/cplusplus/SemanticCheck.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/SemanticCheck.h b/shared/cplusplus/SemanticCheck.h index 453e517b2a6aa99c30de74dd2efb300500c7332b..0ecdeac6035170ddcc37b89938a91b69d3e1a61f 100644 --- a/shared/cplusplus/SemanticCheck.h +++ b/shared/cplusplus/SemanticCheck.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/Symbol.cpp b/shared/cplusplus/Symbol.cpp index 5d392f38263ffe79da49fa0c1b8ec8956f5a8795..cdcd389118859866f8bae91541dac2453af57bc1 100644 --- a/shared/cplusplus/Symbol.cpp +++ b/shared/cplusplus/Symbol.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/Symbol.h b/shared/cplusplus/Symbol.h index fe274339a5d3d05a42042d35475f65cce8b2c60d..e9d150e8d5e7be431771c0202458b698be771e38 100644 --- a/shared/cplusplus/Symbol.h +++ b/shared/cplusplus/Symbol.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/SymbolVisitor.cpp b/shared/cplusplus/SymbolVisitor.cpp index 6a066175962da18a461f0fe1ff2a6aa19e2037d3..95cab998ed5ada402cdd2806db8fad8e1695500d 100644 --- a/shared/cplusplus/SymbolVisitor.cpp +++ b/shared/cplusplus/SymbolVisitor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/SymbolVisitor.h b/shared/cplusplus/SymbolVisitor.h index a09924d017236df4ab0ca4841efd005efe5d71de..f0f4738de7f571ed06454aafa95492a069789914 100644 --- a/shared/cplusplus/SymbolVisitor.h +++ b/shared/cplusplus/SymbolVisitor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/Symbols.cpp b/shared/cplusplus/Symbols.cpp index 7dd497426d89fa5ae25344ba8de58550dd4c6317..a7ed4682ffefc7bb833174d9f89df0e08cc6bf6c 100644 --- a/shared/cplusplus/Symbols.cpp +++ b/shared/cplusplus/Symbols.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/Symbols.h b/shared/cplusplus/Symbols.h index 3bedf3e88829caeef6580a14080becb4f114b955..c69483a2519f99cb3cb9fcd68ca26ea0acbba3ac 100644 --- a/shared/cplusplus/Symbols.h +++ b/shared/cplusplus/Symbols.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/Token.cpp b/shared/cplusplus/Token.cpp index 5ebd873dce21dac85c4ad601c197dfc40bfa4ee8..eb672958cd68697653822fcce7d3ef775ef549f2 100644 --- a/shared/cplusplus/Token.cpp +++ b/shared/cplusplus/Token.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/Token.h b/shared/cplusplus/Token.h index fdc3298202f697f35604cebcb74ecc75ea36dbf5..f48654aa7738c7ff2b782de1d51847731d56b56b 100644 --- a/shared/cplusplus/Token.h +++ b/shared/cplusplus/Token.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/TranslationUnit.cpp b/shared/cplusplus/TranslationUnit.cpp index caaa9c7d4e709062517f790806e3d73609e21d90..40a95c0f05d7f49860012e780ec2cc7ad75583f9 100644 --- a/shared/cplusplus/TranslationUnit.cpp +++ b/shared/cplusplus/TranslationUnit.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/TranslationUnit.h b/shared/cplusplus/TranslationUnit.h index ada079ff48447b0171bc2e709f838359ef12ceed..aa490701ef9d01ab7ad6478571bd10e996e6c674 100644 --- a/shared/cplusplus/TranslationUnit.h +++ b/shared/cplusplus/TranslationUnit.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/Type.cpp b/shared/cplusplus/Type.cpp index e5d70e088ad8e9580773b5975f895a2170bda5b0..98ccd3c893fc8f02dd2605afaa925c263d80a5ea 100644 --- a/shared/cplusplus/Type.cpp +++ b/shared/cplusplus/Type.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/Type.h b/shared/cplusplus/Type.h index e6d360bc4fd099fcf646cbd7a85f35152ea660b8..7cc347d55322cbb3f5683e21475427410cfccfa5 100644 --- a/shared/cplusplus/Type.h +++ b/shared/cplusplus/Type.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/TypeVisitor.cpp b/shared/cplusplus/TypeVisitor.cpp index 1428addedc7379605999c5803c70439a5f9c7e57..937080e5a5f3aec658797303e1595c5e372e449d 100644 --- a/shared/cplusplus/TypeVisitor.cpp +++ b/shared/cplusplus/TypeVisitor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/cplusplus/TypeVisitor.h b/shared/cplusplus/TypeVisitor.h index 2bd6fb15c921ea84609ece44c950a300a20d5c96..16fb37c4ad0a5130bd7086ac7f1be159d71e1d6c 100644 --- a/shared/cplusplus/TypeVisitor.h +++ b/shared/cplusplus/TypeVisitor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/designerintegrationv2/formresizer.cpp b/shared/designerintegrationv2/formresizer.cpp index 9e1816a9668e525424f7af34c240ea489579f09b..29326f698951729512dc204b210c5ecfd6622306 100644 --- a/shared/designerintegrationv2/formresizer.cpp +++ b/shared/designerintegrationv2/formresizer.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/designerintegrationv2/formresizer.h b/shared/designerintegrationv2/formresizer.h index c88619b8049618c3114e763731fb8da5dc77484a..c76c644a73ec22420ecc93a6ef692f7b8160911c 100644 --- a/shared/designerintegrationv2/formresizer.h +++ b/shared/designerintegrationv2/formresizer.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/designerintegrationv2/sizehandlerect.cpp b/shared/designerintegrationv2/sizehandlerect.cpp index f5c67a47e6f1171dc3e62795caba381cd9606ed3..7d6c21407ef7ace185eb4804af16c7555393d062 100644 --- a/shared/designerintegrationv2/sizehandlerect.cpp +++ b/shared/designerintegrationv2/sizehandlerect.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/designerintegrationv2/sizehandlerect.h b/shared/designerintegrationv2/sizehandlerect.h index 2438781227c50e099cdee2b879d9dd929773748f..1800f29f50d2ce1ba0fa1f5755a47c633af44115 100644 --- a/shared/designerintegrationv2/sizehandlerect.h +++ b/shared/designerintegrationv2/sizehandlerect.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/designerintegrationv2/widgethost.cpp b/shared/designerintegrationv2/widgethost.cpp index cdda8e3a1a8b09f75e7d78934e9553f15b68a2ba..bc5d6336e0dc9d00768c487937c70d13f3346c9a 100644 --- a/shared/designerintegrationv2/widgethost.cpp +++ b/shared/designerintegrationv2/widgethost.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/designerintegrationv2/widgethost.h b/shared/designerintegrationv2/widgethost.h index 8aaf1d781d85f9d4688afea89aebdabaae03f1d5..c8500aff90830d15c3f49a6e3442b48b37d00b71 100644 --- a/shared/designerintegrationv2/widgethost.h +++ b/shared/designerintegrationv2/widgethost.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/designerintegrationv2/widgethostconstants.h b/shared/designerintegrationv2/widgethostconstants.h index e71b3a2dd1f8c19975ee8b9799a3f5800b4827fc..f42f1851ac28f9dfdc4694110bffa9c41c8e960c 100644 --- a/shared/designerintegrationv2/widgethostconstants.h +++ b/shared/designerintegrationv2/widgethostconstants.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/help/bookmarkmanager.cpp b/shared/help/bookmarkmanager.cpp index bb223eb2068a6af29f18bcfb8f0a73264035a814..dfe4b7f9d5f83079bbeff55614ab11a8e0c17677 100644 --- a/shared/help/bookmarkmanager.cpp +++ b/shared/help/bookmarkmanager.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/help/bookmarkmanager.h b/shared/help/bookmarkmanager.h index 892c74b77c41754d9e60cd8077b9b7d5c82ea6c8..a1b5e7171ae03d3918d48d820065b08b0151815b 100644 --- a/shared/help/bookmarkmanager.h +++ b/shared/help/bookmarkmanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/help/contentwindow.cpp b/shared/help/contentwindow.cpp index 768a1223ed9df18d5686a9c463e34d9cf00b32c1..464f583947240bc4ec7be7c587e3409e275e8f11 100644 --- a/shared/help/contentwindow.cpp +++ b/shared/help/contentwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/help/contentwindow.h b/shared/help/contentwindow.h index bbd4a26a3d3fc027b10dc9065ae125f59bdb155b..f61f5e1e72adc78e7eb47256f262c5c1f81bd22b 100644 --- a/shared/help/contentwindow.h +++ b/shared/help/contentwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/help/filternamedialog.cpp b/shared/help/filternamedialog.cpp index 197bf290f79d3e12be12bcb9f6545651d8982200..74d1b001879c76610d78378982691ee2aad49a17 100644 --- a/shared/help/filternamedialog.cpp +++ b/shared/help/filternamedialog.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/help/filternamedialog.h b/shared/help/filternamedialog.h index f5b90279893daf314ab1ee9a46cbc74edc012af6..00aa1eb485c90d5c08cc4257885d362c53a14d05 100644 --- a/shared/help/filternamedialog.h +++ b/shared/help/filternamedialog.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/help/helpviewer.cpp b/shared/help/helpviewer.cpp index 59c6df629a4f6c11e2e73e11c710493a5749ec10..9b86d8e1cf3bd7944a7af992ca43a62d98945a31 100644 --- a/shared/help/helpviewer.cpp +++ b/shared/help/helpviewer.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/help/helpviewer.h b/shared/help/helpviewer.h index 75659da563343a860f9cf96f0a2dddcbac80ad90..b268fa260cb61279da7193fc383b7f7bff574c1a 100644 --- a/shared/help/helpviewer.h +++ b/shared/help/helpviewer.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/help/indexwindow.cpp b/shared/help/indexwindow.cpp index 3879dfc8c2f2852b132b014291a599b0b877722b..f55148c91d53e976ffe40e3d46cd3f30e4e97d16 100644 --- a/shared/help/indexwindow.cpp +++ b/shared/help/indexwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/help/indexwindow.h b/shared/help/indexwindow.h index 7f9ddff0998cab1341292f4d0bd2f483e86814d6..19cbca8b24ab6eed9bb0a0358cc23002d59ca3d3 100644 --- a/shared/help/indexwindow.h +++ b/shared/help/indexwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/help/topicchooser.cpp b/shared/help/topicchooser.cpp index 31b8d52c05ef89fbacc70e2e0ee0519e9f866726..df9fbf9897c58ba0efec83cba576c159a02a72b5 100644 --- a/shared/help/topicchooser.cpp +++ b/shared/help/topicchooser.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/help/topicchooser.h b/shared/help/topicchooser.h index e29a9aae7e1e97eb1fa7b4b2dcc978c414dfe863..37fb3ab14c86981066dc6d58e4ef6035b5335cd4 100644 --- a/shared/help/topicchooser.h +++ b/shared/help/topicchooser.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/indenter/constants.cpp b/shared/indenter/constants.cpp index 9c66b8d2606b58a8064be6ad3114a5a017be2749..ec6b743a3ae0ffc196059140def219074393fc55 100644 --- a/shared/indenter/constants.cpp +++ b/shared/indenter/constants.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/indenter/indenter.h b/shared/indenter/indenter.h index ea078a2c80c671144b0cd0942c54619ea0502271..03fb705a7ce68bc3f4228fe17bce9f58110ee369 100644 --- a/shared/indenter/indenter.h +++ b/shared/indenter/indenter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/indenter/indenter_impl.h b/shared/indenter/indenter_impl.h index 135cbc41092df7620c95ce0276716e512fd3822e..b09685e44d2b9579b605add15c2f91615083a21d 100644 --- a/shared/indenter/indenter_impl.h +++ b/shared/indenter/indenter_impl.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/indenter/test/main.cpp b/shared/indenter/test/main.cpp index 26ffbdc4e3cc770e10c33f76fc14929c52546b34..9adca6a3ee25d90c663a41387181dd4dfd109123 100644 --- a/shared/indenter/test/main.cpp +++ b/shared/indenter/test/main.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/namespace_global.h b/shared/namespace_global.h index 1eb8fed086b6abcca60867722bc15862460ceb71..9a63debfde576a34191e88d18e4466ccf6e8d77b 100644 --- a/shared/namespace_global.h +++ b/shared/namespace_global.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/proparser/abstractproitemvisitor.h b/shared/proparser/abstractproitemvisitor.h index 340e7a00b5b70b0c637c83ff31b2f0d3b0c841df..adc224ff707d72164b6f886d700c883202a61ded 100644 --- a/shared/proparser/abstractproitemvisitor.h +++ b/shared/proparser/abstractproitemvisitor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/proparser/procommandmanager.cpp b/shared/proparser/procommandmanager.cpp index fa0df436983434e3d1ab2fe9e63bb635d029f7b9..2be4ad69f43736a707706f37859b1ba0df5e6c45 100644 --- a/shared/proparser/procommandmanager.cpp +++ b/shared/proparser/procommandmanager.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/proparser/procommandmanager.h b/shared/proparser/procommandmanager.h index 5d0dbb93787303dbe4d1d4a24e4151ef4fe1225c..2c493bac033d8dc6ac3d15f05060650dd31e429f 100644 --- a/shared/proparser/procommandmanager.h +++ b/shared/proparser/procommandmanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/proparser/proeditor.cpp b/shared/proparser/proeditor.cpp index 63215a9f2956e02dafcb2cd9d198c2d64434f4fd..23eef39c77cbc2470da156bdd8f1575ad7c6c248 100644 --- a/shared/proparser/proeditor.cpp +++ b/shared/proparser/proeditor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/proparser/proeditor.h b/shared/proparser/proeditor.h index bef371c27b18d05e67e1c5f1d2102a4efbcb62eb..6469245f5e5315736010eb939523c43a6f796831 100644 --- a/shared/proparser/proeditor.h +++ b/shared/proparser/proeditor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/proparser/proeditormodel.cpp b/shared/proparser/proeditormodel.cpp index 7708c991eaf6cd9fa448834a850c7d621b002d06..787ea76410fec39e44f35b30fcbd33ec56dfb46a 100644 --- a/shared/proparser/proeditormodel.cpp +++ b/shared/proparser/proeditormodel.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/proparser/proeditormodel.h b/shared/proparser/proeditormodel.h index ab5bafae13ee13aa6d254275b71a488a13421d3e..22f6c87e3def597d71e641115a136339102c3e2c 100644 --- a/shared/proparser/proeditormodel.h +++ b/shared/proparser/proeditormodel.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/proparser/profileevaluator.cpp b/shared/proparser/profileevaluator.cpp index 7f029f00185bf252b2ea2e767eaa558df70f0b3d..790edab4571a16fafe2d0d0dcec0b7cf382db88f 100644 --- a/shared/proparser/profileevaluator.cpp +++ b/shared/proparser/profileevaluator.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/proparser/profileevaluator.h b/shared/proparser/profileevaluator.h index 9b7b77fb0c77ebba84bf96878ff1960eb40e590d..a0b860dba0a5c05def39d04553a92db507fa4032 100644 --- a/shared/proparser/profileevaluator.h +++ b/shared/proparser/profileevaluator.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/proparser/proiteminfo.cpp b/shared/proparser/proiteminfo.cpp index 5905acfb0ad51bc06b2cb881d32ec4c54a2d2910..7ada47a301a2bc06be0d5337eb2b7f08ecde0725 100644 --- a/shared/proparser/proiteminfo.cpp +++ b/shared/proparser/proiteminfo.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/proparser/proiteminfo.h b/shared/proparser/proiteminfo.h index 9d7e1bac8ad11ebf5d922e49048dbf0f5d81d5f9..01be6a4f83b3399d48209a129932abfec5dc90b7 100644 --- a/shared/proparser/proiteminfo.h +++ b/shared/proparser/proiteminfo.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/proparser/proitems.cpp b/shared/proparser/proitems.cpp index 1e686c5578b6e17b5e86cb730df5d44b3cd4b29b..60c5b29b71b8dab8d483db54a00fa0f6e2a4f8f0 100644 --- a/shared/proparser/proitems.cpp +++ b/shared/proparser/proitems.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/proparser/proitems.h b/shared/proparser/proitems.h index 01ecf0f0f2ddbaf3c6032270376193722aa4705f..9e531479346d04a07c3e8c6a2b2c3567e0b074e2 100644 --- a/shared/proparser/proitems.h +++ b/shared/proparser/proitems.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/proparser/proparserutils.h b/shared/proparser/proparserutils.h index 6705ffad39f33a8bdf0a939dae89313c7ad4f4c7..7c751c9c273257ef77ac5c2933498e396a3c1b9f 100644 --- a/shared/proparser/proparserutils.h +++ b/shared/proparser/proparserutils.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/proparser/prowriter.cpp b/shared/proparser/prowriter.cpp index e1e28eb4c51385f269c86eaa768cfcbde99d76bd..d5558e9b8c020814c74524cffb47ec38dd19e140 100644 --- a/shared/proparser/prowriter.cpp +++ b/shared/proparser/prowriter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/proparser/prowriter.h b/shared/proparser/prowriter.h index 664ab6db151eb68df83c285a3f22ae2503d5239c..a2282b357e19b11edd31b81700d16515d57047cf 100644 --- a/shared/proparser/prowriter.h +++ b/shared/proparser/prowriter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/proparser/proxml.cpp b/shared/proparser/proxml.cpp index f3d1edb31a496723a39e50a20bdb00b6626ae249..96091436ee5a60ad44c7af84670d997a58b48936 100644 --- a/shared/proparser/proxml.cpp +++ b/shared/proparser/proxml.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/proparser/proxml.h b/shared/proparser/proxml.h index 059d90f7e91bf901dd8ce973d5e7c230e54e60ad..f343c703cf5aafb5baef4edc61a3cb605a306d7c 100644 --- a/shared/proparser/proxml.h +++ b/shared/proparser/proxml.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/proparser/valueeditor.cpp b/shared/proparser/valueeditor.cpp index aafbddbf73c7db433bd2a62a9d7bddcf697fa304..b85d70cf2a405ed70fbcf672f97c52051ddeb285 100644 --- a/shared/proparser/valueeditor.cpp +++ b/shared/proparser/valueeditor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/proparser/valueeditor.h b/shared/proparser/valueeditor.h index f3fd2f9c87d11bcc2c41468cb46800124d0bd600..5ed6cbea2bc5aac316f621a8fffad14dd4432e70 100644 --- a/shared/proparser/valueeditor.h +++ b/shared/proparser/valueeditor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/qrceditor/qrceditor.cpp b/shared/qrceditor/qrceditor.cpp index 741ac12f63ea789d4a355a1109039d5588a62949..e4f04c9762e71de5d38d6b90906d8a637d8464d1 100644 --- a/shared/qrceditor/qrceditor.cpp +++ b/shared/qrceditor/qrceditor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/qrceditor/qrceditor.h b/shared/qrceditor/qrceditor.h index 3c4f3a2497e19eb0ec61db4dd333aa8e9738450e..44eab56623077409ffb902365029ebbf19754a1b 100644 --- a/shared/qrceditor/qrceditor.h +++ b/shared/qrceditor/qrceditor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/qrceditor/resourcefile.cpp b/shared/qrceditor/resourcefile.cpp index a0b7117c2cf561676e7438da5423f362a70619a9..b88444c6e16e356cf693b1131387ab40ebd85f51 100644 --- a/shared/qrceditor/resourcefile.cpp +++ b/shared/qrceditor/resourcefile.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/qrceditor/resourcefile_p.h b/shared/qrceditor/resourcefile_p.h index 28c01745416062d336006effdc213b14c4001714..61b6c594b64ddd1558598108a07e63c9c4221620 100644 --- a/shared/qrceditor/resourcefile_p.h +++ b/shared/qrceditor/resourcefile_p.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/qrceditor/resourceview.cpp b/shared/qrceditor/resourceview.cpp index 95caef482012b92be5d63f06b9ccd89074e80660..ee9c507337f2c06d23d9b26f30c8e86513ba1a29 100644 --- a/shared/qrceditor/resourceview.cpp +++ b/shared/qrceditor/resourceview.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/qrceditor/resourceview.h b/shared/qrceditor/resourceview.h index e3ac2f1c4e07fd18f463243e16a5693277110bb3..ae11b2db93de2c03b65f3ad12c5171d536d3e2ab 100644 --- a/shared/qrceditor/resourceview.h +++ b/shared/qrceditor/resourceview.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/qrceditor/test/main.cpp b/shared/qrceditor/test/main.cpp index 01fb1f9e7d9f25effeba2a85d126eed3d577cffc..481a3b09e780800282a505803c134ba636d75634 100644 --- a/shared/qrceditor/test/main.cpp +++ b/shared/qrceditor/test/main.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/qrceditor/test/mainwindow.cpp b/shared/qrceditor/test/mainwindow.cpp index e737efc52ef2f545c294860048cc29955b6a2e1a..22941ca59a41da9d63cc26591feec69eb8a206ec 100644 --- a/shared/qrceditor/test/mainwindow.cpp +++ b/shared/qrceditor/test/mainwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/qrceditor/test/mainwindow.h b/shared/qrceditor/test/mainwindow.h index cb33eebab85d714010cf8bc26c4dae0e944bb5a0..fec9d01402b4f7ca8e6430b7ad79630f32c58924 100644 --- a/shared/qrceditor/test/mainwindow.h +++ b/shared/qrceditor/test/mainwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/qrceditor/undocommands.cpp b/shared/qrceditor/undocommands.cpp index a6d23a21287f614de46d77733e8f931f529d1f57..171fffafa72a4b32195152700a3786bfb8f8d29b 100644 --- a/shared/qrceditor/undocommands.cpp +++ b/shared/qrceditor/undocommands.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/qrceditor/undocommands_p.h b/shared/qrceditor/undocommands_p.h index 5e277f59e8a1de05f0cea8ab2afbde8db75e5eb3..5a6f5af9a2daa9f3f1cd0db43f7b76d14f920385 100644 --- a/shared/qrceditor/undocommands_p.h +++ b/shared/qrceditor/undocommands_p.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/qscripthighlighter/qscripthighlighter.cpp b/shared/qscripthighlighter/qscripthighlighter.cpp index 776d9ca74323db099347cef731257b3c175a3db2..390e3ca466446e1a4caa133e0f850fe16cf19a1d 100644 --- a/shared/qscripthighlighter/qscripthighlighter.cpp +++ b/shared/qscripthighlighter/qscripthighlighter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/qscripthighlighter/qscripthighlighter.h b/shared/qscripthighlighter/qscripthighlighter.h index bdb59ec49f790f6711357c938a36f9436aa81929..332026c77c81680cc4bb61bc87140757b8981427 100644 --- a/shared/qscripthighlighter/qscripthighlighter.h +++ b/shared/qscripthighlighter/qscripthighlighter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/qscripthighlighter/test/main.cpp b/shared/qscripthighlighter/test/main.cpp index cf914d0d59d99007bd93bf3160526878086c9261..9bfdf22d286b85b55da060ee076855b9a07a5cf8 100644 --- a/shared/qscripthighlighter/test/main.cpp +++ b/shared/qscripthighlighter/test/main.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/qtextended_integration.h b/shared/qtextended_integration.h index f02012c23d2c713215f579f9dfda5157540a1e4e..fe2bf5ad672c34b39f59b1d9277813ec8079fcc5 100644 --- a/shared/qtextended_integration.h +++ b/shared/qtextended_integration.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/qtlockedfile/qtlockedfile.cpp b/shared/qtlockedfile/qtlockedfile.cpp index a530f72f3880e9111e01e4c2c56ab45f5a388e95..fe2acfd612f948e8341861760b868deb0d971fe7 100644 --- a/shared/qtlockedfile/qtlockedfile.cpp +++ b/shared/qtlockedfile/qtlockedfile.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/qtlockedfile/qtlockedfile.h b/shared/qtlockedfile/qtlockedfile.h index 8dfbbb14c2a0cc91eb55079ecd1aec978ad99675..abf44fa452086a9070ef6056aa6b9a0467c18fa9 100644 --- a/shared/qtlockedfile/qtlockedfile.h +++ b/shared/qtlockedfile/qtlockedfile.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/qtlockedfile/qtlockedfile_unix.cpp b/shared/qtlockedfile/qtlockedfile_unix.cpp index 499198053b80a80c05f20185f2eda5acdc835e2c..10ae8f69c31b2ede7202537db11ee99a95fe81ba 100644 --- a/shared/qtlockedfile/qtlockedfile_unix.cpp +++ b/shared/qtlockedfile/qtlockedfile_unix.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/qtlockedfile/qtlockedfile_win.cpp b/shared/qtlockedfile/qtlockedfile_win.cpp index cc156b036449f5924be4d7592fdf3af3bed10904..f1d74e30fc5c48c0106ed2f98a2c011f89174964 100644 --- a/shared/qtlockedfile/qtlockedfile_win.cpp +++ b/shared/qtlockedfile/qtlockedfile_win.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/qtsingleapplication/qtlocalpeer.cpp b/shared/qtsingleapplication/qtlocalpeer.cpp index dbc6d3a683068803d4da6e3e3210a848874d5db6..4b68c67c3dd8b99c2bd6644056d15f49ac1d4651 100644 --- a/shared/qtsingleapplication/qtlocalpeer.cpp +++ b/shared/qtsingleapplication/qtlocalpeer.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/qtsingleapplication/qtlocalpeer.h b/shared/qtsingleapplication/qtlocalpeer.h index b0d78005c904e52b0e5471f82d86de04ba066918..e4021c9b12147ef5dc4e37e87c1dd057095368dd 100644 --- a/shared/qtsingleapplication/qtlocalpeer.h +++ b/shared/qtsingleapplication/qtlocalpeer.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/qtsingleapplication/qtsingleapplication.cpp b/shared/qtsingleapplication/qtsingleapplication.cpp index 90bd9cd35e87d0af75f083cbeba2754bdf3a59f8..8505d5b49c3b500495512aa7ac4f61913d9c786a 100644 --- a/shared/qtsingleapplication/qtsingleapplication.cpp +++ b/shared/qtsingleapplication/qtsingleapplication.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/qtsingleapplication/qtsingleapplication.h b/shared/qtsingleapplication/qtsingleapplication.h index f3a41c044bed0b1f9b2077c0105910f5771f347e..7e023ab981c7f4e8e3dec2478b43308bc3303375 100644 --- a/shared/qtsingleapplication/qtsingleapplication.h +++ b/shared/qtsingleapplication/qtsingleapplication.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/qtsingleapplication/qtsinglecoreapplication.cpp b/shared/qtsingleapplication/qtsinglecoreapplication.cpp index 1bb8d14f482fbe5679f042b3fdb8490a697b8502..c244459afb815cf677c23286f69a5d3f311fe63b 100644 --- a/shared/qtsingleapplication/qtsinglecoreapplication.cpp +++ b/shared/qtsingleapplication/qtsinglecoreapplication.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/qtsingleapplication/qtsinglecoreapplication.h b/shared/qtsingleapplication/qtsinglecoreapplication.h index 9b712fe62013f051a4304d92100ee7891d2ae706..a765c7d0703ce386e02d519e62ecc603ac3a615c 100644 --- a/shared/qtsingleapplication/qtsinglecoreapplication.h +++ b/shared/qtsingleapplication/qtsinglecoreapplication.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/scriptwrapper/interface_wrap_helpers.h b/shared/scriptwrapper/interface_wrap_helpers.h index e8dadffb99f890569c6063a560707103539ba377..0ead88f90fccfc22ebea0c1003ff54f018e82695 100644 --- a/shared/scriptwrapper/interface_wrap_helpers.h +++ b/shared/scriptwrapper/interface_wrap_helpers.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/shared/scriptwrapper/wrap_helpers.h b/shared/scriptwrapper/wrap_helpers.h index 961b1fef6d0dac04a9af8390b280422d8e0f4535..bba83728b90b51d75ff5faf18a06d6ef584c1f3d 100644 --- a/shared/scriptwrapper/wrap_helpers.h +++ b/shared/scriptwrapper/wrap_helpers.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/app/main.cpp b/src/app/main.cpp index 2efc04f14519bde7f49c1e46b068c60de9b59a8c..479ef576c3b86e086882464368cb9bc9793b3e16 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/aggregation/aggregate.cpp b/src/libs/aggregation/aggregate.cpp index 1dd6ce03392427bbf8a7dce9dc5f9e5937c5bbc6..d0429076ad184cab7b56e91aa18b954c8e1ccbdc 100644 --- a/src/libs/aggregation/aggregate.cpp +++ b/src/libs/aggregation/aggregate.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/aggregation/aggregate.h b/src/libs/aggregation/aggregate.h index 98b1693dd514b27790cbbf939704babdefceaed0..c4af87e579ef76311159d8926acc3f2886021973 100644 --- a/src/libs/aggregation/aggregate.h +++ b/src/libs/aggregation/aggregate.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/aggregation/aggregation_global.h b/src/libs/aggregation/aggregation_global.h index 324a2493950767faf9418f2cdd9d0fd4ca499e84..5cd24f26aef69a4d788f85da3ec5f292c1e204a8 100644 --- a/src/libs/aggregation/aggregation_global.h +++ b/src/libs/aggregation/aggregation_global.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/aggregation/examples/text/main.cpp b/src/libs/aggregation/examples/text/main.cpp index 87bfe784e2858cf79213d4bb7aa7d1c796281fde..b638067a99c2fc5d4f4d28b25b5e271e786c20e5 100644 --- a/src/libs/aggregation/examples/text/main.cpp +++ b/src/libs/aggregation/examples/text/main.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/aggregation/examples/text/main.h b/src/libs/aggregation/examples/text/main.h index 69e6f1caf8e3d094d02cc3aa8b011fdcf7430d32..4f68c01fd05a72ab0e8a1ae35b6ac9966f7d1a23 100644 --- a/src/libs/aggregation/examples/text/main.h +++ b/src/libs/aggregation/examples/text/main.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/aggregation/examples/text/myinterfaces.h b/src/libs/aggregation/examples/text/myinterfaces.h index 78c78f05e1a7b2872abe6e7505bf43d1535230c4..2996aed6f2d9b261af65aec0ee4ad0189bfcf1db 100644 --- a/src/libs/aggregation/examples/text/myinterfaces.h +++ b/src/libs/aggregation/examples/text/myinterfaces.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/aggregation/test/tst_aggregate.cpp b/src/libs/aggregation/test/tst_aggregate.cpp index 1a26dc0125345cb34020defb4adc9633c850f247..84ef50c4b92950ebf433f1556d3e67f23c6de124 100644 --- a/src/libs/aggregation/test/tst_aggregate.cpp +++ b/src/libs/aggregation/test/tst_aggregate.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/CppDocument.cpp b/src/libs/cplusplus/CppDocument.cpp index 453f3367af4731860725fd705701a50ffb4d73d1..1f4621e97038dd4bce14d2737d42caf616e69982 100644 --- a/src/libs/cplusplus/CppDocument.cpp +++ b/src/libs/cplusplus/CppDocument.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/CppDocument.h b/src/libs/cplusplus/CppDocument.h index d872dd3a1af37bfdf7b93b8ac3c02435dc7e1861..73bae23679c928d7b17497c76651cbdace7024f6 100644 --- a/src/libs/cplusplus/CppDocument.h +++ b/src/libs/cplusplus/CppDocument.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/ExpressionUnderCursor.cpp b/src/libs/cplusplus/ExpressionUnderCursor.cpp index d55a19e8859b5427c754012de0d0b007e0908e57..03702840a953ec0e73a7cddf8f0b4eebaf071cfe 100644 --- a/src/libs/cplusplus/ExpressionUnderCursor.cpp +++ b/src/libs/cplusplus/ExpressionUnderCursor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/ExpressionUnderCursor.h b/src/libs/cplusplus/ExpressionUnderCursor.h index c979c103e2a01c99ad609ca0d6c22bd1dd01d335..45bf92e56c967213bafc77ac24663dd69e59f3ca 100644 --- a/src/libs/cplusplus/ExpressionUnderCursor.h +++ b/src/libs/cplusplus/ExpressionUnderCursor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/Icons.cpp b/src/libs/cplusplus/Icons.cpp index 447db104bcfd7d15ec803e9b013fd18244636026..e0b50903c39f6345603204622537fe28019b0cb4 100644 --- a/src/libs/cplusplus/Icons.cpp +++ b/src/libs/cplusplus/Icons.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/Icons.h b/src/libs/cplusplus/Icons.h index eb31a07dcf48a4dd579c3985c5d5731321a757e4..b16576cd5504689dac60e4a648a6e1186bc70d35 100644 --- a/src/libs/cplusplus/Icons.h +++ b/src/libs/cplusplus/Icons.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/LookupContext.cpp b/src/libs/cplusplus/LookupContext.cpp index bf5df8b499b04f76351eefda0e30910dcf4648f4..2941489e01cb330f4e7809b4a9771db5a9fe5ee4 100644 --- a/src/libs/cplusplus/LookupContext.cpp +++ b/src/libs/cplusplus/LookupContext.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -143,19 +143,59 @@ Identifier *LookupContext::identifier(Name *name) const return 0; } +bool LookupContext::maybeValidSymbol(Symbol *symbol, + ResolveMode mode, + const QList<Symbol *> &candidates) +{ + if (((mode & ResolveNamespace) && symbol->isNamespace()) || + ((mode & ResolveClass) && symbol->isClass()) || + (mode & ResolveSymbol)) { + return ! candidates.contains(symbol); + } + + return false; +} + QList<Symbol *> LookupContext::resolve(Name *name, const QList<Scope *> &visibleScopes, ResolveMode mode) const { if (QualifiedNameId *q = name->asQualifiedNameId()) { + QList<Symbol *> candidates; QList<Scope *> scopes = visibleScopes; + Identifier *id = identifier(name); + + foreach (Scope *scope, visibleScopes) { + Symbol *symbol = scope->lookat(id); + for (; symbol; symbol = symbol->next()) { + if (! symbol->name()) + continue; + else if (! maybeValidSymbol(symbol, mode, candidates)) + continue; + QualifiedNameId *qq = symbol->name()->asQualifiedNameId(); + if (! qq) + continue; + if (q->nameCount() > qq->nameCount()) + continue; + + for (int i = q->nameCount() - 1; i != -1; --i) { + Name *a = q->nameAt(i); + Name *b = qq->nameAt(i); + + if (! a->isEqualTo(b)) + break; + else if (i == 0) + candidates.append(symbol); + } + } + } + for (unsigned i = 0; i < q->nameCount(); ++i) { Name *name = q->nameAt(i); - QList<Symbol *> candidates; if (i + 1 == q->nameCount()) - candidates = resolve(name, scopes, mode); + candidates += resolve(name, scopes, mode); else - candidates = resolveClassOrNamespace(name, scopes); + candidates += resolveClassOrNamespace(name, scopes); if (candidates.isEmpty() || i + 1 == q->nameCount()) return candidates; @@ -176,19 +216,41 @@ QList<Symbol *> LookupContext::resolve(Name *name, const QList<Scope *> &visible for (int scopeIndex = 0; scopeIndex < visibleScopes.size(); ++scopeIndex) { Scope *scope = visibleScopes.at(scopeIndex); for (Symbol *symbol = scope->lookat(id); symbol; symbol = symbol->next()) { - if (! symbol->name()) + if (! symbol->name()) { continue; - else if (symbol->name()->isQualifiedNameId()) + } else if (! maybeValidSymbol(symbol, mode, candidates)) { continue; - else if (! isNameCompatibleWithIdentifier(symbol->name(), id)) + } else if (QualifiedNameId *q = symbol->name()->asQualifiedNameId()) { + if (! q->unqualifiedNameId()->isEqualTo(name)) + continue; + + if (q->nameCount() > 1) { + Name *classOrNamespaceName = + control()->qualifiedNameId(q->names(), + q->nameCount() - 1); + + const QList<Symbol *> resolvedClassOrNamespace = + resolveClassOrNamespace(classOrNamespaceName, visibleScopes); + + bool good = false; + foreach (Symbol *classOrNamespace, resolvedClassOrNamespace) { + ScopedSymbol *scoped = classOrNamespace->asScopedSymbol(); + if (visibleScopes.contains(scoped->members())) { + good = true; + break; + } + } + + if (! good) + continue; + } + } else if (! isNameCompatibleWithIdentifier(symbol->name(), id)) { continue; - else if (symbol->name()->isDestructorNameId() != name->isDestructorNameId()) + } else if (symbol->name()->isDestructorNameId() != name->isDestructorNameId()) { continue; - else if ((((mode & ResolveNamespace) && symbol->isNamespace()) || - ((mode & ResolveClass) && symbol->isClass()) || - (mode & ResolveSymbol)) && ! candidates.contains(symbol)) { - candidates.append(symbol); } + + candidates.append(symbol); } } } else if (OperatorNameId *opId = name->asOperatorNameId()) { @@ -353,8 +415,8 @@ void LookupContext::expandClass(Scope *scope, } for (int j = 0; j < baseClassCandidates.size(); ++j) { - Class *baseClassSymbol = baseClassCandidates.at(j)->asClass(); - expand(baseClassSymbol->members(), visibleScopes, expandedScopes); + if (Class *baseClassSymbol = baseClassCandidates.at(j)->asClass()) + expand(baseClassSymbol->members(), visibleScopes, expandedScopes); } } } diff --git a/src/libs/cplusplus/LookupContext.h b/src/libs/cplusplus/LookupContext.h index 8759a79210ec99f2a5c179533ab405e5fe04d2b0..014d1be2c91e931c99b5a866cfb48ed6842b1805 100644 --- a/src/libs/cplusplus/LookupContext.h +++ b/src/libs/cplusplus/LookupContext.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -134,6 +134,10 @@ private: QList<Scope *> buildVisibleScopes(); static bool isNameCompatibleWithIdentifier(Name *name, Identifier *id); + static bool maybeValidSymbol(Symbol *symbol, + ResolveMode mode, + const QList<Symbol *> &candidates); + private: Control *_control; diff --git a/src/libs/cplusplus/Macro.cpp b/src/libs/cplusplus/Macro.cpp index d5492b983b7ca1702d4ed8d477a526b9efdc494b..1c1fecf9f2d4370d6d9fc37f4541e726c1d533bf 100644 --- a/src/libs/cplusplus/Macro.cpp +++ b/src/libs/cplusplus/Macro.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/Macro.h b/src/libs/cplusplus/Macro.h index 3957f13fab6192b8dd9553456ea11f7346b3c2b8..050c310a8838c8d98ce1b73a836877bcbe05309a 100644 --- a/src/libs/cplusplus/Macro.h +++ b/src/libs/cplusplus/Macro.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/NameOfExpression.cpp b/src/libs/cplusplus/NameOfExpression.cpp index 12690881bf8dbe1f2eede7a86394d298488930b6..bdb1d8ac16c759d6e5171d1f1faf7c3c2ed73c12 100644 --- a/src/libs/cplusplus/NameOfExpression.cpp +++ b/src/libs/cplusplus/NameOfExpression.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/NameOfExpression.h b/src/libs/cplusplus/NameOfExpression.h index 3aec6a543001225bc66c52dc21addc09a42f188c..255d98ffbfd8dc09805e01178e0580404c009160 100644 --- a/src/libs/cplusplus/NameOfExpression.h +++ b/src/libs/cplusplus/NameOfExpression.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/NamePrettyPrinter.cpp b/src/libs/cplusplus/NamePrettyPrinter.cpp index 50f12b5d979fe91c512b74309deedd1fd0476d9a..bc2be0193efc94c443e48437d9eeba2b1fc92259 100644 --- a/src/libs/cplusplus/NamePrettyPrinter.cpp +++ b/src/libs/cplusplus/NamePrettyPrinter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/NamePrettyPrinter.h b/src/libs/cplusplus/NamePrettyPrinter.h index fea6e07967251192b88a18aa15c2994e95245ec9..9be21726ad5090e93456fe3fd7da5c89322055e8 100644 --- a/src/libs/cplusplus/NamePrettyPrinter.h +++ b/src/libs/cplusplus/NamePrettyPrinter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/Overview.cpp b/src/libs/cplusplus/Overview.cpp index e394415dad9bb311cbb71fda06cfff70726224de..2494d11ec5e7f4574297ce47e983e093ba1717dd 100644 --- a/src/libs/cplusplus/Overview.cpp +++ b/src/libs/cplusplus/Overview.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/Overview.h b/src/libs/cplusplus/Overview.h index 6a4bcdc23783e5471be8e865ca24da0923716e21..fa1f3cf919fa4df75b450a15cad96423a6a11428 100644 --- a/src/libs/cplusplus/Overview.h +++ b/src/libs/cplusplus/Overview.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/OverviewModel.cpp b/src/libs/cplusplus/OverviewModel.cpp index 92b20d9f733e84302d9649bbb7368fdfb2c08bc2..fe78cb343321528b06a5fee380b87858f93dd77a 100644 --- a/src/libs/cplusplus/OverviewModel.cpp +++ b/src/libs/cplusplus/OverviewModel.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/OverviewModel.h b/src/libs/cplusplus/OverviewModel.h index 124382e80ac3d490b6e7f714070a24d78aa93052..f6456d2ee5f14520a1ad0c87e004cc7b66f79eba 100644 --- a/src/libs/cplusplus/OverviewModel.h +++ b/src/libs/cplusplus/OverviewModel.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/PreprocessorClient.cpp b/src/libs/cplusplus/PreprocessorClient.cpp index 2eb5656446ee722b3aa95e40d93b9d8e987d5703..fe05ff7a971973b650fd25504bcb67a4569a867b 100644 --- a/src/libs/cplusplus/PreprocessorClient.cpp +++ b/src/libs/cplusplus/PreprocessorClient.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/PreprocessorClient.h b/src/libs/cplusplus/PreprocessorClient.h index 2d37dac3e6d5e5dda085d231e7c41e884a52af12..f0290c04a00437fccdc9bd0baaf4f47cbd0fff51 100644 --- a/src/libs/cplusplus/PreprocessorClient.h +++ b/src/libs/cplusplus/PreprocessorClient.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/PreprocessorEnvironment.cpp b/src/libs/cplusplus/PreprocessorEnvironment.cpp index 693fe6160ea546e6e5bbaf9dac41e7f246bfdbee..930e4b3a6c731dc4904eaa24a9bad25bc3dacc6f 100644 --- a/src/libs/cplusplus/PreprocessorEnvironment.cpp +++ b/src/libs/cplusplus/PreprocessorEnvironment.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/PreprocessorEnvironment.h b/src/libs/cplusplus/PreprocessorEnvironment.h index 48ee5b2715a588213f62a65b9db6530012a87428..7f712cd49cc6d5c20416fd41bb7ea430539f3d13 100644 --- a/src/libs/cplusplus/PreprocessorEnvironment.h +++ b/src/libs/cplusplus/PreprocessorEnvironment.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/ResolveExpression.cpp b/src/libs/cplusplus/ResolveExpression.cpp index 6f8ae2ba9b9f7568d7c5ed3fbf4820c5a279ffce..e6d4d81adce2b66a69743d330f96e5c7bd82f14f 100644 --- a/src/libs/cplusplus/ResolveExpression.cpp +++ b/src/libs/cplusplus/ResolveExpression.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -425,6 +425,12 @@ bool ResolveExpression::visit(UnaryExpressionAST *ast) return false; } +bool ResolveExpression::visit(CompoundLiteralAST *ast) +{ + accept(ast->type_id); + return false; +} + bool ResolveExpression::visit(QualifiedNameAST *ast) { ResolveClass resolveClass; diff --git a/src/libs/cplusplus/ResolveExpression.h b/src/libs/cplusplus/ResolveExpression.h index e7cf1c0a3af41b6c53a17c24f0e99e3d07346995..b288bc751fce2eb09c27b4aa6cbdaf16fcf88d7d 100644 --- a/src/libs/cplusplus/ResolveExpression.h +++ b/src/libs/cplusplus/ResolveExpression.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -105,6 +105,7 @@ protected: virtual bool visit(ThrowExpressionAST *ast); virtual bool visit(TypeIdAST *ast); virtual bool visit(UnaryExpressionAST *ast); + virtual bool visit(CompoundLiteralAST *ast); //names virtual bool visit(QualifiedNameAST *ast); diff --git a/src/libs/cplusplus/SimpleLexer.cpp b/src/libs/cplusplus/SimpleLexer.cpp index 440946cdb38256cc9ff99d46d0f46100cf083d82..62ecaa174e86ab8880f6e058afc84188ff530fac 100644 --- a/src/libs/cplusplus/SimpleLexer.cpp +++ b/src/libs/cplusplus/SimpleLexer.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/SimpleLexer.h b/src/libs/cplusplus/SimpleLexer.h index 3f5b736e2dd8d2713e82572c206291ce4df0c733..ed48e9360bf95f9e6a4d4342d8abd24d2f49da6e 100644 --- a/src/libs/cplusplus/SimpleLexer.h +++ b/src/libs/cplusplus/SimpleLexer.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/TokenUnderCursor.cpp b/src/libs/cplusplus/TokenUnderCursor.cpp index af0a72284e771c5858b8bd87fa5cdfb5a0e127a9..d103a0307f7ca6bdaa74f1c82b7deb70c8e3095b 100644 --- a/src/libs/cplusplus/TokenUnderCursor.cpp +++ b/src/libs/cplusplus/TokenUnderCursor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/TokenUnderCursor.h b/src/libs/cplusplus/TokenUnderCursor.h index 68638329190a02408f84544272cda101a089aa73..c8fe792e93934c23e73743057b9e55b8a0a7404e 100644 --- a/src/libs/cplusplus/TokenUnderCursor.h +++ b/src/libs/cplusplus/TokenUnderCursor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/TypeOfExpression.cpp b/src/libs/cplusplus/TypeOfExpression.cpp index 7f08d5874d8c54df110f7001d33789e6a4a3199a..90ec7837a738589ae39c683a67d9d4d57ba0a5e9 100644 --- a/src/libs/cplusplus/TypeOfExpression.cpp +++ b/src/libs/cplusplus/TypeOfExpression.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -47,6 +47,11 @@ TypeOfExpression::TypeOfExpression(): { } +Snapshot TypeOfExpression::snapshot() const +{ + return m_snapshot; +} + void TypeOfExpression::setSnapshot(const Snapshot &documents) { m_snapshot = documents; diff --git a/src/libs/cplusplus/TypeOfExpression.h b/src/libs/cplusplus/TypeOfExpression.h index c0eafb2e37f047258c50fa61ea9b6bc66c745357..78af0346347b329379ad7d9f89320604ae94830b 100644 --- a/src/libs/cplusplus/TypeOfExpression.h +++ b/src/libs/cplusplus/TypeOfExpression.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -54,6 +54,8 @@ public: public: TypeOfExpression(); + Snapshot snapshot() const; + /** * Sets the documents used to evaluate expressions. Should be set before * calling this functor. diff --git a/src/libs/cplusplus/TypePrettyPrinter.cpp b/src/libs/cplusplus/TypePrettyPrinter.cpp index f7727572308654f5a722e40d9055a9caa1ee51e3..2784d9d695a7a8266f620d9f043abecd0a6542f3 100644 --- a/src/libs/cplusplus/TypePrettyPrinter.cpp +++ b/src/libs/cplusplus/TypePrettyPrinter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/TypePrettyPrinter.h b/src/libs/cplusplus/TypePrettyPrinter.h index e80b1d435a2f2d31355db1a9e802529befb54e2b..790999dc824c38e9c31b2e456250079b543cd84c 100644 --- a/src/libs/cplusplus/TypePrettyPrinter.h +++ b/src/libs/cplusplus/TypePrettyPrinter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/pp-cctype.h b/src/libs/cplusplus/pp-cctype.h index d55d6c2e4e903aba13dfbb32224a5e7fa4f27f2a..2031b71bf78bd6d742b5d6f9049abf7b769e30ac 100644 --- a/src/libs/cplusplus/pp-cctype.h +++ b/src/libs/cplusplus/pp-cctype.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/pp-engine.cpp b/src/libs/cplusplus/pp-engine.cpp index 6c5930de182143d76e48e24c8be802068ccb5202..6ed55492e50479b8531474d28971bf17ddd4afbe 100644 --- a/src/libs/cplusplus/pp-engine.cpp +++ b/src/libs/cplusplus/pp-engine.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/pp-engine.h b/src/libs/cplusplus/pp-engine.h index d0a573aed9c2f9c9db39edb19a23e5ad3cc0d32f..24e1ac13de0b2d9f21bcd41b0dc20ce7fdf9660e 100644 --- a/src/libs/cplusplus/pp-engine.h +++ b/src/libs/cplusplus/pp-engine.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/pp-macro-expander.cpp b/src/libs/cplusplus/pp-macro-expander.cpp index 40bbc8090b689f1a0a981c636df4b05b1698b459..e4ab03d867a9a4db2944493486d83a4e95fc8646 100644 --- a/src/libs/cplusplus/pp-macro-expander.cpp +++ b/src/libs/cplusplus/pp-macro-expander.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/pp-macro-expander.h b/src/libs/cplusplus/pp-macro-expander.h index 3e6217476fab27f79adb044bbe617661415e1302..0307401d4a02e0df5ee4e9bc9be33779ac23f0b0 100644 --- a/src/libs/cplusplus/pp-macro-expander.h +++ b/src/libs/cplusplus/pp-macro-expander.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/pp-scanner.cpp b/src/libs/cplusplus/pp-scanner.cpp index 8f0f9bf9ae8ac5ee7783123d3ff9405070faa55d..2c69706f0b078a47853f56806c80bd0abd033930 100644 --- a/src/libs/cplusplus/pp-scanner.cpp +++ b/src/libs/cplusplus/pp-scanner.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/pp-scanner.h b/src/libs/cplusplus/pp-scanner.h index 71bd04476badfb7a45aa32699e58ac9568ea0641..481af95adfc286123a8ee8fbe74077821fa14d9f 100644 --- a/src/libs/cplusplus/pp-scanner.h +++ b/src/libs/cplusplus/pp-scanner.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/cplusplus/pp.h b/src/libs/cplusplus/pp.h index 96c81867163abba0de68b71781644239156f7617..79e6e54d6ebf96434f2dc23f65c57cbb3c9ba9b3 100644 --- a/src/libs/cplusplus/pp.h +++ b/src/libs/cplusplus/pp.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/ExtensionSystemInterfaces b/src/libs/extensionsystem/ExtensionSystemInterfaces index db175b405040c16e76133961264523957b45a501..7f42b55e89a78c663b3b8d72107a62dd2804c8b9 100644 --- a/src/libs/extensionsystem/ExtensionSystemInterfaces +++ b/src/libs/extensionsystem/ExtensionSystemInterfaces @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/extensionsystem_global.h b/src/libs/extensionsystem/extensionsystem_global.h index 7ff0d1d471e1ed66f3236adf34e45135084d12dd..578350f819023902bbb9d5b5cbe4278808a6a2af 100644 --- a/src/libs/extensionsystem/extensionsystem_global.h +++ b/src/libs/extensionsystem/extensionsystem_global.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/iplugin.cpp b/src/libs/extensionsystem/iplugin.cpp index 0ce65bf5c0ae9f118b54611145e7af64185b181e..26adaefec38a6049502120c48ed662411c0e153d 100644 --- a/src/libs/extensionsystem/iplugin.cpp +++ b/src/libs/extensionsystem/iplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/iplugin.h b/src/libs/extensionsystem/iplugin.h index fe242b0fb780dcc67f2d38f59a2b12b6577f230f..9c81187065972119ab0fc17ffff46b553b5d479f 100644 --- a/src/libs/extensionsystem/iplugin.h +++ b/src/libs/extensionsystem/iplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/iplugin_p.h b/src/libs/extensionsystem/iplugin_p.h index cc7e1bdae32a3549628110ba79480dba86fde51d..ac87390bf3caee734b6864f0dc4036c269e4f953 100644 --- a/src/libs/extensionsystem/iplugin_p.h +++ b/src/libs/extensionsystem/iplugin_p.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/optionsparser.cpp b/src/libs/extensionsystem/optionsparser.cpp index 414895c9dec82721d5be86eaf8ab2893ff5c19ea..93c159aebcc8625d936e5d6eed225fef8d37f0b0 100644 --- a/src/libs/extensionsystem/optionsparser.cpp +++ b/src/libs/extensionsystem/optionsparser.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/optionsparser.h b/src/libs/extensionsystem/optionsparser.h index 1be8531d537f2f3e7fddb5a77e5dbbeed75aac36..8ebedec99f4bf0fe3b84c70fc9c2f1650fcd6cce 100644 --- a/src/libs/extensionsystem/optionsparser.h +++ b/src/libs/extensionsystem/optionsparser.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/plugindetailsview.cpp b/src/libs/extensionsystem/plugindetailsview.cpp index 1f3070411fef378cd2f45e165f7489be8e232bcd..392f8adb8188a85813944de9fcc113f58c6d77fb 100644 --- a/src/libs/extensionsystem/plugindetailsview.cpp +++ b/src/libs/extensionsystem/plugindetailsview.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/plugindetailsview.h b/src/libs/extensionsystem/plugindetailsview.h index 9ae44dad3401da81419ddc0fc9f3cfcdc2e8acc3..19b543f93d3cf34d0ed0533e07da597cb2e86532 100644 --- a/src/libs/extensionsystem/plugindetailsview.h +++ b/src/libs/extensionsystem/plugindetailsview.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/pluginerrorview.cpp b/src/libs/extensionsystem/pluginerrorview.cpp index dae77d0b8727d5e058f2336e498d3e44d405d8dc..f619a6c70f7d748b0e16b2d45f85b3089f5fb432 100644 --- a/src/libs/extensionsystem/pluginerrorview.cpp +++ b/src/libs/extensionsystem/pluginerrorview.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/pluginerrorview.h b/src/libs/extensionsystem/pluginerrorview.h index d6c8897931d6b7cc5ce59bec34582f6955d9c601..f53cf393b4b46c76f2fa74e749efee0f99da8d5a 100644 --- a/src/libs/extensionsystem/pluginerrorview.h +++ b/src/libs/extensionsystem/pluginerrorview.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/pluginmanager.cpp b/src/libs/extensionsystem/pluginmanager.cpp index 7dc9c4e10af716cad64356b88212697bf3a2f9fb..5a1c8a00e6a02ad071ca7ce5e8c2dd0da478605e 100644 --- a/src/libs/extensionsystem/pluginmanager.cpp +++ b/src/libs/extensionsystem/pluginmanager.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -54,8 +54,7 @@ enum { debugLeaks = 0 }; /*! \namespace ExtensionSystem - \brief The ExtensionSystem namespace provides - classes that belong to the core plugin system. + \brief The ExtensionSystem namespace provides classes that belong to the core plugin system. The basic extension system contains of the plugin manager and its supporting classes, and the IPlugin interface that must be implemented by plugin providers. diff --git a/src/libs/extensionsystem/pluginmanager.h b/src/libs/extensionsystem/pluginmanager.h index 42e3029bc5da19ceddc41aba1ae6e9bb0f3b0b13..85dc06f4e9e2b126e95c46ca02af2db6cd1363db 100644 --- a/src/libs/extensionsystem/pluginmanager.h +++ b/src/libs/extensionsystem/pluginmanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/pluginmanager_p.h b/src/libs/extensionsystem/pluginmanager_p.h index cfe2d6d17ad33131e453e9baee105e51ec6fb8ff..9d03777c74894a5f82dbbea7b3c5c858673febc0 100644 --- a/src/libs/extensionsystem/pluginmanager_p.h +++ b/src/libs/extensionsystem/pluginmanager_p.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/pluginspec.cpp b/src/libs/extensionsystem/pluginspec.cpp index 0e5fa53996ff187b23c443d4dc04e89e56f11333..48aa88950e9a16c027b3a5055607c8a5a05138e2 100644 --- a/src/libs/extensionsystem/pluginspec.cpp +++ b/src/libs/extensionsystem/pluginspec.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/pluginspec.h b/src/libs/extensionsystem/pluginspec.h index 6ab9d4659147d5c7474018c2532dded460030f50..5c98e55111228e6c0061546d3571f8893f18418b 100644 --- a/src/libs/extensionsystem/pluginspec.h +++ b/src/libs/extensionsystem/pluginspec.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/pluginspec_p.h b/src/libs/extensionsystem/pluginspec_p.h index 436a1f44b012af37ba18637a40b0d624bdfe50e4..66611c18b6692c91d5dbf6768c6160017e0eb83a 100644 --- a/src/libs/extensionsystem/pluginspec_p.h +++ b/src/libs/extensionsystem/pluginspec_p.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/pluginview.cpp b/src/libs/extensionsystem/pluginview.cpp index c60ae334736c78760e9a1d9a5e7813baa650868d..716cef20d1466f40c8ef8e0f6da8b32857cb43b4 100644 --- a/src/libs/extensionsystem/pluginview.cpp +++ b/src/libs/extensionsystem/pluginview.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/pluginview.h b/src/libs/extensionsystem/pluginview.h index dc4c5f1c8440500021a535e3e218d20ae6ed3b3e..4e094502ff2a978e36595fa3b6361a30091881dc 100644 --- a/src/libs/extensionsystem/pluginview.h +++ b/src/libs/extensionsystem/pluginview.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/pluginview_p.h b/src/libs/extensionsystem/pluginview_p.h index 77e511ba2cc8dc404a26514b604c47882941fac5..7c122a59d65225a2a36a327c7a818d30ab8440e4 100644 --- a/src/libs/extensionsystem/pluginview_p.h +++ b/src/libs/extensionsystem/pluginview_p.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/test/auto/pluginmanager/circularplugins/plugin1/plugin1.cpp b/src/libs/extensionsystem/test/auto/pluginmanager/circularplugins/plugin1/plugin1.cpp index 68332a77b3eaf3fc6bcc482d9f5181717fa22615..c720a28f5709f7219c4a9fae184f79bce2a9c77a 100644 --- a/src/libs/extensionsystem/test/auto/pluginmanager/circularplugins/plugin1/plugin1.cpp +++ b/src/libs/extensionsystem/test/auto/pluginmanager/circularplugins/plugin1/plugin1.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/test/auto/pluginmanager/circularplugins/plugin1/plugin1.h b/src/libs/extensionsystem/test/auto/pluginmanager/circularplugins/plugin1/plugin1.h index c15a30bf165d3ca83b54000a361692ab733ded79..3ef8b8959a147877f747ec6b66144558a844036f 100644 --- a/src/libs/extensionsystem/test/auto/pluginmanager/circularplugins/plugin1/plugin1.h +++ b/src/libs/extensionsystem/test/auto/pluginmanager/circularplugins/plugin1/plugin1.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/test/auto/pluginmanager/circularplugins/plugin2/plugin2.cpp b/src/libs/extensionsystem/test/auto/pluginmanager/circularplugins/plugin2/plugin2.cpp index fd788e4da6bdb2cf6096b1b7d245711ea65aeff1..f8d7c4928deea1c29c1121b5362bc16ef7ceeb11 100644 --- a/src/libs/extensionsystem/test/auto/pluginmanager/circularplugins/plugin2/plugin2.cpp +++ b/src/libs/extensionsystem/test/auto/pluginmanager/circularplugins/plugin2/plugin2.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/test/auto/pluginmanager/circularplugins/plugin2/plugin2.h b/src/libs/extensionsystem/test/auto/pluginmanager/circularplugins/plugin2/plugin2.h index 431fa8201fd50377173ea7a45272e1c223778544..f4ee2b6979a973b467b5adedc4031c49dcc54efe 100644 --- a/src/libs/extensionsystem/test/auto/pluginmanager/circularplugins/plugin2/plugin2.h +++ b/src/libs/extensionsystem/test/auto/pluginmanager/circularplugins/plugin2/plugin2.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/test/auto/pluginmanager/circularplugins/plugin3/plugin3.cpp b/src/libs/extensionsystem/test/auto/pluginmanager/circularplugins/plugin3/plugin3.cpp index 9da1403df8bbf11705042ce696a7c56b5d7b3d8c..5b95f050609f2e54680ec1a63fefc56ae8205b0e 100644 --- a/src/libs/extensionsystem/test/auto/pluginmanager/circularplugins/plugin3/plugin3.cpp +++ b/src/libs/extensionsystem/test/auto/pluginmanager/circularplugins/plugin3/plugin3.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/test/auto/pluginmanager/circularplugins/plugin3/plugin3.h b/src/libs/extensionsystem/test/auto/pluginmanager/circularplugins/plugin3/plugin3.h index 0878a907be828fae40102569e4f22858e58dd1f6..ce14b9f92d3f0a5c99917c7fb9779ba8359c6c2f 100644 --- a/src/libs/extensionsystem/test/auto/pluginmanager/circularplugins/plugin3/plugin3.h +++ b/src/libs/extensionsystem/test/auto/pluginmanager/circularplugins/plugin3/plugin3.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/test/auto/pluginmanager/correctplugins1/plugin1/plugin1.cpp b/src/libs/extensionsystem/test/auto/pluginmanager/correctplugins1/plugin1/plugin1.cpp index f67dd11e9e7e46b0c93e5e009184525cecc7ee7c..d6d3ba481c6168b62a6042b12856df22b0867cf7 100644 --- a/src/libs/extensionsystem/test/auto/pluginmanager/correctplugins1/plugin1/plugin1.cpp +++ b/src/libs/extensionsystem/test/auto/pluginmanager/correctplugins1/plugin1/plugin1.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/test/auto/pluginmanager/correctplugins1/plugin1/plugin1.h b/src/libs/extensionsystem/test/auto/pluginmanager/correctplugins1/plugin1/plugin1.h index 498d827dd12ac4326e7a026e764ccdaca340382e..b65aa19d6832ca4c619ffa3499fb7cd93616faac 100644 --- a/src/libs/extensionsystem/test/auto/pluginmanager/correctplugins1/plugin1/plugin1.h +++ b/src/libs/extensionsystem/test/auto/pluginmanager/correctplugins1/plugin1/plugin1.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/test/auto/pluginmanager/correctplugins1/plugin2/plugin2.cpp b/src/libs/extensionsystem/test/auto/pluginmanager/correctplugins1/plugin2/plugin2.cpp index 4cd3a89f6d467111c239f4f5897ad7cfc6c0f511..a8b5662dd15d92e53aeaf2d904d3489ba0ba1391 100644 --- a/src/libs/extensionsystem/test/auto/pluginmanager/correctplugins1/plugin2/plugin2.cpp +++ b/src/libs/extensionsystem/test/auto/pluginmanager/correctplugins1/plugin2/plugin2.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/test/auto/pluginmanager/correctplugins1/plugin2/plugin2.h b/src/libs/extensionsystem/test/auto/pluginmanager/correctplugins1/plugin2/plugin2.h index c509439800d404f85ad611389509e5dfc167766f..ff2fc32a2c35bea5c3c1c8942512839c3d488e01 100644 --- a/src/libs/extensionsystem/test/auto/pluginmanager/correctplugins1/plugin2/plugin2.h +++ b/src/libs/extensionsystem/test/auto/pluginmanager/correctplugins1/plugin2/plugin2.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/test/auto/pluginmanager/correctplugins1/plugin3/plugin3.cpp b/src/libs/extensionsystem/test/auto/pluginmanager/correctplugins1/plugin3/plugin3.cpp index 7e170878e60dbe6063bc7aafdf94b66af4a815b7..a9569bbdeebb4cb43d46437862dc7e16bafca131 100644 --- a/src/libs/extensionsystem/test/auto/pluginmanager/correctplugins1/plugin3/plugin3.cpp +++ b/src/libs/extensionsystem/test/auto/pluginmanager/correctplugins1/plugin3/plugin3.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/test/auto/pluginmanager/correctplugins1/plugin3/plugin3.h b/src/libs/extensionsystem/test/auto/pluginmanager/correctplugins1/plugin3/plugin3.h index 484ceace7a6b0f791afc91e844fcb78da3c548c9..bc323afc655b5361d229bdc51c2a648876327ac2 100644 --- a/src/libs/extensionsystem/test/auto/pluginmanager/correctplugins1/plugin3/plugin3.h +++ b/src/libs/extensionsystem/test/auto/pluginmanager/correctplugins1/plugin3/plugin3.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/test/auto/pluginmanager/tst_pluginmanager.cpp b/src/libs/extensionsystem/test/auto/pluginmanager/tst_pluginmanager.cpp index ca2b00fc71a792864b61243057c6a2b685294e6b..08f647630373e1f2c44d07cd2327298d2ce7cdee 100644 --- a/src/libs/extensionsystem/test/auto/pluginmanager/tst_pluginmanager.cpp +++ b/src/libs/extensionsystem/test/auto/pluginmanager/tst_pluginmanager.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/test/auto/pluginspec/testplugin/testplugin.cpp b/src/libs/extensionsystem/test/auto/pluginspec/testplugin/testplugin.cpp index eff30909c7b28576a08c378afe338bdb17da9147..e3f60a3df0b38ca1e80cf54be714d62a10b535fa 100644 --- a/src/libs/extensionsystem/test/auto/pluginspec/testplugin/testplugin.cpp +++ b/src/libs/extensionsystem/test/auto/pluginspec/testplugin/testplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/test/auto/pluginspec/testplugin/testplugin.h b/src/libs/extensionsystem/test/auto/pluginspec/testplugin/testplugin.h index 1cc205c334d03f9bd2d5277757b5554339673972..353487fce5cbeafa66af3e849911e0a7073adad4 100644 --- a/src/libs/extensionsystem/test/auto/pluginspec/testplugin/testplugin.h +++ b/src/libs/extensionsystem/test/auto/pluginspec/testplugin/testplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/test/auto/pluginspec/testplugin/testplugin_global.h b/src/libs/extensionsystem/test/auto/pluginspec/testplugin/testplugin_global.h index 93b2bdb2d72223f04695e3877f9bf072053dd007..e1c0001369597d7d899811d593cf766b9d4c693f 100644 --- a/src/libs/extensionsystem/test/auto/pluginspec/testplugin/testplugin_global.h +++ b/src/libs/extensionsystem/test/auto/pluginspec/testplugin/testplugin_global.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/test/auto/pluginspec/tst_pluginspec.cpp b/src/libs/extensionsystem/test/auto/pluginspec/tst_pluginspec.cpp index 59683feb04b668c97c88ed9c64bd400e3ecb486c..5ab40b33a6677a4317a7749b1bdf52b4cb832d84 100644 --- a/src/libs/extensionsystem/test/auto/pluginspec/tst_pluginspec.cpp +++ b/src/libs/extensionsystem/test/auto/pluginspec/tst_pluginspec.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/test/manual/pluginview/plugindialog.cpp b/src/libs/extensionsystem/test/manual/pluginview/plugindialog.cpp index 468a06dda0e48c8ad1d487d62ef9a8d42b4f0a0e..484b755be7db7d3a36dbb3b89c18cb09f7b24979 100644 --- a/src/libs/extensionsystem/test/manual/pluginview/plugindialog.cpp +++ b/src/libs/extensionsystem/test/manual/pluginview/plugindialog.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/test/manual/pluginview/plugindialog.h b/src/libs/extensionsystem/test/manual/pluginview/plugindialog.h index 7eaffeef47d36a9fc83fb698c3b34a18ee9d5815..cc0400b4afb9c95f988fba4d26d873a840780751 100644 --- a/src/libs/extensionsystem/test/manual/pluginview/plugindialog.h +++ b/src/libs/extensionsystem/test/manual/pluginview/plugindialog.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/test/manual/pluginview/plugins/plugin1/plugin1.cpp b/src/libs/extensionsystem/test/manual/pluginview/plugins/plugin1/plugin1.cpp index 465215ec42c4844591950c1ad831c1e2942b2570..e6e5f908a2510c2555f8acce47f3e394b8bdb9cb 100644 --- a/src/libs/extensionsystem/test/manual/pluginview/plugins/plugin1/plugin1.cpp +++ b/src/libs/extensionsystem/test/manual/pluginview/plugins/plugin1/plugin1.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/test/manual/pluginview/plugins/plugin1/plugin1.h b/src/libs/extensionsystem/test/manual/pluginview/plugins/plugin1/plugin1.h index 77648b733b9fbd09db1444f20e63f1ea8a024297..702648b57f93d4cf9321866b03af92a33068efb6 100644 --- a/src/libs/extensionsystem/test/manual/pluginview/plugins/plugin1/plugin1.h +++ b/src/libs/extensionsystem/test/manual/pluginview/plugins/plugin1/plugin1.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/test/manual/pluginview/plugins/plugin2/plugin2.cpp b/src/libs/extensionsystem/test/manual/pluginview/plugins/plugin2/plugin2.cpp index b74b339b237d2c32bbc452843382a3c19e96f006..40471cba1b7d3a7a304a84fefb0757516c125c63 100644 --- a/src/libs/extensionsystem/test/manual/pluginview/plugins/plugin2/plugin2.cpp +++ b/src/libs/extensionsystem/test/manual/pluginview/plugins/plugin2/plugin2.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/test/manual/pluginview/plugins/plugin2/plugin2.h b/src/libs/extensionsystem/test/manual/pluginview/plugins/plugin2/plugin2.h index c13f47f925e48ddeedd22991f4247406b3104e5e..3c067b71d623023c365ebb18e1f2425048efe935 100644 --- a/src/libs/extensionsystem/test/manual/pluginview/plugins/plugin2/plugin2.h +++ b/src/libs/extensionsystem/test/manual/pluginview/plugins/plugin2/plugin2.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/test/manual/pluginview/plugins/plugin3/plugin3.cpp b/src/libs/extensionsystem/test/manual/pluginview/plugins/plugin3/plugin3.cpp index 888e3fb662b7407870e2cc2e969e9e37877318f2..9538caf9a63f1d437f214722e0d603a533942e51 100644 --- a/src/libs/extensionsystem/test/manual/pluginview/plugins/plugin3/plugin3.cpp +++ b/src/libs/extensionsystem/test/manual/pluginview/plugins/plugin3/plugin3.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/extensionsystem/test/manual/pluginview/plugins/plugin3/plugin3.h b/src/libs/extensionsystem/test/manual/pluginview/plugins/plugin3/plugin3.h index c6d865b8856853d195ab0ed932008bffa1280554..c038b5e7bfc740c0545968549458aec05288a12c 100644 --- a/src/libs/extensionsystem/test/manual/pluginview/plugins/plugin3/plugin3.h +++ b/src/libs/extensionsystem/test/manual/pluginview/plugins/plugin3/plugin3.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/qtconcurrent/QtConcurrentTools b/src/libs/qtconcurrent/QtConcurrentTools index b618f1cb49df90ce5eb2880b190b1c4897469f39..a60a4cdf26673ba5f2e2b82706ce93f183cef91b 100644 --- a/src/libs/qtconcurrent/QtConcurrentTools +++ b/src/libs/qtconcurrent/QtConcurrentTools @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/qtconcurrent/multitask.h b/src/libs/qtconcurrent/multitask.h index b23c6e35804c9ee38c6446278b2af94f61ba347b..d477d0e4ed4bb7ea682392d319c2e2bb83f27ffd 100644 --- a/src/libs/qtconcurrent/multitask.h +++ b/src/libs/qtconcurrent/multitask.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/qtconcurrent/qtconcurrent_global.h b/src/libs/qtconcurrent/qtconcurrent_global.h index 6c49354ffff31160b3545c2b4ba4946342dbb3fe..c9c81d182599942b3de8842aa97d4bf4ed99b84f 100644 --- a/src/libs/qtconcurrent/qtconcurrent_global.h +++ b/src/libs/qtconcurrent/qtconcurrent_global.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/qtconcurrent/runextensions.h b/src/libs/qtconcurrent/runextensions.h index c5c2954db923cf07a7d9ccb966e765c5e05afbc4..89c8d18ad676b461cbd7b940560c7617226e0cbf 100644 --- a/src/libs/qtconcurrent/runextensions.h +++ b/src/libs/qtconcurrent/runextensions.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/basevalidatinglineedit.cpp b/src/libs/utils/basevalidatinglineedit.cpp index 6c26d0bf4b438143c141db20598d44b1db8b9a07..c9368a757bea2c742b87fba71a55e2660d961f9a 100644 --- a/src/libs/utils/basevalidatinglineedit.cpp +++ b/src/libs/utils/basevalidatinglineedit.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/basevalidatinglineedit.h b/src/libs/utils/basevalidatinglineedit.h index 4a9468e7148eb816b1c33fadfd95e64faaf51399..1e57bcfd5fc3b51ab1e493b1b817d112247362f6 100644 --- a/src/libs/utils/basevalidatinglineedit.h +++ b/src/libs/utils/basevalidatinglineedit.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/classnamevalidatinglineedit.cpp b/src/libs/utils/classnamevalidatinglineedit.cpp index a4e55ccd81315a85a6c23b12e178017d1deeba21..1a2a3c6e38541d92cbedab1365d53ea2ed215c7e 100644 --- a/src/libs/utils/classnamevalidatinglineedit.cpp +++ b/src/libs/utils/classnamevalidatinglineedit.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/classnamevalidatinglineedit.h b/src/libs/utils/classnamevalidatinglineedit.h index 321bc9e34f29a05a31abf8145f470a57b336bc4d..86771587a4c56e1c723a85a6aa8ea4aa7c6dd06b 100644 --- a/src/libs/utils/classnamevalidatinglineedit.h +++ b/src/libs/utils/classnamevalidatinglineedit.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/codegeneration.cpp b/src/libs/utils/codegeneration.cpp index 4bfa9098cdc2eb1fa565293c2d69488f5c6b7b08..892a1fc1b2f78ebbc8c9b0df280d66348640f172 100644 --- a/src/libs/utils/codegeneration.cpp +++ b/src/libs/utils/codegeneration.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/codegeneration.h b/src/libs/utils/codegeneration.h index e8b844784a6c4d0815e7575a558c85ee5f5d4d89..839d94e2cec8747b5c62c224c2233d54403955b7 100644 --- a/src/libs/utils/codegeneration.h +++ b/src/libs/utils/codegeneration.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/fancylineedit.cpp b/src/libs/utils/fancylineedit.cpp index 8e9911f8f47a7733da060fad0aeeccc5a6d03c7f..e016046e8dc44411e168e2ed172fe63232973847 100644 --- a/src/libs/utils/fancylineedit.cpp +++ b/src/libs/utils/fancylineedit.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/fancylineedit.h b/src/libs/utils/fancylineedit.h index 10b5f32129be90705399d43e3cee9871f9f9e257..ae60f20618d4097b47e8ed4f46502cfdd125c92b 100644 --- a/src/libs/utils/fancylineedit.h +++ b/src/libs/utils/fancylineedit.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/filenamevalidatinglineedit.cpp b/src/libs/utils/filenamevalidatinglineedit.cpp index e11c578070d71f74365d41d6078efbb9382107b4..80b4e827942c8bdf1b8cc13c6f01bb61f7e2a7b5 100644 --- a/src/libs/utils/filenamevalidatinglineedit.cpp +++ b/src/libs/utils/filenamevalidatinglineedit.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/filenamevalidatinglineedit.h b/src/libs/utils/filenamevalidatinglineedit.h index 95440c83f378891173ad2b12e12f05b03b9d95bb..2f5bfe6b4b79ed21dccae9ce0a945566f1c07002 100644 --- a/src/libs/utils/filenamevalidatinglineedit.h +++ b/src/libs/utils/filenamevalidatinglineedit.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/filesearch.cpp b/src/libs/utils/filesearch.cpp index a04e6a429588b5950c27d7dab5232a4537098c5a..feb3acc2399ed3b2d6301450f9c9f1e3b3fd6480 100644 --- a/src/libs/utils/filesearch.cpp +++ b/src/libs/utils/filesearch.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/filesearch.h b/src/libs/utils/filesearch.h index 09bef9d1bec946ff5a8adf92628dfb2456b1ca9e..559d58a0ac0c2f948aac1e7479b6753a929d2acd 100644 --- a/src/libs/utils/filesearch.h +++ b/src/libs/utils/filesearch.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/filewizarddialog.cpp b/src/libs/utils/filewizarddialog.cpp index 0e8655bf7cafb1207fdef126b1f798fbf3d42360..2bf7ecbcdca879406db2e4a7fc728fff7ecaa4c2 100644 --- a/src/libs/utils/filewizarddialog.cpp +++ b/src/libs/utils/filewizarddialog.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/filewizarddialog.h b/src/libs/utils/filewizarddialog.h index 5a01a9558d6f264c0369248b98ae36c90d874b0e..6d483c505d022650d3a5339d0cd4215609e42350 100644 --- a/src/libs/utils/filewizarddialog.h +++ b/src/libs/utils/filewizarddialog.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/filewizardpage.cpp b/src/libs/utils/filewizardpage.cpp index 0e5c7b2455061ddc637415785e9342af10acb3a0..7d0dd6ab0b6ea3491a56ca222fc9100d919522b0 100644 --- a/src/libs/utils/filewizardpage.cpp +++ b/src/libs/utils/filewizardpage.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/filewizardpage.h b/src/libs/utils/filewizardpage.h index 18e89af9d04ea18483c38ffa2a379ab9ac546934..48c32d1f30f2b7dd5949d1d9318299fd4b4112fb 100644 --- a/src/libs/utils/filewizardpage.h +++ b/src/libs/utils/filewizardpage.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/linecolumnlabel.cpp b/src/libs/utils/linecolumnlabel.cpp index 75e1dd2708505e3d9f230968f53c9844612254c7..f651347835e82063f318860f0a21163274bbf921 100644 --- a/src/libs/utils/linecolumnlabel.cpp +++ b/src/libs/utils/linecolumnlabel.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/linecolumnlabel.h b/src/libs/utils/linecolumnlabel.h index 1ae84ccac958a994dc556b9005f7d576f2fffc02..239092150ec5d5ac197e2e751dc6c1aea87eb4ee 100644 --- a/src/libs/utils/linecolumnlabel.h +++ b/src/libs/utils/linecolumnlabel.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/listutils.h b/src/libs/utils/listutils.h index fa260e0ed755fcbe6559b67ba8a60643dc3841ca..fcb2875bcd3869ca8e763c40fe9e8a7d204e483a 100644 --- a/src/libs/utils/listutils.h +++ b/src/libs/utils/listutils.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/newclasswidget.cpp b/src/libs/utils/newclasswidget.cpp index 46db9fda71baad903df38b663d63dae8f754effa..006cf61cbba422f121499591da8f6575a4152b2a 100644 --- a/src/libs/utils/newclasswidget.cpp +++ b/src/libs/utils/newclasswidget.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/newclasswidget.h b/src/libs/utils/newclasswidget.h index 7b141f8c370c0052d8ea82090ea248c772ef2d3f..9f8d9a80bbe457dca85b2d38bcef17e75ba89642 100644 --- a/src/libs/utils/newclasswidget.h +++ b/src/libs/utils/newclasswidget.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/pathchooser.cpp b/src/libs/utils/pathchooser.cpp index 91504b496c9cddfe0c42aeef955afa734b64cc44..0f83cf1c4cbdfbcfbf025f90e70276ef67c5a5ed 100644 --- a/src/libs/utils/pathchooser.cpp +++ b/src/libs/utils/pathchooser.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/pathchooser.h b/src/libs/utils/pathchooser.h index 5fcc8ee228ca8d6b2949f6d5a4a719e5e61a4fdf..5a6721ac67a8861fae98bb3605c4f387816056dd 100644 --- a/src/libs/utils/pathchooser.h +++ b/src/libs/utils/pathchooser.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/projectintropage.cpp b/src/libs/utils/projectintropage.cpp index 85bf22b14c50897b6f0563493a1abf84a7d557c9..16a06eec4acad40d915da485b15130de587f8bc8 100644 --- a/src/libs/utils/projectintropage.cpp +++ b/src/libs/utils/projectintropage.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/projectintropage.h b/src/libs/utils/projectintropage.h index 7f6b34bc886fd69ca69cd3c9a531a83a76ea210a..597ace33ecf5c327e7d6aa5d50383e575ce78be9 100644 --- a/src/libs/utils/projectintropage.h +++ b/src/libs/utils/projectintropage.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/projectnamevalidatinglineedit.cpp b/src/libs/utils/projectnamevalidatinglineedit.cpp index bbd8d73466dbd6ef505c8b66f09ba02652eff5b4..3c5e84db60d2f453ac31e811e5a3a3ee30778cad 100644 --- a/src/libs/utils/projectnamevalidatinglineedit.cpp +++ b/src/libs/utils/projectnamevalidatinglineedit.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/projectnamevalidatinglineedit.h b/src/libs/utils/projectnamevalidatinglineedit.h index d660c1aa4a51d4ca0156fbd8ea076c4cefee7d20..0ab8d92bcc34b705297c41d67016de50d6178815 100644 --- a/src/libs/utils/projectnamevalidatinglineedit.h +++ b/src/libs/utils/projectnamevalidatinglineedit.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/qtcassert.h b/src/libs/utils/qtcassert.h index 3206e8c38b3a2511bb728edfd9588c3639be5a8b..db0736a64e49925945c234eae2e5a04e08e4d76c 100644 --- a/src/libs/utils/qtcassert.h +++ b/src/libs/utils/qtcassert.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/qtcolorbutton.cpp b/src/libs/utils/qtcolorbutton.cpp index a30b3e5f55fc101c297f4177e7db452bfc00f720..8cb08e6cc73c172d79e82f675796c71242e9595e 100644 --- a/src/libs/utils/qtcolorbutton.cpp +++ b/src/libs/utils/qtcolorbutton.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/qtcolorbutton.h b/src/libs/utils/qtcolorbutton.h index 2fee344d78b904b0fef17c1b8776896ce6ba2604..63f574087c342d1255041840a51b8f97f5c56db7 100644 --- a/src/libs/utils/qtcolorbutton.h +++ b/src/libs/utils/qtcolorbutton.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/reloadpromptutils.cpp b/src/libs/utils/reloadpromptutils.cpp index 509d2417415252504a08ba5597ae3236f9150b42..45160c0670994af57ccbdfa7b4f4616351e4c73f 100644 --- a/src/libs/utils/reloadpromptutils.cpp +++ b/src/libs/utils/reloadpromptutils.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/reloadpromptutils.h b/src/libs/utils/reloadpromptutils.h index ec7d7b411757d0034831345f4736c5d7fa45421f..d1afafb61ad7e3a5929ba1ec2d6bc1eda7194c45 100644 --- a/src/libs/utils/reloadpromptutils.h +++ b/src/libs/utils/reloadpromptutils.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/settingsutils.cpp b/src/libs/utils/settingsutils.cpp index 5394c746d6844cc26363dc93450274e08feb5555..568fd7b4ab375799593c721645cbd0103b8d46e9 100644 --- a/src/libs/utils/settingsutils.cpp +++ b/src/libs/utils/settingsutils.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/settingsutils.h b/src/libs/utils/settingsutils.h index 3777587a406ecd0b2c30f8b103039f612f7a6bd3..664aa3e77b777bd41524537ebf8dc836fb4a1315 100644 --- a/src/libs/utils/settingsutils.h +++ b/src/libs/utils/settingsutils.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/submiteditorwidget.cpp b/src/libs/utils/submiteditorwidget.cpp index ae8eb41593d5cb5778003fe89c27991a21db181c..7a084add0320566d3159c3bb21a58df54003265c 100644 --- a/src/libs/utils/submiteditorwidget.cpp +++ b/src/libs/utils/submiteditorwidget.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -36,6 +36,7 @@ #include <QtCore/QDebug> #include <QtCore/QPointer> +#include <QtCore/QTimer> #include <QtGui/QPushButton> @@ -70,6 +71,42 @@ void QActionPushButton::actionChanged() setEnabled(a->isEnabled()); } +// Helpers to retrieve model data +static inline bool listModelChecked(const QAbstractItemModel *model, int row, int column = 0) +{ + const QModelIndex checkableIndex = model->index(row, column, QModelIndex()); + return model->data(checkableIndex, Qt::CheckStateRole).toInt() == Qt::Checked; +} + +static inline QString listModelText(const QAbstractItemModel *model, int row, int column) +{ + const QModelIndex index = model->index(row, column, QModelIndex()); + return model->data(index, Qt::DisplayRole).toString(); +} + +// Find a check item in a model +static bool listModelContainsCheckedItem(const QAbstractItemModel *model) +{ + const int count = model->rowCount(); + for (int i = 0; i < count; i++) + if (listModelChecked(model, i, 0)) + return true; + return false; +} + +// Convenience to extract a list of selected indexes +QList<int> selectedRows(const QAbstractItemView *view) +{ + const QModelIndexList indexList = view->selectionModel()->selectedRows(0); + if (indexList.empty()) + return QList<int>(); + QList<int> rc; + const QModelIndexList::const_iterator cend = indexList.constEnd(); + for (QModelIndexList::const_iterator it = indexList.constBegin(); it != cend; ++it) + rc.push_back(it->row()); + return rc; +} + // ----------- SubmitEditorWidgetPrivate struct SubmitEditorWidgetPrivate { @@ -78,11 +115,15 @@ struct SubmitEditorWidgetPrivate Ui::SubmitEditorWidget m_ui; bool m_filesSelected; bool m_filesChecked; + int m_fileNameColumn; + int m_activatedRow; }; SubmitEditorWidgetPrivate::SubmitEditorWidgetPrivate() : m_filesSelected(false), - m_filesChecked(false) + m_filesChecked(false), + m_fileNameColumn(1), + m_activatedRow(-1) { } @@ -92,10 +133,10 @@ SubmitEditorWidget::SubmitEditorWidget(QWidget *parent) : { m_d->m_ui.setupUi(this); // File List - m_d->m_ui.fileList->setSelectionMode(QAbstractItemView::ExtendedSelection); - connect(m_d->m_ui.fileList, SIGNAL(itemActivated(QListWidgetItem*)), this, SLOT(triggerDiffSelected())); - connect(m_d->m_ui.fileList, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(fileItemChanged(QListWidgetItem*))); - connect(m_d->m_ui.fileList, SIGNAL(itemSelectionChanged()), this, SLOT(fileSelectionChanged())); + m_d->m_ui.fileView->setSelectionMode(QAbstractItemView::ExtendedSelection); + m_d->m_ui.fileView->setRootIsDecorated(false); + connect(m_d->m_ui.fileView, SIGNAL(doubleClicked(QModelIndex)), + this, SLOT(diffActivated(QModelIndex))); // Text m_d->m_ui.description->setFont(QFont(QLatin1String("Courier"))); @@ -124,8 +165,12 @@ void SubmitEditorWidget::registerActions(QAction *editorUndoAction, QAction *ed } if (submitAction) { - if (debug) - qDebug() << submitAction << m_d->m_ui.fileList->count() << "items" << m_d->m_filesChecked; + if (debug) { + int count = 0; + if (const QAbstractItemModel *model = m_d->m_ui.fileView->model()) + count = model->rowCount(); + qDebug() << submitAction << count << "items" << m_d->m_filesChecked; + } submitAction->setEnabled(m_d->m_filesChecked); connect(this, SIGNAL(fileCheckStateChanged(bool)), submitAction, SLOT(setEnabled(bool))); m_d->m_ui.buttonLayout->addWidget(new QActionPushButton(submitAction)); @@ -161,7 +206,6 @@ void SubmitEditorWidget::unregisterActions(QAction *editorUndoAction, QAction * } } - QString SubmitEditorWidget::trimmedDescriptionText() const { // Make sure we have one terminating NL @@ -180,91 +224,80 @@ void SubmitEditorWidget::setDescriptionText(const QString &text) m_d->m_ui.description->setPlainText(text); } -QStringList SubmitEditorWidget::fileList() const +int SubmitEditorWidget::fileNameColumn() const { - QStringList rc; - const int count = m_d->m_ui.fileList->count(); - for (int i = 0; i < count; i++) - rc.push_back(m_d->m_ui.fileList->item(i)->text()); - return rc; + return m_d->m_fileNameColumn; } -void SubmitEditorWidget::addFilesUnblocked(const QStringList &list, bool checked, bool userCheckable) +void SubmitEditorWidget::setFileNameColumn(int c) { - if (debug) - qDebug() << Q_FUNC_INFO << list << checked << userCheckable; - foreach (const QString &f, list) { - QListWidgetItem *item = new QListWidgetItem(f); - item->setCheckState(checked ? Qt::Checked : Qt::Unchecked); - if (!userCheckable) - item->setFlags(item->flags() & ~Qt::ItemIsUserCheckable); - m_d->m_ui.fileList->addItem(item); - } + m_d->m_fileNameColumn = c; } -void SubmitEditorWidget::addFiles(const QStringList &list, bool checked, bool userCheckable) +QAbstractItemView::SelectionMode SubmitEditorWidget::fileListSelectionMode() const { - if (list.empty()) - return; + return m_d->m_ui.fileView->selectionMode(); +} - const bool blocked = m_d->m_ui.fileList->blockSignals(true); - addFilesUnblocked(list, checked, userCheckable); - m_d->m_ui.fileList->blockSignals(blocked); - // Did we gain any checked files..update action accordingly - if (!m_d->m_filesChecked && checked) { - m_d->m_filesChecked = true; - emit fileCheckStateChanged(m_d->m_filesChecked); - } +void SubmitEditorWidget::setFileListSelectionMode(QAbstractItemView::SelectionMode sm) +{ + m_d->m_ui.fileView->setSelectionMode(sm); } -void SubmitEditorWidget::setFileList(const QStringList &list) +void SubmitEditorWidget::setFileModel(QAbstractItemModel *model) { - // Trigger enabling of menu action - m_d->m_ui.fileList->clearSelection(); + m_d->m_ui.fileView->clearSelection(); // trigger the change signals - const bool blocked = m_d->m_ui.fileList->blockSignals(true); - m_d->m_ui.fileList->clear(); - if (!list.empty()) { - addFilesUnblocked(list, true, true); - // Checked files added? - if (!m_d->m_filesChecked) { - m_d->m_filesChecked = true; - emit fileCheckStateChanged(m_d->m_filesChecked); - } + m_d->m_ui.fileView->setModel(model); + + if (model->rowCount()) { + const int columnCount = model->columnCount(); + for (int c = 0; c < columnCount; c++) + m_d->m_ui.fileView->resizeColumnToContents(c); } - m_d->m_ui.fileList->blockSignals(blocked); + + connect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), + this, SLOT(updateSubmitAction())); + connect(model, SIGNAL(modelReset()), + this, SLOT(updateSubmitAction())); + connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(updateSubmitAction())); + connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(updateSubmitAction())); + connect(m_d->m_ui.fileView->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), + this, SLOT(updateDiffAction())); + updateActions(); } -static bool containsCheckState(const QListWidget *lw, Qt::CheckState cs) +QAbstractItemModel *SubmitEditorWidget::fileModel() const { - const int count = lw->count(); - for (int i = 0; i < count; i++) - if (lw->item(i)->checkState() == cs) - return true; - return false; + return m_d->m_ui.fileView->model(); } QStringList SubmitEditorWidget::selectedFiles() const { + const QList<int> selection = selectedRows(m_d->m_ui.fileView); + if (selection.empty()) + return QStringList(); + QStringList rc; - const int count = m_d->m_ui.fileList->count(); - for (int i = 0; i < count; i++) { - const QListWidgetItem *item = m_d->m_ui.fileList->item(i); - if (item->isSelected()) - rc.push_back(item->text()); - } + const QAbstractItemModel *model = m_d->m_ui.fileView->model(); + const int count = selection.size(); + for (int i = 0; i < count; i++) + rc.push_back(listModelText(model, selection.at(i), fileNameColumn())); return rc; } QStringList SubmitEditorWidget::checkedFiles() const { QStringList rc; - const int count = m_d->m_ui.fileList->count(); - for (int i = 0; i < count; i++) { - const QListWidgetItem *item = m_d->m_ui.fileList->item(i); - if (item->checkState() == Qt::Checked) - rc.push_back(item->text()); - } + const QAbstractItemModel *model = m_d->m_ui.fileView->model(); + if (!model) + return rc; + const int count = model->rowCount(); + for (int i = 0; i < count; i++) + if (listModelChecked(model, i, 0)) + rc.push_back(listModelText(model, i, fileNameColumn())); return rc; } @@ -280,44 +313,61 @@ void SubmitEditorWidget::triggerDiffSelected() emit diffSelected(sel); } -void SubmitEditorWidget::fileItemChanged(QListWidgetItem *item) +void SubmitEditorWidget::diffActivatedDelayed() { - const Qt::CheckState st = item->checkState(); - if (debug) - qDebug() << Q_FUNC_INFO << st << item->text() << m_d->m_filesChecked; - // Enable the actions according to check state - switch (st) { - case Qt::Unchecked: // Item was unchecked: Any checked items left? - if (m_d->m_filesChecked && !containsCheckState(m_d->m_ui.fileList, Qt::Checked)) { - m_d->m_filesChecked = false; - emit fileCheckStateChanged(m_d->m_filesChecked); - } - break; - case Qt::Checked: - // Item was Checked. First one? - if (!m_d->m_filesChecked) { - m_d->m_filesChecked = true; - emit fileCheckStateChanged(m_d->m_filesChecked); - } - break; - case Qt::PartiallyChecked: // Errm? - break; + const QStringList files = QStringList(listModelText(m_d->m_ui.fileView->model(), m_d->m_activatedRow, fileNameColumn())); + emit diffSelected(files); +} + +void SubmitEditorWidget::diffActivated(const QModelIndex &index) +{ + // We need to delay the signal, otherwise, the diff editor will not + // be in the foreground. + m_d->m_activatedRow = index.row(); + QTimer::singleShot(0, this, SLOT(diffActivatedDelayed())); +} + +void SubmitEditorWidget::updateActions() +{ + updateSubmitAction(); + updateDiffAction(); +} + +// Enable submit depending on having checked files +void SubmitEditorWidget::updateSubmitAction() +{ + const bool newFilesCheckedState = hasCheckedFiles(); + if (m_d->m_filesChecked != newFilesCheckedState) { + m_d->m_filesChecked = newFilesCheckedState; + emit fileCheckStateChanged(m_d->m_filesChecked); } } -void SubmitEditorWidget::fileSelectionChanged() +// Enable diff depending on selected files +void SubmitEditorWidget::updateDiffAction() { - const bool newFilesSelected = !m_d->m_ui.fileList->selectedItems().empty(); - if (debug) - qDebug() << Q_FUNC_INFO << newFilesSelected; - if (m_d->m_filesSelected != newFilesSelected) { - m_d->m_filesSelected = newFilesSelected; + const bool filesSelected = hasSelection(); + if (m_d->m_filesSelected != filesSelected) { + m_d->m_filesSelected = filesSelected; emit fileSelectionChanged(m_d->m_filesSelected); - if (debug) - qDebug() << Q_FUNC_INFO << m_d->m_filesSelected; } } +bool SubmitEditorWidget::hasSelection() const +{ + // Not present until model is set + if (const QItemSelectionModel *sm = m_d->m_ui.fileView->selectionModel()) + return sm->hasSelection(); + return false; +} + +bool SubmitEditorWidget::hasCheckedFiles() const +{ + if (const QAbstractItemModel *model = m_d->m_ui.fileView->model()) + return listModelContainsCheckedItem(model); + return false; +} + void SubmitEditorWidget::changeEvent(QEvent *e) { switch (e->type()) { diff --git a/src/libs/utils/submiteditorwidget.h b/src/libs/utils/submiteditorwidget.h index 921bb6d16ddbd83cbf35497f6cecfa85d0e4351d..c24ae5e6d8a2ec92eee98f73cae3c5a91766bf95 100644 --- a/src/libs/utils/submiteditorwidget.h +++ b/src/libs/utils/submiteditorwidget.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -37,11 +37,14 @@ #include "utils_global.h" #include <QtGui/QWidget> +#include <QtGui/QAbstractItemView> QT_BEGIN_NAMESPACE class QPlainTextEdit; class QListWidgetItem; class QAction; +class QAbstractItemModel; +class QModelIndex; QT_END_NAMESPACE namespace Core { @@ -51,8 +54,9 @@ struct SubmitEditorWidgetPrivate; /* The submit editor presents the commit message in a text editor and an * checkable list of modified files in a list window. The user can delete - * files from the list by pressing unchecking them or diff the selection - * by doubleclicking. + * files from the list by unchecking them or diff the selection + * by doubleclicking. A list model which contains the file in a column + * specified by fileNameColumn should be set using setFileModel(). * * Additionally, standard creator actions can be registered: * Undo/redo will be set up to work with the description editor. @@ -71,7 +75,8 @@ class QWORKBENCH_UTILS_EXPORT SubmitEditorWidget : public QWidget Q_OBJECT Q_DISABLE_COPY(SubmitEditorWidget) Q_PROPERTY(QString descriptionText READ descriptionText WRITE setDescriptionText DESIGNABLE true) - Q_PROPERTY(QStringList fileList READ fileList WRITE setFileList DESIGNABLE true) + Q_PROPERTY(int fileNameColumn READ fileNameColumn WRITE setFileNameColumn DESIGNABLE false) + Q_PROPERTY(QAbstractItemView::SelectionMode fileListSelectionMode READ fileListSelectionMode WRITE setFileListSelectionMode DESIGNABLE true) public: explicit SubmitEditorWidget(QWidget *parent = 0); virtual ~SubmitEditorWidget(); @@ -86,10 +91,14 @@ public: // Should be used to normalize newlines. QString trimmedDescriptionText() const; - // The raw file list - QStringList fileList() const; - void addFiles(const QStringList&, bool checked = true, bool userCheckable = true); - void setFileList(const QStringList&); + int fileNameColumn() const; + void setFileNameColumn(int c); + + QAbstractItemView::SelectionMode fileListSelectionMode() const; + void setFileListSelectionMode(QAbstractItemView::SelectionMode sm); + + void setFileModel(QAbstractItemModel *model); + QAbstractItemModel *fileModel() const; // Files to be included in submit QStringList checkedFiles() const; @@ -110,11 +119,15 @@ protected: private slots: void triggerDiffSelected(); - void fileItemChanged(QListWidgetItem *); - void fileSelectionChanged(); + void diffActivated(const QModelIndex &index); + void diffActivatedDelayed(); + void updateActions(); + void updateSubmitAction(); + void updateDiffAction(); private: - void addFilesUnblocked(const QStringList &list, bool checked, bool userCheckable); + bool hasSelection() const; + bool hasCheckedFiles() const; SubmitEditorWidgetPrivate *m_d; }; diff --git a/src/libs/utils/submiteditorwidget.ui b/src/libs/utils/submiteditorwidget.ui index 69eed91eb326d286b7ab84ee5170ba12b2f73841..2067cad4487dbafbf69f1de5651adb4242c6fec0 100644 --- a/src/libs/utils/submiteditorwidget.ui +++ b/src/libs/utils/submiteditorwidget.ui @@ -39,14 +39,7 @@ </property> <layout class="QVBoxLayout" name="verticalLayout_2"> <item> - <widget class="QListWidget" name="fileList"> - <property name="font"> - <font/> - </property> - <property name="textElideMode"> - <enum>Qt::ElideNone</enum> - </property> - </widget> + <widget class="QTreeView" name="fileView"/> </item> </layout> </widget> diff --git a/src/libs/utils/synchronousprocess.cpp b/src/libs/utils/synchronousprocess.cpp index a8e2979f8194dda93e7e1e7bce4ae58edb452076..852f5546be71ffa4fef52e9cfbd547c3de79d9b0 100644 --- a/src/libs/utils/synchronousprocess.cpp +++ b/src/libs/utils/synchronousprocess.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/synchronousprocess.h b/src/libs/utils/synchronousprocess.h index 5b51f53cd4c395e9a30d526965a38a3850057501..e9218f43d80b6f22d1ce99baeb6d4ed7653ac55f 100644 --- a/src/libs/utils/synchronousprocess.h +++ b/src/libs/utils/synchronousprocess.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/libs/utils/utils_global.h b/src/libs/utils/utils_global.h index 5a326faa45eb1f161ae82dbec871e0682ec94b6b..eb3a2dc615ca1312cbff912b0fac360f4fd48837 100644 --- a/src/libs/utils/utils_global.h +++ b/src/libs/utils/utils_global.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/bineditor/bineditor.cpp b/src/plugins/bineditor/bineditor.cpp index b7576f98030183247547d523184958834b1e3075..05b064b83e49afc75c2b8944ac3ee94927b00285 100644 --- a/src/plugins/bineditor/bineditor.cpp +++ b/src/plugins/bineditor/bineditor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/bineditor/bineditor.h b/src/plugins/bineditor/bineditor.h index 1940434b4255a0f1f868905ffd6700066f641039..804a820145b5ebebe52498dee92104db80340af1 100644 --- a/src/plugins/bineditor/bineditor.h +++ b/src/plugins/bineditor/bineditor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/bineditor/bineditorconstants.h b/src/plugins/bineditor/bineditorconstants.h index 86cdb5ea5be654a9a2c3fbfcbe2f90798fedf470..9cbf40d5af3b91df61c84ab185d1fa4cf7d44404 100644 --- a/src/plugins/bineditor/bineditorconstants.h +++ b/src/plugins/bineditor/bineditorconstants.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/bineditor/bineditorplugin.cpp b/src/plugins/bineditor/bineditorplugin.cpp index ff07d5e876e2c86e6da8bd54fa0b7fb936436be7..883459ba7d7c88f471516929e57e5c7a0f15af83 100644 --- a/src/plugins/bineditor/bineditorplugin.cpp +++ b/src/plugins/bineditor/bineditorplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -46,7 +46,7 @@ #include <coreplugin/coreconstants.h> #include <coreplugin/mimedatabase.h> #include <coreplugin/uniqueidmanager.h> -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/editormanager/editormanager.h> #include <texteditor/texteditorsettings.h> #include <texteditor/fontsettings.h> diff --git a/src/plugins/bineditor/bineditorplugin.h b/src/plugins/bineditor/bineditorplugin.h index b5bedb49aa09a45b2e8ed32b5121879ec4520567..51ff129dd6259de65c085116b4116302e647433b 100644 --- a/src/plugins/bineditor/bineditorplugin.h +++ b/src/plugins/bineditor/bineditorplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/bookmarks/bookmark.cpp b/src/plugins/bookmarks/bookmark.cpp index f622bff74b33d788b4e49c8c2dede301a456e7f1..f12ec6dc6836c10996aa8512e993cdad07d32644 100644 --- a/src/plugins/bookmarks/bookmark.cpp +++ b/src/plugins/bookmarks/bookmark.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/bookmarks/bookmark.h b/src/plugins/bookmarks/bookmark.h index 72ead1d05482d23565094da7c66a66f71cbabb0a..1ca4fd16f1b32c5a9b4054f5b5411fd0dfa2ce25 100644 --- a/src/plugins/bookmarks/bookmark.h +++ b/src/plugins/bookmarks/bookmark.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/bookmarks/bookmarkmanager.cpp b/src/plugins/bookmarks/bookmarkmanager.cpp index ea59be8377231a3c3dbe04294a1b8f43c304b1ed..88857a81fb7d0a9a5c97f3df6399762461b1a5f2 100644 --- a/src/plugins/bookmarks/bookmarkmanager.cpp +++ b/src/plugins/bookmarks/bookmarkmanager.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/bookmarks/bookmarkmanager.h b/src/plugins/bookmarks/bookmarkmanager.h index d0d84d50ed0fec6d18b7d2bdd6761fe5cf34bbe6..1763b4e52605dde5c5dd3a2b43ac92dc0817d4d9 100644 --- a/src/plugins/bookmarks/bookmarkmanager.h +++ b/src/plugins/bookmarks/bookmarkmanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/bookmarks/bookmarks_global.h b/src/plugins/bookmarks/bookmarks_global.h index 59e639e6348d996f0ef4def2640ef077b9e76212..469c7acd3258444025574ad97a81db58acd83753 100644 --- a/src/plugins/bookmarks/bookmarks_global.h +++ b/src/plugins/bookmarks/bookmarks_global.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/bookmarks/bookmarksplugin.cpp b/src/plugins/bookmarks/bookmarksplugin.cpp index 63fbb1c2eefe75d4281ad136a45cdede71b7bd53..55b28ec82a3a8f2cec7a6c4ab709e9de71858a27 100644 --- a/src/plugins/bookmarks/bookmarksplugin.cpp +++ b/src/plugins/bookmarks/bookmarksplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -42,7 +42,7 @@ #include <coreplugin/editormanager/editormanager.h> #include <coreplugin/coreconstants.h> #include <coreplugin/uniqueidmanager.h> -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> #include <QtCore/qplugin.h> #include <QtCore/QDebug> @@ -68,7 +68,7 @@ void BookmarksPlugin::extensionsInitialized() bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *) { m_core = ExtensionSystem::PluginManager::instance()->getObject<Core::ICore>(); - Core::ActionManagerInterface *am = m_core->actionManager(); + Core::ActionManager *am = m_core->actionManager(); QList<int> context = QList<int>() << m_core->uniqueIDManager()-> uniqueIdentifier(Constants::BOOKMARKS_CONTEXT); @@ -77,17 +77,17 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *) uniqueIdentifier(TextEditor::Constants::C_TEXTEDITOR); globalcontext << Core::Constants::C_GLOBAL_ID; - Core::IActionContainer *mtools = + Core::ActionContainer *mtools = am->actionContainer(Core::Constants::M_TOOLS); - Core::IActionContainer *mbm = + Core::ActionContainer *mbm = am->createMenu(QLatin1String(BOOKMARKS_MENU)); mbm->menu()->setTitle(tr("&Bookmarks")); mtools->addMenu(mbm); //Toggle m_toggleAction = new QAction(tr("Toggle Bookmark"), this); - Core::ICommand *cmd = + Core::Command *cmd = am->registerAction(m_toggleAction, BOOKMARKS_TOGGLE_ACTION, textcontext); #ifndef Q_OS_MAC cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+M"))); diff --git a/src/plugins/bookmarks/bookmarksplugin.h b/src/plugins/bookmarks/bookmarksplugin.h index 9bf68c6b9bcc53bb5651510bab50876a4ad4310c..f4853c48cb89f1b9d1d88ad9bde02dcded293471 100644 --- a/src/plugins/bookmarks/bookmarksplugin.h +++ b/src/plugins/bookmarks/bookmarksplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp index b6e1f159b79a0b6bc6c62c8ea39ed8f9855b408a..d98539969afc79073744f6da6b35c387245a1dcb 100644 --- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -46,6 +46,7 @@ #include <QtCore/QDebug> #include <QtCore/QDir> #include <QtCore/QProcess> +#include <QtGui/QFormLayout> using namespace CMakeProjectManager; using namespace CMakeProjectManager::Internal; @@ -61,27 +62,39 @@ using namespace CMakeProjectManager::Internal; // Who sets up the environment for cl.exe ? INCLUDEPATH and so on + CMakeProject::CMakeProject(CMakeManager *manager, const QString &fileName) : m_manager(manager), m_fileName(fileName), m_rootNode(new CMakeProjectNode(m_fileName)) { - m_file = new CMakeFile(this, fileName); QDir dir = QFileInfo(m_fileName).absoluteDir(); - QString cbpFile = findCbpFile(dir); - if (cbpFile.isEmpty()) { - createCbpFile(dir); - cbpFile = findCbpFile(dir); - } + parseCMakeLists(dir); +} + +CMakeProject::~CMakeProject() +{ + delete m_rootNode; +} + +// TODO also call this method if the CMakeLists.txt file changed, which is also called if the CMakeList.txt is updated +// TODO make this function work even if it is reparsing +void CMakeProject::parseCMakeLists(const QDir &directory) +{ + createCbpFile(directory); + + QString cbpFile = findCbpFile(directory); - //TODO move this parsing to a seperate method, which is also called if the CMakeList.txt is updated CMakeCbpParser cbpparser; + qDebug()<<"Parsing file "<<cbpFile; if (cbpparser.parseCbpFile(cbpFile)) { + qDebug()<<"Building Tree"; // TODO do a intelligent updating of the tree buildTree(m_rootNode, cbpparser.fileList()); foreach (ProjectExplorer::FileNode *fn, cbpparser.fileList()) m_files.append(fn->path()); m_files.sort(); + qDebug()<<"Adding Targets"; m_targets = cbpparser.targets(); qDebug()<<"Printing targets"; foreach(CMakeTarget ct, m_targets) { @@ -91,6 +104,7 @@ CMakeProject::CMakeProject(CMakeManager *manager, const QString &fileName) qDebug()<<""; } + qDebug()<<"Updating CodeModel"; CppTools::CppModelManagerInterface *modelmanager = ExtensionSystem::PluginManager::instance()->getObject<CppTools::CppModelManagerInterface>(); if (modelmanager) { CppTools::CppModelManagerInterface::ProjectInfo pinfo = modelmanager->projectInfo(this); @@ -106,9 +120,12 @@ CMakeProject::CMakeProject(CMakeManager *manager, const QString &fileName) } } -CMakeProject::~CMakeProject() +QStringList CMakeProject::targets() const { - delete m_rootNode; + QStringList results; + foreach(const CMakeTarget &ct, m_targets) + results << ct.title; + return results; } QString CMakeProject::findCbpFile(const QDir &directory) @@ -134,10 +151,12 @@ void CMakeProject::createCbpFile(const QDir &directory) // QtCreator generator, which actually can be very similar to the CodeBlock Generator // TODO we need to pass on the same paremeters as the cmakestep + qDebug()<<"Creating cbp file"; QProcess cmake; cmake.setWorkingDirectory(directory.absolutePath()); cmake.start("cmake", QStringList() << "-GCodeBlocks - Unix Makefiles"); - cmake.waitForFinished(); + cmake.waitForFinished(-1); + qDebug()<<"cmake output: \n"<<cmake.readAll(); } void CMakeProject::buildTree(CMakeProjectNode *rootNode, QList<ProjectExplorer::FileNode *> list) @@ -219,14 +238,15 @@ ProjectExplorer::Environment CMakeProject::environment(const QString &buildConfi QString CMakeProject::buildDirectory(const QString &buildConfiguration) const { - Q_UNUSED(buildConfiguration) - //TODO - return QFileInfo(m_fileName).absolutePath(); + QString buildDirectory = value(buildConfiguration, "buildDirectory").toString(); + if (buildDirectory.isEmpty()) + buildDirectory = QFileInfo(m_fileName).absolutePath(); + return buildDirectory; } ProjectExplorer::BuildStepConfigWidget *CMakeProject::createConfigWidget() { - return new CMakeBuildSettingsWidget; + return new CMakeBuildSettingsWidget(this); } QList<ProjectExplorer::BuildStepConfigWidget*> CMakeProject::subConfigWidgets() @@ -238,8 +258,8 @@ QList<ProjectExplorer::BuildStepConfigWidget*> CMakeProject::subConfigWidgets() // You should probably set some default values in this method void CMakeProject::newBuildConfiguration(const QString &buildConfiguration) { - Q_UNUSED(buildConfiguration); - //TODO + // Default to all + makeStep()->setBuildTarget(buildConfiguration, "all", true); } ProjectExplorer::ProjectNode *CMakeProject::rootProjectNode() const @@ -261,6 +281,25 @@ void CMakeProject::saveSettingsImpl(ProjectExplorer::PersistentSettingsWriter &w Project::saveSettingsImpl(writer); } +MakeStep *CMakeProject::makeStep() const +{ + foreach (ProjectExplorer::BuildStep *bs, buildSteps()) { + MakeStep *ms = qobject_cast<MakeStep *>(bs); + if (ms) + return ms; + } + return 0; +} + +CMakeStep *CMakeProject::cmakeStep() const +{ + foreach (ProjectExplorer::BuildStep *bs, buildSteps()) { + if (CMakeStep *cs = qobject_cast<CMakeStep *>(bs)) + return cs; + } + return 0; +} + void CMakeProject::restoreSettingsImpl(ProjectExplorer::PersistentSettingsReader &reader) { // TODO @@ -273,14 +312,16 @@ void CMakeProject::restoreSettingsImpl(ProjectExplorer::PersistentSettingsReader insertBuildStep(0, cmakeStep); insertBuildStep(1, makeStep); - addBuildConfiguration("AllTargets"); - setActiveBuildConfiguration("AllTargets"); - makeStep->setValue("AllTargets", "buildTargets", QStringList() << "all"); + addBuildConfiguration("all"); + setActiveBuildConfiguration("all"); + makeStep->setBuildTarget("all", "all", true); - // Create build configurations of m_targets - qDebug()<<"Create build configurations of m_targets"; + // Create run configurations for m_targets + qDebug()<<"Create run configurations of m_targets"; bool setActive = false; foreach(const CMakeTarget &ct, m_targets) { + if (ct.executable.isEmpty()) + continue; QSharedPointer<ProjectExplorer::RunConfiguration> rc(new CMakeRunConfiguration(this, ct.executable, ct.workingDirectory)); addRunConfiguration(rc); // The first one gets the honour of beeing the active one @@ -289,7 +330,6 @@ void CMakeProject::restoreSettingsImpl(ProjectExplorer::PersistentSettingsReader setActive = true; } } - setActiveBuildConfiguration("all"); } // Restoring is fine @@ -352,10 +392,19 @@ void CMakeFile::modified(ReloadBehavior *behavior) Q_UNUSED(behavior); } - -CMakeBuildSettingsWidget::CMakeBuildSettingsWidget() +CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeProject *project) + : m_project(project) { - + QFormLayout *fl = new QFormLayout(this); + setLayout(fl); + m_pathChooser = new Core::Utils::PathChooser(this); + m_pathChooser->setEnabled(false); + // TODO currently doesn't work + // since creating the cbp file also creates makefiles + // and then cmake builds in that directory instead of shadow building + // We need our own generator for that to work + connect(m_pathChooser, SIGNAL(changed()), this, SLOT(buildDirectoryChanged())); + fl->addRow("Build directory:", m_pathChooser); } QString CMakeBuildSettingsWidget::displayName() const @@ -365,10 +414,19 @@ QString CMakeBuildSettingsWidget::displayName() const void CMakeBuildSettingsWidget::init(const QString &buildConfiguration) { - Q_UNUSED(buildConfiguration); - // TODO + m_buildConfiguration = buildConfiguration; + m_pathChooser->setPath(m_project->buildDirectory(buildConfiguration)); } +void CMakeBuildSettingsWidget::buildDirectoryChanged() +{ + m_project->setValue(m_buildConfiguration, "buildDirectory", m_pathChooser->path()); +} + +///// +// CMakeCbpParser +//// + bool CMakeCbpParser::parseCbpFile(const QString &fileName) { QFile fi(fileName); @@ -445,7 +503,7 @@ void CMakeCbpParser::parseTarget() while (!atEnd()) { readNext(); if (isEndElement()) { - if (m_targetType || m_target.title == "all") { + if (m_targetType || m_target.title == "all" || m_target.title == "install") { m_targets.append(m_target); } return; diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.h b/src/plugins/cmakeprojectmanager/cmakeproject.h index c6a93f8693c9e6cb23d8dab6444d4dc8a2aff7b2..cad7b5fe5df1dd46042d36edf963380031a6a88a 100644 --- a/src/plugins/cmakeprojectmanager/cmakeproject.h +++ b/src/plugins/cmakeprojectmanager/cmakeproject.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -36,11 +36,14 @@ #include "cmakeprojectmanager.h" #include "cmakeprojectnodes.h" +#include "makestep.h" +#include "cmakestep.h" #include <projectexplorer/project.h> #include <projectexplorer/projectnodes.h> #include <projectexplorer/buildstep.h> #include <coreplugin/ifile.h> +#include <utils/pathchooser.h> #include <QtCore/QXmlStreamReader> @@ -99,8 +102,12 @@ public: // virtual Node *nodeForFile(const QString &filePath) const = 0; virtual QStringList files(FilesMode fileMode) const; + MakeStep *makeStep() const; + CMakeStep *cmakeStep() const; + QStringList targets() const; private: + void parseCMakeLists(const QDir &directory); QString findCbpFile(const QDir &); void createCbpFile(const QDir &); @@ -177,13 +184,20 @@ private: class CMakeBuildSettingsWidget : public ProjectExplorer::BuildStepConfigWidget { + Q_OBJECT public: - CMakeBuildSettingsWidget(); + CMakeBuildSettingsWidget(CMakeProject *project); virtual QString displayName() const; // This is called to set up the config widget before showing it // buildConfiguration is QString::null for the non buildConfiguration specific page virtual void init(const QString &buildConfiguration); +private slots: + void buildDirectoryChanged(); +private: + CMakeProject *m_project; + Core::Utils::PathChooser *m_pathChooser; + QString m_buildConfiguration; }; } // namespace Internal diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectconstants.h b/src/plugins/cmakeprojectmanager/cmakeprojectconstants.h index 4e753c570e9dbfaa947c8939c3f683208789a652..0c5430556683c964ffa5bb33f90b384e8d0483ae 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectconstants.h +++ b/src/plugins/cmakeprojectmanager/cmakeprojectconstants.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp index 2282f0cb527d0a3839af648213b39dc1452b25e3..1f4bc59e9efb04170f759024f6dd5a1244de86bd 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.h b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.h index b3335702de1192fd5d7df0f590cb08b73c090d9d..34d97f1cc7c9f2f21920aecd33eb284c0849c133 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.h +++ b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp index 2d48295f0f641758ad770436835fd370ea167bbe..b998a18bb70a52d3bdce2d5c91c82616d5224357 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.h b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.h index 3f7b8442fa9e3160201a7f5034f96fd863e25b4d..ba569dbaf4a821a6f26f4f7af8014e13e2058485 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.h +++ b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectplugin.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectplugin.cpp index d38cb56c145a43424173518c51c955936037514b..e1b2b1279b61697701dea9d3dee90b4b8d65d2c3 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectplugin.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -34,6 +34,8 @@ #include "cmakeprojectplugin.h" #include "cmakeprojectmanager.h" #include "cmakerunconfiguration.h" +#include "cmakestep.h" +#include "makestep.h" #include <coreplugin/icore.h> #include <coreplugin/mimedatabase.h> @@ -58,6 +60,8 @@ bool CMakeProjectPlugin::initialize(const QStringList & /*arguments*/, QString * if (!core->mimeDatabase()->addMimeTypes(QLatin1String(":cmakeproject/CMakeProject.mimetypes.xml"), errorMessage)) return false; addAutoReleasedObject(new CMakeManager()); + addAutoReleasedObject(new CMakeBuildStepFactory()); + addAutoReleasedObject(new MakeBuildStepFactory()); addAutoReleasedObject(new CMakeRunConfigurationFactory()); return true; } diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectplugin.h b/src/plugins/cmakeprojectmanager/cmakeprojectplugin.h index d3cd8941b53b7d3f4d1cb538bb1e09ee3e46d9df..fd40f322c482fbef82aab9de24fca3ac75d9ee72 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectplugin.h +++ b/src/plugins/cmakeprojectmanager/cmakeprojectplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp index 356cfba3b38e9dba4f2f7b4938bde594281eb5c4..b688fa6bb112be6b63ae49f48aa3d8d72179a558 100644 --- a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.h b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.h index 6dff25adfd5b6ce9a12fc05cc40b964f42cf0b28..1452ca3908c7e9870bf78142ef7e8b2835c9f389 100644 --- a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.h +++ b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -71,7 +71,7 @@ private: * QString nameForType(const QString&) are used to generate a list of creatable * RunConfigurations, and create(..) is used to create it. */ -class CMakeRunConfigurationFactory : public QObject +class CMakeRunConfigurationFactory : public ProjectExplorer::IRunConfigurationFactory { Q_OBJECT; public: diff --git a/src/plugins/cmakeprojectmanager/cmakestep.cpp b/src/plugins/cmakeprojectmanager/cmakestep.cpp index 13963273287384406c71e0567df104d9fae80eb8..9f114893fc44993e3c6061158ae74c4ba40afa2b 100644 --- a/src/plugins/cmakeprojectmanager/cmakestep.cpp +++ b/src/plugins/cmakeprojectmanager/cmakestep.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -37,6 +37,8 @@ #include "cmakeprojectconstants.h" #include <utils/qtcassert.h> +#include <QtGui/QFormLayout> +#include <QtGui/QLineEdit> using namespace CMakeProjectManager; using namespace CMakeProjectManager::Internal; @@ -55,7 +57,14 @@ bool CMakeStep::init(const QString &buildConfiguration) setEnabled(buildConfiguration, true); setWorkingDirectory(buildConfiguration, m_pro->buildDirectory(buildConfiguration)); setCommand(buildConfiguration, "cmake"); // TODO give full path here? - setArguments(buildConfiguration, QStringList() << "-GUnix Makefiles"); // TODO + + QString sourceDir = QFileInfo(m_pro->file()->fileName()).absolutePath(); + setArguments(buildConfiguration, + QStringList() + << sourceDir + << "-GUnix Makefiles" + << value(buildConfiguration, "userArguments").toStringList()); // TODO + setEnvironment(buildConfiguration, m_pro->environment(buildConfiguration)); return AbstractProcessStep::init(buildConfiguration); } @@ -72,17 +81,17 @@ void CMakeStep::run(QFutureInterface<bool> &fi) QString CMakeStep::name() { - return "CMake"; + return Constants::CMAKESTEP; } QString CMakeStep::displayName() { - return Constants::CMAKESTEP; + return "CMake"; } ProjectExplorer::BuildStepConfigWidget *CMakeStep::createConfigWidget() { - return new CMakeBuildStepConfigWidget(); + return new CMakeBuildStepConfigWidget(this); } bool CMakeStep::immutable() const @@ -90,18 +99,46 @@ bool CMakeStep::immutable() const return true; } +QString CMakeStep::userArguments(const QString &buildConfiguration) const +{ + return ProjectExplorer::Environment::joinArgumentList(value(buildConfiguration, "userArguments").toStringList()); +} + +void CMakeStep::setUserArguments(const QString &buildConfiguration, const QString &arguments) +{ + setValue(buildConfiguration, "userArguments", ProjectExplorer::Environment::parseCombinedArgString(arguments)); +} + // // CMakeBuildStepConfigWidget // +CMakeBuildStepConfigWidget::CMakeBuildStepConfigWidget(CMakeStep *cmakeStep) + : m_cmakeStep(cmakeStep) +{ + QFormLayout *fl = new QFormLayout(this); + setLayout(fl); + m_arguments = new QLineEdit(this); + fl->addRow("Additional arguments", m_arguments); + connect(m_arguments, SIGNAL(textChanged(QString)), this, SLOT(argumentsLineEditChanged())); +} + QString CMakeBuildStepConfigWidget::displayName() const { return "CMake"; } -void CMakeBuildStepConfigWidget::init(const QString & /*buildConfiguration */) +void CMakeBuildStepConfigWidget::init(const QString &buildConfiguration) +{ + m_buildConfiguration = buildConfiguration; + disconnect(m_arguments, SIGNAL(textChanged(QString)), this, SLOT(argumentsLineEditChanged())); + m_arguments->setText(m_cmakeStep->userArguments(buildConfiguration)); + connect(m_arguments, SIGNAL(textChanged(QString)), this, SLOT(argumentsLineEditChanged())); +} + +void CMakeBuildStepConfigWidget::argumentsLineEditChanged() { - // TODO + m_cmakeStep->setUserArguments(m_buildConfiguration, m_arguments->text()); } // diff --git a/src/plugins/cmakeprojectmanager/cmakestep.h b/src/plugins/cmakeprojectmanager/cmakestep.h index a0a20b0c50d22a1105a23542be36ba4a81066b0f..c5006a3eadcecacfbe352252fd679466d0d7332f 100644 --- a/src/plugins/cmakeprojectmanager/cmakestep.h +++ b/src/plugins/cmakeprojectmanager/cmakestep.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -37,6 +37,10 @@ #include <projectexplorer/buildstep.h> #include <projectexplorer/abstractprocessstep.h> +QT_BEGIN_NAMESPACE +class QLineEdit; +QT_END_NAMESPACE + namespace CMakeProjectManager { namespace Internal { @@ -46,6 +50,7 @@ class CMakeBuildStepConfigWidget; class CMakeStep : public ProjectExplorer::AbstractProcessStep { + Q_OBJECT public: CMakeStep(CMakeProject *pro); ~CMakeStep(); @@ -57,15 +62,26 @@ public: virtual QString displayName(); virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget(); virtual bool immutable() const; + + void setUserArguments(const QString &buildConfiguration, const QString &arguments); + QString userArguments(const QString &buildConfiguration) const; private: CMakeProject *m_pro; }; class CMakeBuildStepConfigWidget :public ProjectExplorer::BuildStepConfigWidget { + Q_OBJECT public: + CMakeBuildStepConfigWidget(CMakeStep *cmakeStep); virtual QString displayName() const; virtual void init(const QString &buildConfiguration); +private slots: + void argumentsLineEditChanged(); +private: + CMakeStep *m_cmakeStep; + QString m_buildConfiguration; + QLineEdit *m_arguments; }; class CMakeBuildStepFactory : public ProjectExplorer::IBuildStepFactory diff --git a/src/plugins/cmakeprojectmanager/makestep.cpp b/src/plugins/cmakeprojectmanager/makestep.cpp index abd77cd10aadb36f196a81e1f5dcb350ca18507b..60f5d04903ebd5398b481d91ef70f5231678b335 100644 --- a/src/plugins/cmakeprojectmanager/makestep.cpp +++ b/src/plugins/cmakeprojectmanager/makestep.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -36,6 +36,11 @@ #include "cmakeproject.h" #include <utils/qtcassert.h> +#include <QtGui/QFormLayout> +#include <QtGui/QGroupBox> +#include <QtGui/QCheckBox> +#include <QtGui/QLineEdit> +#include <QtGui/QListWidget> using namespace CMakeProjectManager; using namespace CMakeProjectManager::Internal; @@ -66,17 +71,17 @@ void MakeStep::run(QFutureInterface<bool> &fi) QString MakeStep::name() { - return "Make"; + return Constants::MAKESTEP; } QString MakeStep::displayName() { - return Constants::CMAKESTEP; + return "Make"; } ProjectExplorer::BuildStepConfigWidget *MakeStep::createConfigWidget() { - return new MakeBuildStepConfigWidget(); + return new MakeBuildStepConfigWidget(this); } bool MakeStep::immutable() const @@ -84,18 +89,72 @@ bool MakeStep::immutable() const return true; } +CMakeProject *MakeStep::project() const +{ + return m_pro; +} + +bool MakeStep::buildsTarget(const QString &buildConfiguration, const QString &target) const +{ + return value(buildConfiguration, "buildTargets").toStringList().contains(target); +} + +void MakeStep::setBuildTarget(const QString &buildConfiguration, const QString &target, bool on) +{ + QStringList old = value(buildConfiguration, "buildTargets").toStringList(); + if (on && !old.contains(target)) + setValue(buildConfiguration, "buildTargets", old << target); + else if(!on && old.contains(target)) + setValue(buildConfiguration, "buildTargets", old.removeOne(target)); +} + // // CMakeBuildStepConfigWidget // +MakeBuildStepConfigWidget::MakeBuildStepConfigWidget(MakeStep *makeStep) + : m_makeStep(makeStep) +{ + QFormLayout *fl = new QFormLayout(this); + setLayout(fl); + + m_targetsList = new QListWidget; + fl->addRow("Targets:", m_targetsList); + + // TODO update this list also on rescans of the CMakeLists.txt + CMakeProject *pro = m_makeStep->project(); + foreach(const QString& target, pro->targets()) { + QListWidgetItem *item = new QListWidgetItem(target, m_targetsList); + item->setFlags(item->flags() | Qt::ItemIsUserCheckable); + item->setCheckState(Qt::Unchecked); + } + connect(m_targetsList, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(itemChanged(QListWidgetItem*))); +} + +void MakeBuildStepConfigWidget::itemChanged(QListWidgetItem *item) +{ + m_makeStep->setBuildTarget(m_buildConfiguration, item->text(), item->checkState() & Qt::Checked); +} QString MakeBuildStepConfigWidget::displayName() const { return "Make"; } -void MakeBuildStepConfigWidget::init(const QString & /* buildConfiguration */) +void MakeBuildStepConfigWidget::init(const QString &buildConfiguration) { // TODO + + // disconnect to make the changes to the items + disconnect(m_targetsList, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(itemChanged(QListWidgetItem*))); + m_buildConfiguration = buildConfiguration; + int count = m_targetsList->count(); + for(int i = 0; i < count; ++i) { + QListWidgetItem *item = m_targetsList->item(i); + item->setCheckState(m_makeStep->buildsTarget(buildConfiguration, item->text()) ? Qt::Checked : Qt::Unchecked); + } + // and connect again + connect(m_targetsList, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(itemChanged(QListWidgetItem*))); + } // diff --git a/src/plugins/cmakeprojectmanager/makestep.h b/src/plugins/cmakeprojectmanager/makestep.h index 33800265d6a0826fa991f877fbfb4384fc5574fe..fbfc007dbe44362154e5ee06e05a41b6115254cc 100644 --- a/src/plugins/cmakeprojectmanager/makestep.h +++ b/src/plugins/cmakeprojectmanager/makestep.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -36,6 +36,12 @@ #include <projectexplorer/abstractprocessstep.h> +QT_BEGIN_NAMESPACE +class QLineEdit; +class QListWidget; +class QListWidgetItem; +QT_END_NAMESPACE + namespace CMakeProjectManager { namespace Internal { @@ -43,6 +49,7 @@ class CMakeProject; class MakeStep : public ProjectExplorer::AbstractProcessStep { + Q_OBJECT public: MakeStep(CMakeProject *pro); ~MakeStep(); @@ -54,15 +61,26 @@ public: virtual QString displayName(); virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget(); virtual bool immutable() const; + CMakeProject *project() const; + bool buildsTarget(const QString &buildConfiguration, const QString &target) const; + void setBuildTarget(const QString &buildConfiguration, const QString &target, bool on); private: CMakeProject *m_pro; }; class MakeBuildStepConfigWidget :public ProjectExplorer::BuildStepConfigWidget { + Q_OBJECT public: + MakeBuildStepConfigWidget(MakeStep *makeStep); virtual QString displayName() const; virtual void init(const QString &buildConfiguration); +private slots: + void itemChanged(QListWidgetItem*); +private: + QString m_buildConfiguration; + MakeStep * m_makeStep; + QListWidget *m_targetsList; }; class MakeBuildStepFactory : public ProjectExplorer::IBuildStepFactory diff --git a/src/plugins/coreplugin/actionmanager/actioncontainer.cpp b/src/plugins/coreplugin/actionmanager/actioncontainer.cpp index bec545cc2627e71c9fa897b226aaaefbf50e4192..bf2d49826c0189fdd28503f94b0279118dcb9c69 100644 --- a/src/plugins/coreplugin/actionmanager/actioncontainer.cpp +++ b/src/plugins/coreplugin/actionmanager/actioncontainer.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -31,8 +31,10 @@ ** ***************************************************************************/ -#include "actioncontainer.h" -#include "command.h" +#include "actioncontainer_p.h" +#include "actionmanager_p.h" + +#include "command_p.h" #include "coreimpl.h" #include "coreconstants.h" @@ -49,145 +51,111 @@ using namespace Core; using namespace Core::Internal; /*! - \class IActionContainer + \class ActionContainer \mainclass - \ingroup qwb - \inheaderfile iactioncontainer.h - \brief The class... + \brief The ActionContainer class represents a menu or menu bar in Qt Creator. - The Action Container interface... + */ /*! - \enum IActionContainer::ContainerType + \enum ActionContainer::ContainerType */ /*! - \enum IActionContainer::EmptyAction + \enum ActionContainer::EmptyAction */ /*! - \fn virtual IActionContainer::setEmptyAction(EmptyAction ea) + \fn virtual ActionContainer::setEmptyAction(EmptyAction ea) */ /*! - \fn virtual int IActionContainer::id() const + \fn virtual int ActionContainer::id() const */ /*! - \fn virtual ContainerType IActionContainer::type() const + \fn virtual ContainerType ActionContainer::type() const */ /*! - \fn virtual QMenu *IActionContainer::menu() const + \fn virtual QMenu *ActionContainer::menu() const */ /*! - \fn virtual QToolBar *IActionContainer::toolBar() const + \fn virtual QToolBar *ActionContainer::toolBar() const */ /*! - \fn virtual QMenuBar *IActionContainer::menuBar() const + \fn virtual QMenuBar *ActionContainer::menuBar() const */ /*! - \fn virtual QAction *IActionContainer::insertLocation(const QString &group) const + \fn virtual QAction *ActionContainer::insertLocation(const QString &group) const */ /*! - \fn virtual void IActionContainer::appendGroup(const QString &group, bool global) + \fn virtual void ActionContainer::appendGroup(const QString &group, bool global) */ /*! - \fn virtual void IActionContainer::addAction(Core::ICommand *action, const QString &group) + \fn virtual void ActionContainer::addAction(Core::Command *action, const QString &group) */ /*! - \fn virtual void IActionContainer::addMenu(Core::IActionContainer *menu, const QString &group) + \fn virtual void ActionContainer::addMenu(Core::ActionContainer *menu, const QString &group) */ /*! - \fn virtual bool IActionContainer::update() + \fn virtual bool ActionContainer::update() */ /*! - \fn virtual IActionContainer::~IActionContainer() + \fn virtual ActionContainer::~ActionContainer() */ -// ---------- ActionContainer ------------ - -/*! - \class ActionContainer - \ingroup qwb - \inheaderfile actioncontainer.h -*/ +// ---------- ActionContainerPrivate ------------ /*! - \enum ActionContainer::ContainerState + \class Core::Internal::ActionContainerPrivate + \internal */ -/*! -\fn ActionContainer::ActionContainer(ContainerType type, int id) -*/ -ActionContainer::ActionContainer(ContainerType type, int id) - : m_data(CS_None), m_type(type), m_id(id) +ActionContainerPrivate::ActionContainerPrivate(int id) + : m_data(CS_None), m_id(id) { } -/*! - \fn virtual ActionContainer::~ActionContainer() -*/ - -/*! - ... -*/ -void ActionContainer::setEmptyAction(EmptyAction ea) +void ActionContainerPrivate::setEmptyAction(EmptyAction ea) { m_data = ((m_data & ~EA_Mask) | ea); } -/*! - ... -*/ -bool ActionContainer::hasEmptyAction(EmptyAction ea) const +bool ActionContainerPrivate::hasEmptyAction(EmptyAction ea) const { return (m_data & EA_Mask) == ea; } -/*! - ... -*/ -void ActionContainer::setState(ContainerState state) +void ActionContainerPrivate::setState(ContainerState state) { m_data |= state; } -/*! - ... -*/ -bool ActionContainer::hasState(ContainerState state) const +bool ActionContainerPrivate::hasState(ContainerState state) const { return (m_data & state); } -/*! - ... -*/ -void ActionContainer::appendGroup(const QString &group, bool global) +void ActionContainerPrivate::appendGroup(const QString &group) { UniqueIDManager *idmanager = CoreImpl::instance()->uniqueIDManager(); int gid = idmanager->uniqueIdentifier(group); m_groups << gid; - if (global) - ActionManager::instance()->registerGlobalGroup(gid, m_id); } -/*! - ... -*/ -QAction *ActionContainer::insertLocation(const QString &group) const +QAction *ActionContainerPrivate::insertLocation(const QString &group) const { UniqueIDManager *idmanager = CoreImpl::instance()->uniqueIDManager(); int grpid = idmanager->uniqueIdentifier(group); @@ -196,41 +164,22 @@ QAction *ActionContainer::insertLocation(const QString &group) const return beforeAction(pos, &prevKey); } -/*! -\fn virtual void ActionContainer::insertAction(QAction *before, QAction *action) = 0 -*/ - -/*! -\fn virtual void ActionContainer::insertMenu(QAction *before, QMenu *menu) = 0 -*/ - -/*! -\fn QList<ICommand *> ActionContainer::commands() const -*/ - -/*! -\fn QList<IActionContainer *> ActionContainer::subContainers() const -*/ - -/*! - ... -*/ -void ActionContainer::addAction(ICommand *action, const QString &group) +void ActionContainerPrivate::addAction(Command *action, const QString &group) { if (!canAddAction(action)) return; - ActionManager *am = ActionManager::instance(); + ActionManagerPrivate *am = ActionManagerPrivate::instance(); Action *a = static_cast<Action *>(action); - if (a->stateFlags() & Command::CS_PreLocation) { + if (a->stateFlags() & CommandPrivate::CS_PreLocation) { QList<CommandLocation> locs = a->locations(); for (int i=0; i<locs.size(); ++i) { - if (IActionContainer *aci = am->actionContainer(locs.at(i).m_container)) { - ActionContainer *ac = static_cast<ActionContainer *>(aci); + if (ActionContainer *aci = am->actionContainer(locs.at(i).m_container)) { + ActionContainerPrivate *ac = static_cast<ActionContainerPrivate *>(aci); ac->addAction(action, locs.at(i).m_position, false); } } - a->setStateFlags(a->stateFlags() | Command::CS_Initialized); + a->setStateFlags(a->stateFlags() | CommandPrivate::CS_Initialized); } else { UniqueIDManager *idmanager = CoreImpl::instance()->uniqueIDManager(); int grpid = idmanager->uniqueIdentifier(Constants::G_DEFAULT_TWO); @@ -243,23 +192,21 @@ void ActionContainer::addAction(ICommand *action, const QString &group) } } -/*! - ... -*/ -void ActionContainer::addMenu(IActionContainer *menu, const QString &group) +void ActionContainerPrivate::addMenu(ActionContainer *menu, const QString &group) { - if (!canAddMenu(menu)) + ActionContainerPrivate *container = static_cast<ActionContainerPrivate *>(menu); + if (!container->canBeAddedToMenu()) return; - ActionManager *am = ActionManager::instance(); + ActionManagerPrivate *am = ActionManagerPrivate::instance(); MenuActionContainer *mc = static_cast<MenuActionContainer *>(menu); - if (mc->hasState(ActionContainer::CS_PreLocation)) { + if (mc->hasState(ActionContainerPrivate::CS_PreLocation)) { CommandLocation loc = mc->location(); - if (IActionContainer *aci = am->actionContainer(loc.m_container)) { - ActionContainer *ac = static_cast<ActionContainer *>(aci); + if (ActionContainer *aci = am->actionContainer(loc.m_container)) { + ActionContainerPrivate *ac = static_cast<ActionContainerPrivate *>(aci); ac->addMenu(menu, loc.m_position, false); } - mc->setState(ActionContainer::CS_Initialized); + mc->setState(ActionContainerPrivate::CS_Initialized); } else { UniqueIDManager *idmanager = CoreImpl::instance()->uniqueIDManager(); int grpid = idmanager->uniqueIdentifier(Constants::G_DEFAULT_TWO); @@ -272,80 +219,34 @@ void ActionContainer::addMenu(IActionContainer *menu, const QString &group) } } -/*! - ... -*/ -int ActionContainer::id() const +int ActionContainerPrivate::id() const { return m_id; } -/*! - ... -*/ -IActionContainer::ContainerType ActionContainer::type() const -{ - return m_type; -} - -/*! - ... -*/ -QMenu *ActionContainer::menu() const -{ - return 0; -} - -/*! - ... -*/ -QToolBar *ActionContainer::toolBar() const +QMenu *ActionContainerPrivate::menu() const { return 0; } -/*! - ... -*/ -QMenuBar *ActionContainer::menuBar() const +QMenuBar *ActionContainerPrivate::menuBar() const { return 0; } -/*! - ... -*/ -bool ActionContainer::canAddAction(ICommand *action) const -{ - if (action->type() != ICommand::CT_OverridableAction) - return false; - - Command *cmd = static_cast<Command *>(action); - if (cmd->stateFlags() & Command::CS_Initialized) - return false; - - return true; -} - -/*! - ... -*/ -bool ActionContainer::canAddMenu(IActionContainer *menu) const +bool ActionContainerPrivate::canAddAction(Command *action) const { - if (menu->type() != IActionContainer::CT_Menu) + if (action->type() != Command::CT_OverridableAction) return false; - ActionContainer *container = static_cast<ActionContainer *>(menu); - if (container->hasState(ActionContainer::CS_Initialized)) + CommandPrivate *cmd = static_cast<CommandPrivate *>(action); + if (cmd->stateFlags() & CommandPrivate::CS_Initialized) return false; return true; } -/*! - ... -*/ -void ActionContainer::addAction(ICommand *action, int pos, bool setpos) +void ActionContainerPrivate::addAction(Command *action, int pos, bool setpos) { Action *a = static_cast<Action *>(action); @@ -367,10 +268,7 @@ void ActionContainer::addAction(ICommand *action, int pos, bool setpos) insertAction(ba, a->action()); } -/*! - ... -*/ -void ActionContainer::addMenu(IActionContainer *menu, int pos, bool setpos) +void ActionContainerPrivate::addMenu(ActionContainer *menu, int pos, bool setpos) { MenuActionContainer *mc = static_cast<MenuActionContainer *>(menu); @@ -390,13 +288,9 @@ void ActionContainer::addMenu(IActionContainer *menu, int pos, bool setpos) insertMenu(ba, mc->menu()); } -/*! - ... - \internal -*/ -QAction *ActionContainer::beforeAction(int pos, int *prevKey) const +QAction *ActionContainerPrivate::beforeAction(int pos, int *prevKey) const { - ActionManager *am = ActionManager::instance(); + ActionManagerPrivate *am = ActionManagerPrivate::instance(); int baId = -1; @@ -415,20 +309,16 @@ QAction *ActionContainer::beforeAction(int pos, int *prevKey) const if (baId == -1) return 0; - if (ICommand *cmd = am->command(baId)) + if (Command *cmd = am->command(baId)) return cmd->action(); - if (IActionContainer *container = am->actionContainer(baId)) + if (ActionContainer *container = am->actionContainer(baId)) if (QMenu *menu = container->menu()) return menu->menuAction(); return 0; } -/*! - ... - \internal -*/ -int ActionContainer::calcPosition(int pos, int prevKey) const +int ActionContainerPrivate::calcPosition(int pos, int prevKey) const { int grp = (pos & 0xFFFF0000); if (prevKey == -1) @@ -445,23 +335,16 @@ int ActionContainer::calcPosition(int pos, int prevKey) const // ---------- MenuActionContainer ------------ /*! - \class MenuActionContainer - \ingroup qwb - \inheaderfile actioncontainer.h + \class Core::Internal::MenuActionContainer + \internal */ -/*! - ... -*/ MenuActionContainer::MenuActionContainer(int id) - : ActionContainer(CT_Menu, id), m_menu(0) + : ActionContainerPrivate(id), m_menu(0) { setEmptyAction(EA_Disable); } -/*! - ... -*/ void MenuActionContainer::setMenu(QMenu *menu) { m_menu = menu; @@ -472,49 +355,31 @@ void MenuActionContainer::setMenu(QMenu *menu) m_menu->menuAction()->setData(v); } -/*! - ... -*/ QMenu *MenuActionContainer::menu() const { return m_menu; } -/*! - ... -*/ void MenuActionContainer::insertAction(QAction *before, QAction *action) { m_menu->insertAction(before, action); } -/*! - ... -*/ void MenuActionContainer::insertMenu(QAction *before, QMenu *menu) { m_menu->insertMenu(before, menu); } -/*! - ... -*/ void MenuActionContainer::setLocation(const CommandLocation &location) { m_location = location; } -/*! - ... -*/ CommandLocation MenuActionContainer::location() const { return m_location; } -/*! - ... -*/ bool MenuActionContainer::update() { if (hasEmptyAction(EA_None)) @@ -522,7 +387,7 @@ bool MenuActionContainer::update() bool hasitems = false; - foreach (IActionContainer *container, subContainers()) { + foreach (ActionContainer *container, subContainers()) { if (container == this) { qWarning() << Q_FUNC_INFO << "container" << (this->menu() ? this->menu()->title() : "") << "contains itself as subcontainer"; continue; @@ -533,7 +398,7 @@ bool MenuActionContainer::update() } } if (!hasitems) { - foreach (ICommand *command, commands()) { + foreach (Command *command, commands()) { if (command->isActive()) { hasitems = true; break; @@ -549,131 +414,48 @@ bool MenuActionContainer::update() return hasitems; } -// ---------- ToolBarActionContainer ------------ - -/*! - \class ToolBarActionContainer - \ingroup qwb - \inheaderfile actioncontainer.h -*/ - -/*! - ... -*/ -ToolBarActionContainer::ToolBarActionContainer(int id) - : ActionContainer(CT_ToolBar, id), m_toolBar(0) -{ - setEmptyAction(EA_None); -} - -/*! - ... -*/ -void ToolBarActionContainer::setToolBar(QToolBar *toolBar) -{ - m_toolBar = toolBar; -} - -/*! - ... -*/ -QToolBar *ToolBarActionContainer::toolBar() const -{ - return m_toolBar; -} - -/*! - ... -*/ -void ToolBarActionContainer::insertAction(QAction *before, QAction *action) +bool MenuActionContainer::canBeAddedToMenu() const { - m_toolBar->insertAction(before, action); -} + if (hasState(ActionContainerPrivate::CS_Initialized)) + return false; -/*! - ... -*/ -void ToolBarActionContainer::insertMenu(QAction *, QMenu *) -{ - // not implemented + return true; } -/*! - ... -*/ -bool ToolBarActionContainer::update() -{ - if (hasEmptyAction(EA_None)) - return true; - - bool hasitems = false; - foreach (ICommand *command, commands()) { - if (command->isActive()) { - hasitems = true; - break; - } - } - - if (hasEmptyAction(EA_Hide)) - m_toolBar->setVisible(hasitems); - else if (hasEmptyAction(EA_Disable)) - m_toolBar->setEnabled(hasitems); - - return hasitems; -} // ---------- MenuBarActionContainer ------------ /*! - \class MenuBarActionContainer - \ingroup qwb - \inheaderfile actioncontainer.h + \class Core::Internal::MenuBarActionContainer + \internal */ -/*! - ... -*/ MenuBarActionContainer::MenuBarActionContainer(int id) - : ActionContainer(CT_ToolBar, id), m_menuBar(0) + : ActionContainerPrivate(id), m_menuBar(0) { setEmptyAction(EA_None); } -/*! - ... -*/ void MenuBarActionContainer::setMenuBar(QMenuBar *menuBar) { m_menuBar = menuBar; } -/*! - ... -*/ QMenuBar *MenuBarActionContainer::menuBar() const { return m_menuBar; } -/*! - ... -*/ void MenuBarActionContainer::insertAction(QAction *before, QAction *action) { m_menuBar->insertAction(before, action); } -/*! - ... -*/ void MenuBarActionContainer::insertMenu(QAction *before, QMenu *menu) { m_menuBar->insertMenu(before, menu); } -/*! - ... -*/ bool MenuBarActionContainer::update() { if (hasEmptyAction(EA_None)) @@ -695,3 +477,9 @@ bool MenuBarActionContainer::update() return hasitems; } + +bool MenuBarActionContainer::canBeAddedToMenu() const +{ + return false; +} + diff --git a/src/plugins/coreplugin/actionmanager/actioncontainer.h b/src/plugins/coreplugin/actionmanager/actioncontainer.h index 6d116426f203930228d7d7bf3e521d221455d044..adad9a3d3424047720e211a076deff49c650328a 100644 --- a/src/plugins/coreplugin/actionmanager/actioncontainer.h +++ b/src/plugins/coreplugin/actionmanager/actioncontainer.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -34,123 +34,42 @@ #ifndef ACTIONCONTAINER_H #define ACTIONCONTAINER_H -#include "actionmanager.h" - -#include <coreplugin/actionmanager/iactioncontainer.h> -#include <coreplugin/actionmanager/icommand.h> +#include <QtCore/QObject> +#include <QtGui/QMenu> +#include <QtGui/QToolBar> +#include <QtGui/QMenuBar> +#include <QtGui/QAction> namespace Core { -namespace Internal { - -class ActionContainer : public Core::IActionContainer -{ -public: - enum ContainerState { - CS_None = 0x000000, - CS_Initialized = 0x010000, - CS_PreLocation = 0x020000, - CS_UserDefined = 0x040000 - }; - - ActionContainer(ContainerType type, int id); - virtual ~ActionContainer() {} - - void setEmptyAction(EmptyAction ea); - bool hasEmptyAction(EmptyAction ea) const; - - void setState(ContainerState state); - bool hasState(ContainerState state) const; - - QAction *insertLocation(const QString &group) const; - void appendGroup(const QString &group, bool global = false); - void addAction(ICommand *action, const QString &group = QString()); - void addMenu(IActionContainer *menu, const QString &group = QString()); - - int id() const; - ContainerType type() const; - - QMenu *menu() const; - QToolBar *toolBar() const; - QMenuBar *menuBar() const; - - virtual void insertAction(QAction *before, QAction *action) = 0; - virtual void insertMenu(QAction *before, QMenu *menu) = 0; - - QList<ICommand *> commands() const { return m_commands; } - QList<IActionContainer *> subContainers() const { return m_subContainers; } -protected: - bool canAddAction(ICommand *action) const; - bool canAddMenu(IActionContainer *menu) const; - - void addAction(ICommand *action, int pos, bool setpos); - void addMenu(IActionContainer *menu, int pos, bool setpos); - -private: - QAction *beforeAction(int pos, int *prevKey) const; - int calcPosition(int pos, int prevKey) const; - QList<int> m_groups; - int m_data; - ContainerType m_type; - int m_id; - QMap<int, int> m_posmap; - QList<IActionContainer *> m_subContainers; - QList<ICommand *> m_commands; -}; - -class MenuActionContainer : public ActionContainer -{ -public: - MenuActionContainer(int id); - - void setMenu(QMenu *menu); - QMenu *menu() const; - - void setLocation(const CommandLocation &location); - CommandLocation location() const; - - void insertAction(QAction *before, QAction *action); - void insertMenu(QAction *before, QMenu *menu); - bool update(); - -private: - QMenu *m_menu; - CommandLocation m_location; -}; +class Command; -class ToolBarActionContainer : public ActionContainer +class ActionContainer : public QObject { public: - ToolBarActionContainer(int id); - - void setToolBar(QToolBar *toolBar); - QToolBar *toolBar() const; - - void insertAction(QAction *before, QAction *action); - void insertMenu(QAction *before, QMenu *menu); - bool update(); + enum EmptyAction { + EA_Mask = 0xFF00, + EA_None = 0x0100, + EA_Hide = 0x0200, + EA_Disable = 0x0300 + }; -private: - QToolBar *m_toolBar; -}; + virtual void setEmptyAction(EmptyAction ea) = 0; -class MenuBarActionContainer : public ActionContainer -{ -public: - MenuBarActionContainer(int id); + virtual int id() const = 0; - void setMenuBar(QMenuBar *menuBar); - QMenuBar *menuBar() const; + virtual QMenu *menu() const = 0; + virtual QMenuBar *menuBar() const = 0; - void insertAction(QAction *before, QAction *action); - void insertMenu(QAction *before, QMenu *menu); - bool update(); + virtual QAction *insertLocation(const QString &group) const = 0; + virtual void appendGroup(const QString &group) = 0; + virtual void addAction(Core::Command *action, const QString &group = QString()) = 0; + virtual void addMenu(Core::ActionContainer *menu, const QString &group = QString()) = 0; -private: - QMenuBar *m_menuBar; + virtual bool update() = 0; + virtual ~ActionContainer() {} }; -} // namespace Internal } // namespace Core #endif // ACTIONCONTAINER_H diff --git a/src/plugins/coreplugin/actionmanager/actioncontainer_p.h b/src/plugins/coreplugin/actionmanager/actioncontainer_p.h new file mode 100644 index 0000000000000000000000000000000000000000..6521cff5748438f2bf3bd2066a6ca545c2c2de13 --- /dev/null +++ b/src/plugins/coreplugin/actionmanager/actioncontainer_p.h @@ -0,0 +1,142 @@ +/*************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** +** Non-Open Source Usage +** +** Licensees may use this file in accordance with the Qt Beta Version +** License Agreement, Agreement version 2.2 provided with the Software or, +** alternatively, in accordance with the terms contained in a written +** agreement between you and Nokia. +** +** GNU General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the packaging +** of this file. Please review the following information to ensure GNU +** General Public Licensing requirements will be met: +** +** http://www.fsf.org/licensing/licenses/info/GPLv2.html and +** http://www.gnu.org/copyleft/gpl.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt GPL Exception +** version 1.3, included in the file GPL_EXCEPTION.txt in this package. +** +***************************************************************************/ + +#ifndef ACTIONCONTAINER_P_H +#define ACTIONCONTAINER_P_H + +#include "actionmanager_p.h" + +#include <coreplugin/actionmanager/actioncontainer.h> +#include <coreplugin/actionmanager/command.h> + +namespace Core { +namespace Internal { + +class ActionContainerPrivate : public Core::ActionContainer +{ +public: + enum ContainerState { + CS_None = 0x000000, + CS_Initialized = 0x010000, + CS_PreLocation = 0x020000, + CS_UserDefined = 0x040000 + }; + + ActionContainerPrivate(int id); + virtual ~ActionContainerPrivate() {} + + void setEmptyAction(EmptyAction ea); + bool hasEmptyAction(EmptyAction ea) const; + + void setState(ContainerState state); + bool hasState(ContainerState state) const; + + QAction *insertLocation(const QString &group) const; + void appendGroup(const QString &group); + void addAction(Command *action, const QString &group = QString()); + void addMenu(ActionContainer *menu, const QString &group = QString()); + + int id() const; + + QMenu *menu() const; + QMenuBar *menuBar() const; + + virtual void insertAction(QAction *before, QAction *action) = 0; + virtual void insertMenu(QAction *before, QMenu *menu) = 0; + + QList<Command *> commands() const { return m_commands; } + QList<ActionContainer *> subContainers() const { return m_subContainers; } +protected: + bool canAddAction(Command *action) const; + bool canAddMenu(ActionContainer *menu) const; + virtual bool canBeAddedToMenu() const = 0; + + void addAction(Command *action, int pos, bool setpos); + void addMenu(ActionContainer *menu, int pos, bool setpos); + +private: + QAction *beforeAction(int pos, int *prevKey) const; + int calcPosition(int pos, int prevKey) const; + + QList<int> m_groups; + int m_data; + int m_id; + QMap<int, int> m_posmap; + QList<ActionContainer *> m_subContainers; + QList<Command *> m_commands; +}; + +class MenuActionContainer : public ActionContainerPrivate +{ +public: + MenuActionContainer(int id); + + void setMenu(QMenu *menu); + QMenu *menu() const; + + void setLocation(const CommandLocation &location); + CommandLocation location() const; + + void insertAction(QAction *before, QAction *action); + void insertMenu(QAction *before, QMenu *menu); + bool update(); + +protected: + bool canBeAddedToMenu() const; +private: + QMenu *m_menu; + CommandLocation m_location; +}; + +class MenuBarActionContainer : public ActionContainerPrivate +{ +public: + MenuBarActionContainer(int id); + + void setMenuBar(QMenuBar *menuBar); + QMenuBar *menuBar() const; + + void insertAction(QAction *before, QAction *action); + void insertMenu(QAction *before, QMenu *menu); + bool update(); + +protected: + bool canBeAddedToMenu() const; +private: + QMenuBar *m_menuBar; +}; + +} // namespace Internal +} // namespace Core + +#endif // ACTIONCONTAINER_P_H diff --git a/src/plugins/coreplugin/actionmanager/actionmanager.cpp b/src/plugins/coreplugin/actionmanager/actionmanager.cpp index bc43374f0e463beee84403254c993e9368e9670f..3932d42598b6cd2b466a993a9b131863d9173297 100644 --- a/src/plugins/coreplugin/actionmanager/actionmanager.cpp +++ b/src/plugins/coreplugin/actionmanager/actionmanager.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -31,10 +31,10 @@ ** ***************************************************************************/ -#include "actionmanager.h" +#include "actionmanager_p.h" #include "mainwindow.h" -#include "actioncontainer.h" -#include "command.h" +#include "actioncontainer_p.h" +#include "command_p.h" #include "uniqueidmanager.h" #include <coreplugin/coreconstants.h> @@ -44,7 +44,6 @@ #include <QtGui/QMenu> #include <QtGui/QAction> #include <QtGui/QShortcut> -#include <QtGui/QToolBar> #include <QtGui/QMenuBar> namespace { @@ -52,115 +51,163 @@ namespace { } /*! - \class Core::ActionManagerInterface + \class Core::ActionManager \mainclass - \ingroup qwb - \inheaderfile actionmanagerinterface.h - \brief All actions should be registered in the ActionManager, since this enables the user to - e.g. change their shortcuts at a central place. + \brief The action manager is responsible for registration of menus and + menu items and keyboard shortcuts. - The ActionManagerInterface is the central bookkeeper of actions and their shortcuts and layout. - You get the only implementation of this class from the core interface (ICore::actionManager()). + The ActionManager is the central bookkeeper of actions and their shortcuts and layout. + You get the only implementation of this class from the core interface + ICore::actionManager() method, e.g. + \code + ExtensionSystem::PluginManager::instance()->getObject<Core::ICore>()->actionManager() + \endcode The main reasons for the need of this class is to provide a central place where the user can specify all his keyboard shortcuts, and to provide a solution for actions that should behave differently in different contexts (like the copy/replace/undo/redo actions). All actions that are registered with the same string id (but different context lists) - are considered to be overloads of the same command. The action that is visible to the user - is the one returned by ICommand::action(). (If you provide yourself a user visible - representation of your action be sure to always use ICommand::action() for this.) - If this action is invoked by the user, the signal is forwarded to the registered action that - is valid for the current context. - - You use this class also to add items to registered - action containers like the applications menu bar. For this you register your action via the + are considered to be overloads of the same command, represented by an instance + of the Command class. + The action that is visible to the user is the one returned by Command::action(). + If you provide yourself a user visible representation of your action you need + to use Command::action() for this. + When this action is invoked by the user, + the signal is forwarded to the registered action that is valid for the current context. + + So to register a globally active action "My Action" + put the following in your plugin's IPlugin::initialize method: + \code + Core::ActionManager *am = ExtensionSystem::PluginManager::instance() + ->getObject<Core::ICore>()->actionManager(); + QAction *myAction = new QAction(tr("My Action"), this); + Core::Command *cmd = am->registerAction(myAction, + "myplugin.myaction", + QList<int>() << C_GLOBAL_ID); + cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Alt+u"))); + connect(myAction, SIGNAL(triggered()), this, SLOT(performMyAction())); + \endcode + + So the \c connect is done to your own QAction instance. If you create e.g. + a tool button that should represent the action you add the action + from Command::action() to it: + \code + QToolButton *myButton = new QToolButton(someParentWidget); + myButton->setDefaultAction(cmd->action()); + \endcode + + Also use the ActionManager to add items to registered + action containers like the applications menu bar or menus in that menu bar. + To do this, you register your action via the registerAction methods, get the action container for a specific id (like specified in - Core::Constants) with a call of + the Core::Constants namespace) with a call of actionContainer(const QString&) and add your command to this container. - Guidelines: + Following the example adding "My Action" to the "Tools" menu would be done by + \code + am->actionContainer(Core::M_TOOLS)->addAction(cmd); + \endcode + + Important guidelines: \list \o Always register your actions and shortcuts! + \o Register your actions and shortcuts during your plugin's IPlugin::initialize + or IPlugin::extensionsInitialized methods, otherwise the shortcuts won't appear + in the keyboard settings dialog from the beginning. \o When registering an action with cmd=registerAction(action, id, contexts) be sure to connect your own action connect(action, SIGNAL...) but make cmd->action() visible to the user, i.e. widget->addAction(cmd->action()). \o Use this class to add actions to the applications menus \endlist - \sa Core::ICore, Core::ICommand - \sa Core::IActionContainer + \sa Core::ICore + \sa Core::Command + \sa Core::ActionContainer + \sa Core::IContext */ /*! - \fn virtual IActionContainer *ActionManagerInterface::createMenu(const QString &id) = 0 - ... -*/ + \fn ActionContainer *ActionManager::createMenu(const QString &id) + \brief Creates a new menu with the given string \a id. -/*! - \fn virtual IActionContainer *ActionManagerInterface::createMenuBar(const QString &id) = 0 - ... + Returns a new ActionContainer that you can use to get the QMenu instance + or to add menu items to the menu. The ActionManager owns + the returned ActionContainer. + Add your menu to some other menu or a menu bar via the + ActionManager::actionContainer and ActionContainer::addMenu methods. */ /*! - \fn virtual ICommand *ActionManagerInterface::registerAction(QAction *action, const QString &id, const QList<int> &context) = 0 - ... -*/ + \fn ActionContainer *ActionManager::createMenuBar(const QString &id) + \brief Creates a new menu bar with the given string \a id. -/*! - \fn virtual ICommand *ActionManagerInterface::registerShortcut(QShortcut *shortcut, const QString &id, const QList<int> &context) = 0 - ... + Returns a new ActionContainer that you can use to get the QMenuBar instance + or to add menus to the menu bar. The ActionManager owns + the returned ActionContainer. */ /*! - \fn virtual ICommand *ActionManagerInterface::registerAction(QAction *action, const QString &id) = 0 - ... + \fn Command *ActionManager::registerAction(QAction *action, const QString &id, const QList<int> &context) + \brief Makes an \a action known to the system under the specified string \a id. + + Returns a command object that represents the action in the application and is + owned by the ActionManager. You can registered several actions with the + same \a id as long as the \a context is different. In this case + a trigger of the actual action is forwarded to the registered QAction + for the currently active context. */ /*! - \fn virtual void ActionManagerInterface::addAction(ICommand *action, const QString &globalGroup) = 0 - ... + \fn Command *ActionManager::registerShortcut(QShortcut *shortcut, const QString &id, const QList<int> &context) + \brief Makes a \a shortcut known to the system under the specified string \a id. + + Returns a command object that represents the shortcut in the application and is + owned by the ActionManager. You can registered several shortcuts with the + same \a id as long as the \a context is different. In this case + a trigger of the actual shortcut is forwarded to the registered QShortcut + for the currently active context. */ /*! - \fn virtual void ActionManagerInterface::addMenu(IActionContainer *menu, const QString &globalGroup) = 0 - ... + \fn Command *ActionManager::command(const QString &id) const + \brief Returns the Command object that is known to the system + under the given string \a id. + + \sa ActionManager::registerAction() */ /*! - \fn virtual ICommand *ActionManagerInterface::command(const QString &id) const = 0 - ... -*/ + \fn ActionContainer *ActionManager::actionContainer(const QString &id) const + \brief Returns the IActionContainter object that is know to the system + under the given string \a id. + \sa ActionManager::createMenu() + \sa ActionManager::createMenuBar() +*/ /*! - \fn virtual IActionContainer *ActionManagerInterface::actionContainer(const QString &id) const = 0 - ... + \fn ActionManager::ActionManager(QObject *parent) + \internal */ - /*! - \fn virtual ActionManagerInterface::~ActionManagerInterface() - ... + \fn ActionManager::~ActionManager() + \internal */ using namespace Core; using namespace Core::Internal; -ActionManager* ActionManager::m_instance = 0; +ActionManagerPrivate* ActionManagerPrivate::m_instance = 0; /*! - \class ActionManager - \ingroup qwb - \inheaderfile actionmanager.h - - \sa ActionContainer + \class ActionManagerPrivate + \inheaderfile actionmanager_p.h + \internal */ -/*! - ... -*/ -ActionManager::ActionManager(MainWindow *mainWnd, UniqueIDManager *uidmgr) : - ActionManagerInterface(mainWnd), +ActionManagerPrivate::ActionManagerPrivate(MainWindow *mainWnd, UniqueIDManager *uidmgr) : + ActionManager(mainWnd), m_mainWnd(mainWnd) { m_defaultGroups << uidmgr->uniqueIdentifier(Constants::G_DEFAULT_ONE); @@ -170,73 +217,38 @@ ActionManager::ActionManager(MainWindow *mainWnd, UniqueIDManager *uidmgr) : } -/*! - ... -*/ -ActionManager::~ActionManager() +ActionManagerPrivate::~ActionManagerPrivate() { qDeleteAll(m_idCmdMap.values()); qDeleteAll(m_idContainerMap.values()); } -/*! - ... -*/ -ActionManager* ActionManager::instance() +ActionManagerPrivate* ActionManagerPrivate::instance() { return m_instance; } -/*! - ... -*/ -QList<int> ActionManager::defaultGroups() const +QList<int> ActionManagerPrivate::defaultGroups() const { return m_defaultGroups; } -/*! - ... -*/ -QList<Command *> ActionManager::commands() const +QList<CommandPrivate *> ActionManagerPrivate::commands() const { return m_idCmdMap.values(); } -/*! - ... -*/ -QList<ActionContainer *> ActionManager::containers() const +QList<ActionContainerPrivate *> ActionManagerPrivate::containers() const { return m_idContainerMap.values(); } -/*! - ... -*/ -void ActionManager::registerGlobalGroup(int groupId, int containerId) -{ - if (m_globalgroups.contains(groupId)) { - qWarning() << "registerGlobalGroup: Global group " - << m_mainWnd->uniqueIDManager()->stringForUniqueIdentifier(groupId) - << " already registered"; - } else { - m_globalgroups.insert(groupId, containerId); - } -} - -/*! - ... -*/ -bool ActionManager::hasContext(int context) const +bool ActionManagerPrivate::hasContext(int context) const { return m_context.contains(context); } -/*! - ... -*/ -void ActionManager::setContext(const QList<int> &context) +void ActionManagerPrivate::setContext(const QList<int> &context) { // here are possibilities for speed optimization if necessary: // let commands (de-)register themselves for contexts @@ -251,10 +263,7 @@ void ActionManager::setContext(const QList<int> &context) it.value()->update(); } -/*! - \internal -*/ -bool ActionManager::hasContext(QList<int> context) const +bool ActionManagerPrivate::hasContext(QList<int> context) const { for (int i=0; i<m_context.count(); ++i) { if (context.contains(m_context.at(i))) @@ -263,10 +272,7 @@ bool ActionManager::hasContext(QList<int> context) const return false; } -/*! - ... -*/ -IActionContainer *ActionManager::createMenu(const QString &id) +ActionContainer *ActionManagerPrivate::createMenu(const QString &id) { const int uid = m_mainWnd->uniqueIDManager()->uniqueIdentifier(id); const IdContainerMap::const_iterator it = m_idContainerMap.constFind(uid); @@ -284,10 +290,7 @@ IActionContainer *ActionManager::createMenu(const QString &id) return mc; } -/*! - ... -*/ -IActionContainer *ActionManager::createMenuBar(const QString &id) +ActionContainer *ActionManagerPrivate::createMenuBar(const QString &id) { const int uid = m_mainWnd->uniqueIDManager()->uniqueIdentifier(id); const IdContainerMap::const_iterator it = m_idContainerMap.constFind(uid); @@ -305,36 +308,22 @@ IActionContainer *ActionManager::createMenuBar(const QString &id) return mbc; } -/*! - ... -*/ -ICommand *ActionManager::registerAction(QAction *action, const QString &id, const QList<int> &context) +Command *ActionManagerPrivate::registerAction(QAction *action, const QString &id, const QList<int> &context) { OverrideableAction *a = 0; - ICommand *c = registerOverridableAction(action, id, false); + Command *c = registerOverridableAction(action, id, false); a = static_cast<OverrideableAction *>(c); if (a) a->addOverrideAction(action, context); return a; } -/*! - ... -*/ -ICommand *ActionManager::registerAction(QAction *action, const QString &id) -{ - return registerOverridableAction(action, id, true); -} - -/*! - \internal -*/ -ICommand *ActionManager::registerOverridableAction(QAction *action, const QString &id, bool checkUnique) +Command *ActionManagerPrivate::registerOverridableAction(QAction *action, const QString &id, bool checkUnique) { OverrideableAction *a = 0; const int uid = m_mainWnd->uniqueIDManager()->uniqueIdentifier(id); - if (Command *c = m_idCmdMap.value(uid, 0)) { - if (c->type() != ICommand::CT_OverridableAction) { + if (CommandPrivate *c = m_idCmdMap.value(uid, 0)) { + if (c->type() != Command::CT_OverridableAction) { qWarning() << "registerAction: id" << id << "is registered with a different command type."; return c; } @@ -375,15 +364,12 @@ ICommand *ActionManager::registerOverridableAction(QAction *action, const QStrin return a; } -/*! - ... -*/ -ICommand *ActionManager::registerShortcut(QShortcut *shortcut, const QString &id, const QList<int> &context) +Command *ActionManagerPrivate::registerShortcut(QShortcut *shortcut, const QString &id, const QList<int> &context) { Shortcut *sc = 0; int uid = m_mainWnd->uniqueIDManager()->uniqueIdentifier(id); - if (Command *c = m_idCmdMap.value(uid, 0)) { - if (c->type() != ICommand::CT_Shortcut) { + if (CommandPrivate *c = m_idCmdMap.value(uid, 0)) { + if (c->type() != Command::CT_Shortcut) { qWarning() << "registerShortcut: id" << id << "is registered with a different command type."; return c; } @@ -415,98 +401,47 @@ ICommand *ActionManager::registerShortcut(QShortcut *shortcut, const QString &id return sc; } -/*! - \fn void ActionManager::addAction(Core::ICommand *action, const QString &globalGroup) -*/ -void ActionManager::addAction(ICommand *action, const QString &globalGroup) -{ - const int gid = m_mainWnd->uniqueIDManager()->uniqueIdentifier(globalGroup); - if (!m_globalgroups.contains(gid)) { - qWarning() << "addAction: Unknown global group " << globalGroup; - return; - } - - const int cid = m_globalgroups.value(gid); - if (IActionContainer *aci = actionContainer(cid)) { - aci->addAction(action, globalGroup); - } else { - qWarning() << "addAction: Cannot find container." << cid << '/' << gid; - } -} - -/*! - \fn void ActionManager::addMenu(Core::IActionContainer *menu, const QString &globalGroup) - -*/ -void ActionManager::addMenu(IActionContainer *menu, const QString &globalGroup) -{ - const int gid = m_mainWnd->uniqueIDManager()->uniqueIdentifier(globalGroup); - if (!m_globalgroups.contains(gid)) { - qWarning() << "addAction: Unknown global group " << globalGroup; - return; - } - - const int cid = m_globalgroups.value(gid); - if (IActionContainer *aci = actionContainer(cid)) { - aci->addMenu(menu, globalGroup); - } else { - qWarning() << "addAction: Cannot find container." << cid << '/' << gid; - } -} - -/*! - ... -*/ -ICommand *ActionManager::command(const QString &id) const +Command *ActionManagerPrivate::command(const QString &id) const { const int uid = m_mainWnd->uniqueIDManager()->uniqueIdentifier(id); const IdCmdMap::const_iterator it = m_idCmdMap.constFind(uid); if (it == m_idCmdMap.constEnd()) { if (warnAboutFindFailures) - qWarning() << "ActionManager::command(): failed to find :" << id << '/' << uid; + qWarning() << "ActionManagerPrivate::command(): failed to find :" << id << '/' << uid; return 0; } return it.value(); } -/*! - ... -*/ -IActionContainer *ActionManager::actionContainer(const QString &id) const +ActionContainer *ActionManagerPrivate::actionContainer(const QString &id) const { const int uid = m_mainWnd->uniqueIDManager()->uniqueIdentifier(id); const IdContainerMap::const_iterator it = m_idContainerMap.constFind(uid); if ( it == m_idContainerMap.constEnd()) { if (warnAboutFindFailures) - qWarning() << "ActionManager::actionContainer(): failed to find :" << id << '/' << uid; + qWarning() << "ActionManagerPrivate::actionContainer(): failed to find :" << id << '/' << uid; return 0; } return it.value(); } -/*! - ... -*/ -ICommand *ActionManager::command(int uid) const +Command *ActionManagerPrivate::command(int uid) const { const IdCmdMap::const_iterator it = m_idCmdMap.constFind(uid); if (it == m_idCmdMap.constEnd()) { if (warnAboutFindFailures) - qWarning() << "ActionManager::command(): failed to find :" << m_mainWnd->uniqueIDManager()->stringForUniqueIdentifier(uid) << '/' << uid; + qWarning() << "ActionManagerPrivate::command(): failed to find :" << m_mainWnd->uniqueIDManager()->stringForUniqueIdentifier(uid) << '/' << uid; return 0; } return it.value(); } -/*! - ... -*/ -IActionContainer *ActionManager::actionContainer(int uid) const +ActionContainer *ActionManagerPrivate::actionContainer(int uid) const { const IdContainerMap::const_iterator it = m_idContainerMap.constFind(uid); if (it == m_idContainerMap.constEnd()) { if (warnAboutFindFailures) - qWarning() << "ActionManager::actionContainer(): failed to find :" << m_mainWnd->uniqueIDManager()->stringForUniqueIdentifier(uid) << uid; + qWarning() << "ActionManagerPrivate::actionContainer(): failed to find :" << m_mainWnd->uniqueIDManager()->stringForUniqueIdentifier(uid) << uid; return 0; } return it.value(); @@ -516,10 +451,7 @@ static const char *settingsGroup = "KeyBindings"; static const char *idKey = "ID"; static const char *sequenceKey = "Keysequence"; -/*! - \internal -*/ -void ActionManager::initialize() +void ActionManagerPrivate::initialize() { QSettings *settings = m_mainWnd->settings(); const int shortcuts = settings->beginReadArray(QLatin1String(settingsGroup)); @@ -529,17 +461,14 @@ void ActionManager::initialize() const QKeySequence key(settings->value(QLatin1String(sequenceKey)).toString()); const int id = m_mainWnd->uniqueIDManager()->uniqueIdentifier(sid); - ICommand *cmd = command(id); + Command *cmd = command(id); if (cmd) cmd->setKeySequence(key); } settings->endArray(); } -/*! - ... -*/ -void ActionManager::saveSettings(QSettings *settings) +void ActionManagerPrivate::saveSettings(QSettings *settings) { settings->beginWriteArray(QLatin1String(settingsGroup)); int count = 0; @@ -547,7 +476,7 @@ void ActionManager::saveSettings(QSettings *settings) const IdCmdMap::const_iterator cmdcend = m_idCmdMap.constEnd(); for (IdCmdMap::const_iterator j = m_idCmdMap.constBegin(); j != cmdcend; ++j) { const int id = j.key(); - Command *cmd = j.value(); + CommandPrivate *cmd = j.value(); QKeySequence key = cmd->keySequence(); if (key != cmd->defaultKeySequence()) { const QString sid = m_mainWnd->uniqueIDManager()->stringForUniqueIdentifier(id); diff --git a/src/plugins/coreplugin/actionmanager/actionmanager.h b/src/plugins/coreplugin/actionmanager/actionmanager.h index dd5e2f61e92a61f3a6c4c91f5a614837da405934..8550aaf5d388d3cb190bed267c726abafe943332 100644 --- a/src/plugins/coreplugin/actionmanager/actionmanager.h +++ b/src/plugins/coreplugin/actionmanager/actionmanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -34,97 +34,39 @@ #ifndef ACTIONMANAGER_H #define ACTIONMANAGER_H -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include "coreplugin/core_global.h" -#include <QtCore/QMap> -#include <QtCore/QHash> -#include <QtCore/QMultiHash> +#include <coreplugin/actionmanager/actioncontainer.h> +#include <coreplugin/actionmanager/command.h> + +#include <QtCore/QObject> +#include <QtCore/QList> QT_BEGIN_NAMESPACE -class QSettings; +class QAction; +class QShortcut; +class QString; QT_END_NAMESPACE -struct CommandLocation -{ - int m_container; - int m_position; -}; - namespace Core { -class UniqueIDManager; - -namespace Internal { - -class ActionContainer; -class MainWindow; -class Command; - -class ActionManager : public Core::ActionManagerInterface +class CORE_EXPORT ActionManager : public QObject { Q_OBJECT - public: - ActionManager(MainWindow *mainWnd, UniqueIDManager *uidmgr); - ~ActionManager(); - - void setContext(const QList<int> &context); - static ActionManager* instance(); - - void saveSettings(QSettings *settings); - QList<int> defaultGroups() const; - - QList<Command *> commands() const; - QList<ActionContainer *> containers() const; - - bool hasContext(int context) const; - - ICommand *command(int uid) const; - IActionContainer *actionContainer(int uid) const; - - void registerGlobalGroup(int groupId, int containerId); - - void initialize(); - - //ActionManager Interface - IActionContainer *createMenu(const QString &id); - IActionContainer *createMenuBar(const QString &id); - - ICommand *registerAction(QAction *action, const QString &id, - const QList<int> &context); - ICommand *registerAction(QAction *action, const QString &id); - ICommand *registerShortcut(QShortcut *shortcut, const QString &id, - const QList<int> &context); - - void addAction(Core::ICommand *action, const QString &globalGroup); - void addMenu(Core::IActionContainer *menu, const QString &globalGroup); - - Core::ICommand *command(const QString &id) const; - Core::IActionContainer *actionContainer(const QString &id) const; - -private: - bool hasContext(QList<int> context) const; - ICommand *registerOverridableAction(QAction *action, const QString &id, - bool checkUnique); - - static ActionManager* m_instance; - QList<int> m_defaultGroups; - - typedef QHash<int, Command *> IdCmdMap; - IdCmdMap m_idCmdMap; - - typedef QHash<int, ActionContainer *> IdContainerMap; - IdContainerMap m_idContainerMap; + ActionManager(QObject *parent = 0) : QObject(parent) {} + virtual ~ActionManager() {} - typedef QMap<int, int> GlobalGroupMap; - GlobalGroupMap m_globalgroups; + virtual ActionContainer *createMenu(const QString &id) = 0; + virtual ActionContainer *createMenuBar(const QString &id) = 0; - QList<int> m_context; + virtual Command *registerAction(QAction *action, const QString &id, const QList<int> &context) = 0; + virtual Command *registerShortcut(QShortcut *shortcut, const QString &id, const QList<int> &context) = 0; - MainWindow *m_mainWnd; + virtual Command *command(const QString &id) const = 0; + virtual ActionContainer *actionContainer(const QString &id) const = 0; }; -} // namespace Internal } // namespace Core #endif // ACTIONMANAGER_H diff --git a/src/plugins/coreplugin/actionmanager/actionmanager_p.h b/src/plugins/coreplugin/actionmanager/actionmanager_p.h new file mode 100644 index 0000000000000000000000000000000000000000..31513276ec1368e873249f79939bf64f21e81911 --- /dev/null +++ b/src/plugins/coreplugin/actionmanager/actionmanager_p.h @@ -0,0 +1,124 @@ +/*************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** +** Non-Open Source Usage +** +** Licensees may use this file in accordance with the Qt Beta Version +** License Agreement, Agreement version 2.2 provided with the Software or, +** alternatively, in accordance with the terms contained in a written +** agreement between you and Nokia. +** +** GNU General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the packaging +** of this file. Please review the following information to ensure GNU +** General Public Licensing requirements will be met: +** +** http://www.fsf.org/licensing/licenses/info/GPLv2.html and +** http://www.gnu.org/copyleft/gpl.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt GPL Exception +** version 1.3, included in the file GPL_EXCEPTION.txt in this package. +** +***************************************************************************/ + +#ifndef ACTIONMANAGERPRIVATE_H +#define ACTIONMANAGERPRIVATE_H + +#include <coreplugin/actionmanager/actionmanager.h> + +#include <QtCore/QMap> +#include <QtCore/QHash> +#include <QtCore/QMultiHash> + +QT_BEGIN_NAMESPACE +class QSettings; +QT_END_NAMESPACE + +struct CommandLocation +{ + int m_container; + int m_position; +}; + +namespace Core { + +class UniqueIDManager; + +namespace Internal { + +class ActionContainerPrivate; +class MainWindow; +class CommandPrivate; + +class ActionManagerPrivate : public Core::ActionManager +{ + Q_OBJECT + +public: + ActionManagerPrivate(MainWindow *mainWnd, UniqueIDManager *uidmgr); + ~ActionManagerPrivate(); + + void setContext(const QList<int> &context); + static ActionManagerPrivate* instance(); + + void saveSettings(QSettings *settings); + QList<int> defaultGroups() const; + + QList<CommandPrivate *> commands() const; + QList<ActionContainerPrivate *> containers() const; + + bool hasContext(int context) const; + + Command *command(int uid) const; + ActionContainer *actionContainer(int uid) const; + + void initialize(); + + //ActionManager Interface + ActionContainer *createMenu(const QString &id); + ActionContainer *createMenuBar(const QString &id); + + Command *registerAction(QAction *action, const QString &id, + const QList<int> &context); + Command *registerShortcut(QShortcut *shortcut, const QString &id, + const QList<int> &context); + + Core::Command *command(const QString &id) const; + Core::ActionContainer *actionContainer(const QString &id) const; + +private: + bool hasContext(QList<int> context) const; + Command *registerOverridableAction(QAction *action, const QString &id, + bool checkUnique); + + static ActionManagerPrivate* m_instance; + QList<int> m_defaultGroups; + + typedef QHash<int, CommandPrivate *> IdCmdMap; + IdCmdMap m_idCmdMap; + + typedef QHash<int, ActionContainerPrivate *> IdContainerMap; + IdContainerMap m_idContainerMap; + +// typedef QMap<int, int> GlobalGroupMap; +// GlobalGroupMap m_globalgroups; +// + QList<int> m_context; + + MainWindow *m_mainWnd; +}; + +} // namespace Internal +} // namespace Core + +#endif // ACTIONMANAGERPRIVATE_H diff --git a/src/plugins/coreplugin/actionmanager/actionmanagerinterface.h b/src/plugins/coreplugin/actionmanager/actionmanagerinterface.h deleted file mode 100644 index f77e9ca484c0b8b5c0eae31da4ae44b150e57e7c..0000000000000000000000000000000000000000 --- a/src/plugins/coreplugin/actionmanager/actionmanagerinterface.h +++ /dev/null @@ -1,77 +0,0 @@ -/*************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** -** Non-Open Source Usage -** -** Licensees may use this file in accordance with the Qt Beta Version -** License Agreement, Agreement version 2.2 provided with the Software or, -** alternatively, in accordance with the terms contained in a written -** agreement between you and Nokia. -** -** GNU General Public License Usage -** -** Alternatively, this file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the packaging -** of this file. Please review the following information to ensure GNU -** General Public Licensing requirements will be met: -** -** http://www.fsf.org/licensing/licenses/info/GPLv2.html and -** http://www.gnu.org/copyleft/gpl.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt GPL Exception -** version 1.3, included in the file GPL_EXCEPTION.txt in this package. -** -***************************************************************************/ - -#ifndef ACTIONMANAGERINTERFACE_H -#define ACTIONMANAGERINTERFACE_H - -#include "coreplugin/core_global.h" - -#include <coreplugin/actionmanager/iactioncontainer.h> -#include <coreplugin/actionmanager/icommand.h> - -#include <QtCore/QObject> -#include <QtCore/QList> - -QT_BEGIN_NAMESPACE -class QAction; -class QShortcut; -class QString; -QT_END_NAMESPACE - -namespace Core { - -class CORE_EXPORT ActionManagerInterface : public QObject -{ - Q_OBJECT -public: - ActionManagerInterface(QObject *parent = 0) : QObject(parent) {} - virtual ~ActionManagerInterface() {} - - virtual IActionContainer *createMenu(const QString &id) = 0; - virtual IActionContainer *createMenuBar(const QString &id) = 0; - - virtual ICommand *registerAction(QAction *action, const QString &id, const QList<int> &context) = 0; - virtual ICommand *registerShortcut(QShortcut *shortcut, const QString &id, const QList<int> &context) = 0; - - virtual ICommand *registerAction(QAction *action, const QString &id) = 0; - - virtual void addAction(ICommand *action, const QString &globalGroup) = 0; - virtual void addMenu(IActionContainer *menu, const QString &globalGroup) = 0; - - virtual ICommand *command(const QString &id) const = 0; - virtual IActionContainer *actionContainer(const QString &id) const = 0; -}; - -} // namespace Core - -#endif // ACTIONMANAGERINTERFACE_H diff --git a/src/plugins/coreplugin/actionmanager/command.cpp b/src/plugins/coreplugin/actionmanager/command.cpp index d5370e4ffee55e6cd2d29b5e4b94b19ed52d7261..21056cfc5dd123bab6f9154b117e6eae5aca74e4 100644 --- a/src/plugins/coreplugin/actionmanager/command.cpp +++ b/src/plugins/coreplugin/actionmanager/command.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -35,13 +35,12 @@ #include <QtGui/QAction> #include <QtGui/QShortcut> -#include "command.h" +#include "command_p.h" /*! - \class Core::ICommand + \class Core::Command \mainclass \ingroup qwb - \inheaderfile icommand.h \brief The class... @@ -49,226 +48,167 @@ */ /*! - \enum ICommand::CommandType + \enum Command::CommandType */ /*! - \enum ICommand::CommandAttribute + \enum Command::CommandAttribute */ /*! - \fn void ICommand::setCategory(const QString &name) + \fn void Command::setCategory(const QString &name) Sets the category to \a name. */ /*! - \fn virtual void ICommand::setDefaultKeySequence(const QKeySequence &key) + \fn virtual void Command::setDefaultKeySequence(const QKeySequence &key) */ /*! - \fn virtual int ICommand::id() const + \fn virtual int Command::id() const */ /*! - \fn virtual CommandType ICommand::type() const + \fn virtual CommandType Command::type() const */ /*! - \fn virtual QAction *ICommand::action() const + \fn virtual QAction *Command::action() const */ /*! - \fn virtual QShortcut *ICommand::shortcut() const + \fn virtual QShortcut *Command::shortcut() const */ /*! - \fn virtual void ICommand::setAttribute(CommandAttribute attr) + \fn virtual void Command::setAttribute(CommandAttribute attr) */ /*! - \fn virtual void ICommand::removeAttribute(CommandAttribute attr) + \fn virtual void Command::removeAttribute(CommandAttribute attr) */ /*! - \fn virtual bool ICommand::hasAttribute(CommandAttribute attr) const + \fn virtual bool Command::hasAttribute(CommandAttribute attr) const */ /*! - \fn virtual bool ICommand::isActive() const + \fn virtual bool Command::isActive() const */ /*! - \fn virtual ICommand::~ICommand() + \fn virtual Command::~Command() */ using namespace Core::Internal; /*! - \class Command - \ingroup qwb - \inheaderfile command.h + \class CommandPrivate + \inheaderfile command_p.h + \internal */ -/*! - \enum Command::CommandState -*/ - -/*! - \fn Command::Command(CommandType type, int id) -*/ -Command::Command(CommandType type, int id) +CommandPrivate::CommandPrivate(CommandType type, int id) : m_type(type), m_id(id) { } -/*! - \fn virtual Command::~Command() -*/ - -/*! - ... -*/ -void Command::setStateFlags(int state) +void CommandPrivate::setStateFlags(int state) { m_type |= (state & CS_Mask); } -/*! - ... -*/ -int Command::stateFlags() const +int CommandPrivate::stateFlags() const { return (m_type & CS_Mask); } -/*! - \fn virtual QString Command::name() const -*/ - -/*! - ... -*/ -void Command::setCategory(const QString &name) +void CommandPrivate::setCategory(const QString &name) { m_category = name; } -/*! - ... -*/ -QString Command::category() const +QString CommandPrivate::category() const { if (m_category.isEmpty()) return QObject::tr("Other"); return m_category; } -/*! - ... -*/ -void Command::setDefaultKeySequence(const QKeySequence &key) +void CommandPrivate::setDefaultKeySequence(const QKeySequence &key) { m_defaultKey = key; } -/*! - ... -*/ -QKeySequence Command::defaultKeySequence() const +QKeySequence CommandPrivate::defaultKeySequence() const { return m_defaultKey; } -void Command::setDefaultText(const QString &text) +void CommandPrivate::setDefaultText(const QString &text) { m_defaultText = text; } -QString Command::defaultText() const +QString CommandPrivate::defaultText() const { return m_defaultText; } -/*! - ... -*/ -int Command::id() const +int CommandPrivate::id() const { return m_id; } -/*! - ... -*/ -Command::CommandType Command::type() const +CommandPrivate::CommandType CommandPrivate::type() const { return (CommandType)(m_type & CT_Mask); } -/*! - ... -*/ -QAction *Command::action() const +QAction *CommandPrivate::action() const { return 0; } -/*! - ... -*/ -QShortcut *Command::shortcut() const +QShortcut *CommandPrivate::shortcut() const { return 0; } -/*! - ... -*/ -void Command::setAttribute(CommandAttribute attr) +void CommandPrivate::setAttribute(CommandAttribute attr) { m_type |= attr; } -/*! - ... -*/ -void Command::removeAttribute(CommandAttribute attr) +void CommandPrivate::removeAttribute(CommandAttribute attr) { m_type &= ~attr; } -/*! - ... -*/ -bool Command::hasAttribute(CommandAttribute attr) const +bool CommandPrivate::hasAttribute(CommandAttribute attr) const { return (m_type & attr); } -QString Command::stringWithAppendedShortcut(const QString &str) const +QString CommandPrivate::stringWithAppendedShortcut(const QString &str) const { return QString("%1 <span style=\"color: gray; font-size: small\">%2</span>").arg(str).arg( keySequence().toString(QKeySequence::NativeText)); } -/*! - \fn virtual bool Command::setCurrentContext(const QList<int> &context) = 0 -*/ - // ---------- Shortcut ------------ /*! \class Shortcut \ingroup qwb - \inheaderfile command.h */ /*! ... */ Shortcut::Shortcut(int id) - : Command(CT_Shortcut, id), m_shortcut(0) + : CommandPrivate(CT_Shortcut, id), m_shortcut(0) { } @@ -322,7 +262,7 @@ QList<int> Shortcut::context() const void Shortcut::setDefaultKeySequence(const QKeySequence &key) { setKeySequence(key); - Command::setDefaultKeySequence(key); + CommandPrivate::setDefaultKeySequence(key); } void Shortcut::setKeySequence(const QKeySequence &key) @@ -374,14 +314,13 @@ bool Shortcut::isActive() const /*! \class Action \ingroup qwb - \inheaderfile command.h */ /*! ... */ Action::Action(CommandType type, int id) - : Command(type, id), m_action(0) + : CommandPrivate(type, id), m_action(0) { } @@ -439,7 +378,7 @@ QList<CommandLocation> Action::locations() const void Action::setDefaultKeySequence(const QKeySequence &key) { setKeySequence(key); - Command::setDefaultKeySequence(key); + CommandPrivate::setDefaultKeySequence(key); } void Action::setKeySequence(const QKeySequence &key) @@ -467,7 +406,6 @@ QKeySequence Action::keySequence() const /*! \class OverrideableAction \ingroup qwb - \inheaderfile command.h */ /*! diff --git a/src/plugins/coreplugin/actionmanager/command.h b/src/plugins/coreplugin/actionmanager/command.h index 848114c8b96475221b2c29997e3f11767f468d9a..53342555d130eee7776f733d5bc2879cb0fbd6a8 100644 --- a/src/plugins/coreplugin/actionmanager/command.h +++ b/src/plugins/coreplugin/actionmanager/command.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -34,146 +34,61 @@ #ifndef COMMAND_H #define COMMAND_H -#include "icommand.h" -#include "actionmanager.h" +#include <coreplugin/core_global.h> -#include <QtCore/QList> -#include <QtCore/QMultiMap> -#include <QtCore/QPointer> +#include <QtGui/QAction> +#include <QtGui/QShortcut> #include <QtGui/QKeySequence> namespace Core { -namespace Internal { -class Command : public Core::ICommand +class CORE_EXPORT Command : public QObject { Q_OBJECT public: - enum CommandState { - CS_PreLocation = 0x020000, - CS_LocationChanged = 0x040000, - CS_Initialized = 0x080000, - CS_Mask = 0xFF0000 + enum CommandType { + CT_Shortcut = 0x0001, + CT_OverridableAction = 0x0002, + CT_Mask = 0x00FF }; - Command(CommandType type, int id); - virtual ~Command() {} - - void setStateFlags(int state); - int stateFlags() const; - - virtual QString name() const = 0; - - void setCategory(const QString &name); - QString category() const; - - void setDefaultKeySequence(const QKeySequence &key); - QKeySequence defaultKeySequence() const; - - void setDefaultText(const QString &text); - QString defaultText() const; - - int id() const; - CommandType type() const; - - QAction *action() const; - QShortcut *shortcut() const; - - void setAttribute(CommandAttribute attr); - void removeAttribute(CommandAttribute attr); - bool hasAttribute(CommandAttribute attr) const; - - virtual bool setCurrentContext(const QList<int> &context) = 0; - - QString stringWithAppendedShortcut(const QString &str) const; - -protected: - QString m_category; - int m_type; - int m_id; - QKeySequence m_defaultKey; - QString m_defaultText; -}; - -class Shortcut : public Command -{ - Q_OBJECT -public: - Shortcut(int id); - - QString name() const; - - void setDefaultKeySequence(const QKeySequence &key); - void setKeySequence(const QKeySequence &key); - QKeySequence keySequence() const; - - virtual void setDefaultText(const QString &key); - virtual QString defaultText() const; - - void setShortcut(QShortcut *shortcut); - QShortcut *shortcut() const; - - void setContext(const QList<int> &context); - QList<int> context() const; - bool setCurrentContext(const QList<int> &context); + enum CommandAttribute { + CA_Hide = 0x0100, + CA_UpdateText = 0x0200, + CA_UpdateIcon = 0x0400, + CA_NonConfigureable = 0x8000, + CA_Mask = 0xFF00 + }; - bool isActive() const; -private: - QList<int> m_context; - QShortcut *m_shortcut; - QString m_defaultText; -}; + virtual void setDefaultKeySequence(const QKeySequence &key) = 0; + virtual void setKeySequence(const QKeySequence &key) = 0; + virtual QKeySequence defaultKeySequence() const = 0; + virtual QKeySequence keySequence() const = 0; + virtual void setDefaultText(const QString &text) = 0; + virtual QString defaultText() const = 0; -class Action : public Command -{ - Q_OBJECT -public: - Action(CommandType type, int id); + virtual void setCategory(const QString &name) = 0; - QString name() const; + virtual int id() const = 0; + virtual CommandType type() const = 0; - void setDefaultKeySequence(const QKeySequence &key); - void setKeySequence(const QKeySequence &key); - QKeySequence keySequence() const; + virtual QAction *action() const = 0; + virtual QShortcut *shortcut() const = 0; - virtual void setAction(QAction *action); - QAction *action() const; + virtual void setAttribute(CommandAttribute attr) = 0; + virtual void removeAttribute(CommandAttribute attr) = 0; + virtual bool hasAttribute(CommandAttribute attr) const = 0; - void setLocations(const QList<CommandLocation> &locations); - QList<CommandLocation> locations() const; + virtual bool isActive() const = 0; -protected: - void updateToolTipWithKeySequence(); - - QAction *m_action; - QList<CommandLocation> m_locations; - QString m_toolTip; -}; + virtual ~Command() {} -class OverrideableAction : public Action -{ - Q_OBJECT + virtual QString stringWithAppendedShortcut(const QString &str) const = 0; -public: - OverrideableAction(int id); - - void setAction(QAction *action); - bool setCurrentContext(const QList<int> &context); - void addOverrideAction(QAction *action, const QList<int> &context); - bool isActive() const; - -private slots: - void actionChanged(); - -private: - QPointer<QAction> m_currentAction; - QList<int> m_context; - QMap<int, QPointer<QAction> > m_contextActionMap; - bool m_active; - bool m_contextInitialized; +signals: + void keySequenceChanged(); }; -} // namespace Internal } // namespace Core #endif // COMMAND_H diff --git a/src/plugins/coreplugin/actionmanager/command_p.h b/src/plugins/coreplugin/actionmanager/command_p.h new file mode 100644 index 0000000000000000000000000000000000000000..c41053bb55e8971579563d0eb97eadd5dd8d0cfa --- /dev/null +++ b/src/plugins/coreplugin/actionmanager/command_p.h @@ -0,0 +1,179 @@ +/*************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** +** Non-Open Source Usage +** +** Licensees may use this file in accordance with the Qt Beta Version +** License Agreement, Agreement version 2.2 provided with the Software or, +** alternatively, in accordance with the terms contained in a written +** agreement between you and Nokia. +** +** GNU General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the packaging +** of this file. Please review the following information to ensure GNU +** General Public Licensing requirements will be met: +** +** http://www.fsf.org/licensing/licenses/info/GPLv2.html and +** http://www.gnu.org/copyleft/gpl.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt GPL Exception +** version 1.3, included in the file GPL_EXCEPTION.txt in this package. +** +***************************************************************************/ + +#ifndef COMMAND_P_H +#define COMMAND_P_H + +#include "command.h" +#include "actionmanager_p.h" + +#include <QtCore/QList> +#include <QtCore/QMultiMap> +#include <QtCore/QPointer> +#include <QtGui/QKeySequence> + +namespace Core { +namespace Internal { + +class CommandPrivate : public Core::Command +{ + Q_OBJECT +public: + enum CommandState { + CS_PreLocation = 0x020000, + CS_LocationChanged = 0x040000, + CS_Initialized = 0x080000, + CS_Mask = 0xFF0000 + }; + + CommandPrivate(CommandType type, int id); + virtual ~CommandPrivate() {} + + void setStateFlags(int state); + int stateFlags() const; + + virtual QString name() const = 0; + + void setCategory(const QString &name); + QString category() const; + + void setDefaultKeySequence(const QKeySequence &key); + QKeySequence defaultKeySequence() const; + + void setDefaultText(const QString &text); + QString defaultText() const; + + int id() const; + CommandType type() const; + + QAction *action() const; + QShortcut *shortcut() const; + + void setAttribute(CommandAttribute attr); + void removeAttribute(CommandAttribute attr); + bool hasAttribute(CommandAttribute attr) const; + + virtual bool setCurrentContext(const QList<int> &context) = 0; + + QString stringWithAppendedShortcut(const QString &str) const; + +protected: + QString m_category; + int m_type; + int m_id; + QKeySequence m_defaultKey; + QString m_defaultText; +}; + +class Shortcut : public CommandPrivate +{ + Q_OBJECT +public: + Shortcut(int id); + + QString name() const; + + void setDefaultKeySequence(const QKeySequence &key); + void setKeySequence(const QKeySequence &key); + QKeySequence keySequence() const; + + virtual void setDefaultText(const QString &key); + virtual QString defaultText() const; + + void setShortcut(QShortcut *shortcut); + QShortcut *shortcut() const; + + void setContext(const QList<int> &context); + QList<int> context() const; + bool setCurrentContext(const QList<int> &context); + + bool isActive() const; +private: + QList<int> m_context; + QShortcut *m_shortcut; + QString m_defaultText; +}; + +class Action : public CommandPrivate +{ + Q_OBJECT +public: + Action(CommandType type, int id); + + QString name() const; + + void setDefaultKeySequence(const QKeySequence &key); + void setKeySequence(const QKeySequence &key); + QKeySequence keySequence() const; + + virtual void setAction(QAction *action); + QAction *action() const; + + void setLocations(const QList<CommandLocation> &locations); + QList<CommandLocation> locations() const; + +protected: + void updateToolTipWithKeySequence(); + + QAction *m_action; + QList<CommandLocation> m_locations; + QString m_toolTip; +}; + +class OverrideableAction : public Action +{ + Q_OBJECT + +public: + OverrideableAction(int id); + + void setAction(QAction *action); + bool setCurrentContext(const QList<int> &context); + void addOverrideAction(QAction *action, const QList<int> &context); + bool isActive() const; + +private slots: + void actionChanged(); + +private: + QPointer<QAction> m_currentAction; + QList<int> m_context; + QMap<int, QPointer<QAction> > m_contextActionMap; + bool m_active; + bool m_contextInitialized; +}; + +} // namespace Internal +} // namespace Core + +#endif // COMMAND_P_H diff --git a/src/plugins/coreplugin/actionmanager/commandsfile.cpp b/src/plugins/coreplugin/actionmanager/commandsfile.cpp index 99602efaa850452786c2e9827b9ae7ca5dd1f7dc..abdecf43660d9c8be14d4a9b67c72e22789d5b48 100644 --- a/src/plugins/coreplugin/actionmanager/commandsfile.cpp +++ b/src/plugins/coreplugin/actionmanager/commandsfile.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -34,7 +34,7 @@ #include "coreimpl.h" #include "commandsfile.h" #include "shortcutsettings.h" -#include "command.h" +#include "command_p.h" #include <coreplugin/uniqueidmanager.h> diff --git a/src/plugins/coreplugin/actionmanager/commandsfile.h b/src/plugins/coreplugin/actionmanager/commandsfile.h index 7c515a32c2643eda03ef69e6d07f4164f9680817..79eeaed63111f6e83137a8574a32bba01e4d21e4 100644 --- a/src/plugins/coreplugin/actionmanager/commandsfile.h +++ b/src/plugins/coreplugin/actionmanager/commandsfile.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/actionmanager/iactioncontainer.h b/src/plugins/coreplugin/actionmanager/iactioncontainer.h deleted file mode 100644 index ad510393521e68523c17cbfb7cc8a98a6d70be1d..0000000000000000000000000000000000000000 --- a/src/plugins/coreplugin/actionmanager/iactioncontainer.h +++ /dev/null @@ -1,83 +0,0 @@ -/*************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** -** Non-Open Source Usage -** -** Licensees may use this file in accordance with the Qt Beta Version -** License Agreement, Agreement version 2.2 provided with the Software or, -** alternatively, in accordance with the terms contained in a written -** agreement between you and Nokia. -** -** GNU General Public License Usage -** -** Alternatively, this file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the packaging -** of this file. Please review the following information to ensure GNU -** General Public Licensing requirements will be met: -** -** http://www.fsf.org/licensing/licenses/info/GPLv2.html and -** http://www.gnu.org/copyleft/gpl.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt GPL Exception -** version 1.3, included in the file GPL_EXCEPTION.txt in this package. -** -***************************************************************************/ - -#ifndef IACTIONCONTAINER_H -#define IACTIONCONTAINER_H - -#include <QtCore/QObject> -#include <QtGui/QMenu> -#include <QtGui/QToolBar> -#include <QtGui/QMenuBar> -#include <QtGui/QAction> - -namespace Core { - -class ICommand; - -class IActionContainer : public QObject -{ -public: - enum ContainerType { - CT_Mask = 0xFF, - CT_Menu = 0x01, - CT_ToolBar = 0x02 - }; - - enum EmptyAction { - EA_Mask = 0xFF00, - EA_None = 0x0100, - EA_Hide = 0x0200, - EA_Disable = 0x0300 - }; - - virtual void setEmptyAction(EmptyAction ea) = 0; - - virtual int id() const = 0; - virtual ContainerType type() const = 0; - - virtual QMenu *menu() const = 0; - virtual QToolBar *toolBar() const = 0; - virtual QMenuBar *menuBar() const = 0; - - virtual QAction *insertLocation(const QString &group) const = 0; - virtual void appendGroup(const QString &group, bool global = false) = 0; - virtual void addAction(Core::ICommand *action, const QString &group = QString()) = 0; - virtual void addMenu(Core::IActionContainer *menu, const QString &group = QString()) = 0; - - virtual bool update() = 0; - virtual ~IActionContainer() {} -}; - -} // namespace Core - -#endif // IACTIONCONTAINER_H diff --git a/src/plugins/coreplugin/actionmanager/icommand.h b/src/plugins/coreplugin/actionmanager/icommand.h deleted file mode 100644 index 7ab5145b74a9e38c099015793a291a1b73753db9..0000000000000000000000000000000000000000 --- a/src/plugins/coreplugin/actionmanager/icommand.h +++ /dev/null @@ -1,94 +0,0 @@ -/*************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** -** Non-Open Source Usage -** -** Licensees may use this file in accordance with the Qt Beta Version -** License Agreement, Agreement version 2.2 provided with the Software or, -** alternatively, in accordance with the terms contained in a written -** agreement between you and Nokia. -** -** GNU General Public License Usage -** -** Alternatively, this file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the packaging -** of this file. Please review the following information to ensure GNU -** General Public Licensing requirements will be met: -** -** http://www.fsf.org/licensing/licenses/info/GPLv2.html and -** http://www.gnu.org/copyleft/gpl.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt GPL Exception -** version 1.3, included in the file GPL_EXCEPTION.txt in this package. -** -***************************************************************************/ - -#ifndef ICOMMAND_H -#define ICOMMAND_H - -#include <coreplugin/core_global.h> - -#include <QtGui/QAction> -#include <QtGui/QShortcut> -#include <QtGui/QKeySequence> - -namespace Core { - -class CORE_EXPORT ICommand : public QObject -{ - Q_OBJECT -public: - enum CommandType { - CT_Shortcut = 0x0001, - CT_OverridableAction = 0x0002, - CT_Mask = 0x00FF - }; - - enum CommandAttribute { - CA_Hide = 0x0100, - CA_UpdateText = 0x0200, - CA_UpdateIcon = 0x0400, - CA_NonConfigureable = 0x8000, - CA_Mask = 0xFF00 - }; - - virtual void setDefaultKeySequence(const QKeySequence &key) = 0; - virtual void setKeySequence(const QKeySequence &key) = 0; - virtual QKeySequence defaultKeySequence() const = 0; - virtual QKeySequence keySequence() const = 0; - virtual void setDefaultText(const QString &text) = 0; - virtual QString defaultText() const = 0; - - virtual void setCategory(const QString &name) = 0; - - virtual int id() const = 0; - virtual CommandType type() const = 0; - - virtual QAction *action() const = 0; - virtual QShortcut *shortcut() const = 0; - - virtual void setAttribute(CommandAttribute attr) = 0; - virtual void removeAttribute(CommandAttribute attr) = 0; - virtual bool hasAttribute(CommandAttribute attr) const = 0; - - virtual bool isActive() const = 0; - - virtual ~ICommand() {} - - virtual QString stringWithAppendedShortcut(const QString &str) const = 0; - -signals: - void keySequenceChanged(); -}; - -} // namespace Core - -#endif // ICOMMAND_H diff --git a/src/plugins/coreplugin/basefilewizard.cpp b/src/plugins/coreplugin/basefilewizard.cpp index 468c76a0dc64fed1af46fa5f1424bb553302c305..aad82af6677679758db01335d57134af0bb5f07d 100644 --- a/src/plugins/coreplugin/basefilewizard.cpp +++ b/src/plugins/coreplugin/basefilewizard.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/basefilewizard.h b/src/plugins/coreplugin/basefilewizard.h index d530b728aa5d83fdbec2e4e70b3e561b4bfd7ad9..40e98793cb9f57e310fbd62b75906d90846ceb72 100644 --- a/src/plugins/coreplugin/basefilewizard.h +++ b/src/plugins/coreplugin/basefilewizard.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/basemode.cpp b/src/plugins/coreplugin/basemode.cpp index 1a428aa4df7cffcc5e63ce2c6823d31d1199e7cc..ea2d202fc24f165bcd9a4805694d0d2c8b37a279 100644 --- a/src/plugins/coreplugin/basemode.cpp +++ b/src/plugins/coreplugin/basemode.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -82,38 +82,6 @@ BaseMode::BaseMode(QObject *parent): { } -/*! - \fn BaseMode::BaseMode(const QString &name, - const char * uniqueModeName, - const QIcon &icon, - int priority, - QWidget *widget, - QObject *parent) - - Creates a mode with the given properties. - - \a name - \a uniqueModeName - \a icon - \a priority - \a widget - \a parent -*/ -BaseMode::BaseMode(const QString &name, - const char * uniqueModeName, - const QIcon &icon, - int priority, - QWidget *widget, - QObject *parent): - IMode(parent), - m_name(name), - m_icon(icon), - m_priority(priority), - m_widget(widget), - m_uniqueModeName(uniqueModeName) -{ -} - /*! \fn BaseMode::~BaseMode() */ diff --git a/src/plugins/coreplugin/basemode.h b/src/plugins/coreplugin/basemode.h index c6fea7d48072f3184021115ce30d352ace867878..bca1f24347bb3b0e1351ca25f3a50b2dd32121e2 100644 --- a/src/plugins/coreplugin/basemode.h +++ b/src/plugins/coreplugin/basemode.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -49,12 +49,6 @@ class CORE_EXPORT BaseMode public: BaseMode(QObject *parent = 0); - BaseMode(const QString &name, - const char * uniqueModeName, - const QIcon &icon, - int priority, - QWidget *widget, - QObject *parent = 0); ~BaseMode(); // IMode diff --git a/src/plugins/coreplugin/baseview.cpp b/src/plugins/coreplugin/baseview.cpp index 5367062d3716fffc0e605b83e3d3dbb1544fe95f..f3dd93f51553b09e8cb7d66c653b3faa1a913107 100644 --- a/src/plugins/coreplugin/baseview.cpp +++ b/src/plugins/coreplugin/baseview.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/baseview.h b/src/plugins/coreplugin/baseview.h index 0312de6613b9668b6413ce1b55788c374b49a893..a39e4dc8ca2041d986c65d3f8b8c181a536663df 100644 --- a/src/plugins/coreplugin/baseview.h +++ b/src/plugins/coreplugin/baseview.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/core_global.h b/src/plugins/coreplugin/core_global.h index 630b660c0c9986ba83babaa746740accc68176e6..6fe5d150107bca0cddc6f3a4e047620c14ff0593 100644 --- a/src/plugins/coreplugin/core_global.h +++ b/src/plugins/coreplugin/core_global.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/coreconstants.h b/src/plugins/coreplugin/coreconstants.h index dd8155db8209803999264344c91628e035752eba..8dd7d9c588da36cff2264f08adc2d206b5a94aa2 100644 --- a/src/plugins/coreplugin/coreconstants.h +++ b/src/plugins/coreplugin/coreconstants.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/coreimpl.cpp b/src/plugins/coreplugin/coreimpl.cpp index 7a7eca4044f04c452a53874afe95f7e309b58570..68653b52fc7a7a5e963822e516350cef4e92de7a 100644 --- a/src/plugins/coreplugin/coreimpl.cpp +++ b/src/plugins/coreplugin/coreimpl.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -64,7 +64,7 @@ void CoreImpl::showOptionsDialog(const QString &group, const QString &page) m_mainwindow->showOptionsDialog(group, page); } -ActionManagerInterface *CoreImpl::actionManager() const +ActionManager *CoreImpl::actionManager() const { return m_mainwindow->actionManager(); } @@ -84,11 +84,6 @@ MessageManager *CoreImpl::messageManager() const return m_mainwindow->messageManager(); } -ViewManagerInterface *CoreImpl::viewManager() const -{ - return m_mainwindow->viewManager(); -} - ExtensionSystem::PluginManager *CoreImpl::pluginManager() const { return m_mainwindow->pluginManager(); @@ -99,12 +94,12 @@ EditorManager *CoreImpl::editorManager() const return m_mainwindow->editorManager(); } -ProgressManagerInterface *CoreImpl::progressManager() const +ProgressManager *CoreImpl::progressManager() const { return m_mainwindow->progressManager(); } -ScriptManagerInterface *CoreImpl::scriptManager() const +ScriptManager *CoreImpl::scriptManager() const { return m_mainwindow->scriptManager(); } @@ -148,15 +143,6 @@ QString CoreImpl::resourcePath() const #endif } -QString CoreImpl::libraryPath() const -{ -#if defined(Q_OS_MAC) - return QDir::cleanPath(QCoreApplication::applicationDirPath()+QLatin1String("/../PlugIns")); -#else - return QDir::cleanPath(QCoreApplication::applicationDirPath()+QLatin1String("/../lib")); -#endif -} - IContext *CoreImpl::currentContextObject() const { return m_mainwindow->currentContextObject(); @@ -168,12 +154,6 @@ QMainWindow *CoreImpl::mainWindow() const return m_mainwindow; } -QStatusBar *CoreImpl::statusBar() const -{ - return m_mainwindow->statusBar(); -} - - // adds and removes additional active contexts, this context is appended to the // currently active contexts. call updateContext after changing void CoreImpl::addAdditionalContext(int context) diff --git a/src/plugins/coreplugin/coreimpl.h b/src/plugins/coreplugin/coreimpl.h index 5380b9bdaf3ecf8d1a9c941a2a771bffd2def352..b09de4101f6a13262d7e0e0cc66e4ac08aee8889 100644 --- a/src/plugins/coreplugin/coreimpl.h +++ b/src/plugins/coreplugin/coreimpl.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -56,15 +56,14 @@ public: void showOptionsDialog(const QString &group = QString(), const QString &page = QString()); - ActionManagerInterface *actionManager() const; + ActionManager *actionManager() const; FileManager *fileManager() const ; UniqueIDManager *uniqueIDManager() const; MessageManager *messageManager() const; - ViewManagerInterface *viewManager() const; ExtensionSystem::PluginManager *pluginManager() const; EditorManager *editorManager() const; - ProgressManagerInterface *progressManager() const; - ScriptManagerInterface *scriptManager() const; + ProgressManager *progressManager() const; + ScriptManager *scriptManager() const; VariableManager *variableManager() const; VCSManager *vcsManager() const; ModeManager *modeManager() const; @@ -74,12 +73,10 @@ public: QPrinter *printer() const; QString resourcePath() const; - QString libraryPath() const; IContext *currentContextObject() const; QMainWindow *mainWindow() const; - QStatusBar *statusBar() const; // adds and removes additional active contexts, this context is appended to the // currently active contexts. call updateContext after changing diff --git a/src/plugins/coreplugin/coreplugin.cpp b/src/plugins/coreplugin/coreplugin.cpp index 9a426dbeadce2869aa65979d26b9aa8300a4f3e0..4b18570037a82aec00ab52461f4ce885d970a18f 100644 --- a/src/plugins/coreplugin/coreplugin.cpp +++ b/src/plugins/coreplugin/coreplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -37,7 +37,6 @@ #include "editormanager.h" #include "mainwindow.h" #include "modemanager.h" -#include "viewmanager.h" #include "fileiconprovider.h" #include <QtCore/qplugin.h> diff --git a/src/plugins/coreplugin/coreplugin.h b/src/plugins/coreplugin/coreplugin.h index a8341c97e907aebd78f5f965e70e89eb0c2744db..020f407829a315838d8546a251d8255f5865b6c8 100644 --- a/src/plugins/coreplugin/coreplugin.h +++ b/src/plugins/coreplugin/coreplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/coreplugin.pri b/src/plugins/coreplugin/coreplugin.pri index c2b2a3fa2cf52186501481f0382c0e485c996399..fc5fc7aae611e7be950f9f2fc306c48149659381 100644 --- a/src/plugins/coreplugin/coreplugin.pri +++ b/src/plugins/coreplugin/coreplugin.pri @@ -1,3 +1,2 @@ include(coreplugin_dependencies.pri) - LIBS *= -l$$qtLibraryTarget(Core) diff --git a/src/plugins/coreplugin/coreplugin.pro b/src/plugins/coreplugin/coreplugin.pro index 80056b3b2e537658e24bab7f28443421eb4b3bf5..7ba648c1619f37d0c81c0bbfa6d03f123941dec6 100644 --- a/src/plugins/coreplugin/coreplugin.pro +++ b/src/plugins/coreplugin/coreplugin.pro @@ -73,7 +73,8 @@ SOURCES += mainwindow.cpp \ rightpane.cpp \ sidebar.cpp \ fileiconprovider.cpp \ - mimedatabase.cpp + mimedatabase.cpp \ + icore.cpp HEADERS += mainwindow.h \ welcomemode.h \ editmode.h \ @@ -97,12 +98,12 @@ HEADERS += mainwindow.h \ editormanager/openeditorswindow.h \ editormanager/ieditor.h \ editormanager/ieditorfactory.h \ - actionmanager/iactioncontainer.h \ - actionmanager/actionmanagerinterface.h \ - actionmanager/icommand.h \ + actionmanager/actioncontainer.h \ actionmanager/actionmanager.h \ actionmanager/command.h \ - actionmanager/actioncontainer.h \ + actionmanager/actionmanager_p.h \ + actionmanager/command_p.h \ + actionmanager/actioncontainer_p.h \ actionmanager/commandsfile.h \ dialogs/saveitemsdialog.h \ dialogs/newdialog.h \ @@ -111,11 +112,11 @@ HEADERS += mainwindow.h \ dialogs/openwithdialog.h \ dialogs/iwizard.h \ dialogs/ioptionspage.h \ - progressmanager/progressmanager.h \ + progressmanager/progressmanager_p.h \ progressmanager/progressview.h \ progressmanager/progresspie.h \ progressmanager/futureprogress.h \ - progressmanager/progressmanagerinterface.h \ + progressmanager/progressmanager.h \ icontext.h \ icore.h \ ifile.h \ @@ -131,8 +132,8 @@ HEADERS += mainwindow.h \ versiondialog.h \ scriptmanager/metatypedeclarations.h \ scriptmanager/qworkbench_wrapper.h \ - scriptmanager/scriptmanagerinterface.h \ scriptmanager/scriptmanager.h \ + scriptmanager/scriptmanager_p.h \ core_global.h \ basemode.h \ baseview.h \ diff --git a/src/plugins/coreplugin/dialogs/ioptionspage.h b/src/plugins/coreplugin/dialogs/ioptionspage.h index df38e3562a62d891b87d1f116e105a7cb15f71f3..f00c14ef9f059a8df9b63a493c71bda03df4cc7e 100644 --- a/src/plugins/coreplugin/dialogs/ioptionspage.h +++ b/src/plugins/coreplugin/dialogs/ioptionspage.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -54,7 +54,8 @@ public: virtual QString trCategory() const = 0; virtual QWidget *createPage(QWidget *parent) = 0; - virtual void finished(bool accepted) = 0; + virtual void apply() = 0; + virtual void finish() = 0; }; } // namespace Core diff --git a/src/plugins/coreplugin/dialogs/iwizard.h b/src/plugins/coreplugin/dialogs/iwizard.h index 53216a0ed3d29062ecc314c794eccf6acd86f154..e8417349a2e0d9e564f79d2cd033768623fba3ff 100644 --- a/src/plugins/coreplugin/dialogs/iwizard.h +++ b/src/plugins/coreplugin/dialogs/iwizard.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/dialogs/newdialog.cpp b/src/plugins/coreplugin/dialogs/newdialog.cpp index a77d59354163c55e5640296b2747e3966a6639f7..3aee7e994e1804ea5c2c8a5c2fadb96fa85a596f 100644 --- a/src/plugins/coreplugin/dialogs/newdialog.cpp +++ b/src/plugins/coreplugin/dialogs/newdialog.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/dialogs/newdialog.h b/src/plugins/coreplugin/dialogs/newdialog.h index 057d2e826979e4a59aff276450191f07f43af5f4..d1169ddd3c09c10da08cb55604f0fe35e156a42e 100644 --- a/src/plugins/coreplugin/dialogs/newdialog.h +++ b/src/plugins/coreplugin/dialogs/newdialog.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/dialogs/openwithdialog.cpp b/src/plugins/coreplugin/dialogs/openwithdialog.cpp index 35a5152b17eab5f5f94e6f28917ceb5b208fd894..620e65177bc45408330865951daa1ddb14e55984 100644 --- a/src/plugins/coreplugin/dialogs/openwithdialog.cpp +++ b/src/plugins/coreplugin/dialogs/openwithdialog.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/dialogs/openwithdialog.h b/src/plugins/coreplugin/dialogs/openwithdialog.h index b4ff9675082f51b48b14053a3565a2498b6e325f..e4acc6a339b9be854340ac36756113f49e9373c2 100644 --- a/src/plugins/coreplugin/dialogs/openwithdialog.h +++ b/src/plugins/coreplugin/dialogs/openwithdialog.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/dialogs/saveitemsdialog.cpp b/src/plugins/coreplugin/dialogs/saveitemsdialog.cpp index 36da081e2dd44f8876e41a0465132436d1aaff4e..6d7547cca96b550321cfb96613627f7b574e9805 100644 --- a/src/plugins/coreplugin/dialogs/saveitemsdialog.cpp +++ b/src/plugins/coreplugin/dialogs/saveitemsdialog.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/dialogs/saveitemsdialog.h b/src/plugins/coreplugin/dialogs/saveitemsdialog.h index 471c74b2b446c4884fd0da2e884ca86997d5c7c5..a2543c98a2ad32f58447b3b0d8abf6c35eabe1d4 100644 --- a/src/plugins/coreplugin/dialogs/saveitemsdialog.h +++ b/src/plugins/coreplugin/dialogs/saveitemsdialog.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/dialogs/settingsdialog.cpp b/src/plugins/coreplugin/dialogs/settingsdialog.cpp index e2865bf183021486d1cb0833ea88aae8f2640b25..669ea09bf928639f4164f26584e064fd96d0b22b 100644 --- a/src/plugins/coreplugin/dialogs/settingsdialog.cpp +++ b/src/plugins/coreplugin/dialogs/settingsdialog.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -126,20 +126,22 @@ void SettingsDialog::pageSelected(QTreeWidgetItem *) void SettingsDialog::accept() { - foreach (IOptionsPage *page, m_pages) - page->finished(true); + foreach (IOptionsPage *page, m_pages) { + page->apply(); + page->finish(); + } done(QDialog::Accepted); } void SettingsDialog::reject() { foreach (IOptionsPage *page, m_pages) - page->finished(false); + page->finish(); done(QDialog::Rejected); } void SettingsDialog::apply() { foreach (IOptionsPage *page, m_pages) - page->finished(true); + page->apply(); } diff --git a/src/plugins/coreplugin/dialogs/settingsdialog.h b/src/plugins/coreplugin/dialogs/settingsdialog.h index 6dd8a2a37da81f6dcb75878934179b37854f910a..6a9194a8176d35b54ded36f67c15ff6adcdc8491 100644 --- a/src/plugins/coreplugin/dialogs/settingsdialog.h +++ b/src/plugins/coreplugin/dialogs/settingsdialog.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/dialogs/shortcutsettings.cpp b/src/plugins/coreplugin/dialogs/shortcutsettings.cpp index ec1c3975c4dd62ee8772c5852e3dbd76de8b4aa9..3d51e00b874ce2c6b0b02edde29a83b277e37377 100644 --- a/src/plugins/coreplugin/dialogs/shortcutsettings.cpp +++ b/src/plugins/coreplugin/dialogs/shortcutsettings.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -33,15 +33,15 @@ #include "shortcutsettings.h" #include "ui_shortcutsettings.h" -#include "actionmanager.h" -#include "command.h" +#include "actionmanager_p.h" +#include "command_p.h" #include "coreconstants.h" #include "coreimpl.h" #include "commandsfile.h" #include "filemanager.h" #include <coreplugin/uniqueidmanager.h> -#include <coreplugin/actionmanager/icommand.h> +#include <coreplugin/actionmanager/command.h> #include <QtGui/QKeyEvent> #include <QtGui/QShortcut> @@ -120,14 +120,14 @@ QWidget *ShortcutSettings::createPage(QWidget *parent) return w; } -void ShortcutSettings::finished(bool accepted) +void ShortcutSettings::apply() { - if (accepted) { - foreach (ShortcutItem *item, m_scitems) { - item->m_cmd->setKeySequence(item->m_key); - } - } + foreach (ShortcutItem *item, m_scitems) + item->m_cmd->setKeySequence(item->m_key); +} +void ShortcutSettings::finish() +{ qDeleteAll(m_scitems); m_scitems.clear(); } @@ -281,14 +281,14 @@ void ShortcutSettings::initialize() { QMap<QString, QTreeWidgetItem *> categories; - m_am = ActionManager::instance(); + m_am = ActionManagerPrivate::instance(); UniqueIDManager *uidm = CoreImpl::instance()->uniqueIDManager(); - QList<Command *> cmds = m_am->commands(); + QList<CommandPrivate *> cmds = m_am->commands(); for (int i = 0; i < cmds.size(); ++i) { - Command *c = cmds.at(i); - if (c->hasAttribute(Command::CA_NonConfigureable)) + CommandPrivate *c = cmds.at(i); + if (c->hasAttribute(CommandPrivate::CA_NonConfigureable)) continue; if (c->action() && c->action()->isSeparator()) continue; @@ -313,7 +313,7 @@ void ShortcutSettings::initialize() item->setText(0, uidm->stringForUniqueIdentifier(c->id())); if (c->action()) { - QString text = c->hasAttribute(Command::CA_UpdateText) && !c->defaultText().isNull() ? c->defaultText() : c->action()->text(); + QString text = c->hasAttribute(CommandPrivate::CA_UpdateText) && !c->defaultText().isNull() ? c->defaultText() : c->action()->text(); s->m_key = c->action()->shortcut(); item->setText(1, text); } else { diff --git a/src/plugins/coreplugin/dialogs/shortcutsettings.h b/src/plugins/coreplugin/dialogs/shortcutsettings.h index 99d4a8fbbc433880aaf9f439cf1c013213aae7c5..0466c84e6ec483080c94cd71f636e8fd64b100f8 100644 --- a/src/plugins/coreplugin/dialogs/shortcutsettings.h +++ b/src/plugins/coreplugin/dialogs/shortcutsettings.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -47,17 +47,16 @@ QT_END_NAMESPACE namespace Core { -class ICommand; +class Command; namespace Internal { -class ActionManager; -class Command; +class ActionManagerPrivate; class MainWindow; struct ShortcutItem { - ICommand *m_cmd; + Command *m_cmd; QKeySequence m_key; QTreeWidgetItem *m_item; }; @@ -77,7 +76,8 @@ public: QString trCategory() const; QWidget *createPage(QWidget *parent); - void finished(bool accepted); + void apply(); + void finish(); protected: bool eventFilter(QObject *o, QEvent *e); @@ -101,7 +101,7 @@ private: int translateModifiers(Qt::KeyboardModifiers state, const QString &text); QList<ShortcutItem *> m_scitems; - ActionManager *m_am; + ActionManagerPrivate *m_am; int m_key[4], m_keyNum; Ui_ShortcutSettings *m_page; }; diff --git a/src/plugins/coreplugin/editmode.cpp b/src/plugins/coreplugin/editmode.cpp index 503c52ac8f7452ba4dcc8b6dc2f4c0e443f58c53..dacb31e355c74fa66da52cdb6124d52fce8e9b66 100644 --- a/src/plugins/coreplugin/editmode.cpp +++ b/src/plugins/coreplugin/editmode.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/editmode.h b/src/plugins/coreplugin/editmode.h index 2f7555915d8b5a9c7f837078706c569eb248cafd..423480a553af65b74e5e426fb685ea7b194903ab 100644 --- a/src/plugins/coreplugin/editmode.h +++ b/src/plugins/coreplugin/editmode.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/editormanager/editorgroup.cpp b/src/plugins/coreplugin/editormanager/editorgroup.cpp index 8158bab4d8129ef5e7b9b7f0ecb027cc4f4140fe..3ab8e84ed2e89fc49f34e82a16d14b67c322d370 100644 --- a/src/plugins/coreplugin/editormanager/editorgroup.cpp +++ b/src/plugins/coreplugin/editormanager/editorgroup.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/editormanager/editorgroup.h b/src/plugins/coreplugin/editormanager/editorgroup.h index bd9879e1ce31e814ebe91998f8a79e785ddd0a4e..8a0bcb475ff028b991c90bc56d39b63ec5d7146c 100644 --- a/src/plugins/coreplugin/editormanager/editorgroup.h +++ b/src/plugins/coreplugin/editormanager/editorgroup.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 133616f8f368162cf835ed5677b8d0cadf9770b4..0654e64a4235b5a966f6c9ffe709da0e80918f69 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -48,7 +48,7 @@ #include <coreplugin/coreconstants.h> #include <coreplugin/modemanager.h> #include <coreplugin/uniqueidmanager.h> -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/editormanager/ieditorfactory.h> #include <coreplugin/baseview.h> #include <coreplugin/imode.h> @@ -210,13 +210,13 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) : const QList<int> editManagerContext = QList<int>() << m_d->m_core->uniqueIDManager()->uniqueIdentifier(Constants::C_EDITORMANAGER); - ActionManagerInterface *am = m_d->m_core->actionManager(); - IActionContainer *mfile = am->actionContainer(Constants::M_FILE); + ActionManager *am = m_d->m_core->actionManager(); + ActionContainer *mfile = am->actionContainer(Constants::M_FILE); //Revert to saved - ICommand *cmd = am->registerAction(m_d->m_revertToSavedAction, + Command *cmd = am->registerAction(m_d->m_revertToSavedAction, Constants::REVERTTOSAVED, editManagerContext); - cmd->setAttribute(ICommand::CA_UpdateText); + cmd->setAttribute(Command::CA_UpdateText); cmd->setDefaultText(tr("Revert File to Saved")); mfile->addAction(cmd, Constants::G_FILE_SAVE); connect(m_d->m_revertToSavedAction, SIGNAL(triggered()), this, SLOT(revertToSaved())); @@ -230,7 +230,7 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) : connect(m_d->m_saveAsAction, SIGNAL(triggered()), this, SLOT(saveFileAs())); //Window Menu - IActionContainer *mwindow = am->actionContainer(Constants::M_WINDOW); + ActionContainer *mwindow = am->actionContainer(Constants::M_WINDOW); //Window menu separators QAction *tmpaction = new QAction(this); @@ -261,7 +261,7 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) : //Close Action cmd = am->registerAction(m_d->m_closeCurrentEditorAction, Constants::CLOSE, editManagerContext); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+W"))); - cmd->setAttribute(Core::ICommand::CA_UpdateText); + cmd->setAttribute(Core::Command::CA_UpdateText); cmd->setDefaultText(m_d->m_closeCurrentEditorAction->text()); mfile->addAction(cmd, Constants::G_FILE_CLOSE); connect(m_d->m_closeCurrentEditorAction, SIGNAL(triggered()), this, SLOT(closeEditor())); @@ -318,8 +318,8 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) : connect(m_d->m_goForwardAction, SIGNAL(triggered()), this, SLOT(goForwardInNavigationHistory())); - IActionContainer *medit = am->actionContainer(Constants::M_EDIT); - IActionContainer *advancedMenu = am->createMenu(Constants::M_EDIT_ADVANCED); + ActionContainer *medit = am->actionContainer(Constants::M_EDIT); + ActionContainer *advancedMenu = am->createMenu(Constants::M_EDIT_ADVANCED); medit->addMenu(advancedMenu, Constants::G_EDIT_FORMAT); advancedMenu->menu()->setTitle(tr("&Advanced")); @@ -1403,7 +1403,7 @@ void EditorManager::readSettings(QSettings *settings) if (settings->contains(QLatin1String("EditorManager/DocumentStates"))) m_d->m_editorStates = settings->value(QLatin1String("EditorManager/DocumentStates")) .value<QMap<QString, QVariant> >(); - if (settings->contains(QLatin1String("EditorManager/ExternalEditor"))) + if (settings->contains(QLatin1String("EditorManager/ExternalEditorCommand"))) m_d->m_externalEditor = settings->value(QLatin1String("EditorManager/ExternalEditorCommand")).toString(); } diff --git a/src/plugins/coreplugin/editormanager/editormanager.h b/src/plugins/coreplugin/editormanager/editormanager.h index f07da9d447aca2e6956defcdb7b29343af9be84b..0d9a9a65d59531eb316e0a516df98256dcc1a160 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.h +++ b/src/plugins/coreplugin/editormanager/editormanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/editormanager/editorsplitter.cpp b/src/plugins/coreplugin/editormanager/editorsplitter.cpp index 370cae409fdc9117f876547b77f0f49b604fd2ae..7e4f53f4e40390f6e01ca669c13326de2f3d5ff3 100644 --- a/src/plugins/coreplugin/editormanager/editorsplitter.cpp +++ b/src/plugins/coreplugin/editormanager/editorsplitter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -41,7 +41,7 @@ #include <coreplugin/icore.h> #include <coreplugin/coreconstants.h> #include <coreplugin/uniqueidmanager.h> -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> #include <utils/qtcassert.h> @@ -72,9 +72,9 @@ void EditorSplitter::registerActions() const QList<int> editorManagerContext = QList<int>() << m_core->uniqueIDManager()->uniqueIdentifier(Constants::C_EDITORMANAGER); - ActionManagerInterface *am = m_core->actionManager(); - IActionContainer *mwindow = am->actionContainer(Constants::M_WINDOW); - ICommand *cmd; + ActionManager *am = m_core->actionManager(); + ActionContainer *mwindow = am->actionContainer(Constants::M_WINDOW); + Command *cmd; //Horizontal Action m_horizontalSplitAction = new QAction(tr("Split Left/Right"), this); @@ -98,7 +98,7 @@ void EditorSplitter::registerActions() this, SLOT(unsplit())); //Default Layout menu - IActionContainer *mLayout = am->createMenu("QtCreator.Menu.Window.Layout"); + ActionContainer *mLayout = am->createMenu("QtCreator.Menu.Window.Layout"); mwindow->addMenu(mLayout, Constants::G_WINDOW_SPLIT); mLayout->menu()->setTitle(tr("Default Splitter Layout")); diff --git a/src/plugins/coreplugin/editormanager/editorsplitter.h b/src/plugins/coreplugin/editormanager/editorsplitter.h index 0a52aa77449e1cf4715763d15624e758cdeb6d52..94aac2df2316d20e4f7d3e1a61255f3309a87b3c 100644 --- a/src/plugins/coreplugin/editormanager/editorsplitter.h +++ b/src/plugins/coreplugin/editormanager/editorsplitter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/editormanager/ieditor.h b/src/plugins/coreplugin/editormanager/ieditor.h index 02f65d94e008eb0b58d95dac89756fb503ed40c8..c650d43c26c9f73cce544ed3624e8f5e761150d8 100644 --- a/src/plugins/coreplugin/editormanager/ieditor.h +++ b/src/plugins/coreplugin/editormanager/ieditor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/editormanager/ieditorfactory.h b/src/plugins/coreplugin/editormanager/ieditorfactory.h index c3a25162c7a84b025b5fe824dc4a239d86d50660..eabf81c0a3ad65a0395d99f6d89d8e4adbea7221 100644 --- a/src/plugins/coreplugin/editormanager/ieditorfactory.h +++ b/src/plugins/coreplugin/editormanager/ieditorfactory.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/editormanager/openeditorsview.cpp b/src/plugins/coreplugin/editormanager/openeditorsview.cpp index c04a2a5c73b43eff87712fb1faddc1ed85d5294e..7693d1700b224ead003474094a6a1f26b48b8366 100644 --- a/src/plugins/coreplugin/editormanager/openeditorsview.cpp +++ b/src/plugins/coreplugin/editormanager/openeditorsview.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/editormanager/openeditorsview.h b/src/plugins/coreplugin/editormanager/openeditorsview.h index a7403d1e86754fe9297dd9c606d316082bd30ef0..c3523976e18af8c9720d82937f0bb81b5dc49e7e 100644 --- a/src/plugins/coreplugin/editormanager/openeditorsview.h +++ b/src/plugins/coreplugin/editormanager/openeditorsview.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/editormanager/openeditorswindow.cpp b/src/plugins/coreplugin/editormanager/openeditorswindow.cpp index c7fe93b71556d184e07f44fa8f27f94a72dcf066..f9fe4ffe5cc64af430b4156056e652be408b72a0 100644 --- a/src/plugins/coreplugin/editormanager/openeditorswindow.cpp +++ b/src/plugins/coreplugin/editormanager/openeditorswindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/editormanager/openeditorswindow.h b/src/plugins/coreplugin/editormanager/openeditorswindow.h index 270849fb1f77c17abbd79eaf8568cdbc4646106c..c715beb559db82bbaa8c5a4875fb691d478cc876 100644 --- a/src/plugins/coreplugin/editormanager/openeditorswindow.h +++ b/src/plugins/coreplugin/editormanager/openeditorswindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/editormanager/stackededitorgroup.cpp b/src/plugins/coreplugin/editormanager/stackededitorgroup.cpp index 0111be02b76f5670b7c7db6e950f423d1a6e938b..edceea70002712d342657739f987dd1bed05ea89 100644 --- a/src/plugins/coreplugin/editormanager/stackededitorgroup.cpp +++ b/src/plugins/coreplugin/editormanager/stackededitorgroup.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/editormanager/stackededitorgroup.h b/src/plugins/coreplugin/editormanager/stackededitorgroup.h index 250e643c86ee316df458dec66f5e100f420e3ddc..7557830239ec9cff745ca0d1dded48f252de3c8a 100644 --- a/src/plugins/coreplugin/editormanager/stackededitorgroup.h +++ b/src/plugins/coreplugin/editormanager/stackededitorgroup.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/fancyactionbar.cpp b/src/plugins/coreplugin/fancyactionbar.cpp index a4da55d393a0f04f8d789eba7722cc9fab9992c2..b144a731ad43a23d366074d8de830ac3a644634c 100644 --- a/src/plugins/coreplugin/fancyactionbar.cpp +++ b/src/plugins/coreplugin/fancyactionbar.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/fancyactionbar.h b/src/plugins/coreplugin/fancyactionbar.h index e7946e8ed954be52bd7843b4e9ad07a15c470ffe..07a3c98455665577b10cb775161e51c73dbe8946 100644 --- a/src/plugins/coreplugin/fancyactionbar.h +++ b/src/plugins/coreplugin/fancyactionbar.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/fancytabwidget.cpp b/src/plugins/coreplugin/fancytabwidget.cpp index ccf9c92322c650825b3ff21f0328635f1116e945..1302dc71d675591522d4525563e31bfcd4c6f484 100644 --- a/src/plugins/coreplugin/fancytabwidget.cpp +++ b/src/plugins/coreplugin/fancytabwidget.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/fancytabwidget.h b/src/plugins/coreplugin/fancytabwidget.h index 58a597943704fd12114192ea619177e00d1279ed..24865fe8d0edbf141f36e8a51a93d07717a3fa67 100644 --- a/src/plugins/coreplugin/fancytabwidget.h +++ b/src/plugins/coreplugin/fancytabwidget.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/fileiconprovider.cpp b/src/plugins/coreplugin/fileiconprovider.cpp index 0c4b4a39de13bf09286524d7b7db73e14fcb3705..bf48ba37013e6d1c1014798ea990d6258580d8b8 100644 --- a/src/plugins/coreplugin/fileiconprovider.cpp +++ b/src/plugins/coreplugin/fileiconprovider.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/fileiconprovider.h b/src/plugins/coreplugin/fileiconprovider.h index ce4939605a501b034135e8531a1b44d6a6dc137a..8a92666ba4ecdbe6ab756a7ca363a4a2b9d884d5 100644 --- a/src/plugins/coreplugin/fileiconprovider.h +++ b/src/plugins/coreplugin/fileiconprovider.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/filemanager.cpp b/src/plugins/coreplugin/filemanager.cpp index 27276fbe149a5be3c8759fbafb805a5181f63d1f..c4f515547a11bb6017068b3cdb9d7ab1b0401464 100644 --- a/src/plugins/coreplugin/filemanager.cpp +++ b/src/plugins/coreplugin/filemanager.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/filemanager.h b/src/plugins/coreplugin/filemanager.h index 817c0d2a5ab45c3e66aa8a324cac5a945a11f5ee..bffbb088355ad422a79450f0b40f9e3b20733c6f 100644 --- a/src/plugins/coreplugin/filemanager.h +++ b/src/plugins/coreplugin/filemanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/findplaceholder.cpp b/src/plugins/coreplugin/findplaceholder.cpp index 866b9eadcd49a59bad22f0ed311a477a7d2e283a..b3416f01b448d0948018e99d143562d4025620d8 100644 --- a/src/plugins/coreplugin/findplaceholder.cpp +++ b/src/plugins/coreplugin/findplaceholder.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/findplaceholder.h b/src/plugins/coreplugin/findplaceholder.h index 860b16a7878fff10fb328dd14478bca6c34575ef..c7d36d6328abf7d22771bce1775fb0261d8828a7 100644 --- a/src/plugins/coreplugin/findplaceholder.h +++ b/src/plugins/coreplugin/findplaceholder.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/flowlayout.cpp b/src/plugins/coreplugin/flowlayout.cpp index c48190f9e2ea0f7b0dfd31f50055d271cd3971ed..95097f74e527c706c50de308747c255f64240e5a 100644 --- a/src/plugins/coreplugin/flowlayout.cpp +++ b/src/plugins/coreplugin/flowlayout.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/flowlayout.h b/src/plugins/coreplugin/flowlayout.h index efdd3a72807fb0f32b08df8f7473344c0876517f..af709c2bd168b28151f389eae4c88ab94f6be2c1 100644 --- a/src/plugins/coreplugin/flowlayout.h +++ b/src/plugins/coreplugin/flowlayout.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/generalsettings.cpp b/src/plugins/coreplugin/generalsettings.cpp index 294bb36dec8ae49e742ea0f628c3a894d1fb14b9..b21b96fd5e44194ab66c93b1c4c1c8d90aed7979 100644 --- a/src/plugins/coreplugin/generalsettings.cpp +++ b/src/plugins/coreplugin/generalsettings.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -81,11 +81,8 @@ QWidget *GeneralSettings::createPage(QWidget *parent) return w; } -void GeneralSettings::finished(bool accepted) +void GeneralSettings::apply() { - if (!accepted) - return; - // Apply the new base color if accepted StyleHelper::setBaseColor(m_page->colorButton->color()); EditorManager::instance()->setExternalEditor(m_page->externalEditorEdit->text()); diff --git a/src/plugins/coreplugin/generalsettings.h b/src/plugins/coreplugin/generalsettings.h index ead56930333a7589583f4b49869634cb66c4e193..aff4d0c8809bc130d52e906ce89652e1c9551b31 100644 --- a/src/plugins/coreplugin/generalsettings.h +++ b/src/plugins/coreplugin/generalsettings.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -55,7 +55,8 @@ public: QString category() const; QString trCategory() const; QWidget* createPage(QWidget *parent); - void finished(bool accepted); + void apply(); + void finish() { } private slots: void resetInterfaceColor(); diff --git a/src/plugins/coreplugin/icontext.h b/src/plugins/coreplugin/icontext.h index 3a45cfa4123230aa1c7d278eb836f7b8bcc8a3ac..b2d32d4d8467d98d82631adba7c024ca546ca299 100644 --- a/src/plugins/coreplugin/icontext.h +++ b/src/plugins/coreplugin/icontext.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/icore.cpp b/src/plugins/coreplugin/icore.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5d6d32741778dee6d1a526db4e83f4bb75be5552 --- /dev/null +++ b/src/plugins/coreplugin/icore.cpp @@ -0,0 +1,341 @@ +/*************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** +** Non-Open Source Usage +** +** Licensees may use this file in accordance with the Qt Beta Version +** License Agreement, Agreement version 2.2 provided with the Software or, +** alternatively, in accordance with the terms contained in a written +** agreement between you and Nokia. +** +** GNU General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the packaging +** of this file. Please review the following information to ensure GNU +** General Public Licensing requirements will be met: +** +** http://www.fsf.org/licensing/licenses/info/GPLv2.html and +** http://www.gnu.org/copyleft/gpl.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt GPL Exception +** version 1.3, included in the file GPL_EXCEPTION.txt in this package. +** +***************************************************************************/ + +#include "icore.h" + +/*! + \namespace Core + \brief The Core namespace contains all classes that make up the Core plugin + which constitute the basic functionality of Qt Creator. +*/ + +/*! + \namespace Core::Internal + \internal +*/ + +/*! + \class Core::ICore + \brief The ICore class allows access to the different part that make up + the basic functionality of Qt Creator. + + You should never create a subclass of this interface. The one and only + instance is created by the Core plugin. You can access this instance + from your plugin via the plugin manager, e.g. + \code + ExtensionSystem::PluginManager::instance()->getObject<Core::ICore>(); + \endcode + + \mainclass +*/ + +/*! + \fn QStringList ICore::showNewItemDialog(const QString &title, + const QList<IWizard *> &wizards, + const QString &defaultLocation = QString()) + \brief Opens a dialog where the user can choose from a set of \a wizards that + create new files/classes/projects. + + The \a title argument is shown as the dialogs title. The path where the + files will be created (if the user doesn't change it) is set + in \a defaultLocation. It defaults to the path of the file manager's + current file. + + \sa Core::FileManager +*/ + +/*! + \fn void ICore::showOptionsDialog(const QString &group = QString(), + const QString &page = QString()) + \brief Opens the application options/preferences dialog with preselected + \a page in a specified \a group. + + The arguments refer to the string IDs of the corresponding IOptionsPage. +*/ + +/*! + \fn ActionManager *ICore::actionManager() const + \brief Returns the application's action manager. + + The action manager is responsible for registration of menus and + menu items and keyboard shortcuts. +*/ + +/*! + \fn FileManager *ICore::fileManager() const + \brief Returns the application's file manager. + + The file manager keeps track of files for changes outside the application. +*/ + +/*! + \fn UniqueIDManager *ICore::uniqueIDManager() const + \brief Returns the application's id manager. + + The unique ID manager transforms strings in unique integers and the other way round. +*/ + +/*! + \fn MessageManager *ICore::messageManager() const + \brief Returns the application's message manager. + + The message manager is the interface to the "General" output pane for + general application debug messages. +*/ + +/*! + \fn ExtensionSystem::PluginManager *ICore::pluginManager() const + \brief Returns the application's plugin manager. + + The plugin manager handles the plugin life cycles and manages + the common object pool. +*/ + +/*! + \fn EditorManager *ICore::editorManager() const + \brief Returns the application's editor manager. + + The editor manager handles all editor related tasks like opening + documents, the stack of currently open documents and the currently + active document. +*/ + +/*! + \fn ProgressManager *ICore::progressManager() const + \brief Returns the application's progress manager. + + Use the progress manager to register a concurrent task to + show a progress bar the way Qt Creator does it. +*/ + +/*! + \fn ScriptManager *ICore::scriptManager() const + \internal +*/ + +/*! + \fn VariableManager *ICore::variableManager() const + \brief Returns the application's variable manager. + + The variable manager is used to register application wide string variables + like \c MY_PROJECT_DIR such that strings like \c{somecommand ${MY_PROJECT_DIR}/sub} + can be resolved/expanded from anywhere in the application. +*/ + +/*! + \fn VCSManager *ICore::vcsManager() const + \brief Returns the application's vcs manager. + + The vcs manager can be used to e.g. retrieve information about + the version control system used for a directory on hard disk. + The actual functionality for a specific version control system + must be implemented in a IVersionControl object and registered in + the plugin manager's object pool. +*/ + +/*! + \fn ModeManager *ICore::modeManager() const + \brief Returns the application's mode manager. + + The mode manager handles everything related to the instances of IMode + that were added to the plugin manager's object pool as well as their + buttons and the tool bar with the round buttons in the lower left + corner of Qt Creator. +*/ + +/*! + \fn MimeDatabase *ICore::mimeDatabase() const + \brief Returns the application's mime database. + + Use the mime database to manage mime types. +*/ + +/*! + \fn QSettings *ICore::settings() const + \brief Returns the application's main settings object. + + You can use it to retrieve or set application wide settings + (in contrast to session or project specific settings). +*/ + +/*! + \fn QPrinter *ICore::printer() const + \brief Returns the application's printer object. + + Always use this printer object for printing, so the different parts of the + application re-use it's settings. +*/ + +/*! + \fn QString ICore::resourcePath() const + \brief Returns the absolute path that is used for resources like + project templates and the debugger macros. + + This abstraction is needed to avoid platform-specific code all over + the place, since e.g. on Mac the resources are part of the application bundle. +*/ + +/*! + \fn QMainWindow *ICore::mainWindow() const + \brief Returns the main application window. + + For use as dialog parent etc. +*/ + +/*! + \fn IContext *ICore::currentContextObject() const + \brief Returns the context object of the current main context. + + \sa ICore::addAdditionalContext() + \sa ICore::addContextObject() +*/ + +/*! + \fn void ICore::addAdditionalContext(int context) + \brief Register additional context to be currently active. + + Appends the additional \a context to the list of currently active + contexts. You need to call ICore::updateContext to make that change + take effect. + + \sa ICore::removeAdditionalContext() + \sa ICore::hasContext() + \sa ICore::updateContext() +*/ + +/*! + \fn void ICore::removeAdditionalContext(int context) + \brief Removes the given \a context from the list of currently active contexts. + + You need to call ICore::updateContext to make that change + take effect. + + \sa ICore::addAdditionalContext() + \sa ICore::hasContext() + \sa ICore::updateContext() +*/ + +/*! + \fn bool ICore::hasContext(int context) const + \brief Returns if the given \a context is currently one of the active contexts. + + \sa ICore::addAdditionalContext() + \sa ICore::addContextObject() +*/ + +/*! + \fn void ICore::addContextObject(IContext *context) + \brief Registers an additional \a context object. + + After registration this context object gets automatically the + current context object whenever it's widget gets focus. + + \sa ICore::removeContextObject() + \sa ICore::addAdditionalContext() + \sa ICore::currentContextObject() +*/ + +/*! + \fn void ICore::removeContextObject(IContext *context) + \brief Unregisters a \a context object from the list of know contexts. + + \sa ICore::addContextObject() + \sa ICore::addAdditionalContext() + \sa ICore::currentContextObject() +} +*/ + +/*! + \fn void ICore::updateContext() + \brief Update the list of active contexts after adding or removing additional ones. + + \sa ICore::addAdditionalContext() + \sa ICore::removeAdditionalContext() +*/ + +/*! + \fn void ICore::openFiles(const QStringList &fileNames) + \brief Open all files from a list of \a fileNames like it would be + done if they were given to Qt Creator on the command line, or + they were opened via \gui{File|Open}. +*/ + +/*! + \fn ICore::ICore() + \internal +*/ + +/*! + \fn ICore::~ICore() + \internal +*/ + +/*! + \fn void ICore::coreOpened() + \brief Emitted after all plugins have been loaded and the main window shown. +*/ + +/*! + \fn void ICore::saveSettingsRequested() + \brief Emitted to signal that the user has requested that the global settings + should be saved to disk. + + At the moment that happens when the application is closed, and on \gui{Save All}. +*/ + +/*! + \fn void ICore::optionsDialogRequested() + \brief Signal that allows plugins to perform actions just before the \gui{Tools|Options} + dialog is shown. +*/ + +/*! + \fn void ICore::coreAboutToClose() + \brief Plugins can do some pre-end-of-life actions when they get this signal. + + The application is guaranteed to shut down after this signal is emitted. + It's there as an addition to the usual plugin lifecycle methods, namely + IPlugin::shutdown(), just for convenience. +*/ + +/*! + \fn void ICore::contextAboutToChange(Core::IContext *context) + \brief Sent just before a new \a context becomes the current context + (meaning that it's widget got focus). +*/ + +/*! + \fn void ICore::contextChanged(Core::IContext *context) + \brief Sent just after a new \a context became the current context + (meaning that it's widget got focus). +*/ diff --git a/src/plugins/coreplugin/icore.h b/src/plugins/coreplugin/icore.h index fe9b3b3ba9b1137ef1898f1a4f995235fc3d387a..7244782b495a3b613494628bdd22e7f28a0ccb9c 100644 --- a/src/plugins/coreplugin/icore.h +++ b/src/plugins/coreplugin/icore.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -50,16 +50,15 @@ QT_END_NAMESPACE namespace Core { // forward declarations -class ActionManagerInterface; +class ActionManager; class IFile; class FileManager; class MessageManager; class IEditor; class UniqueIDManager; -class ViewManagerInterface; class EditorManager; -class ProgressManagerInterface; -class ScriptManagerInterface; +class ProgressManager; +class ScriptManager; class VariableManager; class IContext; class VCSManager; @@ -82,15 +81,14 @@ public: virtual void showOptionsDialog(const QString &group = QString(), const QString &page = QString()) = 0; - virtual ActionManagerInterface *actionManager() const = 0; + virtual ActionManager *actionManager() const = 0; virtual FileManager *fileManager() const = 0; virtual UniqueIDManager *uniqueIDManager() const = 0; virtual MessageManager *messageManager() const = 0; - virtual ViewManagerInterface *viewManager() const = 0; virtual ExtensionSystem::PluginManager *pluginManager() const = 0; virtual EditorManager *editorManager() const = 0; - virtual ProgressManagerInterface *progressManager() const = 0; - virtual ScriptManagerInterface *scriptManager() const = 0; + virtual ProgressManager *progressManager() const = 0; + virtual ScriptManager *scriptManager() const = 0; virtual VariableManager *variableManager() const = 0; virtual VCSManager *vcsManager() const = 0; virtual ModeManager *modeManager() const = 0; @@ -100,20 +98,17 @@ public: virtual QPrinter *printer() const = 0; virtual QString resourcePath() const = 0; - virtual QString libraryPath() const = 0; - - virtual IContext *currentContextObject() const = 0; virtual QMainWindow *mainWindow() const = 0; - virtual QStatusBar *statusBar() const = 0; // adds and removes additional active contexts, this context is appended to the // currently active contexts. call updateContext after changing + virtual IContext *currentContextObject() const = 0; virtual void addAdditionalContext(int context) = 0; virtual void removeAdditionalContext(int context) = 0; virtual bool hasContext(int context) const = 0; - virtual void addContextObject(IContext *contex) = 0; - virtual void removeContextObject(IContext *contex) = 0; + virtual void addContextObject(IContext *context) = 0; + virtual void removeContextObject(IContext *context) = 0; virtual void updateContext() = 0; @@ -122,7 +117,7 @@ public: signals: void coreOpened(); void saveSettingsRequested(); - void settingsDialogRequested(); + void optionsDialogRequested(); void coreAboutToClose(); void contextAboutToChange(Core::IContext *context); void contextChanged(Core::IContext *context); diff --git a/src/plugins/coreplugin/icorelistener.h b/src/plugins/coreplugin/icorelistener.h index c0aab3b1aae2a0f92da192c24445c8c2773149f5..25468fbfd1af6d56177d8f7d76d96e01411613a0 100644 --- a/src/plugins/coreplugin/icorelistener.h +++ b/src/plugins/coreplugin/icorelistener.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/ifile.h b/src/plugins/coreplugin/ifile.h index a6ecdfbcb05b52804ab2a5b369edb86e0da8bd51..7ac816dcf886e508ba3008e8dec7cb0d1175c06c 100644 --- a/src/plugins/coreplugin/ifile.h +++ b/src/plugins/coreplugin/ifile.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/ifilefactory.h b/src/plugins/coreplugin/ifilefactory.h index d208d447f688739b32c2afc03cc43583909c1c82..cd69fd5127dd6b275099e588d6518be48da8e930 100644 --- a/src/plugins/coreplugin/ifilefactory.h +++ b/src/plugins/coreplugin/ifilefactory.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/ifilewizardextension.h b/src/plugins/coreplugin/ifilewizardextension.h index 6e2c36c75946d867d62df24be1e6a17521785884..76c94957653a8b52037da8ef10a694e86af490b2 100644 --- a/src/plugins/coreplugin/ifilewizardextension.h +++ b/src/plugins/coreplugin/ifilewizardextension.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/imode.h b/src/plugins/coreplugin/imode.h index 58602c083b6d318e7aaa9d2d1bb80aa94b543fbd..34e0455990672d31c07d0058673f31376eed8a43 100644 --- a/src/plugins/coreplugin/imode.h +++ b/src/plugins/coreplugin/imode.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/inavigationwidgetfactory.cpp b/src/plugins/coreplugin/inavigationwidgetfactory.cpp index f2ac6d8d5395f971f91bd2aec655e6a9062a9d8a..4d64ad6587607299c509703affad027d36221a4c 100644 --- a/src/plugins/coreplugin/inavigationwidgetfactory.cpp +++ b/src/plugins/coreplugin/inavigationwidgetfactory.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/inavigationwidgetfactory.h b/src/plugins/coreplugin/inavigationwidgetfactory.h index a8f1dbbe42cc5f1cdf6218695c1b9a06b1fe8189..e3bb73e7b307ce98ce318f731940fd3b7a3dba25 100644 --- a/src/plugins/coreplugin/inavigationwidgetfactory.h +++ b/src/plugins/coreplugin/inavigationwidgetfactory.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/ioutputpane.h b/src/plugins/coreplugin/ioutputpane.h index 44d2d09291a3f20ebba3c95505a8fc0a5e85831f..7c4bfcb28bb7f2f04bed78e15874bcc743eae111 100644 --- a/src/plugins/coreplugin/ioutputpane.h +++ b/src/plugins/coreplugin/ioutputpane.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/iversioncontrol.h b/src/plugins/coreplugin/iversioncontrol.h index 4e82731b77cee9bf5ce60c03b1204223610fb4d8..12c4667f2063b05b370e3f4348a4ea448fa29052 100644 --- a/src/plugins/coreplugin/iversioncontrol.h +++ b/src/plugins/coreplugin/iversioncontrol.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/iview.h b/src/plugins/coreplugin/iview.h index fb472b73475d4d4a5fc3d7f4069d4453d15d3a70..0bce0f5354484a8ca9940345ae0055667aee4c71 100644 --- a/src/plugins/coreplugin/iview.h +++ b/src/plugins/coreplugin/iview.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp index 9a70673e0887507bf510964586df928c0492a215..f4633fcd7351f7aa966d4067159963326265f28f 100644 --- a/src/plugins/coreplugin/mainwindow.cpp +++ b/src/plugins/coreplugin/mainwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -33,7 +33,7 @@ #include "mainwindow.h" #include "actioncontainer.h" -#include "actionmanager.h" +#include "actionmanager_p.h" #include "basemode.h" #include "coreimpl.h" #include "coreconstants.h" @@ -49,12 +49,12 @@ #include "newdialog.h" #include "outputpane.h" #include "plugindialog.h" -#include "progressmanager.h" +#include "progressmanager_p.h" #include "progressview.h" #include "shortcutsettings.h" #include "vcsmanager.h" -#include "scriptmanager.h" +#include "scriptmanager_p.h" #include "settingsdialog.h" #include "stylehelper.h" #include "variablemanager.h" @@ -115,11 +115,11 @@ MainWindow::MainWindow() : m_additionalContexts(m_globalContext), m_settings(new QSettings(QSettings::IniFormat, QSettings::UserScope, QLatin1String("Nokia"), QLatin1String("QtCreator"), this)), m_printer(0), - m_actionManager(new ActionManager(this, m_uniqueIDManager)), + m_actionManager(new ActionManagerPrivate(this, m_uniqueIDManager)), m_editorManager(0), m_fileManager(new FileManager(m_coreImpl, this)), - m_progressManager(new ProgressManager()), - m_scriptManager(new ScriptManager(this, m_coreImpl)), + m_progressManager(new ProgressManagerPrivate()), + m_scriptManager(new ScriptManagerPrivate(this, m_coreImpl)), m_variableManager(new VariableManager(this)), m_vcsManager(new VCSManager()), m_viewManager(0), @@ -283,11 +283,12 @@ bool MainWindow::init(ExtensionSystem::PluginManager *pm, QString *) outputModeWidget->setLayout(new QVBoxLayout); outputModeWidget->layout()->setMargin(0); outputModeWidget->layout()->setSpacing(0); - m_outputMode = new BaseMode(tr("Output"), - Constants::MODE_OUTPUT, - QIcon(QLatin1String(":/fancyactionbar/images/mode_Output.png")), - Constants::P_MODE_OUTPUT, - outputModeWidget); + m_outputMode = new BaseMode; + m_outputMode->setName(tr("Output")); + m_outputMode->setUniqueModeName(Constants::MODE_OUTPUT); + m_outputMode->setIcon(QIcon(QLatin1String(":/fancyactionbar/images/mode_Output.png"))); + m_outputMode->setPriority(Constants::P_MODE_OUTPUT); + m_outputMode->setWidget(outputModeWidget); OutputPanePlaceHolder *oph = new OutputPanePlaceHolder(m_outputMode); oph->setVisible(true); oph->setCloseable(false); @@ -362,9 +363,9 @@ QStatusBar *MainWindow::statusBar() const void MainWindow::registerDefaultContainers() { - ActionManager *am = m_actionManager; + ActionManagerPrivate *am = m_actionManager; - IActionContainer *menubar = m_actionManager->createMenuBar(Constants::MENU_BAR); + ActionContainer *menubar = am->createMenuBar(Constants::MENU_BAR); #ifndef Q_WS_MAC // System menu bar on Mac setMenuBar(menubar->menuBar()); @@ -377,7 +378,7 @@ void MainWindow::registerDefaultContainers() menubar->appendGroup(Constants::G_HELP); //File Menu - IActionContainer *filemenu = am->createMenu(Constants::M_FILE); + ActionContainer *filemenu = am->createMenu(Constants::M_FILE); menubar->addMenu(filemenu, Constants::G_FILE); filemenu->menu()->setTitle(tr("&File")); filemenu->appendGroup(Constants::G_FILE_NEW); @@ -391,23 +392,23 @@ void MainWindow::registerDefaultContainers() //Edit Menu - IActionContainer *medit = am->createMenu(Constants::M_EDIT); + ActionContainer *medit = am->createMenu(Constants::M_EDIT); menubar->addMenu(medit, Constants::G_EDIT); medit->menu()->setTitle(tr("&Edit")); medit->appendGroup(Constants::G_EDIT_UNDOREDO); medit->appendGroup(Constants::G_EDIT_COPYPASTE); medit->appendGroup(Constants::G_EDIT_SELECTALL); medit->appendGroup(Constants::G_EDIT_FORMAT); - medit->appendGroup(Constants::G_EDIT_FIND, true); + medit->appendGroup(Constants::G_EDIT_FIND); medit->appendGroup(Constants::G_EDIT_OTHER); //Tools Menu - IActionContainer *ac = am->createMenu(Constants::M_TOOLS); + ActionContainer *ac = am->createMenu(Constants::M_TOOLS); menubar->addMenu(ac, Constants::G_TOOLS); ac->menu()->setTitle(tr("&Tools")); //Window Menu - IActionContainer *mwindow = am->createMenu(Constants::M_WINDOW); + ActionContainer *mwindow = am->createMenu(Constants::M_WINDOW); menubar->addMenu(mwindow, Constants::G_WINDOW); mwindow->menu()->setTitle(tr("&Window")); mwindow->appendGroup(Constants::G_WINDOW_SIZE); @@ -417,38 +418,38 @@ void MainWindow::registerDefaultContainers() mwindow->appendGroup(Constants::G_WINDOW_NAVIGATE); mwindow->appendGroup(Constants::G_WINDOW_NAVIGATE_GROUPS); mwindow->appendGroup(Constants::G_WINDOW_OTHER); - mwindow->appendGroup(Constants::G_WINDOW_LIST, true); + mwindow->appendGroup(Constants::G_WINDOW_LIST); //Help Menu ac = am->createMenu(Constants::M_HELP); menubar->addMenu(ac, Constants::G_HELP); ac->menu()->setTitle(tr("&Help")); - ac->appendGroup(Constants::G_HELP_HELP, true); - ac->appendGroup(Constants::G_HELP_ABOUT, true); + ac->appendGroup(Constants::G_HELP_HELP); + ac->appendGroup(Constants::G_HELP_ABOUT); } -static ICommand *createSeparator(ActionManager *am, QObject *parent, +static Command *createSeparator(ActionManagerPrivate *am, QObject *parent, const QString &name, const QList<int> &context) { QAction *tmpaction = new QAction(parent); tmpaction->setSeparator(true); - ICommand *cmd = am->registerAction(tmpaction, name, context); + Command *cmd = am->registerAction(tmpaction, name, context); return cmd; } void MainWindow::registerDefaultActions() { - ActionManager *am = m_actionManager; - IActionContainer *mfile = am->actionContainer(Constants::M_FILE); - IActionContainer *medit = am->actionContainer(Constants::M_EDIT); - IActionContainer *mtools = am->actionContainer(Constants::M_TOOLS); - IActionContainer *mwindow = am->actionContainer(Constants::M_WINDOW); + ActionManagerPrivate *am = m_actionManager; + ActionContainer *mfile = am->actionContainer(Constants::M_FILE); + ActionContainer *medit = am->actionContainer(Constants::M_EDIT); + ActionContainer *mtools = am->actionContainer(Constants::M_TOOLS); + ActionContainer *mwindow = am->actionContainer(Constants::M_WINDOW); Q_UNUSED(mwindow) - IActionContainer *mhelp = am->actionContainer(Constants::M_HELP); + ActionContainer *mhelp = am->actionContainer(Constants::M_HELP); // File menu separators - ICommand *cmd = createSeparator(am, this, QLatin1String("QtCreator.File.Sep.Save"), m_globalContext); + Command *cmd = createSeparator(am, this, QLatin1String("QtCreator.File.Sep.Save"), m_globalContext); mfile->addAction(cmd, Constants::G_FILE_SAVE); cmd = createSeparator(am, this, QLatin1String("QtCreator.File.Sep.Print"), m_globalContext); @@ -505,25 +506,25 @@ void MainWindow::registerDefaultActions() connect(m_openWithAction, SIGNAL(triggered()), this, SLOT(openFileWith())); //File->Recent Files Menu - IActionContainer *ac = am->createMenu(Constants::M_FILE_RECENTFILES); + ActionContainer *ac = am->createMenu(Constants::M_FILE_RECENTFILES); mfile->addMenu(ac, Constants::G_FILE_OPEN); ac->menu()->setTitle(tr("Recent Files")); //Save Action QAction *tmpaction = new QAction(QIcon(Constants::ICON_SAVEFILE), tr("&Save"), this); - cmd = am->registerAction(tmpaction, Constants::SAVE); + cmd = am->registerAction(tmpaction, Constants::SAVE, m_globalContext); cmd->setDefaultKeySequence(QKeySequence::Save); - cmd->setAttribute(ICommand::CA_UpdateText); + cmd->setAttribute(Command::CA_UpdateText); cmd->setDefaultText(tr("&Save")); mfile->addAction(cmd, Constants::G_FILE_SAVE); //Save As Action tmpaction = new QAction(tr("Save &As..."), this); - cmd = am->registerAction(tmpaction, Constants::SAVEAS); + cmd = am->registerAction(tmpaction, Constants::SAVEAS, m_globalContext); #ifdef Q_OS_MAC cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+S"))); #endif - cmd->setAttribute(ICommand::CA_UpdateText); + cmd->setAttribute(Command::CA_UpdateText); cmd->setDefaultText(tr("Save &As...")); mfile->addAction(cmd, Constants::G_FILE_SAVE); @@ -538,7 +539,7 @@ void MainWindow::registerDefaultActions() //Print Action tmpaction = new QAction(tr("&Print..."), this); - cmd = am->registerAction(tmpaction, Constants::PRINT); + cmd = am->registerAction(tmpaction, Constants::PRINT, m_globalContext); mfile->addAction(cmd, Constants::G_FILE_PRINT); //Exit Action @@ -550,47 +551,47 @@ void MainWindow::registerDefaultActions() //Undo Action tmpaction = new QAction(QIcon(Constants::ICON_UNDO), tr("&Undo"), this); - cmd = am->registerAction(tmpaction, Constants::UNDO); + cmd = am->registerAction(tmpaction, Constants::UNDO, m_globalContext); cmd->setDefaultKeySequence(QKeySequence::Undo); - cmd->setAttribute(ICommand::CA_UpdateText); + cmd->setAttribute(Command::CA_UpdateText); cmd->setDefaultText(tr("&Undo")); medit->addAction(cmd, Constants::G_EDIT_UNDOREDO); //Redo Action tmpaction = new QAction(QIcon(Constants::ICON_REDO), tr("&Redo"), this); - cmd = am->registerAction(tmpaction, Constants::REDO); + cmd = am->registerAction(tmpaction, Constants::REDO, m_globalContext); cmd->setDefaultKeySequence(QKeySequence::Redo); - cmd->setAttribute(ICommand::CA_UpdateText); + cmd->setAttribute(Command::CA_UpdateText); cmd->setDefaultText(tr("&Redo")); medit->addAction(cmd, Constants::G_EDIT_UNDOREDO); //Cut Action tmpaction = new QAction(QIcon(Constants::ICON_CUT), tr("Cu&t"), this); - cmd = am->registerAction(tmpaction, Constants::CUT); + cmd = am->registerAction(tmpaction, Constants::CUT, m_globalContext); cmd->setDefaultKeySequence(QKeySequence::Cut); medit->addAction(cmd, Constants::G_EDIT_COPYPASTE); //Copy Action tmpaction = new QAction(QIcon(Constants::ICON_COPY), tr("&Copy"), this); - cmd = am->registerAction(tmpaction, Constants::COPY); + cmd = am->registerAction(tmpaction, Constants::COPY, m_globalContext); cmd->setDefaultKeySequence(QKeySequence::Copy); medit->addAction(cmd, Constants::G_EDIT_COPYPASTE); //Paste Action tmpaction = new QAction(QIcon(Constants::ICON_PASTE), tr("&Paste"), this); - cmd = am->registerAction(tmpaction, Constants::PASTE); + cmd = am->registerAction(tmpaction, Constants::PASTE, m_globalContext); cmd->setDefaultKeySequence(QKeySequence::Paste); medit->addAction(cmd, Constants::G_EDIT_COPYPASTE); //Select All tmpaction = new QAction(tr("&Select All"), this); - cmd = am->registerAction(tmpaction, Constants::SELECTALL); + cmd = am->registerAction(tmpaction, Constants::SELECTALL, m_globalContext); cmd->setDefaultKeySequence(QKeySequence::SelectAll); medit->addAction(cmd, Constants::G_EDIT_SELECTALL); //Goto Action tmpaction = new QAction(tr("&Go To Line..."), this); - cmd = am->registerAction(tmpaction, Constants::GOTO); + cmd = am->registerAction(tmpaction, Constants::GOTO, m_globalContext); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+L"))); medit->addAction(cmd, Constants::G_EDIT_OTHER); @@ -783,7 +784,7 @@ QStringList MainWindow::showNewItemDialog(const QString &title, void MainWindow::showOptionsDialog(const QString &category, const QString &page) { - emit m_coreImpl->settingsDialogRequested(); + emit m_coreImpl->optionsDialogRequested(); SettingsDialog dlg(this, category, page); dlg.exec(); } @@ -815,7 +816,7 @@ void MainWindow::openFileWith() } } -ActionManagerInterface *MainWindow::actionManager() const +ActionManager *MainWindow::actionManager() const { return m_actionManager; } @@ -840,22 +841,17 @@ VCSManager *MainWindow::vcsManager() const return m_vcsManager; } -ViewManagerInterface *MainWindow::viewManager() const -{ - return m_viewManager; -} - EditorManager *MainWindow::editorManager() const { return m_editorManager; } -ProgressManagerInterface *MainWindow::progressManager() const +ProgressManager *MainWindow::progressManager() const { return m_progressManager; } -ScriptManagerInterface *MainWindow::scriptManager() const +ScriptManager *MainWindow::scriptManager() const { return m_scriptManager; } @@ -967,17 +963,6 @@ void MainWindow::resetContext() updateContextObject(0); } -QMenu *MainWindow::createPopupMenu() -{ - QMenu *menu = new QMenu(this); - QList<ActionContainer *> containers = m_actionManager->containers(); - foreach (ActionContainer *c, containers) { - if (c->toolBar()) - menu->addAction(c->toolBar()->toggleViewAction()); - } - return menu; -} - static const char *settingsGroup = "MainWindow"; static const char *geometryKey = "Geometry"; static const char *colorKey = "Color"; @@ -1071,7 +1056,7 @@ void MainWindow::updateContext() void MainWindow::aboutToShowRecentFiles() { - IActionContainer *aci = + ActionContainer *aci = m_actionManager->actionContainer(Constants::M_FILE_RECENTFILES); aci->menu()->clear(); m_recentFilesActions.clear(); diff --git a/src/plugins/coreplugin/mainwindow.h b/src/plugins/coreplugin/mainwindow.h index 57338b31276e947081da1fb03c5585edc4ac1fe8..4a1c08f16efb5ffa31a85df67bd335e070fd49ac 100644 --- a/src/plugins/coreplugin/mainwindow.h +++ b/src/plugins/coreplugin/mainwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -55,7 +55,7 @@ class PluginManager; namespace Core { -class ActionManagerInterface; +class ActionManager; class BaseMode; class BaseView; class EditorManager; @@ -64,9 +64,9 @@ class IContext; class MessageManager; class MimeDatabase; class ModeManager; -class ProgressManagerInterface; +class ProgressManager; class RightPaneWidget; -class ScriptManagerInterface; +class ScriptManager; class UniqueIDManager; class VariableManager; class VCSManager; @@ -74,13 +74,13 @@ class ViewManagerInterface; namespace Internal { -class ActionManager; +class ActionManagerPrivate; class CoreImpl; class FancyTabWidget; class GeneralSettings; class NavigationWidget; class OutputPane; -class ProgressManager; +class ProgressManagerPrivate; class ShortcutSettings; class ViewManager; class VersionDialog; @@ -105,15 +105,14 @@ public: //ICore inline ExtensionSystem::PluginManager *pluginManager() { return m_pluginManager; } - Core::ActionManagerInterface *actionManager() const; + Core::ActionManager *actionManager() const; Core::FileManager *fileManager() const; Core::UniqueIDManager *uniqueIDManager() const; Core::MessageManager *messageManager() const; - Core::ViewManagerInterface *viewManager() const; ExtensionSystem::PluginManager *pluginManager() const; Core::EditorManager *editorManager() const; - Core::ProgressManagerInterface *progressManager() const; - Core::ScriptManagerInterface *scriptManager() const; + Core::ProgressManager *progressManager() const; + Core::ScriptManager *scriptManager() const; Core::VariableManager *variableManager() const; Core::ModeManager *modeManager() const; Core::MimeDatabase *mimeDatabase() const; @@ -129,8 +128,6 @@ public: void updateContext(); - QMenu *createPopupMenu(); - void setSuppressNavigationWidget(bool suppress); signals: @@ -177,12 +174,12 @@ private: QList<int> m_additionalContexts; QSettings *m_settings; mutable QPrinter *m_printer; - ActionManager *m_actionManager; + ActionManagerPrivate *m_actionManager; EditorManager *m_editorManager; FileManager *m_fileManager; MessageManager *m_messageManager; - ProgressManager *m_progressManager; - ScriptManagerInterface *m_scriptManager; + ProgressManagerPrivate *m_progressManager; + ScriptManager *m_scriptManager; VariableManager *m_variableManager; VCSManager *m_vcsManager; ViewManager *m_viewManager; diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp index 9237883221bba260a50188943182ed9ee098ce7f..a38a6c9774bad75a4e2dadf6c941e8dcc8e172a4 100644 --- a/src/plugins/coreplugin/manhattanstyle.cpp +++ b/src/plugins/coreplugin/manhattanstyle.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/manhattanstyle.h b/src/plugins/coreplugin/manhattanstyle.h index 991d976a79eb4206ac025ffc947b513097696ec4..1f61b931e9df7c3517a3b0ba5886f0162db4f4f8 100644 --- a/src/plugins/coreplugin/manhattanstyle.h +++ b/src/plugins/coreplugin/manhattanstyle.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/messagemanager.cpp b/src/plugins/coreplugin/messagemanager.cpp index 081dfb68327aa6479891ff1ff66c485833701d73..1b74995ef4dae173128219663b5367dfb9206ad5 100644 --- a/src/plugins/coreplugin/messagemanager.cpp +++ b/src/plugins/coreplugin/messagemanager.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/messagemanager.h b/src/plugins/coreplugin/messagemanager.h index 6e28b0a7e302a6fb9733ed39dfc30b83c87a2c67..12a1524cb47d6b789b487efffa5ee5f253719af7 100644 --- a/src/plugins/coreplugin/messagemanager.h +++ b/src/plugins/coreplugin/messagemanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/messageoutputwindow.cpp b/src/plugins/coreplugin/messageoutputwindow.cpp index 8833507ff5428b023dd1f4eeeb51edcfcf5e0fcb..9a37af27a034cc02f6ff7a4d74c0022031226733 100644 --- a/src/plugins/coreplugin/messageoutputwindow.cpp +++ b/src/plugins/coreplugin/messageoutputwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/messageoutputwindow.h b/src/plugins/coreplugin/messageoutputwindow.h index 44bf29ca1cf170ed5e771e4aebcd5c2d74d4a675..03ae5854643c6bcb8793113482dc3ade27fb8e36 100644 --- a/src/plugins/coreplugin/messageoutputwindow.h +++ b/src/plugins/coreplugin/messageoutputwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/mimedatabase.cpp b/src/plugins/coreplugin/mimedatabase.cpp index abca6a8e51d013176a9e12a673cd3354669ce201..5e57da02241ae32f2746834268a9f42b492e24af 100644 --- a/src/plugins/coreplugin/mimedatabase.cpp +++ b/src/plugins/coreplugin/mimedatabase.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/mimedatabase.h b/src/plugins/coreplugin/mimedatabase.h index 2f43be45cd44d002b13b797e54c25bab257a9155..d7d696bd723528f4fe32a17f2ea268699ea47dea 100644 --- a/src/plugins/coreplugin/mimedatabase.h +++ b/src/plugins/coreplugin/mimedatabase.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/minisplitter.cpp b/src/plugins/coreplugin/minisplitter.cpp index 1270a9ccf3ffa5c1e0712d3101bd4535f18e727b..7cd3653b541bbc33c2d6f7f43a29a6d44d871956 100644 --- a/src/plugins/coreplugin/minisplitter.cpp +++ b/src/plugins/coreplugin/minisplitter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/minisplitter.h b/src/plugins/coreplugin/minisplitter.h index 0a2beaf17ae0b150d2c69fc5966f83adf1b0b765..2e7fbcc4b74e35ebf9ff3425dc7b2f25c062f546 100644 --- a/src/plugins/coreplugin/minisplitter.h +++ b/src/plugins/coreplugin/minisplitter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/modemanager.cpp b/src/plugins/coreplugin/modemanager.cpp index 2e1713d05f93633c31728639805099e28a41be98..579881a215d885d8bacc5875749dee73b55a692c 100644 --- a/src/plugins/coreplugin/modemanager.cpp +++ b/src/plugins/coreplugin/modemanager.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -39,8 +39,8 @@ #include <aggregation/aggregate.h> -#include <coreplugin/actionmanager/actionmanagerinterface.h> -#include <coreplugin/actionmanager/icommand.h> +#include <coreplugin/actionmanager/actionmanager.h> +#include <coreplugin/actionmanager/command.h> #include <coreplugin/coreconstants.h> #include <coreplugin/coreimpl.h> #include <coreplugin/imode.h> @@ -140,11 +140,11 @@ void ModeManager::objectAdded(QObject *obj) m_modeStack->insertTab(index, mode->widget(), mode->icon(), mode->name()); // Register mode shortcut - ActionManagerInterface *am = m_mainWindow->actionManager(); + ActionManager *am = m_mainWindow->actionManager(); const QString shortcutId = QLatin1String("QtCreator.Mode.") + mode->uniqueModeName(); QShortcut *shortcut = new QShortcut(m_mainWindow); shortcut->setWhatsThis(tr("Switch to %1 mode").arg(mode->name())); - ICommand *cmd = am->registerShortcut(shortcut, shortcutId, QList<int>() << Constants::C_GLOBAL_ID); + Command *cmd = am->registerShortcut(shortcut, shortcutId, QList<int>() << Constants::C_GLOBAL_ID); m_modeShortcuts.insert(index, cmd); connect(cmd, SIGNAL(keySequenceChanged()), this, SLOT(updateModeToolTip())); @@ -162,7 +162,7 @@ void ModeManager::objectAdded(QObject *obj) void ModeManager::updateModeToolTip() { - ICommand *cmd = qobject_cast<ICommand *>(sender()); + Command *cmd = qobject_cast<Command *>(sender()); if (cmd) { int index = m_modeShortcuts.indexOf(cmd); if (index != -1) @@ -184,7 +184,7 @@ void ModeManager::aboutToRemoveObject(QObject *obj) m_mainWindow->removeContextObject(mode); } -void ModeManager::addAction(ICommand *command, int priority, QMenu *menu) +void ModeManager::addAction(Command *command, int priority, QMenu *menu) { m_actions.insert(command, priority); diff --git a/src/plugins/coreplugin/modemanager.h b/src/plugins/coreplugin/modemanager.h index d3b328c29e085bafb7042324efbb1fa1d6e30b8a..4d783f461d6c90744a5daf3bb76d1e48040c73fd 100644 --- a/src/plugins/coreplugin/modemanager.h +++ b/src/plugins/coreplugin/modemanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -48,7 +48,7 @@ QT_END_NAMESPACE namespace Core { -class ICommand; +class Command; class IMode; namespace Internal { @@ -70,7 +70,7 @@ public: IMode* currentMode() const; IMode* mode(const QString &id) const; - void addAction(ICommand *command, int priority, QMenu *menu = 0); + void addAction(Command *command, int priority, QMenu *menu = 0); void addWidget(QWidget *widget); signals: @@ -95,9 +95,9 @@ private: Internal::MainWindow *m_mainWindow; Internal::FancyTabWidget *m_modeStack; Internal::FancyActionBar *m_actionBar; - QMap<ICommand*, int> m_actions; + QMap<Command*, int> m_actions; QVector<IMode*> m_modes; - QVector<ICommand*> m_modeShortcuts; + QVector<Command*> m_modeShortcuts; QSignalMapper *m_signalMapper; QList<int> m_addedContexts; }; diff --git a/src/plugins/coreplugin/navigationwidget.cpp b/src/plugins/coreplugin/navigationwidget.cpp index 491c394343820bea218a06fa4098b08a5f1136d3..f6b586f76035f7783913328900bee3cc74ff8df0 100644 --- a/src/plugins/coreplugin/navigationwidget.cpp +++ b/src/plugins/coreplugin/navigationwidget.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -38,7 +38,7 @@ #include <coreplugin/inavigationwidgetfactory.h> #include <coreplugin/modemanager.h> #include <coreplugin/uniqueidmanager.h> -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> #include <extensionsystem/ExtensionSystemInterfaces> #include <QtGui/QAction> @@ -316,14 +316,14 @@ void NavigationWidget::objectAdded(QObject * obj) return; Core::ICore *core = ExtensionSystem::PluginManager::instance()->getObject<Core::ICore>(); - Core::ActionManagerInterface *am = core->actionManager(); + Core::ActionManager *am = core->actionManager(); QList<int> navicontext = QList<int>() << core->uniqueIDManager()-> uniqueIdentifier(Core::Constants::C_NAVIGATION_PANE); QString displayName = factory->displayName(); QShortcut *shortcut = new QShortcut(this); shortcut->setWhatsThis(tr("Activate %1 Pane").arg(displayName)); - Core::ICommand *cmd = am->registerShortcut(shortcut, + Core::Command *cmd = am->registerShortcut(shortcut, displayName + QLatin1String(".FocusShortcut"), navicontext); cmd->setDefaultKeySequence(factory->activationSequence()); connect(shortcut, SIGNAL(activated()), this, SLOT(activateSubWidget())); @@ -492,10 +492,10 @@ void NavigationSubWidget::restoreSettings(int position) factory()->restoreSettings(position, m_navigationWidget); } -Core::ICommand *NavigationSubWidget::command(const QString &title) const +Core::Command *NavigationSubWidget::command(const QString &title) const { - const QHash<QString, Core::ICommand*> commandMap = m_parentWidget->commandMap(); - QHash<QString, Core::ICommand*>::const_iterator r = commandMap.find(title); + const QHash<QString, Core::Command*> commandMap = m_parentWidget->commandMap(); + QHash<QString, Core::Command*>::const_iterator r = commandMap.find(title); if (r != commandMap.end()) return r.value(); return 0; @@ -510,7 +510,7 @@ bool NavComboBox::event(QEvent *e) { if (e->type() == QEvent::ToolTip) { QString txt = currentText(); - Core::ICommand *cmd = m_navSubWidget->command(txt); + Core::Command *cmd = m_navSubWidget->command(txt); if (cmd) { txt = tr("Activate %1").arg(txt); setToolTip(cmd->stringWithAppendedShortcut(txt)); diff --git a/src/plugins/coreplugin/navigationwidget.h b/src/plugins/coreplugin/navigationwidget.h index 77dbf43ecefbf1b4286a00035edab062005d9b10..016fbcd0bda2d88c920755a366febb054a263c3b 100644 --- a/src/plugins/coreplugin/navigationwidget.h +++ b/src/plugins/coreplugin/navigationwidget.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -50,7 +50,7 @@ namespace Core { class INavigationWidgetFactory; class IMode; -class ICommand; +class Command; namespace Internal { class NavigationWidget; @@ -99,7 +99,7 @@ public: // Called from the place holders void placeHolderChanged(NavigationWidgetPlaceHolder *holder); - QHash<QString, Core::ICommand*> commandMap() const { return m_commandMap; } + QHash<QString, Core::Command*> commandMap() const { return m_commandMap; } protected: void resizeEvent(QResizeEvent *); @@ -113,7 +113,7 @@ private: NavigationSubWidget *insertSubItem(int position); QList<NavigationSubWidget *> m_subWidgets; QHash<QShortcut *, QString> m_shortcutMap; - QHash<QString, Core::ICommand*> m_commandMap; + QHash<QString, Core::Command*> m_commandMap; bool m_shown; bool m_suppressed; int m_width; @@ -136,7 +136,7 @@ public: void saveSettings(int position); void restoreSettings(int position); - Core::ICommand *command(const QString &title) const; + Core::Command *command(const QString &title) const; signals: void split(); diff --git a/src/plugins/coreplugin/outputpane.cpp b/src/plugins/coreplugin/outputpane.cpp index 6b5c3b146d11580fa68bc299ab7690c1702ee440..36fc9de9cf8b846f7ef31a5436c91a374153c110 100644 --- a/src/plugins/coreplugin/outputpane.cpp +++ b/src/plugins/coreplugin/outputpane.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -37,8 +37,8 @@ #include "mainwindow.h" #include "modemanager.h" -#include <coreplugin/actionmanager/actionmanagerinterface.h> -#include <coreplugin/actionmanager/iactioncontainer.h> +#include <coreplugin/actionmanager/actionmanager.h> +#include <coreplugin/actionmanager/actioncontainer.h> #include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editorgroup.h> @@ -210,11 +210,11 @@ void OutputPane::init(ICore *core, ExtensionSystem::PluginManager *pm) m_pluginManager = pm; m_core = core; - ActionManagerInterface *am = m_core->actionManager(); - IActionContainer *mwindow = am->actionContainer(Constants::M_WINDOW); + ActionManager *am = m_core->actionManager(); + ActionContainer *mwindow = am->actionContainer(Constants::M_WINDOW); // Window->Output Panes - IActionContainer *mpanes = am->createMenu(Constants::M_WINDOW_PANES); + ActionContainer *mpanes = am->createMenu(Constants::M_WINDOW_PANES); mwindow->addMenu(mpanes, Constants::G_WINDOW_PANES); mpanes->menu()->setTitle(tr("Output &Panes")); @@ -252,7 +252,7 @@ void OutputPane::init(ICore *core, ExtensionSystem::PluginManager *pm) actionId.remove(QLatin1Char(' ')); QAction *action = new QAction(outPane->name(), this); - ICommand *cmd = am->registerAction(action, actionId, m_context); + Command *cmd = am->registerAction(action, actionId, m_context); if (outPane->priorityInStatusBar() != -1) { #ifdef Q_OS_MAC cmd->setDefaultKeySequence(QKeySequence("Ctrl+" + QString::number(shortcutNumber))); diff --git a/src/plugins/coreplugin/outputpane.h b/src/plugins/coreplugin/outputpane.h index 096567a8a66cb9553577f5dc148343f6df14ff32..5a7c928a5467e56c6d249308c32c818d68adccc4 100644 --- a/src/plugins/coreplugin/outputpane.h +++ b/src/plugins/coreplugin/outputpane.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/plugindialog.cpp b/src/plugins/coreplugin/plugindialog.cpp index 829c28e9c399c2d21b37853d5e1ae17dd2710945..29ea470411cb43da070515c8c2ebd090f9f88de0 100644 --- a/src/plugins/coreplugin/plugindialog.cpp +++ b/src/plugins/coreplugin/plugindialog.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/plugindialog.h b/src/plugins/coreplugin/plugindialog.h index c264978918be6bae0b564aaf04f611fc1a34a1db..ace03bb3c17c393893623463fc4d5f02ae5cf3ab 100644 --- a/src/plugins/coreplugin/plugindialog.h +++ b/src/plugins/coreplugin/plugindialog.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/progressmanager/futureprogress.cpp b/src/plugins/coreplugin/progressmanager/futureprogress.cpp index 476a80a366764979bdc5619a0ea5f0cacba36031..bfd00ef37b3d05218b9c9055962c0ad4adbf0207 100644 --- a/src/plugins/coreplugin/progressmanager/futureprogress.cpp +++ b/src/plugins/coreplugin/progressmanager/futureprogress.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/progressmanager/futureprogress.h b/src/plugins/coreplugin/progressmanager/futureprogress.h index 8b286dbf21779f8b792258cf90fb35a11af944b5..5f8e5353b3f83afcca80115bc15dd1911a8735e3 100644 --- a/src/plugins/coreplugin/progressmanager/futureprogress.h +++ b/src/plugins/coreplugin/progressmanager/futureprogress.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/progressmanager/progressmanager.cpp b/src/plugins/coreplugin/progressmanager/progressmanager.cpp index aaa5f4406c987fa3907e2a6f854008f610dc6fb9..968d2bb9fc8774a230fcd5fad33ac34b6f271494 100644 --- a/src/plugins/coreplugin/progressmanager/progressmanager.cpp +++ b/src/plugins/coreplugin/progressmanager/progressmanager.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -31,37 +31,36 @@ ** ***************************************************************************/ -#include "progressmanager.h" +#include "progressmanager_p.h" #include "progressview.h" #include "coreimpl.h" #include "baseview.h" #include "coreconstants.h" #include "uniqueidmanager.h" -#include "viewmanagerinterface.h" #include <utils/qtcassert.h> using namespace Core; using namespace Core::Internal; -ProgressManager::ProgressManager(QObject *parent) - : ProgressManagerInterface(parent) +ProgressManagerPrivate::ProgressManagerPrivate(QObject *parent) + : ProgressManager(parent) { m_progressView = new ProgressView; ICore *core = CoreImpl::instance(); connect(core, SIGNAL(coreAboutToClose()), this, SLOT(cancelAllRunningTasks())); } -ProgressManager::~ProgressManager() +ProgressManagerPrivate::~ProgressManagerPrivate() { } -void ProgressManager::init() +void ProgressManagerPrivate::init() { } -void ProgressManager::cancelTasks(const QString &type) +void ProgressManagerPrivate::cancelTasks(const QString &type) { QMap<QFutureWatcher<void> *, QString>::iterator task = m_runningTasks.begin(); while (task != m_runningTasks.end()) { @@ -76,7 +75,7 @@ void ProgressManager::cancelTasks(const QString &type) } } -void ProgressManager::cancelAllRunningTasks() +void ProgressManagerPrivate::cancelAllRunningTasks() { QMap<QFutureWatcher<void> *, QString>::const_iterator task = m_runningTasks.constBegin(); while (task != m_runningTasks.constEnd()) { @@ -88,7 +87,7 @@ void ProgressManager::cancelAllRunningTasks() m_runningTasks.clear(); } -FutureProgress *ProgressManager::addTask(const QFuture<void> &future, const QString &title, const QString &type, PersistentType persistency) +FutureProgress *ProgressManagerPrivate::addTask(const QFuture<void> &future, const QString &title, const QString &type, PersistentType persistency) { QFutureWatcher<void> *watcher = new QFutureWatcher<void>(); m_runningTasks.insert(watcher, type); @@ -97,12 +96,12 @@ FutureProgress *ProgressManager::addTask(const QFuture<void> &future, const QStr return m_progressView->addTask(future, title, type, persistency); } -QWidget *ProgressManager::progressView() +QWidget *ProgressManagerPrivate::progressView() { return m_progressView; } -void ProgressManager::taskFinished() +void ProgressManagerPrivate::taskFinished() { QObject *taskObject = sender(); QTC_ASSERT(taskObject, return); diff --git a/src/plugins/coreplugin/progressmanager/progressmanager.h b/src/plugins/coreplugin/progressmanager/progressmanager.h index 7df78fe26b845b29bef1d160b7c9f8228d4d784a..a82bd24b5179e93ce65fbfc92c617fdb27272740 100644 --- a/src/plugins/coreplugin/progressmanager/progressmanager.h +++ b/src/plugins/coreplugin/progressmanager/progressmanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -34,41 +34,30 @@ #ifndef PROGRESSMANAGER_H #define PROGRESSMANAGER_H -#include "progressmanagerinterface.h" +#include <coreplugin/core_global.h> +#include <coreplugin/progressmanager/futureprogress.h> -#include <QtCore/QPointer> -#include <QtCore/QList> -#include <QtCore/QFutureWatcher> +#include <QtCore/QObject> +#include <QtCore/QFuture> +#include <QtGui/QIcon> namespace Core { -namespace Internal { -class ProgressView; - -class ProgressManager : public Core::ProgressManagerInterface +class CORE_EXPORT ProgressManager : public QObject { Q_OBJECT public: - ProgressManager(QObject *parent = 0); - ~ProgressManager(); - void init(); + enum PersistentType { CloseOnSuccess, KeepOnFinish }; - FutureProgress *addTask(const QFuture<void> &future, const QString &title, const QString &type, PersistentType persistency); + ProgressManager(QObject *parent = 0) : QObject(parent) {} + virtual ~ProgressManager() {} - QWidget *progressView(); + virtual FutureProgress *addTask(const QFuture<void> &future, const QString &title, const QString &type, PersistentType persistency = KeepOnFinish) = 0; public slots: - void cancelTasks(const QString &type); - -private slots: - void taskFinished(); - void cancelAllRunningTasks(); -private: - QPointer<ProgressView> m_progressView; - QMap<QFutureWatcher<void> *, QString> m_runningTasks; + virtual void cancelTasks(const QString &type) = 0; }; -} // namespace Internal } // namespace Core -#endif // PROGRESSMANAGER_H +#endif //PROGRESSMANAGER_H diff --git a/src/plugins/debugger/mode.h b/src/plugins/coreplugin/progressmanager/progressmanager_p.h similarity index 62% rename from src/plugins/debugger/mode.h rename to src/plugins/coreplugin/progressmanager/progressmanager_p.h index 2d64ca6f0727fd3ed81450e09d73178ce85ddcad..92140904b05b0a6aeed1bd35c1f87a8f28b9e2cb 100644 --- a/src/plugins/debugger/mode.h +++ b/src/plugins/coreplugin/progressmanager/progressmanager_p.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -31,55 +31,44 @@ ** ***************************************************************************/ -#ifndef DEBUGGER_DEBUGMODE_H -#define DEBUGGER_DEBUGMODE_H +#ifndef PROGRESSMANAGER_P_H +#define PROGRESSMANAGER_P_H -#include <coreplugin/basemode.h> +#include "progressmanager.h" -#include <QtCore/QList> #include <QtCore/QPointer> +#include <QtCore/QList> +#include <QtCore/QFutureWatcher> -QT_BEGIN_NAMESPACE -class QAction; -class QDockWidget; -class QMainWindow; -class QSettings; -class QSplitter; -class QToolBar; -class QWidget; -QT_END_NAMESPACE - -namespace Debugger { +namespace Core { namespace Internal { -class DebuggerManager; +class ProgressView; -class DebugMode : public Core::BaseMode +class ProgressManagerPrivate : public Core::ProgressManager { Q_OBJECT - public: - DebugMode(DebuggerManager *manager, QObject *parent = 0); - ~DebugMode(); + ProgressManagerPrivate(QObject *parent = 0); + ~ProgressManagerPrivate(); + void init(); - // IMode - void activated(); - void shutdown(); - static QSettings *settings(); + FutureProgress *addTask(const QFuture<void> &future, const QString &title, const QString &type, PersistentType persistency); -private slots: - void focusCurrentEditor(Core::IMode *mode); + QWidget *progressView(); -private: - QToolBar *createToolBar(); - void writeSettings() const; - void readSettings(); +public slots: + void cancelTasks(const QString &type); - QPointer<DebuggerManager> m_manager; - QAction *m_toggleLockedAction; +private slots: + void taskFinished(); + void cancelAllRunningTasks(); +private: + QPointer<ProgressView> m_progressView; + QMap<QFutureWatcher<void> *, QString> m_runningTasks; }; } // namespace Internal -} // namespace Debugger +} // namespace Core -#endif // DEBUGGER_DEBUGMODE_H +#endif // PROGRESSMANAGER_P_H diff --git a/src/plugins/coreplugin/progressmanager/progresspie.cpp b/src/plugins/coreplugin/progressmanager/progresspie.cpp index 620b369c547a8a383d9b6065edd6e473ac629db9..be2a3e124b5f7ed3e5fe3a4206c29ff7e1c0de0b 100644 --- a/src/plugins/coreplugin/progressmanager/progresspie.cpp +++ b/src/plugins/coreplugin/progressmanager/progresspie.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/progressmanager/progresspie.h b/src/plugins/coreplugin/progressmanager/progresspie.h index 1914b51b13bbb649969054919b3fc9005550306c..e878a024ea4af728b7f4c92470bb34dc30f94ce6 100644 --- a/src/plugins/coreplugin/progressmanager/progresspie.h +++ b/src/plugins/coreplugin/progressmanager/progresspie.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/progressmanager/progressview.cpp b/src/plugins/coreplugin/progressmanager/progressview.cpp index a4e686d494b09bfaf1823cfd8900d9437eef8994..cee81c697b0735042f4e2713272d0d3f69e9782d 100644 --- a/src/plugins/coreplugin/progressmanager/progressview.cpp +++ b/src/plugins/coreplugin/progressmanager/progressview.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -62,7 +62,7 @@ ProgressView::~ProgressView() FutureProgress *ProgressView::addTask(const QFuture<void> &future, const QString &title, const QString &type, - ProgressManagerInterface::PersistentType persistency) + ProgressManager::PersistentType persistency) { removeOldTasks(type); if (m_taskList.size() == 3) @@ -73,7 +73,7 @@ FutureProgress *ProgressView::addTask(const QFuture<void> &future, m_layout->insertWidget(0, progress); m_taskList.append(progress); m_type.insert(progress, type); - m_keep.insert(progress, (persistency == ProgressManagerInterface::KeepOnFinish)); + m_keep.insert(progress, (persistency == ProgressManager::KeepOnFinish)); connect(progress, SIGNAL(finished()), this, SLOT(slotFinished())); return progress; } diff --git a/src/plugins/coreplugin/progressmanager/progressview.h b/src/plugins/coreplugin/progressmanager/progressview.h index 455362009cfeccb980b080a05a3a94599fa02f74..939b162639eafbeffe26255abc48547ebbb480b1 100644 --- a/src/plugins/coreplugin/progressmanager/progressview.h +++ b/src/plugins/coreplugin/progressmanager/progressview.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -34,7 +34,7 @@ #ifndef PROGRESSVIEW_H #define PROGRESSVIEW_H -#include "progressmanagerinterface.h" +#include "progressmanager.h" #include <QtCore/QFuture> #include <QtGui/QWidget> @@ -59,7 +59,7 @@ public: FutureProgress *addTask(const QFuture<void> &future, const QString &title, const QString &type, - ProgressManagerInterface::PersistentType persistency); + ProgressManager::PersistentType persistency); private slots: void slotFinished(); diff --git a/src/plugins/coreplugin/rightpane.cpp b/src/plugins/coreplugin/rightpane.cpp index 389afbced919ea7718ca91fd192c8feec9c648d6..69c0e51e18855f8fca0a036662049c2f72c5a224 100644 --- a/src/plugins/coreplugin/rightpane.cpp +++ b/src/plugins/coreplugin/rightpane.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/rightpane.h b/src/plugins/coreplugin/rightpane.h index 84739ab4e66515e247543f9d3ee69fe7ff1ff489..776b9fdb2bb2d5f0fbced29690cb4e795a17749c 100644 --- a/src/plugins/coreplugin/rightpane.h +++ b/src/plugins/coreplugin/rightpane.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/scriptmanager/metatypedeclarations.h b/src/plugins/coreplugin/scriptmanager/metatypedeclarations.h index 6431e4265193248fb396795f09c181bf9f4b3af0..1e068b7cf45a7e0415000264c773ad4313ed4909 100644 --- a/src/plugins/coreplugin/scriptmanager/metatypedeclarations.h +++ b/src/plugins/coreplugin/scriptmanager/metatypedeclarations.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.cpp b/src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.cpp index 03809fdf30e426eea3990c5c1a200d750a3066ec..de98aecb215db2553ffa33f02076333aae205ed8 100644 --- a/src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.cpp +++ b/src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -44,7 +44,6 @@ #include <QtCore/QSettings> #include <QtGui/QMainWindow> -#include <QtGui/QStatusBar> #include <QtGui/QToolBar> #include <QtScript/QScriptEngine> @@ -82,11 +81,6 @@ QMainWindow *CorePrototype::mainWindow() const return callee()->mainWindow(); } -QStatusBar *CorePrototype::statusBar() const -{ - return callee()->statusBar(); -} - QSettings *CorePrototype::settings() const { return callee()->settings(); diff --git a/src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.h b/src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.h index c7eae4a6ed4761629d67a6552ef1ae0db9fd4368..d90030bc9a77d85f12fe88438f99dcdcec3525ff 100644 --- a/src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.h +++ b/src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -55,7 +55,6 @@ class CorePrototype : public QObject, public QScriptable Q_PROPERTY(Core::EditorManager* editorManager READ editorManager DESIGNABLE false SCRIPTABLE true STORED false) Q_PROPERTY(QMainWindow* mainWindow READ mainWindow DESIGNABLE false SCRIPTABLE true STORED false) - Q_PROPERTY(QStatusBar* statusBar READ statusBar DESIGNABLE false SCRIPTABLE true STORED false) Q_PROPERTY(QSettings* settings READ settings DESIGNABLE false SCRIPTABLE true STORED false) public: @@ -68,7 +67,6 @@ public: Core::EditorManager *editorManager() const; QMainWindow *mainWindow() const; - QStatusBar *statusBar() const; QSettings *settings() const; public slots: diff --git a/src/plugins/coreplugin/scriptmanager/scriptmanager.cpp b/src/plugins/coreplugin/scriptmanager/scriptmanager.cpp index 084888c4dd2dc1228f9c16a4cdeab556ec9dfc39..1ac21ca743ce87e60a40629402c20adacf062418 100644 --- a/src/plugins/coreplugin/scriptmanager/scriptmanager.cpp +++ b/src/plugins/coreplugin/scriptmanager/scriptmanager.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -31,7 +31,7 @@ ** ***************************************************************************/ -#include "scriptmanager.h" +#include "scriptmanager_p.h" #include "qworkbench_wrapper.h" #include "metatypedeclarations.h" @@ -177,19 +177,19 @@ static QScriptValue fileBox(QScriptContext *context, QScriptEngine *engine) engine->toScriptValue(rc) : engine->toScriptValue(rc.front()); } -// ------ ScriptManager +// ------ ScriptManagerPrivate namespace Core { namespace Internal { -ScriptManager::ScriptManager(QObject *parent, ICore *core) : - ScriptManagerInterface(parent), +ScriptManagerPrivate::ScriptManagerPrivate(QObject *parent, ICore *core) : + ScriptManager(parent), m_core(core), m_initialized(false) { } -QScriptEngine &ScriptManager::scriptEngine() +QScriptEngine &ScriptManagerPrivate::scriptEngine() { ensureEngineInitialized(); return m_engine; @@ -200,7 +200,7 @@ QScriptEngine &ScriptManager::scriptEngine() // demoProjectExplorer()@:237 // <anonymous>()@:276 // <global>()@:0" -static void parseBackTrace(const QStringList &backTrace, ScriptManager::Stack &stack) +static void parseBackTrace(const QStringList &backTrace, ScriptManagerPrivate::Stack &stack) { const QChar at = QLatin1Char('@'); const QChar colon = QLatin1Char(':'); @@ -213,7 +213,7 @@ static void parseBackTrace(const QStringList &backTrace, ScriptManager::Stack &s if (colonPos == -1) continue; - ScriptManager::StackFrame frame; + ScriptManagerPrivate::StackFrame frame; frame.function = line.left(atPos); frame.fileName = line.mid(atPos + 1, colonPos - atPos - 1); frame.lineNumber = line.right(line.size() - colonPos - 1).toInt(); @@ -221,13 +221,13 @@ static void parseBackTrace(const QStringList &backTrace, ScriptManager::Stack &s } } -bool ScriptManager::runScript(const QString &script, QString *errorMessage) +bool ScriptManagerPrivate::runScript(const QString &script, QString *errorMessage) { Stack stack; return runScript(script, errorMessage, &stack); } -bool ScriptManager::runScript(const QString &script, QString *errorMessage, Stack *stack) +bool ScriptManagerPrivate::runScript(const QString &script, QString *errorMessage, Stack *stack) { ensureEngineInitialized(); stack->clear(); @@ -247,7 +247,7 @@ bool ScriptManager::runScript(const QString &script, QString *errorMessage, Stac return !failed; } -void ScriptManager::ensureEngineInitialized() +void ScriptManagerPrivate::ensureEngineInitialized() { if (m_initialized) return; @@ -304,7 +304,7 @@ void ScriptManager::ensureEngineInitialized() m_initialized = true; } -QString ScriptManager::engineError(QScriptEngine &scriptEngine) +QString ScriptManagerPrivate::engineError(QScriptEngine &scriptEngine) { QScriptValue error = scriptEngine.evaluate(QLatin1String("Error")); if (error.isValid()) diff --git a/src/plugins/coreplugin/scriptmanager/scriptmanager.h b/src/plugins/coreplugin/scriptmanager/scriptmanager.h index 305da45ca3ad282478172232312386ac04e567d7..c39cc21e0a0320e55c2e5c3a0fab1a3aae5087b8 100644 --- a/src/plugins/coreplugin/scriptmanager/scriptmanager.h +++ b/src/plugins/coreplugin/scriptmanager/scriptmanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -34,39 +34,43 @@ #ifndef SCRIPTMANAGER_H #define SCRIPTMANAGER_H -#include <coreplugin/scriptmanager/scriptmanagerinterface.h> -#include <coreplugin/icore.h> +#include <coreplugin/core_global.h> #include <QtCore/QObject> -#include <QtCore/QList> +#include <QtCore/QString> #include <QtScript/QScriptEngine> namespace Core { -namespace Internal { -class ScriptManager : public Core::ScriptManagerInterface +/* Script Manager. + * Provides a script engine that is initialized with + * Qt Creator's interfaces and allows for running scripts. + * @{todo} Should it actually manage script files, too? */ + +class CORE_EXPORT ScriptManager : public QObject { Q_OBJECT - public: - ScriptManager(QObject *parent, ICore *core); - - virtual QScriptEngine &scriptEngine(); - - virtual bool runScript(const QString &script, QString *errorMessage, Stack *stack); - virtual bool runScript(const QString &script, QString *errorMessage); + // A stack frame as returned by a failed invocation (exception) + // fileName may be empty. lineNumber can be 0 for the top frame (goof-up?). + struct StackFrame { + QString function; + QString fileName; + int lineNumber; + }; + typedef QList<StackFrame> Stack; - static QString engineError(QScriptEngine &scriptEngine); + ScriptManager(QObject *parent = 0) : QObject(parent) {} + virtual ~ScriptManager() { } -private: - void ensureEngineInitialized(); + // Access the engine (for plugins to wrap additional interfaces). + virtual QScriptEngine &scriptEngine() = 0; - QScriptEngine m_engine; - ICore *m_core; - bool m_initialized; + // Run a script + virtual bool runScript(const QString &script, QString *errorMessage, Stack *errorStack) = 0; + virtual bool runScript(const QString &script, QString *errorMessage) = 0; }; -} // namespace Internal } // namespace Core #endif // SCRIPTMANAGER_H diff --git a/src/plugins/coreplugin/progressmanager/progressmanagerinterface.h b/src/plugins/coreplugin/scriptmanager/scriptmanager_p.h similarity index 61% rename from src/plugins/coreplugin/progressmanager/progressmanagerinterface.h rename to src/plugins/coreplugin/scriptmanager/scriptmanager_p.h index 8bb55cc96dde77478941c9f3cd1bcb81a4edebd5..40768f0fa9bcc808e199a4291a1695d4da592865 100644 --- a/src/plugins/coreplugin/progressmanager/progressmanagerinterface.h +++ b/src/plugins/coreplugin/scriptmanager/scriptmanager_p.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -31,33 +31,42 @@ ** ***************************************************************************/ -#ifndef PROGRESSMANAGERINTERFACE_H -#define PROGRESSMANAGERINTERFACE_H +#ifndef SCRIPTMANAGER_P_H +#define SCRIPTMANAGER_P_H -#include <coreplugin/core_global.h> -#include <coreplugin/progressmanager/futureprogress.h> +#include <coreplugin/scriptmanager/scriptmanager.h> +#include <coreplugin/icore.h> #include <QtCore/QObject> -#include <QtCore/QFuture> -#include <QtGui/QIcon> +#include <QtCore/QList> +#include <QtScript/QScriptEngine> namespace Core { +namespace Internal { -class CORE_EXPORT ProgressManagerInterface : public QObject +class ScriptManagerPrivate : public Core::ScriptManager { Q_OBJECT + public: - enum PersistentType { CloseOnSuccess, KeepOnFinish }; + ScriptManagerPrivate(QObject *parent, ICore *core); + + virtual QScriptEngine &scriptEngine(); + + virtual bool runScript(const QString &script, QString *errorMessage, Stack *stack); + virtual bool runScript(const QString &script, QString *errorMessage); - ProgressManagerInterface(QObject *parent = 0) : QObject(parent) {} - virtual ~ProgressManagerInterface() {} + static QString engineError(QScriptEngine &scriptEngine); - virtual FutureProgress *addTask(const QFuture<void> &future, const QString &title, const QString &type, PersistentType persistency = KeepOnFinish) = 0; +private: + void ensureEngineInitialized(); -public slots: - virtual void cancelTasks(const QString &type) = 0; + QScriptEngine m_engine; + ICore *m_core; + bool m_initialized; }; +} // namespace Internal } // namespace Core -#endif //PROGRESSMANAGERINTERFACE_H +#endif // SCRIPTMANAGER_P_H diff --git a/src/plugins/coreplugin/sidebar.cpp b/src/plugins/coreplugin/sidebar.cpp index 17887450d9bc5fe1fba312ffecb9252d9d0b5475..b84947d3706945eadfe5b67567be74a8c23f7e7d 100644 --- a/src/plugins/coreplugin/sidebar.cpp +++ b/src/plugins/coreplugin/sidebar.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -35,7 +35,7 @@ #include "imode.h" #include "modemanager.h" -#include "actionmanager/actionmanagerinterface.h" +#include "actionmanager/actionmanager.h" #include <QtCore/QDebug> #include <QtCore/QEvent> @@ -206,12 +206,12 @@ void SideBar::activateItem(SideBarItem *item) item->widget()->setFocus(); } -void SideBar::setShortcutMap(const QMap<QString, Core::ICommand*> &shortcutMap) +void SideBar::setShortcutMap(const QMap<QString, Core::Command*> &shortcutMap) { m_shortcutMap = shortcutMap; } -QMap<QString, Core::ICommand*> SideBar::shortcutMap() const +QMap<QString, Core::Command*> SideBar::shortcutMap() const { return m_shortcutMap; } @@ -341,10 +341,10 @@ void SideBarWidget::setCurrentIndex(int) emit currentWidgetChanged(); } -Core::ICommand *SideBarWidget::command(const QString &title) const +Core::Command *SideBarWidget::command(const QString &title) const { - const QMap<QString, Core::ICommand*> shortcutMap = m_sideBar->shortcutMap(); - QMap<QString, Core::ICommand*>::const_iterator r = shortcutMap.find(title); + const QMap<QString, Core::Command*> shortcutMap = m_sideBar->shortcutMap(); + QMap<QString, Core::Command*>::const_iterator r = shortcutMap.find(title); if (r != shortcutMap.end()) return r.value(); return 0; @@ -361,7 +361,7 @@ bool ComboBox::event(QEvent *e) { if (e->type() == QEvent::ToolTip) { QString txt = currentText(); - Core::ICommand *cmd = m_sideBarWidget->command(txt); + Core::Command *cmd = m_sideBarWidget->command(txt); if (cmd) { txt = tr("Activate %1").arg(txt); setToolTip(cmd->stringWithAppendedShortcut(txt)); diff --git a/src/plugins/coreplugin/sidebar.h b/src/plugins/coreplugin/sidebar.h index dd8e5727c1963b4f1b3ddab169bdf5b651ef65e5..e5b1f9c3afa7656992866706cc6dd984b36ee062 100644 --- a/src/plugins/coreplugin/sidebar.h +++ b/src/plugins/coreplugin/sidebar.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -50,7 +50,7 @@ QT_END_NAMESPACE namespace Core { -class ICommand; +class Command; namespace Internal { class SideBarWidget; @@ -110,8 +110,8 @@ public: void activateItem(SideBarItem *item); - void setShortcutMap(const QMap<QString, Core::ICommand*> &shortcutMap); - QMap<QString, Core::ICommand*> shortcutMap() const; + void setShortcutMap(const QMap<QString, Core::Command*> &shortcutMap); + QMap<QString, Core::Command*> shortcutMap() const; private slots: void split(); @@ -126,7 +126,7 @@ private: QMap<QString, SideBarItem*> m_itemMap; QStringList m_availableItems; QStringList m_defaultVisible; - QMap<QString, Core::ICommand*> m_shortcutMap; + QMap<QString, Core::Command*> m_shortcutMap; }; namespace Internal { @@ -144,7 +144,7 @@ public: void updateAvailableItems(); void removeCurrentItem(); - Core::ICommand *command(const QString &title) const; + Core::Command *command(const QString &title) const; signals: void split(); diff --git a/src/plugins/coreplugin/styleanimator.cpp b/src/plugins/coreplugin/styleanimator.cpp index fa8ccd93de2aa5ccf523f35dd467e116f17a3ac5..f0fda1f512cfa0bbd69fb5b612b3691b1de7f269 100644 --- a/src/plugins/coreplugin/styleanimator.cpp +++ b/src/plugins/coreplugin/styleanimator.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/styleanimator.h b/src/plugins/coreplugin/styleanimator.h index f4b6e9f95ceec3cc01188230ea778dc4d8ce0476..7a75056af5d304fee561cc1ad1775e7688a8d876 100644 --- a/src/plugins/coreplugin/styleanimator.h +++ b/src/plugins/coreplugin/styleanimator.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/stylehelper.cpp b/src/plugins/coreplugin/stylehelper.cpp index 9fcb5180debb066910d2ad9b41c6f49141d59aa9..b102f6e2086c977f699c357f9ba95e6e7819bab5 100644 --- a/src/plugins/coreplugin/stylehelper.cpp +++ b/src/plugins/coreplugin/stylehelper.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/stylehelper.h b/src/plugins/coreplugin/stylehelper.h index ec46f9a1c57678dd1686e0fa2b65d88196e168ae..3a1e8f5b4a2610a2f652742ed37b26073e3dc05b 100644 --- a/src/plugins/coreplugin/stylehelper.h +++ b/src/plugins/coreplugin/stylehelper.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/tabpositionindicator.cpp b/src/plugins/coreplugin/tabpositionindicator.cpp index 2de5da922b7648ebb361c4149f26e3a9aed18b0b..ae292a785a4028f5443dbd0e6e3ccd0ba04ca6ef 100644 --- a/src/plugins/coreplugin/tabpositionindicator.cpp +++ b/src/plugins/coreplugin/tabpositionindicator.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/tabpositionindicator.h b/src/plugins/coreplugin/tabpositionindicator.h index 4c5290596f2761aa8c374040e3f59d7211c879fc..55162cb838f2a7568866478935c12d9d297db2f3 100644 --- a/src/plugins/coreplugin/tabpositionindicator.h +++ b/src/plugins/coreplugin/tabpositionindicator.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/uniqueidmanager.cpp b/src/plugins/coreplugin/uniqueidmanager.cpp index b06d6a7e5901c6491455ca5ca9564c907dbdea1f..475448935b16737ab8c60e11086d410de4df834a 100644 --- a/src/plugins/coreplugin/uniqueidmanager.cpp +++ b/src/plugins/coreplugin/uniqueidmanager.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/uniqueidmanager.h b/src/plugins/coreplugin/uniqueidmanager.h index 1aa8489685b5d4af3a17a1fbd074c7926271c8b2..0a8ed6fcd07febed01adae9713d18773e45fea48 100644 --- a/src/plugins/coreplugin/uniqueidmanager.h +++ b/src/plugins/coreplugin/uniqueidmanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/variablemanager.cpp b/src/plugins/coreplugin/variablemanager.cpp index 9a5c9dd783f90b3d26213d6a2b20f30c6ab454a8..793ca04f1b7861488b5bcbdab0c366554869d709 100644 --- a/src/plugins/coreplugin/variablemanager.cpp +++ b/src/plugins/coreplugin/variablemanager.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/variablemanager.h b/src/plugins/coreplugin/variablemanager.h index 10a0efde9de146565436013ccae801a738769ab6..dc85e8dc3fff9489ddad3346b65e7d51507375bd 100644 --- a/src/plugins/coreplugin/variablemanager.h +++ b/src/plugins/coreplugin/variablemanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/vcsmanager.cpp b/src/plugins/coreplugin/vcsmanager.cpp index c2f18a0b1cd4113d9e285ab6dcef4aa54e948f23..1ac0d698e1a2eac91868abbe38452d5a368c2321 100644 --- a/src/plugins/coreplugin/vcsmanager.cpp +++ b/src/plugins/coreplugin/vcsmanager.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/vcsmanager.h b/src/plugins/coreplugin/vcsmanager.h index 753db77380539cae3d3a0d0b3abcf7e7c1be8d3a..3947fc8cb62f7ec376d877fec9bfe596b4c972fa 100644 --- a/src/plugins/coreplugin/vcsmanager.h +++ b/src/plugins/coreplugin/vcsmanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/versiondialog.cpp b/src/plugins/coreplugin/versiondialog.cpp index 52810c00efcef1730a58ad27b1ef7de6f49f65c1..a61e29e50d7c193bbc2e922e2aaec0e06b1ad084 100644 --- a/src/plugins/coreplugin/versiondialog.cpp +++ b/src/plugins/coreplugin/versiondialog.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -76,7 +76,7 @@ VersionDialog::VersionDialog(QWidget *parent) #endif "<br/>" "<br/>" - "Copyright 2006-%3 %4. All rights reserved.<br/>" + "Copyright 2008-%3 %4. All rights reserved.<br/>" "<br/>" "The program is provided AS IS with NO WARRANTY OF ANY KIND, " "INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A " diff --git a/src/plugins/coreplugin/versiondialog.h b/src/plugins/coreplugin/versiondialog.h index c7ba26db0e9bb95ad18735af452a6360c0e35ba4..bfa61f1d52d833c006dc5c02469558e14f88cd78 100644 --- a/src/plugins/coreplugin/versiondialog.h +++ b/src/plugins/coreplugin/versiondialog.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/viewmanager.cpp b/src/plugins/coreplugin/viewmanager.cpp index 5032d45b4d486a2964a26d5ee153d8f556fc6c4e..0db47634729ce9fb4d0b584f6bcc4dfd1b1efa32 100644 --- a/src/plugins/coreplugin/viewmanager.cpp +++ b/src/plugins/coreplugin/viewmanager.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -38,8 +38,8 @@ #include "uniqueidmanager.h" #include "iview.h" -#include <coreplugin/actionmanager/actionmanagerinterface.h> -#include <coreplugin/actionmanager/icommand.h> +#include <coreplugin/actionmanager/actionmanager.h> +#include <coreplugin/actionmanager/command.h> #include <extensionsystem/ExtensionSystemInterfaces> #include <aggregation/aggregate.h> diff --git a/src/plugins/coreplugin/viewmanager.h b/src/plugins/coreplugin/viewmanager.h index c22e68d891d04bfd5dc79f77b4f460b8607e9b1e..80d24ed775cecdc6f45fb72c5d08117e706ddd70 100644 --- a/src/plugins/coreplugin/viewmanager.h +++ b/src/plugins/coreplugin/viewmanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/viewmanagerinterface.h b/src/plugins/coreplugin/viewmanagerinterface.h index 0eb21187ccb9396483fc080f93c899273c318caa..24813cc9414afe87bc2a605a063baf9ad385a3fa 100644 --- a/src/plugins/coreplugin/viewmanagerinterface.h +++ b/src/plugins/coreplugin/viewmanagerinterface.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/welcomemode.cpp b/src/plugins/coreplugin/welcomemode.cpp index a0f5f98b998b00affdc00e2caec1f5ab118e17a7..ee66ac7f33c2add780914a40d774df0d1f2ee1da 100644 --- a/src/plugins/coreplugin/welcomemode.cpp +++ b/src/plugins/coreplugin/welcomemode.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/coreplugin/welcomemode.h b/src/plugins/coreplugin/welcomemode.h index 05ba96c3eee4fd37b5ffa4d1c125d03c37984f47..bcd205072f854cd9bdf7580616f6e94219720bd2 100644 --- a/src/plugins/coreplugin/welcomemode.h +++ b/src/plugins/coreplugin/welcomemode.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cpaster/cpasterplugin.cpp b/src/plugins/cpaster/cpasterplugin.cpp index 548c48be7d3fd1b1e7e059867c488476a6eefd9c..1ab4daa0a4a9f3b8602aa7ddf8be9aaa5cfcecce 100644 --- a/src/plugins/cpaster/cpasterplugin.cpp +++ b/src/plugins/cpaster/cpasterplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -43,7 +43,7 @@ #include <coreplugin/filemanager.h> #include <coreplugin/messagemanager.h> #include <coreplugin/uniqueidmanager.h> -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/editormanager/editormanager.h> #include <texteditor/itexteditor.h> #include <coreplugin/messageoutputwindow.h> @@ -95,17 +95,17 @@ bool CodepasterPlugin::initialize(const QStringList &arguments, QString *error_m addObject(m_settingsPage); //register actions - Core::ActionManagerInterface *actionManager = gCoreInstance->actionManager(); + Core::ActionManager *actionManager = gCoreInstance->actionManager(); - Core::IActionContainer *toolsContainer = + Core::ActionContainer *toolsContainer = actionManager->actionContainer(Core::Constants::M_TOOLS); - Core::IActionContainer *cpContainer = + Core::ActionContainer *cpContainer = actionManager->createMenu(QLatin1String("CodePaster")); cpContainer->menu()->setTitle(tr("&CodePaster")); toolsContainer->addMenu(cpContainer); - Core::ICommand *command; + Core::Command *command; m_postAction = new QAction(tr("Paste snippet..."), this); command = actionManager->registerAction(m_postAction, "CodePaster.post", globalcontext); diff --git a/src/plugins/cpaster/cpasterplugin.h b/src/plugins/cpaster/cpasterplugin.h index 9940df0840c35990de989d76daeb651a07911681..b6694be562cde0cfb401f3e00b02d091da9566fc 100644 --- a/src/plugins/cpaster/cpasterplugin.h +++ b/src/plugins/cpaster/cpasterplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cpaster/settingspage.cpp b/src/plugins/cpaster/settingspage.cpp index af35e7e576d07a75c81082ae2775ad6cb84269d4..333630636178df33155ff3acdab70eb3b7cb0fb7 100644 --- a/src/plugins/cpaster/settingspage.cpp +++ b/src/plugins/cpaster/settingspage.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -86,11 +86,8 @@ QWidget *SettingsPage::createPage(QWidget *parent) return w; } -void SettingsPage::finished(bool accepted) +void SettingsPage::apply() { - if (!accepted) - return; - m_username = m_ui.userEdit->text(); m_server = QUrl(m_ui.serverEdit->text()); m_copy = m_ui.clipboardBox->isChecked(); diff --git a/src/plugins/cpaster/settingspage.h b/src/plugins/cpaster/settingspage.h index 9f2b4b25f7bc9b83a3492460d81605cb0cc5f076..a492030752c7ec8b6b9f5c7b32cb2c395adab66e 100644 --- a/src/plugins/cpaster/settingspage.h +++ b/src/plugins/cpaster/settingspage.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -59,7 +59,8 @@ public: QString trCategory() const; QWidget *createPage(QWidget *parent); - void finished(bool accepted); + void apply(); + void finish() { } QString username() const; QUrl serverUrl() const; diff --git a/src/plugins/cppeditor/cppclasswizard.cpp b/src/plugins/cppeditor/cppclasswizard.cpp index 4ecb56b884c00210367432658d65d7849ea50e45..ecdcc110197a22d4a02ba8eff9da4bf7b3d1bbcb 100644 --- a/src/plugins/cppeditor/cppclasswizard.cpp +++ b/src/plugins/cppeditor/cppclasswizard.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cppeditor/cppclasswizard.h b/src/plugins/cppeditor/cppclasswizard.h index 177d8a1fbb1176a67381f9c5f841aa7e125959b2..b117dc7ad09ee2717f15cf2c89b8fed18e3dd257 100644 --- a/src/plugins/cppeditor/cppclasswizard.h +++ b/src/plugins/cppeditor/cppclasswizard.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index 1eb298aa3780571abe1d91afbbc85bd926aa09ac..c8e9a946b9095fd38ba564124df23ac85a21d5b7 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -55,7 +55,7 @@ #include <coreplugin/icore.h> #include <coreplugin/uniqueidmanager.h> -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/editormanager/ieditor.h> #include <coreplugin/editormanager/editormanager.h> #include <projectexplorer/projectexplorerconstants.h> @@ -657,7 +657,7 @@ void CPPEditor::contextMenuEvent(QContextMenuEvent *e) if (lastAction->menu() && QLatin1String(lastAction->menu()->metaObject()->className()) == QLatin1String("QUnicodeControlCharacterMenu")) menu->removeAction(lastAction); - Core::IActionContainer *mcontext = + Core::ActionContainer *mcontext = m_core->actionManager()->actionContainer(CppEditor::Constants::M_CONTEXT); QMenu *contextMenu = mcontext->menu(); diff --git a/src/plugins/cppeditor/cppeditor.h b/src/plugins/cppeditor/cppeditor.h index 3667b5d6f7f217e063b44423e9d86b0d92d3d012..6773a5308ae783b50a6593dec0ef0a0af6a0ab9b 100644 --- a/src/plugins/cppeditor/cppeditor.h +++ b/src/plugins/cppeditor/cppeditor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cppeditor/cppeditor_global.h b/src/plugins/cppeditor/cppeditor_global.h index c1d8f32db723a8e8aa574f503cfdb2e94623c7be..dad179aea73617b37424fcfcadb570fc2fe8f19d 100644 --- a/src/plugins/cppeditor/cppeditor_global.h +++ b/src/plugins/cppeditor/cppeditor_global.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cppeditor/cppeditoractionhandler.cpp b/src/plugins/cppeditor/cppeditoractionhandler.cpp index 4eb4543a679ce88f30234b9cc39c9ee136d55d67..f8f2510523b08a11da301d8d78f9744bbf5d3a42 100644 --- a/src/plugins/cppeditor/cppeditoractionhandler.cpp +++ b/src/plugins/cppeditor/cppeditoractionhandler.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cppeditor/cppeditoractionhandler.h b/src/plugins/cppeditor/cppeditoractionhandler.h index 6a0391c1e8a27d0acad6377b4f0d7e8c3490dd7d..12428c3343e7147c600e19ffbfa910f49991a469 100644 --- a/src/plugins/cppeditor/cppeditoractionhandler.h +++ b/src/plugins/cppeditor/cppeditoractionhandler.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cppeditor/cppeditorconstants.h b/src/plugins/cppeditor/cppeditorconstants.h index 96359b0bb658b6d7b9a4fe6eaf206be12903a8da..f0c7bff4c340cdaaff00f01edfdc87c56681e63a 100644 --- a/src/plugins/cppeditor/cppeditorconstants.h +++ b/src/plugins/cppeditor/cppeditorconstants.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cppeditor/cppeditorenums.h b/src/plugins/cppeditor/cppeditorenums.h index 07398bac9d47ffa7b485eeee10b59af15fe76ce8..9b4ce75c0d79554ba8e76a7c8c29a9ca1971c6f0 100644 --- a/src/plugins/cppeditor/cppeditorenums.h +++ b/src/plugins/cppeditor/cppeditorenums.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cppeditor/cppfilewizard.cpp b/src/plugins/cppeditor/cppfilewizard.cpp index df464aa576fe4e8bbf1f801a00d82cd3a506d1aa..d65fed176691080ab0b2c8f577459da6057e578c 100644 --- a/src/plugins/cppeditor/cppfilewizard.cpp +++ b/src/plugins/cppeditor/cppfilewizard.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cppeditor/cppfilewizard.h b/src/plugins/cppeditor/cppfilewizard.h index adb94d911f4cf40b6debeb08b1f1c4168152e339..51c91d9465ce1c13dfa8d8956ac5de5eb70cccb3 100644 --- a/src/plugins/cppeditor/cppfilewizard.h +++ b/src/plugins/cppeditor/cppfilewizard.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cppeditor/cpphighlighter.cpp b/src/plugins/cppeditor/cpphighlighter.cpp index 0eb3b67e69b2af87274a9342f109cfd93926bd30..f7d12b0add73802f385266e0c3fd7cf5260d3ce0 100644 --- a/src/plugins/cppeditor/cpphighlighter.cpp +++ b/src/plugins/cppeditor/cpphighlighter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cppeditor/cpphighlighter.h b/src/plugins/cppeditor/cpphighlighter.h index 3df54c26acbfae9e86ef5d21fcf30b725a6465af..3c74460e653ebd31669b2d8e021cb1950ba2a4c4 100644 --- a/src/plugins/cppeditor/cpphighlighter.h +++ b/src/plugins/cppeditor/cpphighlighter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cppeditor/cpphoverhandler.cpp b/src/plugins/cppeditor/cpphoverhandler.cpp index 6ebf51b2a2c0ad8f989e836181dd9c934a2d1654..febf86f6510624f69cf3a45b6a14f65b27741ef1 100644 --- a/src/plugins/cppeditor/cpphoverhandler.cpp +++ b/src/plugins/cppeditor/cpphoverhandler.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cppeditor/cpphoverhandler.h b/src/plugins/cppeditor/cpphoverhandler.h index d8bd48031c394b728e738f59bad64a9361d489b7..27daccc35d7e40c490842047408ac75e387a443f 100644 --- a/src/plugins/cppeditor/cpphoverhandler.h +++ b/src/plugins/cppeditor/cpphoverhandler.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cppeditor/cppplugin.cpp b/src/plugins/cppeditor/cppplugin.cpp index c30bc97f29d7d77c2ba1d94eca5de145d72e2bf2..077bea902745043c8ddf9ac5617891b27060779a 100644 --- a/src/plugins/cppeditor/cppplugin.cpp +++ b/src/plugins/cppeditor/cppplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -44,8 +44,8 @@ #include <coreplugin/mimedatabase.h> #include <coreplugin/uniqueidmanager.h> #include <coreplugin/fileiconprovider.h> -#include <coreplugin/actionmanager/actionmanagerinterface.h> -#include <coreplugin/actionmanager/icommand.h> +#include <coreplugin/actionmanager/actionmanager.h> +#include <coreplugin/actionmanager/command.h> #include <coreplugin/editormanager/editormanager.h> #include <texteditor/completionsupport.h> #include <texteditor/fontsettings.h> @@ -194,10 +194,10 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess QList<int> context; context << m_core->uniqueIDManager()->uniqueIdentifier(CppEditor::Constants::C_CPPEDITOR); - Core::ActionManagerInterface *am = m_core->actionManager(); + Core::ActionManager *am = m_core->actionManager(); am->createMenu(CppEditor::Constants::M_CONTEXT); - Core::ICommand *cmd; + Core::Command *cmd; QAction *jumpToDefinition = new QAction(tr("Follow Symbol under Cursor"), this); cmd = am->registerAction(jumpToDefinition, diff --git a/src/plugins/cppeditor/cppplugin.h b/src/plugins/cppeditor/cppplugin.h index 42dae09c6f6bb97e8c505bd68204ef63275e3d2a..52655e6ae7060c40a46972c61e5afd5828949310 100644 --- a/src/plugins/cppeditor/cppplugin.h +++ b/src/plugins/cppeditor/cppplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cpptools/completionsettingspage.cpp b/src/plugins/cpptools/completionsettingspage.cpp index a885f45e06d054058bd85a6db8c887a65ca4a5d0..589b1b399e48e63058a54faa28cdf34ebac92f3d 100644 --- a/src/plugins/cpptools/completionsettingspage.cpp +++ b/src/plugins/cpptools/completionsettingspage.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -78,11 +78,8 @@ QWidget *CompletionSettingsPage::createPage(QWidget *parent) return w; } -void CompletionSettingsPage::finished(bool accepted) +void CompletionSettingsPage::apply() { - if (!accepted) - return; - m_completion->setCaseSensitivity( m_page->caseSensitive->isChecked() ? Qt::CaseSensitive : Qt::CaseInsensitive); m_completion->setAutoInsertBraces(m_page->autoInsertBraces->isChecked()); diff --git a/src/plugins/cpptools/completionsettingspage.h b/src/plugins/cpptools/completionsettingspage.h index b241ccd3b121196e8824ab0a0eb87d9bb6b3644a..c59ed87e17d78bd5769cde9af662121db1329fce 100644 --- a/src/plugins/cpptools/completionsettingspage.h +++ b/src/plugins/cpptools/completionsettingspage.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -56,7 +56,8 @@ public: QString trCategory() const; QWidget *createPage(QWidget *parent); - void finished(bool accepted); + void apply(); + void finish() { } private: CppCodeCompletion *m_completion; diff --git a/src/plugins/cpptools/cppclassesfilter.cpp b/src/plugins/cpptools/cppclassesfilter.cpp index 04c3bffd87b486a6813af8106d7d57ed91f1b01e..212db82700bf7e0754257d3dc9b5a0b16b53e8f6 100644 --- a/src/plugins/cpptools/cppclassesfilter.cpp +++ b/src/plugins/cpptools/cppclassesfilter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cpptools/cppclassesfilter.h b/src/plugins/cpptools/cppclassesfilter.h index 9cf52ac6829538a167077ae0058aa7fd7d729b11..a84931d64c74241ff37a5a604b3d48e5d4f01ef8 100644 --- a/src/plugins/cpptools/cppclassesfilter.h +++ b/src/plugins/cpptools/cppclassesfilter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cpptools/cppcodecompletion.cpp b/src/plugins/cpptools/cppcodecompletion.cpp index 2cd859ecb9e4e18a15a2c163792d2ed9ac58b5da..573c9a254666d5b803efb479e4a60eee8b87ab83 100644 --- a/src/plugins/cpptools/cppcodecompletion.cpp +++ b/src/plugins/cpptools/cppcodecompletion.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -77,7 +77,7 @@ namespace Internal { class FunctionArgumentWidget : public QLabel { public: FunctionArgumentWidget(Core::ICore *core); - void showFunctionHint(Function *functionSymbol); + void showFunctionHint(Function *functionSymbol, const Snapshot &snapshot); protected: bool eventFilter(QObject *obj, QEvent *e); @@ -94,6 +94,7 @@ private: QFrame *m_popupFrame; Function *m_item; + Snapshot m_snapshot; }; class ConvertToCompletionItem: protected NameVisitor @@ -212,9 +213,11 @@ FunctionArgumentWidget::FunctionArgumentWidget(Core::ICore *core) setMargin(1); } -void FunctionArgumentWidget::showFunctionHint(Function *functionSymbol) +void FunctionArgumentWidget::showFunctionHint(Function *functionSymbol, + const Snapshot &snapshot) { m_item = functionSymbol; + m_snapshot = snapshot; m_startpos = m_editor->position(); // update the text @@ -762,7 +765,7 @@ bool CppCodeCompletion::completeScope(const QList<TypeOfExpression::Result> &res void CppCodeCompletion::addKeywords() { // keyword completion items. - for (int i = T_FIRST_KEYWORD; i < T_FIRST_QT_KEYWORD; ++i) { + for (int i = T_FIRST_KEYWORD; i < T_FIRST_OBJC_AT_KEYWORD; ++i) { TextEditor::CompletionItem item(this); item.m_text = QLatin1String(Token::name(i)); item.m_icon = m_icons.keywordIcon(); @@ -913,7 +916,7 @@ bool CppCodeCompletion::completeQtMethod(CPlusPlus::FullySpecifiedType, if (TextEditor::CompletionItem item = toCompletionItem(fun)) { unsigned count = fun->argumentCount(); while (true) { - TextEditor::CompletionItem i = item; + TextEditor::CompletionItem ci = item; QString signature; signature += overview.prettyName(fun->name()); @@ -934,8 +937,8 @@ bool CppCodeCompletion::completeQtMethod(CPlusPlus::FullySpecifiedType, if (! signatures.contains(signature)) { signatures.insert(signature); - i.m_text = signature; // fix the completion item. - m_completions.append(i); + ci.m_text = signature; // fix the completion item. + m_completions.append(ci); } if (count && fun->argumentAt(count - 1)->asArgument()->hasInitializer()) @@ -1023,7 +1026,7 @@ void CppCodeCompletion::complete(const TextEditor::CompletionItem &item) QTC_ASSERT(function, return); m_functionArgumentWidget = new FunctionArgumentWidget(m_core); - m_functionArgumentWidget->showFunctionHint(function); + m_functionArgumentWidget->showFunctionHint(function, typeOfExpression.snapshot()); } } else if (m_completionOperator == T_SIGNAL || m_completionOperator == T_SLOT) { QString toInsert = item.m_text; diff --git a/src/plugins/cpptools/cppcodecompletion.h b/src/plugins/cpptools/cppcodecompletion.h index 5720adbbc513473e90ee9de973b615c08297514f..6d4690babca9df92419fc8d5c3ab543128bf205d 100644 --- a/src/plugins/cpptools/cppcodecompletion.h +++ b/src/plugins/cpptools/cppcodecompletion.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cpptools/cppfunctionsfilter.cpp b/src/plugins/cpptools/cppfunctionsfilter.cpp index 3bf2137dff6ee3b6ae7423d0ca71e17e3d0d34ad..f9b031c68aed2fcba35daac49142ecea446e87df 100644 --- a/src/plugins/cpptools/cppfunctionsfilter.cpp +++ b/src/plugins/cpptools/cppfunctionsfilter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cpptools/cppfunctionsfilter.h b/src/plugins/cpptools/cppfunctionsfilter.h index f8476001d72a6e19f31b0fb4792ce11b749b2b5f..43145c95b49fbf3f6e99bb0c4e8a66d29d6e4d6b 100644 --- a/src/plugins/cpptools/cppfunctionsfilter.h +++ b/src/plugins/cpptools/cppfunctionsfilter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp index df611294751d5e2d5dab55339751a675035273bc..49e7cbfc7dbc324c316ace319977ff99468406b1 100644 --- a/src/plugins/cpptools/cppmodelmanager.cpp +++ b/src/plugins/cpptools/cppmodelmanager.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -606,7 +606,7 @@ QFuture<void> CppModelManager::refreshSourceFiles(const QStringList &sourceFiles if (sourceFiles.count() > 1) { m_core->progressManager()->addTask(result, tr("Indexing"), CppTools::Constants::TASK_INDEX, - Core::ProgressManagerInterface::CloseOnSuccess); + Core::ProgressManager::CloseOnSuccess); } return result; } diff --git a/src/plugins/cpptools/cppmodelmanager.h b/src/plugins/cpptools/cppmodelmanager.h index 570ee58f451e660d46188e0ea99c8b4bc84fe670..361c714fee793d9c9a6b35af47c74f63af7a46e8 100644 --- a/src/plugins/cpptools/cppmodelmanager.h +++ b/src/plugins/cpptools/cppmodelmanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cpptools/cppmodelmanagerinterface.h b/src/plugins/cpptools/cppmodelmanagerinterface.h index 0247c9c514e6bd3fd814cd8e2e800747818ea3ba..ca1c57f86355a185a042a7bd4b4ef1828c79a7e5 100644 --- a/src/plugins/cpptools/cppmodelmanagerinterface.h +++ b/src/plugins/cpptools/cppmodelmanagerinterface.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cpptools/cppquickopenfilter.cpp b/src/plugins/cpptools/cppquickopenfilter.cpp index 03bd8d78bb220f93cf1404f9ebb20cfb2c41c7b0..135876cf7d7f98d3b9c11527bfc9a3db9da04283 100644 --- a/src/plugins/cpptools/cppquickopenfilter.cpp +++ b/src/plugins/cpptools/cppquickopenfilter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cpptools/cppquickopenfilter.h b/src/plugins/cpptools/cppquickopenfilter.h index b867194f6895068f0ede3050fab5511646523b8c..d52aee62ba6019af386d68a8bdc422a87ceef8a9 100644 --- a/src/plugins/cpptools/cppquickopenfilter.h +++ b/src/plugins/cpptools/cppquickopenfilter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cpptools/cpptools_global.h b/src/plugins/cpptools/cpptools_global.h index 7b63a15b81356bab6f9ce9fe3d8dc320c41a2f76..1793c738769dce96c7fb0c062f889aff80f7e697 100644 --- a/src/plugins/cpptools/cpptools_global.h +++ b/src/plugins/cpptools/cpptools_global.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cpptools/cpptoolsconstants.h b/src/plugins/cpptools/cpptoolsconstants.h index 8279eef501d8edcf0ee00fdb79226fe3bec10829..42a0def4d6a5f390d1792139e46fa89393bd2407 100644 --- a/src/plugins/cpptools/cpptoolsconstants.h +++ b/src/plugins/cpptools/cpptoolsconstants.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cpptools/cpptoolseditorsupport.cpp b/src/plugins/cpptools/cpptoolseditorsupport.cpp index 73e34e411327a0de114ff7bf4fc6252298c8352b..5a907a2d175be003c0efa7e662df93b3b2714f00 100644 --- a/src/plugins/cpptools/cpptoolseditorsupport.cpp +++ b/src/plugins/cpptools/cpptoolseditorsupport.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cpptools/cpptoolseditorsupport.h b/src/plugins/cpptools/cpptoolseditorsupport.h index 042e5dcd1cfb3f82d9a49f010cdcdaf75de78694..2bce101e5231b84dc78bdc8c98c418352cc236af 100644 --- a/src/plugins/cpptools/cpptoolseditorsupport.h +++ b/src/plugins/cpptools/cpptoolseditorsupport.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cpptools/cpptoolsplugin.cpp b/src/plugins/cpptools/cpptoolsplugin.cpp index 866a3d05c9460e2ced1d283ba86ea0707f470edf..5ec67bf4a35fcfbb01341044b29c075e82dd457c 100644 --- a/src/plugins/cpptools/cpptoolsplugin.cpp +++ b/src/plugins/cpptools/cpptoolsplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -45,7 +45,7 @@ #include <coreplugin/mimedatabase.h> #include <coreplugin/coreconstants.h> #include <coreplugin/uniqueidmanager.h> -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/editormanager/editormanager.h> #include <cppeditor/cppeditorconstants.h> @@ -81,7 +81,7 @@ CppToolsPlugin::~CppToolsPlugin() bool CppToolsPlugin::initialize(const QStringList & /*arguments*/, QString *) { m_core = ExtensionSystem::PluginManager::instance()->getObject<Core::ICore>(); - Core::ActionManagerInterface *am = m_core->actionManager(); + Core::ActionManager *am = m_core->actionManager(); // Objects m_modelManager = new CppModelManager(this); @@ -96,8 +96,8 @@ bool CppToolsPlugin::initialize(const QStringList & /*arguments*/, QString *) addAutoReleasedObject(new CompletionSettingsPage(m_completion)); // Menus - Core::IActionContainer *mtools = am->actionContainer(Core::Constants::M_TOOLS); - Core::IActionContainer *mcpptools = am->createMenu(CppTools::Constants::M_TOOLS_CPP); + Core::ActionContainer *mtools = am->actionContainer(Core::Constants::M_TOOLS); + Core::ActionContainer *mcpptools = am->createMenu(CppTools::Constants::M_TOOLS_CPP); QMenu *menu = mcpptools->menu(); menu->setTitle(tr("&C++")); menu->setEnabled(true); @@ -108,7 +108,7 @@ bool CppToolsPlugin::initialize(const QStringList & /*arguments*/, QString *) QList<int> context = QList<int>() << m_context; QAction *switchAction = new QAction(tr("Switch Header/Source"), this); - Core::ICommand *command = am->registerAction(switchAction, Constants::SWITCH_HEADER_SOURCE, context); + Core::Command *command = am->registerAction(switchAction, Constants::SWITCH_HEADER_SOURCE, context); command->setDefaultKeySequence(QKeySequence(Qt::Key_F4)); mcpptools->addAction(command); connect(switchAction, SIGNAL(triggered()), this, SLOT(switchHeaderSource())); diff --git a/src/plugins/cpptools/cpptoolsplugin.h b/src/plugins/cpptools/cpptoolsplugin.h index 39af36e86f1dd92a675c086c6e6c6744eb3229b4..a55630e6c04072dce00aa3c5fd83096b042e9f6f 100644 --- a/src/plugins/cpptools/cpptoolsplugin.h +++ b/src/plugins/cpptools/cpptoolsplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cpptools/searchsymbols.cpp b/src/plugins/cpptools/searchsymbols.cpp index 1d555fd626540e850039d5f86e5da619a40f4c02..9e5c11607720a2cf8a9cfab8453f9dce661036d5 100644 --- a/src/plugins/cpptools/searchsymbols.cpp +++ b/src/plugins/cpptools/searchsymbols.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/cpptools/searchsymbols.h b/src/plugins/cpptools/searchsymbols.h index e3cba1f30fd5ff9451b3da6907a0471e974e82f0..9e4fd1c2529710d43dd0f2fdc2c663abd8b766c3 100644 --- a/src/plugins/cpptools/searchsymbols.h +++ b/src/plugins/cpptools/searchsymbols.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/attachexternaldialog.cpp b/src/plugins/debugger/attachexternaldialog.cpp index 7ca50470fb5fda62c6431f8cc860c81573906439..5177605ac817288830f19fbbdbfe48f9ed603362 100644 --- a/src/plugins/debugger/attachexternaldialog.cpp +++ b/src/plugins/debugger/attachexternaldialog.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/attachexternaldialog.h b/src/plugins/debugger/attachexternaldialog.h index d04d1bd61b5db05ac79f9d0832861ac80c6414e8..83e5fbdc88b996c3fe89df500a3fad1d016651ac 100644 --- a/src/plugins/debugger/attachexternaldialog.h +++ b/src/plugins/debugger/attachexternaldialog.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/attachremotedialog.cpp b/src/plugins/debugger/attachremotedialog.cpp index e13d7b6ebc294424e8531750607a418254de3ba6..f7868bab0da8d3775daeb0a4bc98bb328a0fb072 100644 --- a/src/plugins/debugger/attachremotedialog.cpp +++ b/src/plugins/debugger/attachremotedialog.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/attachremotedialog.h b/src/plugins/debugger/attachremotedialog.h index 5e0bee93490e3b4a94c2584a44bf0ca59ca2f66a..7558284f04cd9fb1f863db17323cfc45cb315874 100644 --- a/src/plugins/debugger/attachremotedialog.h +++ b/src/plugins/debugger/attachremotedialog.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp index 7f8d48da732709eb265e9a6812eb841c5280cf4f..a03586e55e2e5523712e9d1c667a20cba8f4e2a8 100644 --- a/src/plugins/debugger/breakhandler.cpp +++ b/src/plugins/debugger/breakhandler.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/breakhandler.h b/src/plugins/debugger/breakhandler.h index 9d4c82ec2053527421d8d7454059f438294b6715..31c24d352f2448628c4a06dceadf31b92fe28a7d 100644 --- a/src/plugins/debugger/breakhandler.h +++ b/src/plugins/debugger/breakhandler.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/breakwindow.cpp b/src/plugins/debugger/breakwindow.cpp index a86f1b2e8271211f9022d335402812fae2a5cf5a..16ff2bcfd6249a466f062d5849dd6c7bc874aca0 100644 --- a/src/plugins/debugger/breakwindow.cpp +++ b/src/plugins/debugger/breakwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/breakwindow.h b/src/plugins/debugger/breakwindow.h index 1db2175e8bb5f48488d82b0aead45fe90b41ac12..4915b7fc5fa0c13ad19d28d08fa00ce91996423f 100644 --- a/src/plugins/debugger/breakwindow.h +++ b/src/plugins/debugger/breakwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/debugger.pro b/src/plugins/debugger/debugger.pro index b47e7d5ee02613d1c99f6bdace60c88d68a4ca7a..c9256caaa5fc9ae7efe4d9ffdda918999f44131a 100644 --- a/src/plugins/debugger/debugger.pro +++ b/src/plugins/debugger/debugger.pro @@ -22,7 +22,6 @@ HEADERS += attachexternaldialog.h \ debuggeroutputwindow.h \ debuggerplugin.h \ debuggerrunner.h \ - mode.h \ disassemblerhandler.h \ disassemblerwindow.h \ gdbengine.h \ @@ -52,7 +51,6 @@ SOURCES += attachexternaldialog.cpp \ debuggeroutputwindow.cpp \ debuggerplugin.cpp \ debuggerrunner.cpp \ - mode.cpp \ disassemblerhandler.cpp \ disassemblerwindow.cpp \ gdbengine.cpp \ diff --git a/src/plugins/debugger/debuggerconstants.h b/src/plugins/debugger/debuggerconstants.h index 5215870976a8b16e3cf8f121affb64a3e6ff6007..7cec9b8ba5925a951b7ddb4de01b7f175f915a05 100644 --- a/src/plugins/debugger/debuggerconstants.h +++ b/src/plugins/debugger/debuggerconstants.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -50,9 +50,7 @@ const char * const NEXT = "Debugger.NextLine"; const char * const STEPI = "Debugger.StepInstruction"; const char * const NEXTI = "Debugger.NextInstruction"; -const char * const M_VIEW_DEBUG = "Debugger.Menu.View.Debug"; -const char * const G_DEBUG = "Debugger.Group.Debug"; -const char * const G_VIEW_DEBUG = "Debugger.Group.View.Debug"; +const char * const M_DEBUG_VIEWS = "Debugger.Menu.View.Debug"; const char * const C_GDBDEBUGGER = "Gdb Debugger"; const char * const GDBRUNNING = "Gdb.Running"; diff --git a/src/plugins/debugger/debuggermanager.cpp b/src/plugins/debugger/debuggermanager.cpp index 2d6def04da4a4716ea99d07530f52b61f22ad2c8..f268fbb3dda787ac4341b42d0fde49cb762ade8d 100644 --- a/src/plugins/debugger/debuggermanager.cpp +++ b/src/plugins/debugger/debuggermanager.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -483,11 +483,6 @@ IDebuggerManagerAccessForEngines *DebuggerManager::engineInterface() return dynamic_cast<IDebuggerManagerAccessForEngines *>(this); } -IDebuggerManagerAccessForDebugMode *DebuggerManager::debugModeInterface() -{ - return dynamic_cast<IDebuggerManagerAccessForDebugMode *>(this); -} - void DebuggerManager::createDockWidgets() { QSplitter *localsAndWatchers = new QSplitter(Qt::Vertical, 0); diff --git a/src/plugins/debugger/debuggermanager.h b/src/plugins/debugger/debuggermanager.h index 4ae7e66a87de3a62dde005ca909a3395119b332c..bde8ce449b17d386beb670129bc487b5397a3bdf 100644 --- a/src/plugins/debugger/debuggermanager.h +++ b/src/plugins/debugger/debuggermanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -180,32 +180,12 @@ private: }; -// -// IDebuggerManagerAccessForDebugMode -// - -class IDebuggerManagerAccessForDebugMode -{ -public: - virtual ~IDebuggerManagerAccessForDebugMode() {} - -private: - friend class DebugMode; - - virtual QWidget *threadsWindow() const = 0; - virtual QLabel *statusLabel() const = 0; - virtual QList<QDockWidget*> dockWidgets() const = 0; - virtual void createDockWidgets() = 0; -}; - - // // DebuggerManager // class DebuggerManager : public QObject, - public IDebuggerManagerAccessForEngines, - public IDebuggerManagerAccessForDebugMode + public IDebuggerManagerAccessForEngines { Q_OBJECT @@ -214,7 +194,6 @@ public: ~DebuggerManager(); IDebuggerManagerAccessForEngines *engineInterface(); - IDebuggerManagerAccessForDebugMode *debugModeInterface(); QMainWindow *mainWindow() const { return m_mainWindow; } QLabel *statusLabel() const { return m_statusLabel; } diff --git a/src/plugins/debugger/debuggeroutputwindow.cpp b/src/plugins/debugger/debuggeroutputwindow.cpp index 6818ee9620b01c4b8f2835c4a12abc344782c43f..3a8afcde2aafb30fead47bae981aacb759f320a5 100644 --- a/src/plugins/debugger/debuggeroutputwindow.cpp +++ b/src/plugins/debugger/debuggeroutputwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/debuggeroutputwindow.h b/src/plugins/debugger/debuggeroutputwindow.h index d530d501e4bec5047393c43caf91aefddcb7e8e0..5df743923a6eb75602a09f7088dae470ea5160ba 100644 --- a/src/plugins/debugger/debuggeroutputwindow.h +++ b/src/plugins/debugger/debuggeroutputwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index d65f9ac9acd8f1831b5ae37fb98e34be50295b02..80acb59b92f2036dffcb3ad6a8dfaa940a00cd45 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -38,14 +38,19 @@ #include "debuggerrunner.h" #include "gdboptionpage.h" #include "gdbengine.h" -#include "mode.h" -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> +#include <coreplugin/basemode.h> #include <coreplugin/coreconstants.h> #include <coreplugin/editormanager/editormanager.h> +#include <coreplugin/findplaceholder.h> #include <coreplugin/icore.h> #include <coreplugin/messagemanager.h> +#include <coreplugin/minisplitter.h> #include <coreplugin/modemanager.h> +#include <coreplugin/navigationwidget.h> +#include <coreplugin/outputpane.h> +#include <coreplugin/rightpane.h> #include <coreplugin/uniqueidmanager.h> #include <cplusplus/ExpressionUnderCursor.h> @@ -68,17 +73,18 @@ #include <QtCore/QSettings> #include <QtCore/QtPlugin> +#include <QtGui/QDockWidget> +#include <QtGui/QMainWindow> #include <QtGui/QPlainTextEdit> #include <QtGui/QTextBlock> #include <QtGui/QTextCursor> -using namespace Debugger::Internal; -using namespace Debugger::Constants; -using namespace TextEditor; using namespace Core; +using namespace Debugger::Constants; +using namespace Debugger::Internal; using namespace ProjectExplorer; -using namespace CPlusPlus; +using namespace TextEditor; namespace Debugger { @@ -137,6 +143,41 @@ const char * const ADD_TO_WATCH_KEY = "Ctrl+Alt+Q"; } // namespace Debugger +namespace Debugger { +namespace Internal { + +class DebugMode : public Core::BaseMode +{ + Q_OBJECT + +public: + DebugMode(QObject *parent = 0); + ~DebugMode(); + + // IMode + void activated() {} + void shutdown() {} +}; + +} // namespace Internal +} // namespace Debugger + +DebugMode::DebugMode(QObject *parent) + : BaseMode(parent) +{ + setName(tr("Debug")); + setUniqueModeName(Constants::MODE_DEBUG); + setIcon(QIcon(":/fancyactionbar/images/mode_Debug.png")); + setPriority(Constants::P_MODE_DEBUG); +} + +DebugMode::~DebugMode() +{ + // Make sure the editor manager does not get deleted + EditorManager::instance()->setParent(0); +} + + /////////////////////////////////////////////////////////////////////// // // LocationMark @@ -171,6 +212,7 @@ QIcon LocationMark::icon() const return icon; } + /////////////////////////////////////////////////////////////////////// // // DebuggerPlugin @@ -183,11 +225,17 @@ DebuggerPlugin::DebuggerPlugin() m_generalOptionPage = 0; m_locationMark = 0; m_manager = 0; + m_debugMode = 0; } DebuggerPlugin::~DebuggerPlugin() {} +static QSettings *settings() +{ + return ExtensionSystem::PluginManager::instance()->getObject<ICore>()->settings(); +} + void DebuggerPlugin::shutdown() { if (m_debugMode) @@ -196,6 +244,8 @@ void DebuggerPlugin::shutdown() if (m_manager) m_manager->shutdown(); + writeSettings(); + //qDebug() << "DebuggerPlugin::~DebuggerPlugin"; removeObject(m_debugMode); removeObject(m_generalOptionPage); @@ -227,8 +277,8 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *error_mes ICore *core = m_pm->getObject<Core::ICore>(); QTC_ASSERT(core, return false); - Core::ActionManagerInterface *actionManager = core->actionManager(); - QTC_ASSERT(actionManager, return false); + Core::ActionManager *am = core->actionManager(); + QTC_ASSERT(am, return false); Core::UniqueIDManager *uidm = core->uniqueIDManager(); QTC_ASSERT(uidm, return false); @@ -256,151 +306,176 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *error_mes connect(m_breakpointMarginAction, SIGNAL(triggered()), this, SLOT(breakpointMarginActionTriggered())); - //Core::IActionContainer *mcppcontext = - // actionManager->actionContainer(CppEditor::Constants::M_CONTEXT); + //Core::ActionContainer *mcppcontext = + // am->actionContainer(CppEditor::Constants::M_CONTEXT); - Core::IActionContainer *mdebug = - actionManager->actionContainer(ProjectExplorer::Constants::M_DEBUG); + Core::ActionContainer *mdebug = + am->actionContainer(ProjectExplorer::Constants::M_DEBUG); - Core::ICommand *cmd = 0; - cmd = actionManager->registerAction(m_manager->m_startExternalAction, + Core::Command *cmd = 0; + cmd = am->registerAction(m_manager->m_startExternalAction, Constants::STARTEXTERNAL, globalcontext); mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE); #ifndef Q_OS_WIN - cmd = actionManager->registerAction(m_manager->m_attachExternalAction, + cmd = am->registerAction(m_manager->m_attachExternalAction, Constants::ATTACHEXTERNAL, globalcontext); mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE); #endif - cmd = actionManager->registerAction(m_manager->m_continueAction, + cmd = am->registerAction(m_manager->m_continueAction, ProjectExplorer::Constants::DEBUG, QList<int>()<< m_gdbRunningContext); - cmd = actionManager->registerAction(m_manager->m_stopAction, + cmd = am->registerAction(m_manager->m_stopAction, Constants::INTERRUPT, globalcontext); - cmd->setAttribute(Core::ICommand::CA_UpdateText); - cmd->setAttribute(Core::ICommand::CA_UpdateIcon); + cmd->setAttribute(Core::Command::CA_UpdateText); + cmd->setAttribute(Core::Command::CA_UpdateIcon); cmd->setDefaultKeySequence(QKeySequence(Constants::INTERRUPT_KEY)); cmd->setDefaultText(tr("Stop Debugger/Interrupt Debugger")); mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE); - cmd = actionManager->registerAction(m_manager->m_resetAction, + cmd = am->registerAction(m_manager->m_resetAction, Constants::RESET, globalcontext); - cmd->setAttribute(Core::ICommand::CA_UpdateText); + cmd->setAttribute(Core::Command::CA_UpdateText); cmd->setDefaultKeySequence(QKeySequence(Constants::RESET_KEY)); cmd->setDefaultText(tr("Reset Debugger")); //disabled mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE); QAction *sep = new QAction(this); sep->setSeparator(true); - cmd = actionManager->registerAction(sep, - QLatin1String("GdbDebugger.Sep1"), globalcontext); + cmd = am->registerAction(sep, QLatin1String("Debugger.Sep1"), globalcontext); mdebug->addAction(cmd); - cmd = actionManager->registerAction(m_manager->m_nextAction, + cmd = am->registerAction(m_manager->m_nextAction, Constants::NEXT, debuggercontext); cmd->setDefaultKeySequence(QKeySequence(Constants::NEXT_KEY)); mdebug->addAction(cmd); - cmd = actionManager->registerAction(m_manager->m_stepAction, + cmd = am->registerAction(m_manager->m_stepAction, Constants::STEP, debuggercontext); cmd->setDefaultKeySequence(QKeySequence(Constants::STEP_KEY)); mdebug->addAction(cmd); - cmd = actionManager->registerAction(m_manager->m_stepOutAction, + cmd = am->registerAction(m_manager->m_stepOutAction, Constants::STEPOUT, debuggercontext); cmd->setDefaultKeySequence(QKeySequence(Constants::STEPOUT_KEY)); mdebug->addAction(cmd); - cmd = actionManager->registerAction(m_manager->m_nextIAction, + cmd = am->registerAction(m_manager->m_nextIAction, Constants::NEXTI, debuggercontext); cmd->setDefaultKeySequence(QKeySequence(Constants::NEXTI_KEY)); mdebug->addAction(cmd); - cmd = actionManager->registerAction(m_manager->m_stepIAction, + cmd = am->registerAction(m_manager->m_stepIAction, Constants::STEPI, debuggercontext); cmd->setDefaultKeySequence(QKeySequence(Constants::STEPI_KEY)); mdebug->addAction(cmd); - cmd = actionManager->registerAction(m_manager->m_runToLineAction, + cmd = am->registerAction(m_manager->m_runToLineAction, Constants::RUN_TO_LINE, debuggercontext); cmd->setDefaultKeySequence(QKeySequence(Constants::RUN_TO_LINE_KEY)); mdebug->addAction(cmd); - cmd = actionManager->registerAction(m_manager->m_runToFunctionAction, + cmd = am->registerAction(m_manager->m_runToFunctionAction, Constants::RUN_TO_FUNCTION, debuggercontext); cmd->setDefaultKeySequence(QKeySequence(Constants::RUN_TO_FUNCTION_KEY)); mdebug->addAction(cmd); - cmd = actionManager->registerAction(m_manager->m_jumpToLineAction, + cmd = am->registerAction(m_manager->m_jumpToLineAction, Constants::JUMP_TO_LINE, debuggercontext); mdebug->addAction(cmd); sep = new QAction(this); sep->setSeparator(true); - cmd = actionManager->registerAction(sep, - QLatin1String("GdbDebugger.Sep3"), globalcontext); + cmd = am->registerAction(sep, QLatin1String("Debugger.Sep3"), globalcontext); mdebug->addAction(cmd); - cmd = actionManager->registerAction(m_manager->m_breakAction, + cmd = am->registerAction(m_manager->m_breakAction, Constants::TOGGLE_BREAK, cppeditorcontext); cmd->setDefaultKeySequence(QKeySequence(Constants::TOGGLE_BREAK_KEY)); mdebug->addAction(cmd); //mcppcontext->addAction(cmd); - cmd = actionManager->registerAction(m_manager->m_breakByFunctionAction, + cmd = am->registerAction(m_manager->m_breakByFunctionAction, Constants::BREAK_BY_FUNCTION, globalcontext); mdebug->addAction(cmd); - cmd = actionManager->registerAction(m_manager->m_breakAtMainAction, + cmd = am->registerAction(m_manager->m_breakAtMainAction, Constants::BREAK_AT_MAIN, globalcontext); mdebug->addAction(cmd); sep = new QAction(this); sep->setSeparator(true); - cmd = actionManager->registerAction(sep, - QLatin1String("GdbDebugger.Sep2"), globalcontext); + cmd = am->registerAction(sep, QLatin1String("Debugger.Sep2"), globalcontext); mdebug->addAction(cmd); - cmd = actionManager->registerAction(m_manager->m_skipKnownFramesAction, + cmd = am->registerAction(m_manager->m_skipKnownFramesAction, Constants::SKIP_KNOWN_FRAMES, globalcontext); mdebug->addAction(cmd); - cmd = actionManager->registerAction(m_manager->m_useCustomDumpersAction, + cmd = am->registerAction(m_manager->m_useCustomDumpersAction, Constants::USE_CUSTOM_DUMPERS, globalcontext); mdebug->addAction(cmd); - cmd = actionManager->registerAction(m_manager->m_useFastStartAction, + cmd = am->registerAction(m_manager->m_useFastStartAction, Constants::USE_FAST_START, globalcontext); mdebug->addAction(cmd); - cmd = actionManager->registerAction(m_manager->m_useToolTipsAction, + cmd = am->registerAction(m_manager->m_useToolTipsAction, Constants::USE_TOOL_TIPS, globalcontext); mdebug->addAction(cmd); #ifdef QT_DEBUG - cmd = actionManager->registerAction(m_manager->m_dumpLogAction, + cmd = am->registerAction(m_manager->m_dumpLogAction, Constants::DUMP_LOG, globalcontext); //cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+D,Ctrl+L"))); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+F11"))); mdebug->addAction(cmd); - cmd = actionManager->registerAction(m_manager->m_debugDumpersAction, + cmd = am->registerAction(m_manager->m_debugDumpersAction, Constants::DEBUG_DUMPERS, debuggercontext); mdebug->addAction(cmd); #endif sep = new QAction(this); sep->setSeparator(true); - cmd = actionManager->registerAction(sep, - QLatin1String("GdbDebugger.Sep4"), globalcontext); + cmd = am->registerAction(sep, QLatin1String("Debugger.Sep4"), globalcontext); mdebug->addAction(cmd); - cmd = actionManager->registerAction(m_manager->m_watchAction, + cmd = am->registerAction(m_manager->m_watchAction, Constants::ADD_TO_WATCH, cppeditorcontext); //cmd->setDefaultKeySequence(QKeySequence(tr("ALT+D,ALT+W"))); mdebug->addAction(cmd); + // Views menu + cmd = am->registerAction(sep, QLatin1String("Debugger.Sep5"), globalcontext); + mdebug->addAction(cmd); + ActionContainer *viewsMenu = am->createMenu(Constants::M_DEBUG_VIEWS); + QMenu *m = viewsMenu->menu(); + m->setEnabled(true); + m->setTitle(tr("&Views")); + mdebug->addMenu(viewsMenu, Core::Constants::G_DEFAULT_THREE); + + m_toggleLockedAction = new QAction(tr("Locked"), this); + m_toggleLockedAction->setCheckable(true); + m_toggleLockedAction->setChecked(true); + connect(m_toggleLockedAction, SIGNAL(toggled(bool)), + m_manager, SLOT(setLocked(bool))); + foreach (QDockWidget *dockWidget, m_manager->dockWidgets()) { + cmd = am->registerAction(dockWidget->toggleViewAction(), + "Debugger." + dockWidget->objectName(), debuggercontext); + viewsMenu->addAction(cmd); + //m->addAction(dockWidget->toggleViewAction()); + } + m->addSeparator(); + m->addAction(m_toggleLockedAction); + m->addSeparator(); + + QAction *resetToSimpleAction = viewsMenu->menu()->addAction(tr("Reset to default layout")); + connect(resetToSimpleAction, SIGNAL(triggered()), + m_manager, SLOT(setSimpleDockWidgetArrangement())); + + m_generalOptionPage = 0; // FIXME: @@ -409,12 +484,98 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *error_mes m_locationMark = 0; - m_debugMode = new DebugMode(m_manager, this); + + // + // Debug mode setup + // + m_debugMode = new DebugMode(this); //addAutoReleasedObject(m_debugMode); - addObject(m_debugMode); addAutoReleasedObject(new DebuggerRunner(m_manager)); + QList<int> context; + context.append(uidm->uniqueIdentifier(Core::Constants::C_EDITORMANAGER)); + context.append(uidm->uniqueIdentifier(Debugger::Constants::C_GDBDEBUGGER)); + context.append(uidm->uniqueIdentifier(Core::Constants::C_NAVIGATION_PANE)); + m_debugMode->setContext(context); + + QBoxLayout *editorHolderLayout = new QVBoxLayout; + editorHolderLayout->setMargin(0); + editorHolderLayout->setSpacing(0); + editorHolderLayout->addWidget(new EditorManagerPlaceHolder(m_debugMode)); + editorHolderLayout->addWidget(new FindToolBarPlaceHolder(m_debugMode)); + + QWidget *editorAndFindWidget = new QWidget; + editorAndFindWidget->setLayout(editorHolderLayout); + + MiniSplitter *rightPaneSplitter = new MiniSplitter; + rightPaneSplitter->addWidget(editorAndFindWidget); + rightPaneSplitter->addWidget(new RightPanePlaceHolder(m_debugMode)); + rightPaneSplitter->setStretchFactor(0, 1); + rightPaneSplitter->setStretchFactor(1, 0); + + QWidget *centralWidget = new QWidget; + + m_manager->mainWindow()->setCentralWidget(centralWidget); + + MiniSplitter *splitter = new MiniSplitter; + splitter->addWidget(m_manager->mainWindow()); + splitter->addWidget(new OutputPanePlaceHolder(m_debugMode)); + splitter->setStretchFactor(0, 10); + splitter->setStretchFactor(1, 0); + splitter->setOrientation(Qt::Vertical); + + MiniSplitter *splitter2 = new MiniSplitter; + splitter2 = new MiniSplitter; + splitter2->addWidget(new NavigationWidgetPlaceHolder(m_debugMode)); + splitter2->addWidget(splitter); + splitter2->setStretchFactor(0, 0); + splitter2->setStretchFactor(1, 1); + + m_debugMode->setWidget(splitter2); + + QToolBar *debugToolBar = new QToolBar; + debugToolBar->addAction(am->command(ProjectExplorer::Constants::DEBUG)->action()); + debugToolBar->addAction(am->command(Constants::INTERRUPT)->action()); + debugToolBar->addAction(am->command(Constants::NEXT)->action()); + debugToolBar->addAction(am->command(Constants::STEP)->action()); + debugToolBar->addAction(am->command(Constants::STEPOUT)->action()); + debugToolBar->addSeparator(); + debugToolBar->addAction(am->command(Constants::STEPI)->action()); + debugToolBar->addAction(am->command(Constants::NEXTI)->action()); + debugToolBar->addSeparator(); + debugToolBar->addWidget(new QLabel(tr("Threads:"))); + + QComboBox *threadBox = new QComboBox; + threadBox->setModel(m_manager->threadsModel()); + connect(threadBox, SIGNAL(activated(int)), + m_manager->threadsWindow(), SIGNAL(threadSelected(int))); + debugToolBar->addWidget(threadBox); + debugToolBar->addWidget(m_manager->statusLabel()); + + QWidget *stretch = new QWidget; + stretch->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum); + debugToolBar->addWidget(stretch); + + QBoxLayout *toolBarAddingLayout = new QVBoxLayout(centralWidget); + toolBarAddingLayout->setMargin(0); + toolBarAddingLayout->setSpacing(0); + toolBarAddingLayout->addWidget(rightPaneSplitter); + toolBarAddingLayout->addWidget(debugToolBar); + + m_manager->createDockWidgets(); + m_manager->setSimpleDockWidgetArrangement(); + readSettings(); + + connect(ModeManager::instance(), SIGNAL(currentModeChanged(Core::IMode*)), + this, SLOT(focusCurrentEditor(Core::IMode*))); + m_debugMode->widget()->setFocusProxy(EditorManager::instance()); + addObject(m_debugMode); + + // + // Connections + // + // ProjectExplorer connect(projectExplorer()->session(), SIGNAL(sessionLoaded()), m_manager, SLOT(sessionLoaded())); @@ -567,7 +728,7 @@ void DebuggerPlugin::showToolTip(TextEditor::ITextEditor *editor, tc.movePosition(QTextCursor::EndOfWord); // Fetch the expression's code. - ExpressionUnderCursor expressionUnderCursor; + CPlusPlus::ExpressionUnderCursor expressionUnderCursor; expr = expressionUnderCursor(tc); } //qDebug() << " TOOLTIP EXPR " << expr; @@ -595,13 +756,13 @@ void DebuggerPlugin::querySessionValue(const QString &name, QVariant *value) void DebuggerPlugin::setConfigValue(const QString &name, const QVariant &value) { QTC_ASSERT(m_debugMode, return); - m_debugMode->settings()->setValue(name, value); + settings()->setValue(name, value); } void DebuggerPlugin::queryConfigValue(const QString &name, QVariant *value) { QTC_ASSERT(m_debugMode, return); - *value = m_debugMode->settings()->value(name); + *value = settings()->value(name); } void DebuggerPlugin::resetLocation() @@ -636,6 +797,37 @@ void DebuggerPlugin::changeStatus(int status) } } +void DebuggerPlugin::writeSettings() const +{ + QSettings *s = settings(); + QTC_ASSERT(m_manager, return); + QTC_ASSERT(m_manager->mainWindow(), return); + s->beginGroup(QLatin1String("DebugMode")); + s->setValue(QLatin1String("State"), m_manager->mainWindow()->saveState()); + s->setValue(QLatin1String("Locked"), m_toggleLockedAction->isChecked()); + s->endGroup(); +} + +void DebuggerPlugin::readSettings() +{ + QSettings *s = settings(); + s->beginGroup(QLatin1String("DebugMode")); + m_manager->mainWindow()->restoreState(s->value(QLatin1String("State"), QByteArray()).toByteArray()); + m_toggleLockedAction->setChecked(s->value(QLatin1String("Locked"), true).toBool()); + s->endGroup(); +} + +void DebuggerPlugin::focusCurrentEditor(IMode *mode) +{ + if (mode != m_debugMode) + return; + + EditorManager *editorManager = EditorManager::instance(); + + if (editorManager->currentEditor()) + editorManager->currentEditor()->widget()->setFocus(); +} + #include "debuggerplugin.moc" Q_EXPORT_PLUGIN(DebuggerPlugin) diff --git a/src/plugins/debugger/debuggerplugin.h b/src/plugins/debugger/debuggerplugin.h index 6dbc64ee74c8ea22b743c99eb2e62e8b0f88c8e4..53f8490cfc3562084f168f95569f45e633a4d0e4 100644 --- a/src/plugins/debugger/debuggerplugin.h +++ b/src/plugins/debugger/debuggerplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -90,8 +90,12 @@ private slots: void gotoLocation(const QString &fileName, int line, bool setMarker); void breakpointMarginActionTriggered(); + void focusCurrentEditor(Core::IMode *mode); private: + void readSettings(); + void writeSettings() const; + friend class DebuggerManager; friend class DebugMode; // FIXME: Just a hack now so that it can access the views @@ -108,6 +112,7 @@ private: int m_gdbRunningContext; QAction *m_breakpointMarginAction; + QAction *m_toggleLockedAction; int m_breakpointMarginActionLineNumber; QString m_breakpointMarginActionFileName; }; diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp index e3e8728fde890a6095531892fa7004307588992b..45eecd6514e5919d3142043353c5bb721143d5bb 100644 --- a/src/plugins/debugger/debuggerrunner.cpp +++ b/src/plugins/debugger/debuggerrunner.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/debuggerrunner.h b/src/plugins/debugger/debuggerrunner.h index 94ccddf8d1407551a7fd7012df371937b91ad91e..c10a84e479513583acbc5c642f78edb7ff30f24e 100644 --- a/src/plugins/debugger/debuggerrunner.h +++ b/src/plugins/debugger/debuggerrunner.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/disassemblerhandler.cpp b/src/plugins/debugger/disassemblerhandler.cpp index c3ddd5fa5061e89656debb95f4ecb9028bb90e32..ff935dabfdfe2b972b85d5a609bcd2dda2f329c3 100644 --- a/src/plugins/debugger/disassemblerhandler.cpp +++ b/src/plugins/debugger/disassemblerhandler.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/disassemblerhandler.h b/src/plugins/debugger/disassemblerhandler.h index 0074be9217f1c8b00388f6feafbbb14bf7bebc9c..106b414eeb14fa2c8cf1f088618e3406b7e49839 100644 --- a/src/plugins/debugger/disassemblerhandler.h +++ b/src/plugins/debugger/disassemblerhandler.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/disassemblerwindow.cpp b/src/plugins/debugger/disassemblerwindow.cpp index f23cd1b7a90e55baaf06844d12fdef22302abc4c..4545965e88b209baa5ed0d4c4397c42fcdfe885a 100644 --- a/src/plugins/debugger/disassemblerwindow.cpp +++ b/src/plugins/debugger/disassemblerwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/disassemblerwindow.h b/src/plugins/debugger/disassemblerwindow.h index 28b49eb93d4c1b2a938861f506c7b765c598e08c..925081003d3133a9ac8be7dd10717baf5b433a5c 100644 --- a/src/plugins/debugger/disassemblerwindow.h +++ b/src/plugins/debugger/disassemblerwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/gdbengine.cpp b/src/plugins/debugger/gdbengine.cpp index fa6f9ab32508631d983ec65eff7a216d7c94c5ae..3190d1612a385fdd32b3ffdb300d5ddabfd4bd31 100644 --- a/src/plugins/debugger/gdbengine.cpp +++ b/src/plugins/debugger/gdbengine.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/gdbengine.h b/src/plugins/debugger/gdbengine.h index 000c0b84a952d88313066a76e56578c842fd147d..f5a7c658b762804edce91cf32cf5d87ccc54cb4e 100644 --- a/src/plugins/debugger/gdbengine.h +++ b/src/plugins/debugger/gdbengine.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/gdbmi.cpp b/src/plugins/debugger/gdbmi.cpp index 5f20b217317230f428ad53dfd38bc7838c16cfdf..88060d7b350fe4cea36e805ff69faf5a8ce45dca 100644 --- a/src/plugins/debugger/gdbmi.cpp +++ b/src/plugins/debugger/gdbmi.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/gdbmi.h b/src/plugins/debugger/gdbmi.h index dbe2ef73c37b5cac4fdd0ef5cc014398723d1ce4..0e6c36e9756af2ee04dcf00a41234f5529130e15 100644 --- a/src/plugins/debugger/gdbmi.h +++ b/src/plugins/debugger/gdbmi.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/gdboptionpage.cpp b/src/plugins/debugger/gdboptionpage.cpp index efbb959fcf0874854d0b0c1b28a45c1b3db2f965..7c7a2700b6a560db0b854ce1f8e3eefc95e14ae2 100644 --- a/src/plugins/debugger/gdboptionpage.cpp +++ b/src/plugins/debugger/gdboptionpage.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -122,11 +122,8 @@ void GdbOptionPage::onScriptFileChanged() m_settings->m_scriptFile = m_ui.scriptFileChooser->path(); } -void GdbOptionPage::finished(bool accepted) +void GdbOptionPage::apply() { - if (!accepted) - return; - m_settings->m_gdbCmd = m_ui.gdbLocationChooser->path(); m_settings->m_gdbEnv = m_ui.environmentEdit->text(); m_settings->m_autoRun = m_ui.autoStartBox->isChecked(); diff --git a/src/plugins/debugger/gdboptionpage.h b/src/plugins/debugger/gdboptionpage.h index bb48d9e3492d0ab36e0121ba82480b874fdf4550..c4c3ade9e31d60e881af9d2e6e091ad30decc674 100644 --- a/src/plugins/debugger/gdboptionpage.h +++ b/src/plugins/debugger/gdboptionpage.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -59,7 +59,8 @@ public: QString trCategory() const; QWidget *createPage(QWidget *parent); - void finished(bool accepted); + void apply(); + void finish() { } public slots: void onGdbLocationChanged(); diff --git a/src/plugins/debugger/gdbtypemacros.cpp b/src/plugins/debugger/gdbtypemacros.cpp index 26d7aebf44148cb516dcc187547f12184dda0108..d392a836f0e82961c0f32bfcd997c1c7e159a607 100644 --- a/src/plugins/debugger/gdbtypemacros.cpp +++ b/src/plugins/debugger/gdbtypemacros.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/idebuggerengine.h b/src/plugins/debugger/idebuggerengine.h index 5ab4ce066bcf95ac918cebb46f5d4bdd9919efb3..50fbafda5593731781a1b273c5be506a3de38b2e 100644 --- a/src/plugins/debugger/idebuggerengine.h +++ b/src/plugins/debugger/idebuggerengine.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/imports.h b/src/plugins/debugger/imports.h index 644067d4f35842c7fc50da92b0468c380f62fdfe..fa8e7413f86d1a284c6ee8f05c7fd0032dcd1496 100644 --- a/src/plugins/debugger/imports.h +++ b/src/plugins/debugger/imports.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/mode.cpp b/src/plugins/debugger/mode.cpp deleted file mode 100644 index 4499414858306e24ce626fda72518dd0f7946394..0000000000000000000000000000000000000000 --- a/src/plugins/debugger/mode.cpp +++ /dev/null @@ -1,239 +0,0 @@ -/*************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** -** Non-Open Source Usage -** -** Licensees may use this file in accordance with the Qt Beta Version -** License Agreement, Agreement version 2.2 provided with the Software or, -** alternatively, in accordance with the terms contained in a written -** agreement between you and Nokia. -** -** GNU General Public License Usage -** -** Alternatively, this file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the packaging -** of this file. Please review the following information to ensure GNU -** General Public Licensing requirements will be met: -** -** http://www.fsf.org/licensing/licenses/info/GPLv2.html and -** http://www.gnu.org/copyleft/gpl.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt GPL Exception -** version 1.3, included in the file GPL_EXCEPTION.txt in this package. -** -***************************************************************************/ - -#include "mode.h" - -#include "debuggerconstants.h" -#include "debuggermanager.h" - -#include <coreplugin/coreconstants.h> -#include <coreplugin/icore.h> -#include <coreplugin/modemanager.h> -#include <coreplugin/uniqueidmanager.h> -#include <coreplugin/actionmanager/actionmanagerinterface.h> -#include <coreplugin/editormanager/editormanager.h> -#include <coreplugin/minisplitter.h> -#include <coreplugin/findplaceholder.h> -#include <coreplugin/outputpane.h> -#include <coreplugin/navigationwidget.h> -#include <coreplugin/rightpane.h> - -#include <projectexplorer/projectexplorerconstants.h> - -#include <utils/qtcassert.h> - -#include <QtCore/QDebug> -#include <QtCore/QSettings> - -#include <QtGui/QDockWidget> -#include <QtGui/QLabel> -#include <QtGui/QMainWindow> -#include <QtGui/QVBoxLayout> -#include <QtGui/QWidget> - -using namespace Core; -using namespace ExtensionSystem; -using namespace Debugger; -using namespace Debugger::Internal; -using namespace Debugger::Constants; - - -DebugMode::DebugMode(DebuggerManager *manager, QObject *parent) - : BaseMode(tr("Debug"), Constants::MODE_DEBUG, - QIcon(":/fancyactionbar/images/mode_Debug.png"), - Constants::P_MODE_DEBUG, 0, parent), - m_manager(manager) -{ - IDebuggerManagerAccessForDebugMode *managerAccess = - m_manager->debugModeInterface(); - UniqueIDManager *uidm = - PluginManager::instance()->getObject<ICore>()->uniqueIDManager(); - QList<int> context; - context.append(uidm->uniqueIdentifier(Core::Constants::C_EDITORMANAGER)); - context.append(uidm->uniqueIdentifier(Constants::C_GDBDEBUGGER)); - context.append(uidm->uniqueIdentifier(Core::Constants::C_NAVIGATION_PANE)); - setContext(context); - - QBoxLayout *editorHolderLayout = new QVBoxLayout; - editorHolderLayout->setMargin(0); - editorHolderLayout->setSpacing(0); - editorHolderLayout->addWidget(new EditorManagerPlaceHolder(this)); - editorHolderLayout->addWidget(new FindToolBarPlaceHolder(this)); - - QWidget *editorAndFindWidget = new QWidget; - editorAndFindWidget->setLayout(editorHolderLayout); - - MiniSplitter *rightPaneSplitter = new MiniSplitter; - rightPaneSplitter->addWidget(editorAndFindWidget); - rightPaneSplitter->addWidget(new RightPanePlaceHolder(this)); - rightPaneSplitter->setStretchFactor(0, 1); - rightPaneSplitter->setStretchFactor(1, 0); - - QWidget *centralWidget = new QWidget; - QBoxLayout *toolBarAddingLayout = new QVBoxLayout(centralWidget); - toolBarAddingLayout->setMargin(0); - toolBarAddingLayout->setSpacing(0); - toolBarAddingLayout->addWidget(rightPaneSplitter); - - m_manager->mainWindow()->setCentralWidget(centralWidget); - - MiniSplitter *splitter = new MiniSplitter; - splitter->addWidget(m_manager->mainWindow()); - splitter->addWidget(new OutputPanePlaceHolder(this)); - splitter->setStretchFactor(0, 10); - splitter->setStretchFactor(1, 0); - splitter->setOrientation(Qt::Vertical); - - MiniSplitter *splitter2 = new MiniSplitter; - splitter2 = new MiniSplitter; - splitter2->addWidget(new NavigationWidgetPlaceHolder(this)); - splitter2->addWidget(splitter); - splitter2->setStretchFactor(0, 0); - splitter2->setStretchFactor(1, 1); - - setWidget(splitter2); - - QToolBar *toolBar = createToolBar(); - toolBarAddingLayout->addWidget(toolBar); - - managerAccess->createDockWidgets(); - m_manager->setSimpleDockWidgetArrangement(); - readSettings(); - - connect(ModeManager::instance(), SIGNAL(currentModeChanged(Core::IMode*)), - this, SLOT(focusCurrentEditor(Core::IMode*))); - widget()->setFocusProxy(EditorManager::instance()); -} - -DebugMode::~DebugMode() -{ - // Make sure the editor manager does not get deleted - EditorManager::instance()->setParent(0); -} - -void DebugMode::shutdown() -{ - writeSettings(); -} - -QToolBar *DebugMode::createToolBar() -{ - IDebuggerManagerAccessForDebugMode *managerAccess = - m_manager->debugModeInterface(); - - Core::ActionManagerInterface *am = - ExtensionSystem::PluginManager::instance() - ->getObject<Core::ICore>()->actionManager(); - QToolBar *debugToolBar = new QToolBar; - debugToolBar->addAction(am->command(ProjectExplorer::Constants::DEBUG)->action()); - debugToolBar->addAction(am->command(Constants::INTERRUPT)->action()); - debugToolBar->addAction(am->command(Constants::NEXT)->action()); - debugToolBar->addAction(am->command(Constants::STEP)->action()); - debugToolBar->addAction(am->command(Constants::STEPOUT)->action()); - debugToolBar->addSeparator(); - debugToolBar->addAction(am->command(Constants::STEPI)->action()); - debugToolBar->addAction(am->command(Constants::NEXTI)->action()); - debugToolBar->addSeparator(); - debugToolBar->addWidget(new QLabel(tr("Threads:"))); - - QComboBox *threadBox = new QComboBox; - threadBox->setModel(m_manager->threadsModel()); - connect(threadBox, SIGNAL(activated(int)), - managerAccess->threadsWindow(), SIGNAL(threadSelected(int))); - debugToolBar->addWidget(threadBox); - - debugToolBar->addWidget(managerAccess->statusLabel()); - - QWidget *stretch = new QWidget; - stretch->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum); - debugToolBar->addWidget(stretch); - - QMenu *viewMenu = new QMenu(debugToolBar); - m_toggleLockedAction = new QAction(tr("Locked"), viewMenu); - m_toggleLockedAction->setCheckable(true); - m_toggleLockedAction->setChecked(true); - connect(m_toggleLockedAction, SIGNAL(toggled(bool)), - m_manager, SLOT(setLocked(bool))); - foreach (QDockWidget *dockWidget, managerAccess->dockWidgets()) - viewMenu->addAction(dockWidget->toggleViewAction()); - viewMenu->addSeparator(); - viewMenu->addAction(m_toggleLockedAction); - viewMenu->addSeparator(); - - QAction *resetToSimpleAction = viewMenu->addAction(tr("Reset to default layout")); - connect(resetToSimpleAction, SIGNAL(triggered()), - m_manager, SLOT(setSimpleDockWidgetArrangement())); - QToolButton *viewMenuButton = new QToolButton(debugToolBar); - viewMenuButton->setText(tr("View ")); - viewMenuButton->setPopupMode(QToolButton::InstantPopup); - viewMenuButton->setMenu(viewMenu); - debugToolBar->addWidget(viewMenuButton); - - return debugToolBar; -} - -void DebugMode::focusCurrentEditor(IMode *mode) -{ - if (mode != this) - return; - - EditorManager *editorManager = EditorManager::instance(); - - if (editorManager->currentEditor()) - editorManager->currentEditor()->widget()->setFocus(); -} - -void DebugMode::writeSettings() const -{ - QSettings *s = settings(); - QTC_ASSERT(m_manager, return); - QTC_ASSERT(m_manager->mainWindow(), return); - s->beginGroup(QLatin1String("DebugMode")); - s->setValue(QLatin1String("State"), m_manager->mainWindow()->saveState()); - s->setValue(QLatin1String("Locked"), m_toggleLockedAction->isChecked()); - s->endGroup(); -} - -void DebugMode::readSettings() -{ - QSettings *s = settings(); - s->beginGroup(QLatin1String("DebugMode")); - m_manager->mainWindow()->restoreState(s->value(QLatin1String("State"), QByteArray()).toByteArray()); - m_toggleLockedAction->setChecked(s->value(QLatin1String("Locked"), true).toBool()); - s->endGroup(); -} - -QSettings *DebugMode::settings() -{ - return PluginManager::instance()->getObject<ICore>()->settings(); -} diff --git a/src/plugins/debugger/moduleshandler.cpp b/src/plugins/debugger/moduleshandler.cpp index 782fb6f9f7f7d0ec0ccf6ed33d743650a45cd892..e87c92a73d29039087316f3a0fc3ea3724e05d39 100644 --- a/src/plugins/debugger/moduleshandler.cpp +++ b/src/plugins/debugger/moduleshandler.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/moduleshandler.h b/src/plugins/debugger/moduleshandler.h index 9c7a3570b75e9a3c6cea296dbd6978e349799520..4db8c6fe7ad3651791fe8312a438733be8b185b0 100644 --- a/src/plugins/debugger/moduleshandler.h +++ b/src/plugins/debugger/moduleshandler.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/moduleswindow.cpp b/src/plugins/debugger/moduleswindow.cpp index 1e2d2c492c9d9a31c71df1a79d4e9c397e0c939c..5a1273c2942210b074bd9b7af0acdd6697cb8e7b 100644 --- a/src/plugins/debugger/moduleswindow.cpp +++ b/src/plugins/debugger/moduleswindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/moduleswindow.h b/src/plugins/debugger/moduleswindow.h index e2b9b57e568dfd88d8b74a735cb612eb994768a5..95dfec746a7f289f71553cb8fc7939bf343cda6a 100644 --- a/src/plugins/debugger/moduleswindow.h +++ b/src/plugins/debugger/moduleswindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/procinterrupt.cpp b/src/plugins/debugger/procinterrupt.cpp index 801dbbc8dc35a5791cb76de36b3b296a275c4cf2..08f7d39280584c9e0680e4a31e2ee63a27de3ef8 100644 --- a/src/plugins/debugger/procinterrupt.cpp +++ b/src/plugins/debugger/procinterrupt.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/procinterrupt.h b/src/plugins/debugger/procinterrupt.h index 9af88d33578fa3acf83f98be0b151f33cf007637..c98f780a3fbac8d2aa5f1e3018615bb1125ff6ab 100644 --- a/src/plugins/debugger/procinterrupt.h +++ b/src/plugins/debugger/procinterrupt.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/registerhandler.cpp b/src/plugins/debugger/registerhandler.cpp index b37fe752e8f47bfd22a495421b6371e495c2256d..e594326009a4ed1baee8d20260c729c2a4b67b09 100644 --- a/src/plugins/debugger/registerhandler.cpp +++ b/src/plugins/debugger/registerhandler.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/registerhandler.h b/src/plugins/debugger/registerhandler.h index 0b580d22d9f8313fae81be7eba2745ab982f548f..4c038f41eee3b9c721c62b3e9439d27e1fe73b60 100644 --- a/src/plugins/debugger/registerhandler.h +++ b/src/plugins/debugger/registerhandler.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/registerwindow.cpp b/src/plugins/debugger/registerwindow.cpp index 1721aa09fbae0126cfb830919007f09e607d0e9f..339b09609e5a350cdde865e915b7e70adeade715 100644 --- a/src/plugins/debugger/registerwindow.cpp +++ b/src/plugins/debugger/registerwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/registerwindow.h b/src/plugins/debugger/registerwindow.h index 773ee93108a8296bc140091e6e5329da0577170d..958535378f7deb489dd6c2876ad8158982bd5871 100644 --- a/src/plugins/debugger/registerwindow.h +++ b/src/plugins/debugger/registerwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/scriptengine.cpp b/src/plugins/debugger/scriptengine.cpp index 14b0d8a49de98228ac1c2a8bdb667ef84355ab42..b868dcd99ad4044b107b3a6140c535bd4053b299 100644 --- a/src/plugins/debugger/scriptengine.cpp +++ b/src/plugins/debugger/scriptengine.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/scriptengine.h b/src/plugins/debugger/scriptengine.h index 8330826ef8edcd37288aa428b24f15d5aebf1bb4..0f7cc47ac1feafc66ee24a924064de345aa44c57 100644 --- a/src/plugins/debugger/scriptengine.h +++ b/src/plugins/debugger/scriptengine.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/stackhandler.cpp b/src/plugins/debugger/stackhandler.cpp index 85abf6f74882d05d570295922620466047a6ff21..70d0b22ab0654530eb08459ad2908c6bba6bcd45 100644 --- a/src/plugins/debugger/stackhandler.cpp +++ b/src/plugins/debugger/stackhandler.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/stackhandler.h b/src/plugins/debugger/stackhandler.h index 53c941881e4f1c4cbfd73fb027fed883b372af3f..1e68d001f3baa6df94c71c75a8294481a9a2a336 100644 --- a/src/plugins/debugger/stackhandler.h +++ b/src/plugins/debugger/stackhandler.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/stackwindow.cpp b/src/plugins/debugger/stackwindow.cpp index 2ef86a3d3b131edfa784efd6e0513f59ad9e4d13..d40f8a3c5ff52442cdfacb3c943adae8930eca04 100644 --- a/src/plugins/debugger/stackwindow.cpp +++ b/src/plugins/debugger/stackwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/stackwindow.h b/src/plugins/debugger/stackwindow.h index 7955b7f4eb53f76eb6951c8818cb59238b2e0c05..cea4dcffa4a96b1adabb9d160ce8bf83ec1a3e99 100644 --- a/src/plugins/debugger/stackwindow.h +++ b/src/plugins/debugger/stackwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/startexternaldialog.cpp b/src/plugins/debugger/startexternaldialog.cpp index ba88f5f74c2a32bfc87f4e9a0192baf6b22ab42a..465b8acec04545ba4c10c2b253cd51d5e71ae133 100644 --- a/src/plugins/debugger/startexternaldialog.cpp +++ b/src/plugins/debugger/startexternaldialog.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/startexternaldialog.h b/src/plugins/debugger/startexternaldialog.h index 0707252774d26a5aab1e0ff7341cf97c997644d2..120740573074f9850b181df7a26777c4cad35281 100644 --- a/src/plugins/debugger/startexternaldialog.h +++ b/src/plugins/debugger/startexternaldialog.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/threadswindow.cpp b/src/plugins/debugger/threadswindow.cpp index 99cb74d93bf79edc219821b038dde20af5e53cbf..bf418cd0fc547f05c157e23f142b6f4696d2eaf1 100644 --- a/src/plugins/debugger/threadswindow.cpp +++ b/src/plugins/debugger/threadswindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/threadswindow.h b/src/plugins/debugger/threadswindow.h index 373bb0804ec4aab5c082d29b1b52d6f7f5d7406b..afc50a7638f58a4e55cd3ee59ca8353ea61a89fb 100644 --- a/src/plugins/debugger/threadswindow.h +++ b/src/plugins/debugger/threadswindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp index 25fa770823d4ec4e2c1356bd38bd64b49b881292..b2c43b28f646e260dbd26bdb27e95b3d26fc540b 100644 --- a/src/plugins/debugger/watchhandler.cpp +++ b/src/plugins/debugger/watchhandler.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/watchhandler.h b/src/plugins/debugger/watchhandler.h index 4c2a20b167f8f64560f665a1e6ff21f5e1444869..763d04b89b2e38faa12633bd910a7aa9362d4f95 100644 --- a/src/plugins/debugger/watchhandler.h +++ b/src/plugins/debugger/watchhandler.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp index 97d27d5f0166ff99d865911d203f240fe1f4176e..f357c451061666a8cb9d95e86aae5bb69ec35735 100644 --- a/src/plugins/debugger/watchwindow.cpp +++ b/src/plugins/debugger/watchwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/debugger/watchwindow.h b/src/plugins/debugger/watchwindow.h index 4a13ac65955d98c9bca39032c6c19904ebd8dc95..42a2928974fd6b936f8a7dd8200119524452c406 100644 --- a/src/plugins/debugger/watchwindow.h +++ b/src/plugins/debugger/watchwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/cpp/formclasswizard.cpp b/src/plugins/designer/cpp/formclasswizard.cpp index be21968a58c6b7dd58af8c6c8e84a09a47103e6e..b4e618490d40a4a2d869635894f1c3b67d5b55dc 100644 --- a/src/plugins/designer/cpp/formclasswizard.cpp +++ b/src/plugins/designer/cpp/formclasswizard.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/cpp/formclasswizard.h b/src/plugins/designer/cpp/formclasswizard.h index 028ed199cc3c9a2d62749c5fb1fdab3b4d766588..39b99c92037d0e15ea3de360d377c5afde5b7776 100644 --- a/src/plugins/designer/cpp/formclasswizard.h +++ b/src/plugins/designer/cpp/formclasswizard.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/cpp/formclasswizarddialog.cpp b/src/plugins/designer/cpp/formclasswizarddialog.cpp index 3250961d63d7c809c3694535a0fdea6a1535bd04..748e1b1d021b444025cc0b163702e113115e3f48 100644 --- a/src/plugins/designer/cpp/formclasswizarddialog.cpp +++ b/src/plugins/designer/cpp/formclasswizarddialog.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/cpp/formclasswizarddialog.h b/src/plugins/designer/cpp/formclasswizarddialog.h index f4f3d947cc7ef1591c42407c8cd8348c5434541a..4c61e5f09c7c9426bf0fd79ccae75ead59e3bfc7 100644 --- a/src/plugins/designer/cpp/formclasswizarddialog.h +++ b/src/plugins/designer/cpp/formclasswizarddialog.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/cpp/formclasswizardpage.cpp b/src/plugins/designer/cpp/formclasswizardpage.cpp index 3a0e0065926a6b7b15d989dbd03e93fe59c255cf..6cc0ced4215266b741ae39fa2410c4066c4f99d1 100644 --- a/src/plugins/designer/cpp/formclasswizardpage.cpp +++ b/src/plugins/designer/cpp/formclasswizardpage.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/cpp/formclasswizardpage.h b/src/plugins/designer/cpp/formclasswizardpage.h index b5270fa42de0b3f6b305addce65c7a349a265c6b..8643c67dd993046c1b38b9b57e4498c4981447c9 100644 --- a/src/plugins/designer/cpp/formclasswizardpage.h +++ b/src/plugins/designer/cpp/formclasswizardpage.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/cpp/formclasswizardparameters.cpp b/src/plugins/designer/cpp/formclasswizardparameters.cpp index 2441cddc3a052a0c598094fe6d793cb1a69abd50..81c67331de3da59ca2bd4d225a0cecbe95e1e24b 100644 --- a/src/plugins/designer/cpp/formclasswizardparameters.cpp +++ b/src/plugins/designer/cpp/formclasswizardparameters.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/cpp/formclasswizardparameters.h b/src/plugins/designer/cpp/formclasswizardparameters.h index 169ff2446bcec481f82cf5b16d13b052c4985700..e68ce95230498e9158d1a497af2873a27334655f 100644 --- a/src/plugins/designer/cpp/formclasswizardparameters.h +++ b/src/plugins/designer/cpp/formclasswizardparameters.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/designerconstants.h b/src/plugins/designer/designerconstants.h index f2458816d2fc7a5957e418bab9b934cd6d9f10b7..0f4024f2b9a00caa6b4a303d4e36e06a58ce6fec 100644 --- a/src/plugins/designer/designerconstants.h +++ b/src/plugins/designer/designerconstants.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/editorwidget.cpp b/src/plugins/designer/editorwidget.cpp index a6654411acc5ef27e8620519a230879255a3013d..71e28de7ba2281c7940d7912e866cca454903d19 100644 --- a/src/plugins/designer/editorwidget.cpp +++ b/src/plugins/designer/editorwidget.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/editorwidget.h b/src/plugins/designer/editorwidget.h index e144f486982efc3e1cafa1d695af043ee9cc9fd2..83a7b264197109a298c739e75fe7883f7490751a 100644 --- a/src/plugins/designer/editorwidget.h +++ b/src/plugins/designer/editorwidget.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/formeditorfactory.cpp b/src/plugins/designer/formeditorfactory.cpp index 684ad07e8a9cbbd4b828ecf8320ddb22db31d7b4..81d910ee9df2cd0b7db0dfa385b3247674449039 100644 --- a/src/plugins/designer/formeditorfactory.cpp +++ b/src/plugins/designer/formeditorfactory.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/formeditorfactory.h b/src/plugins/designer/formeditorfactory.h index 8de03dc4e536a082d138299e64d45fa9d8ffa5c6..02ad78fdb2d8c21bdd4d7657d11a7d324afb2474 100644 --- a/src/plugins/designer/formeditorfactory.h +++ b/src/plugins/designer/formeditorfactory.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/formeditorplugin.cpp b/src/plugins/designer/formeditorplugin.cpp index 3f1895e0fe1c20643c0e20d748b4d18868f27836..bc9f6a23337dc82a3e46ee1552d9a9a8fae44b93 100644 --- a/src/plugins/designer/formeditorplugin.cpp +++ b/src/plugins/designer/formeditorplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/formeditorplugin.h b/src/plugins/designer/formeditorplugin.h index fdcdfdb84f97ae83ae33c1cb3b6c12eb08aac81c..5743ab3f7632ff1be8f1f412d19badfb5f7efc1a 100644 --- a/src/plugins/designer/formeditorplugin.h +++ b/src/plugins/designer/formeditorplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/formeditorw.cpp b/src/plugins/designer/formeditorw.cpp index b0274ad27e172d0b2ed651dd2c61815858d4d312..e302eabb3c154ad090156eff9d09f4dd2db95cb1 100644 --- a/src/plugins/designer/formeditorw.cpp +++ b/src/plugins/designer/formeditorw.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -41,7 +41,7 @@ #include <coreplugin/coreconstants.h> #include <coreplugin/uniqueidmanager.h> -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/editormanager/editormanager.h> #include <utils/qtcassert.h> @@ -99,8 +99,8 @@ static inline QIcon designerIcon(const QString &iconName) // Create an action to activate a designer tool static inline QAction *createEditModeAction(QActionGroup *ag, const QList<int> &context, - Core::ActionManagerInterface *am, - Core::IActionContainer *medit, + Core::ActionManager *am, + Core::ActionContainer *medit, const QString &actionName, const QString &name, int toolNumber, @@ -111,10 +111,10 @@ static inline QAction *createEditModeAction(QActionGroup *ag, rc->setCheckable(true); if (!iconName.isEmpty()) rc->setIcon(designerIcon(iconName)); - Core::ICommand *command = am->registerAction(rc, name, context); + Core::Command *command = am->registerAction(rc, name, context); if (!keySequence.isEmpty()) command->setDefaultKeySequence(QKeySequence(keySequence)); - command->setAttribute(Core::ICommand::CA_Hide); + command->setAttribute(Core::Command::CA_Hide); medit->addAction(command, Core::Constants::G_EDIT_OTHER); rc->setData(toolNumber); ag->addAction(rc); @@ -124,28 +124,28 @@ static inline QAction *createEditModeAction(QActionGroup *ag, // Create a menu separato static inline QAction * createSeparator(QObject *parent, - Core::ActionManagerInterface *am, + Core::ActionManager *am, const QList<int> &context, - Core::IActionContainer *container, + Core::ActionContainer *container, const QString &name = QString(), const QString &group = QString()) { QAction *actSeparator = new QAction(parent); actSeparator->setSeparator(true); - Core::ICommand *command = am->registerAction(actSeparator, name, context); + Core::Command *command = am->registerAction(actSeparator, name, context); container->addAction(command, group); return actSeparator; } // Create a tool action static inline void addToolAction(QAction *a, - Core::ActionManagerInterface *am, + Core::ActionManager *am, const QList<int> &context, const QString &name, - Core::IActionContainer *c1, + Core::ActionContainer *c1, const QString &keySequence = QString()) { - Core::ICommand *command = am->registerAction(a, name, context); + Core::Command *command = am->registerAction(a, name, context); if (!keySequence.isEmpty()) command->setDefaultKeySequence(QKeySequence(keySequence)); c1->addAction(command); @@ -305,16 +305,16 @@ void FormEditorW::deleteInstance() void FormEditorW::setupActions() { - Core::ActionManagerInterface *am = m_core->actionManager(); - Core::ICommand *command; + Core::ActionManager *am = m_core->actionManager(); + Core::Command *command; //menus - Core::IActionContainer *medit = + Core::ActionContainer *medit = am->actionContainer(Core::Constants::M_EDIT); - Core::IActionContainer *mtools = + Core::ActionContainer *mtools = am->actionContainer(Core::Constants::M_TOOLS); - Core::IActionContainer *mformtools = + Core::ActionContainer *mformtools = am->createMenu(M_FORMEDITOR); mformtools->menu()->setTitle(tr("For&m editor")); mtools->addMenu(mformtools); @@ -334,7 +334,7 @@ void FormEditorW::setupActions() //'delete' action command = am->registerAction(m_fwm->actionDelete(), QLatin1String("FormEditor.Edit.Delete"), m_context); command->setDefaultKeySequence(QKeySequence::Delete); - command->setAttribute(Core::ICommand::CA_Hide); + command->setAttribute(Core::Command::CA_Hide); medit->addAction(command, Core::Constants::G_EDIT_COPYPASTE); //editor Modes. Store ids for editor tool bars @@ -443,10 +443,10 @@ QToolBar *FormEditorW::createEditorToolBar() const { QToolBar *rc = new QToolBar; rc->addSeparator(); - Core::ActionManagerInterface *am = m_core->actionManager(); + Core::ActionManager *am = m_core->actionManager(); const QStringList::const_iterator cend = m_toolActionIds.constEnd(); for (QStringList::const_iterator it = m_toolActionIds.constBegin(); it != cend; ++it) { - Core::ICommand *cmd = am->command(*it); + Core::Command *cmd = am->command(*it); QTC_ASSERT(cmd, continue); QAction *action = cmd->action(); if (!action->icon().isNull()) // Simplify grid has no action yet @@ -457,11 +457,11 @@ QToolBar *FormEditorW::createEditorToolBar() const return rc; } -Core::IActionContainer *FormEditorW::createPreviewStyleMenu(Core::ActionManagerInterface *am, +Core::ActionContainer *FormEditorW::createPreviewStyleMenu(Core::ActionManager *am, QActionGroup *actionGroup) { const QString menuId = QLatin1String(M_FORMEDITOR_PREVIEW); - Core::IActionContainer *menuPreviewStyle = am->createMenu(menuId); + Core::ActionContainer *menuPreviewStyle = am->createMenu(menuId); menuPreviewStyle->menu()->setTitle(tr("Preview in")); // The preview menu is a list of invisible actions for the embedded design @@ -483,10 +483,10 @@ Core::IActionContainer *FormEditorW::createPreviewStyleMenu(Core::ActionManagerI name += dot; } name += data.toString(); - Core::ICommand *command = am->registerAction(a, name, m_context); + Core::Command *command = am->registerAction(a, name, m_context); if (isDeviceProfile) { - command->setAttribute(Core::ICommand::CA_UpdateText); - command->setAttribute(Core::ICommand::CA_NonConfigureable); + command->setAttribute(Core::Command::CA_UpdateText); + command->setAttribute(Core::Command::CA_NonConfigureable); } menuPreviewStyle->addAction(command); } @@ -715,7 +715,7 @@ void FormEditorW::print() painter.drawPixmap(0, 0, pixmap); m_core->mainWindow()->setCursor(oldCursor); - m_core->statusBar()->showMessage(tr("Printed %1...").arg(QFileInfo(fw->fileName()).fileName())); +// m_core->statusBar()->showMessage(tr("Printed %1...").arg(QFileInfo(fw->fileName()).fileName())); } while (false); m_core->printer()->setFullPage(oldFullPage); m_core->printer()->setOrientation(oldOrientation); diff --git a/src/plugins/designer/formeditorw.h b/src/plugins/designer/formeditorw.h index 8263fbb622dcb84b8b2e8da59267092725a86f75..6aaca2c5924c35b7d034635efd7f71912a069c2e 100644 --- a/src/plugins/designer/formeditorw.h +++ b/src/plugins/designer/formeditorw.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -65,8 +65,8 @@ namespace qdesigner_internal { QT_END_NAMESPACE namespace Core { -class ActionManagerInterface; -class IActionContainer; +class ActionManager; +class ActionContainer; class ICore; class IEditor; } @@ -89,7 +89,7 @@ class SettingsPage; * Requesting an editor via instance() will fully initialize the class. * This is based on the assumption that the Designer settings work with * no plugins loaded. If that does not work, full initialization can be - * triggered by connection to the ICore::settingsDialogRequested() signal. + * triggered by connection to the ICore::optionsDialogRequested() signal. */ class FormEditorW : public QObject { @@ -142,7 +142,7 @@ private: typedef QList<FormWindowEditor *> EditorList; void setupActions(); - Core::IActionContainer *createPreviewStyleMenu(Core::ActionManagerInterface *am, + Core::ActionContainer *createPreviewStyleMenu(Core::ActionManager *am, QActionGroup *actionGroup); void critical(const QString &errorMessage); diff --git a/src/plugins/designer/formtemplatewizardpage.cpp b/src/plugins/designer/formtemplatewizardpage.cpp index e6ed5a1da5d064b2b9f01cad269a2eb1fb82e251..4a8c99070091853fda537b753d3bbf76d19ce6aa 100644 --- a/src/plugins/designer/formtemplatewizardpage.cpp +++ b/src/plugins/designer/formtemplatewizardpage.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/formtemplatewizardpage.h b/src/plugins/designer/formtemplatewizardpage.h index d123b52998c32dc19781f8f5b0a994278a559124..6b375386b5899b91ec0e57d48bc0d8b030d2ceb2 100644 --- a/src/plugins/designer/formtemplatewizardpage.h +++ b/src/plugins/designer/formtemplatewizardpage.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/formwindoweditor.cpp b/src/plugins/designer/formwindoweditor.cpp index 9bc3340299de5c400f2ff255e85a6875c23e008d..1c142c483e0b086fc37c7dbbe19649c932d1ffe3 100644 --- a/src/plugins/designer/formwindoweditor.cpp +++ b/src/plugins/designer/formwindoweditor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/formwindoweditor.h b/src/plugins/designer/formwindoweditor.h index 518f3e634883ca4213ca3624a888935b78842d2a..e448d8a6514367c1b54101e67040b03f3af36b69 100644 --- a/src/plugins/designer/formwindoweditor.h +++ b/src/plugins/designer/formwindoweditor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/formwindowfile.cpp b/src/plugins/designer/formwindowfile.cpp index b5a145736daf1d49159a7d960461a4fde20093b1..49387adb45b2448f99c13bb637c57ff6b7f925e9 100644 --- a/src/plugins/designer/formwindowfile.cpp +++ b/src/plugins/designer/formwindowfile.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/formwindowfile.h b/src/plugins/designer/formwindowfile.h index 54468c388f78e16a0ce96ee23edfa52bc2982855..c94e25da5b787db9f73faeba832aee5141d97759 100644 --- a/src/plugins/designer/formwindowfile.h +++ b/src/plugins/designer/formwindowfile.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/formwindowhost.cpp b/src/plugins/designer/formwindowhost.cpp index c54ed911429391567b53d1032fa06636329193c9..e1de87af80e7c5971caa037094ac23cf91d5cb57 100644 --- a/src/plugins/designer/formwindowhost.cpp +++ b/src/plugins/designer/formwindowhost.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/formwindowhost.h b/src/plugins/designer/formwindowhost.h index fc31d65847c6aa392f65f0c5db1aa164b1c50bd9..411949c27eddec698fb5f20b1f4d28ba582e069f 100644 --- a/src/plugins/designer/formwindowhost.h +++ b/src/plugins/designer/formwindowhost.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/formwizard.cpp b/src/plugins/designer/formwizard.cpp index 5c3f84a83495a21f51173d75a1d0961c01b23192..4bb492ce354e49f8c7c50c97ae20cc4d416fb188 100644 --- a/src/plugins/designer/formwizard.cpp +++ b/src/plugins/designer/formwizard.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/formwizard.h b/src/plugins/designer/formwizard.h index e4274a8a7be09356f3614e65200a2546e60a099f..b49fea1eb7a838ef12653a428e637b86ef609cb4 100644 --- a/src/plugins/designer/formwizard.h +++ b/src/plugins/designer/formwizard.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/formwizarddialog.cpp b/src/plugins/designer/formwizarddialog.cpp index 958d627503d19e0d70dfec2a80462d0336b9db57..67ed81601988220364a2b0c5f220c27389e01de7 100644 --- a/src/plugins/designer/formwizarddialog.cpp +++ b/src/plugins/designer/formwizarddialog.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/formwizarddialog.h b/src/plugins/designer/formwizarddialog.h index 234d3ce42bd22696c87e610cc9733019853c5d8d..52aaed4cd0226c8f420ef33e397ca573011799df 100644 --- a/src/plugins/designer/formwizarddialog.h +++ b/src/plugins/designer/formwizarddialog.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/settingsmanager.cpp b/src/plugins/designer/settingsmanager.cpp index 56ae6f0236f51a14f4966dc30ed478947c84d278..3edad0921b84548b8825b778513a57a898f30dc1 100644 --- a/src/plugins/designer/settingsmanager.cpp +++ b/src/plugins/designer/settingsmanager.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/settingsmanager.h b/src/plugins/designer/settingsmanager.h index 30bb51dd31fec7dc71b7005dfbdbba1902af426b..ba6c89e133a8bad20e851a95f4ddd1686e6b2556 100644 --- a/src/plugins/designer/settingsmanager.h +++ b/src/plugins/designer/settingsmanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/settingspage.cpp b/src/plugins/designer/settingspage.cpp index 7e0952ae763228c101b7a6e47a23255e030568cb..8de4cad5dc21b0fde740d940c62305f6f0d50fb3 100644 --- a/src/plugins/designer/settingspage.cpp +++ b/src/plugins/designer/settingspage.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -67,7 +67,12 @@ QWidget *SettingsPage::createPage(QWidget *parent) return m_designerPage->createPage(parent); } -void SettingsPage::finished(bool accepted) +void SettingsPage::apply() { - m_designerPage->finish(accepted); + m_designerPage->apply(); +} + +void SettingsPage::finish() +{ + m_designerPage->finish(); } diff --git a/src/plugins/designer/settingspage.h b/src/plugins/designer/settingspage.h index 397bb36b3a0a28b7966cfccad630c6f4007c7889..8ad707dd76937a6acd5d37cc7b429f9bfb59e26b 100644 --- a/src/plugins/designer/settingspage.h +++ b/src/plugins/designer/settingspage.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -58,8 +58,9 @@ public: QString category() const; QString trCategory() const; - QWidget *createPage(QWidget *parent); - void finished(bool accepted); + virtual QWidget *createPage(QWidget *parent); + virtual void apply(); + virtual void finish(); private: QDesignerOptionsPageInterface *m_designerPage; diff --git a/src/plugins/designer/workbenchintegration.cpp b/src/plugins/designer/workbenchintegration.cpp index 0291bd210580d76f0b7e196b816a2b80916dd025..42043c3cd209e8e193fad67afb446ea23859c78b 100644 --- a/src/plugins/designer/workbenchintegration.cpp +++ b/src/plugins/designer/workbenchintegration.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/designer/workbenchintegration.h b/src/plugins/designer/workbenchintegration.h index 10732865b0466ba70baa4ef8b0610e8c92d20158..55acd931ec668c992ce405901d3c3ba46fad54e3 100644 --- a/src/plugins/designer/workbenchintegration.h +++ b/src/plugins/designer/workbenchintegration.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/fakevim/FakeVim.pluginspec b/src/plugins/fakevim/FakeVim.pluginspec index 66a091e283d4b367dce07e01d6c3af5bba0117f9..a420040ac8a8d8a39c572902d5c8aa191e084781 100644 --- a/src/plugins/fakevim/FakeVim.pluginspec +++ b/src/plugins/fakevim/FakeVim.pluginspec @@ -6,6 +6,7 @@ <url>http://www.trolltech.com/</url> <dependencyList> <dependency name="CppEditor" version="0.9.2"/><!-- Plugin adds items to the editor's context menu --> + <dependency name="TextEditor" version="0.9.2"/> <dependency name="ProjectExplorer" version="0.9.2"/> <dependency name="Core" version="0.9.2"/> </dependencyList> diff --git a/src/plugins/fakevim/fakevim.pro b/src/plugins/fakevim/fakevim.pro index 2165ffed202f99d2ae3b72a2c1b539c217922400..2c85f8c50b287db7d456c6e5a7e5da1920c586ab 100644 --- a/src/plugins/fakevim/fakevim.pro +++ b/src/plugins/fakevim/fakevim.pro @@ -2,10 +2,13 @@ TEMPLATE = lib TARGET = FakeVim # CONFIG += single +include(../../libs/cplusplus/cplusplus.pri) include(../../qworkbenchplugin.pri) include(../../plugins/projectexplorer/projectexplorer.pri) include(../../plugins/coreplugin/coreplugin.pri) include(../../plugins/texteditor/texteditor.pri) +include(../../plugins/texteditor/cppeditor.pri) +include(../../../shared/indenter/indenter.pri) # DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII QT += gui diff --git a/src/plugins/fakevim/fakevimconstants.h b/src/plugins/fakevim/fakevimconstants.h index 13c716954344f39867672f625c7afef95f2e86e6..93472b66d30d6169b9c8e937a32c4b16ad1f617e 100644 --- a/src/plugins/fakevim/fakevimconstants.h +++ b/src/plugins/fakevim/fakevimconstants.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -45,6 +45,7 @@ const char * const ConfigTabStop = "tabstop"; const char * const ConfigSmartTab = "smarttab"; const char * const ConfigShiftWidth = "shiftwidth"; const char * const ConfigExpandTab = "expandtab"; +const char * const ConfigAutoIndent = "autoindent"; } // namespace Constants } // namespace FakeVim diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp index 3f6bb103c59a0d28e84f0de5d5287201f7acab3a..4a69ff97ea67da35e9c7cdf6ce011a52869a3155 100644 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -53,6 +53,11 @@ #include <QtGui/QTextDocumentFragment> #include <QtGui/QTextEdit> +//#include <texteditor/basetexteditor.h> +//#include <texteditor/textblockiterator.h> +//#include <cppeditor/cppeditor.h> + +//#include <indenter.h> using namespace FakeVim::Internal; using namespace FakeVim::Constants; @@ -97,6 +102,9 @@ enum SubMode ChangeSubMode, DeleteSubMode, FilterSubMode, + ReplaceSubMode, + YankSubMode, + IndentSubMode, ZSubMode, }; @@ -179,8 +187,16 @@ private: int linesInDocument() const; void scrollToLineInDocument(int line); + // helper functions for indenting + bool isElectricCharacter(QChar c) const { return (c == '{' || c == '}' || c == '#'); } + int indentDist() const; + void indentRegion(QTextBlock first, QTextBlock last, QChar typedChar=0); + void indentCurrentLine(QChar typedChar); + void moveToFirstNonBlankOnLine(); + void moveToDesiredColumn(); void moveToNextWord(bool simple); + void moveToMatchingParanthesis(); void moveToWordBoundary(bool simple, bool forward); void handleFfTt(int key); @@ -263,6 +279,10 @@ public: // vi style configuration QHash<QString, QString> m_config; + + // for restoring cursor position + int m_savedPosition; + int m_desiredColumn; }; FakeVimHandler::Private::Private(FakeVimHandler *parent) @@ -279,12 +299,14 @@ FakeVimHandler::Private::Private(FakeVimHandler *parent) m_textedit = 0; m_plaintextedit = 0; m_visualMode = NoVisualMode; + m_desiredColumn = 0; m_config[ConfigStartOfLine] = ConfigOn; m_config[ConfigTabStop] = "8"; m_config[ConfigSmartTab] = ConfigOff; m_config[ConfigShiftWidth] = "8"; m_config[ConfigExpandTab] = ConfigOff; + m_config[ConfigAutoIndent] = ConfigOff; } bool FakeVimHandler::Private::handleEvent(QKeyEvent *ev) @@ -306,15 +328,18 @@ bool FakeVimHandler::Private::handleEvent(QKeyEvent *ev) // Fake "End of line" m_tc = EDITOR(textCursor()); + m_tc.setVisualNavigation(true); if (m_fakeEnd) m_tc.movePosition(Right, MoveAnchor, 1); - if (key >= Key_A && key <= Key_Z - && (ev->modifiers() & Qt::ShiftModifier) == 0) - key += 32; - if ((ev->modifiers() & Qt::ControlModifier) != 0) + if ((ev->modifiers() & Qt::ControlModifier) != 0) { key += 256; + key += 32; // make it lower case + } else if (key >= Key_A && key <= Key_Z + && (ev->modifiers() & Qt::ShiftModifier) == 0) { + key += 32; + } bool handled = handleKey(key, ev->text()); // We fake vi-style end-of-line behaviour @@ -332,6 +357,7 @@ bool FakeVimHandler::Private::handleKey(int key, const QString &text) { //qDebug() << "KEY: " << key << text << "POS: " << m_tc.position(); //qDebug() << "\nUNDO: " << m_undoStack << "\nREDO: " << m_redoStack; + m_savedPosition = m_tc.position(); if (m_mode == InsertMode) return handleInsertMode(key, text); if (m_mode == CommandMode) @@ -372,6 +398,23 @@ void FakeVimHandler::Private::finishMovement(const QString &dotCommand) m_submode = NoSubMode; if (atEol()) m_tc.movePosition(Left, MoveAnchor, 1); + } else if (m_submode == YankSubMode) { + m_registers[m_register] = m_tc.selectedText(); + m_tc.setPosition(m_savedPosition); + m_submode = NoSubMode; + } else if (m_submode == ReplaceSubMode) { + m_submode = NoSubMode; + } else if (m_submode == IndentSubMode) { + QTextDocument *doc = EDITOR(document()); + int start = m_tc.selectionStart(); + int end = m_tc.selectionEnd(); + if (start > end) + std::swap(start, end); + QTextBlock startBlock = doc->findBlock(start); + indentRegion(doc->findBlock(start), doc->findBlock(end).next()); + m_tc.setPosition(startBlock.position()); + moveToFirstNonBlankOnLine(); + m_submode = NoSubMode; } m_mvcount.clear(); m_opcount.clear(); @@ -381,6 +424,7 @@ void FakeVimHandler::Private::finishMovement(const QString &dotCommand) updateSelection(); updateMiniBuffer(); + m_desiredColumn = leftDist(); } void FakeVimHandler::Private::updateSelection() @@ -430,7 +474,7 @@ void FakeVimHandler::Private::updateSelection() } } } - EDITOR(setExtraSelections(selections)); + emit q->selectionChanged(editor(), selections); } void FakeVimHandler::Private::updateMiniBuffer() @@ -502,7 +546,7 @@ void FakeVimHandler::Private::showBlackMessage(const QString &msg) bool FakeVimHandler::Private::handleCommandMode(int key, const QString &text) { - Q_UNUSED(text) + bool handled = true; if (m_submode == RegisterSubMode) { m_register = key; @@ -517,6 +561,20 @@ bool FakeVimHandler::Private::handleCommandMode(int key, const QString &text) m_tc.movePosition(Down, KeepAnchor, count()); m_registers[m_register] = m_tc.selectedText(); finishMovement("d"); + } else if (m_submode == YankSubMode && key == 'y') { + m_tc.movePosition(StartOfLine, MoveAnchor); + m_tc.movePosition(Down, KeepAnchor, count()); + m_registers[m_register] = m_tc.selectedText(); + finishMovement(); + } else if (m_submode == ReplaceSubMode) { + if (atEol()) + m_tc.movePosition(Left, KeepAnchor, 1); + else + m_tc.deleteChar(); + m_tc.insertText(text); + } else if (m_submode == IndentSubMode && key == '=') { + indentRegion(m_tc.block(), m_tc.block().next()); + finishMovement(); } else if (m_submode == ZSubMode) { if (key == Key_Return) { // cursor line to top of window, cursor on first non-blank @@ -590,12 +648,16 @@ bool FakeVimHandler::Private::handleCommandMode(int key, const QString &text) } else if (key == Key_Return) { m_tc.movePosition(StartOfLine); m_tc.movePosition(Down); + finishMovement(); } else if (key == Key_Home) { m_tc.movePosition(StartOfLine, KeepAnchor); finishMovement(); } else if (key == '$' || key == Key_End) { + int submode = m_submode; m_tc.movePosition(EndOfLine, KeepAnchor); finishMovement(); + if (submode == NoSubMode) + m_desiredColumn = -1; } else if (key == ',') { // FIXME: use some other mechanism m_mode = PassingMode; @@ -605,6 +667,11 @@ bool FakeVimHandler::Private::handleCommandMode(int key, const QString &text) for (int i = count(); --i >= 0; ) foreach (QChar c, m_dotCommand) handleKey(c.unicode(), QString(c)); + } else if (key == '=') { + m_submode = IndentSubMode; + } else if (key == '%') { + moveToMatchingParanthesis(); + finishMovement(); } else if (key == 'a') { m_mode = InsertMode; m_lastInsertion.clear(); @@ -656,7 +723,7 @@ bool FakeVimHandler::Private::handleCommandMode(int key, const QString &text) m_gflag = true; } else if (key == 'G') { int n = m_mvcount.isEmpty() ? linesInDocument() : count(); - m_tc.setPosition(positionForLine(n), MoveAnchor); + m_tc.setPosition(positionForLine(n), KeepAnchor); if (m_config.contains(ConfigStartOfLine)) moveToFirstNonBlankOnLine(); finishMovement(); @@ -674,6 +741,8 @@ bool FakeVimHandler::Private::handleCommandMode(int key, const QString &text) } else if (key == 'i') { enterInsertMode(); updateMiniBuffer(); + if (atEol()) + m_tc.movePosition(Left, MoveAnchor, 1); } else if (key == 'I') { enterInsertMode(); if (m_gflag) @@ -681,8 +750,16 @@ bool FakeVimHandler::Private::handleCommandMode(int key, const QString &text) else moveToFirstNonBlankOnLine(); } else if (key == 'j' || key == Key_Down) { - m_tc.movePosition(Down, KeepAnchor, count()); + int savedColumn = m_desiredColumn; + if (m_submode == NoSubMode || m_submode == ZSubMode || m_submode == RegisterSubMode) { + m_tc.movePosition(Down, KeepAnchor, count()); + moveToDesiredColumn(); + } else { + m_tc.movePosition(StartOfLine, MoveAnchor); + m_tc.movePosition(Down, KeepAnchor, count()+1); + } finishMovement(); + m_desiredColumn = savedColumn; } else if (key == 'J') { EditOperation op; if (m_submode == NoSubMode) { @@ -696,8 +773,17 @@ bool FakeVimHandler::Private::handleCommandMode(int key, const QString &text) m_tc.movePosition(Left, MoveAnchor, 1); } } else if (key == 'k' || key == Key_Up) { - m_tc.movePosition(Up, KeepAnchor, count()); + int savedColumn = m_desiredColumn; + if (m_submode == NoSubMode || m_submode == ZSubMode || m_submode == RegisterSubMode) { + m_tc.movePosition(Up, KeepAnchor, count()); + moveToDesiredColumn(); + } else { + m_tc.movePosition(StartOfLine, MoveAnchor); + m_tc.movePosition(Down, MoveAnchor); + m_tc.movePosition(Up, KeepAnchor, count()+1); + } finishMovement(); + m_desiredColumn = savedColumn; } else if (key == 'l' || key == Key_Right) { m_tc.movePosition(Right, KeepAnchor, qMin(count(), rightDist())); finishMovement(); @@ -716,15 +802,20 @@ bool FakeVimHandler::Private::handleCommandMode(int key, const QString &text) search(lastSearchString(), m_lastSearchForward); } else if (key == 'N') { search(lastSearchString(), !m_lastSearchForward); - } else if (key == 'o') { + } else if (key == 'o' || key == 'O') { enterInsertMode(); + moveToFirstNonBlankOnLine(); + int numSpaces = leftDist(); + m_tc.movePosition(Up, MoveAnchor, 1); + if (key == 'o') + m_tc.movePosition(Down, MoveAnchor, 1); m_tc.movePosition(EndOfLine, MoveAnchor); m_tc.insertText("\n"); - } else if (key == 'O') { - enterInsertMode(); m_tc.movePosition(StartOfLine, MoveAnchor); - m_tc.movePosition(Left, MoveAnchor, 1); - m_tc.insertText("\n"); + if (m_config[ConfigAutoIndent] == ConfigOn) + m_tc.insertText(QString(indentDist(), ' ')); + else + m_tc.insertText(QString(numSpaces, ' ')); } else if (key == 'p' || key == 'P') { QString text = m_registers[m_register]; int n = text.count(QChar(ParagraphSeparator)); @@ -741,6 +832,13 @@ bool FakeVimHandler::Private::handleCommandMode(int key, const QString &text) m_tc.movePosition(Left); } m_dotCommand = "p"; + } else if (key == 'r') { + m_submode = ReplaceSubMode; + m_dotCommand = "r"; + } else if (key == 'R') { + m_mode = InsertMode; + m_submode = ReplaceSubMode; + m_dotCommand = "R"; } else if (key == control('r')) { redo(); } else if (key == 's') { @@ -779,6 +877,10 @@ bool FakeVimHandler::Private::handleCommandMode(int key, const QString &text) m_tc.deleteChar(); } finishMovement(); + } else if (key == 'y') { + if (atEol()) + m_tc.movePosition(Left, MoveAnchor, 1); + m_submode = YankSubMode; } else if (key == 'z') { m_submode = ZSubMode; } else if (key == '~' && !atEol()) { @@ -805,9 +907,11 @@ bool FakeVimHandler::Private::handleCommandMode(int key, const QString &text) leaveVisualMode(); } else { qDebug() << "Ignored in command mode: " << key << text; - return false; + if (text.isEmpty()) + handled = false; } - return true; + + return handled; } bool FakeVimHandler::Private::handleInsertMode(int key, const QString &text) @@ -827,17 +931,21 @@ bool FakeVimHandler::Private::handleInsertMode(int key, const QString &text) m_tc.movePosition(Left, MoveAnchor, 1); m_lastInsertion.clear(); } else if (key == Key_Down) { + m_submode = NoSubMode; m_tc.movePosition(Down, MoveAnchor, 1); m_lastInsertion.clear(); } else if (key == Key_Up) { + m_submode = NoSubMode; m_tc.movePosition(Up, MoveAnchor, 1); m_lastInsertion.clear(); } else if (key == Key_Right) { m_tc.movePosition(Right, MoveAnchor, 1); m_lastInsertion.clear(); } else if (key == Key_Return) { + m_submode = NoSubMode; m_tc.insertBlock(); m_lastInsertion += "\n"; + indentRegion(m_tc.block(), m_tc.block().next()); } else if (key == Key_Backspace || key == control('h')) { m_tc.deletePreviousChar(); m_lastInsertion = m_lastInsertion.left(m_lastInsertion.size() - 1); @@ -856,7 +964,30 @@ bool FakeVimHandler::Private::handleInsertMode(int key, const QString &text) m_tc.insertText(str); } else if (!text.isEmpty()) { m_lastInsertion.append(text); + if (m_submode == ReplaceSubMode) { + if (atEol()) + m_submode = NoSubMode; + else + m_tc.deleteChar(); + } m_tc.insertText(text); + if (m_config[ConfigAutoIndent] == ConfigOn + && isElectricCharacter(text.at(0))) { + const QString leftText = m_tc.block().text() + .left(m_tc.position() - 1 - m_tc.block().position()); + if (leftText.simplified().isEmpty()) { + if (m_tc.hasSelection()) { + QTextDocument *doc = EDITOR(document()); + QTextBlock block = doc->findBlock(qMin(m_tc.selectionStart(), + m_tc.selectionEnd())); + const QTextBlock end = doc->findBlock(qMax(m_tc.selectionStart(), + m_tc.selectionEnd())).next(); + indentRegion(block, end, text.at(0)); + } else { + indentCurrentLine(text.at(0)); + } + } + } } else { return false; } @@ -942,6 +1073,17 @@ int FakeVimHandler::Private::readLineCode(QString &cmd) return cursorLineInDocument() + 1; if (c == '$') return linesInDocument(); + if (c == '\'' && !cmd.isEmpty()) { + int mark = m_marks.value(cmd.at(0).unicode()); + if (!mark) { + showRedMessage(tr("E20: Mark '%1' not set").arg(cmd.at(0))); + return -1; + } + cmd = cmd.mid(1); + QTextCursor tc = m_tc; + tc.setPosition(mark); + return tc.block().blockNumber() + 1; + } if (c == '-') { int n = readLineCode(cmd); return cursorLineInDocument() + 1 - (n == -1 ? 1 : n); @@ -1159,7 +1301,7 @@ void FakeVimHandler::Private::moveToFirstNonBlankOnLine() { QTextBlock block = m_tc.block(); QTextDocument *doc = m_tc.document(); - m_tc.movePosition(StartOfLine); + m_tc.movePosition(StartOfLine, KeepAnchor); int firstPos = m_tc.position(); for (int i = firstPos, n = firstPos + block.length(); i < n; ++i) { if (!doc->characterAt(i).isSpace()) { @@ -1169,6 +1311,72 @@ void FakeVimHandler::Private::moveToFirstNonBlankOnLine() } } +int FakeVimHandler::Private::indentDist() const +{ +#if 0 + // FIXME: Make independent of TextEditor + if (!m_texteditor) + return 0; + + TextEditor::TabSettings ts = m_texteditor->tabSettings(); + typedef SharedTools::Indenter<TextEditor::TextBlockIterator> Indenter; + Indenter &indenter = Indenter::instance(); + indenter.setIndentSize(ts.m_indentSize); + indenter.setTabSize(ts.m_tabSize); + + QTextDocument *doc = EDITOR(document()); + const TextEditor::TextBlockIterator current(m_tc.block()); + const TextEditor::TextBlockIterator begin(doc->begin()); + const TextEditor::TextBlockIterator end(m_tc.block().next()); + return indenter.indentForBottomLine(current, begin, end, QChar(' ')); +#endif + return 0; +} + +void FakeVimHandler::Private::indentRegion(QTextBlock begin, QTextBlock end, QChar typedChar) +{ +#if 0 + // FIXME: Make independent of TextEditor + if (!m_texteditor) + return 0; + typedef SharedTools::Indenter<TextEditor::TextBlockIterator> Indenter; + Indenter &indenter = Indenter::instance(); + indenter.setIndentSize(m_config[ConfigShiftWidth].toInt()); + indenter.setTabSize(m_config[ConfigTabStop].toInt()); + + QTextDocument *doc = EDITOR(document()); + const TextEditor::TextBlockIterator docStart(doc->begin()); + for(QTextBlock cur = begin; cur != end; cur = cur.next()) { + if (typedChar != 0 && cur.text().simplified().isEmpty()) { + m_tc.setPosition(cur.position(), KeepAnchor); + while (!m_tc.atBlockEnd()) + m_tc.deleteChar(); + } else { + const TextEditor::TextBlockIterator current(cur); + const TextEditor::TextBlockIterator next(cur.next()); + const int indent = indenter.indentForBottomLine(current, docStart, next, typedChar); + ts.indentLine(cur, indent); + } + } +#endif + Q_UNUSED(begin); + Q_UNUSED(end); + Q_UNUSED(typedChar); +} + +void FakeVimHandler::Private::indentCurrentLine(QChar typedChar) +{ + indentRegion(m_tc.block(), m_tc.block().next(), typedChar); +} + +void FakeVimHandler::Private::moveToDesiredColumn() +{ + if (m_desiredColumn == -1 || m_tc.block().length() <= m_desiredColumn) + m_tc.movePosition(EndOfLine, KeepAnchor); + else + m_tc.setPosition(m_tc.block().position() + m_desiredColumn, KeepAnchor); +} + static int charClass(QChar c, bool simple) { if (simple) @@ -1262,6 +1470,38 @@ void FakeVimHandler::Private::moveToNextWord(bool simple) } } +void FakeVimHandler::Private::moveToMatchingParanthesis() +{ +#if 0 + // FIXME: remove TextEditor dependency + bool undoFakeEOL = false; + if (atEol()) { + m_tc.movePosition(Left, KeepAnchor, 1); + undoFakeEOL = true; + } + TextEditor::TextBlockUserData::MatchType match + = TextEditor::TextBlockUserData::matchCursorForward(&m_tc); + if (match == TextEditor::TextBlockUserData::Match) { + if (m_submode == NoSubMode || m_submode == ZSubMode || m_submode == RegisterSubMode) + m_tc.movePosition(Left, KeepAnchor, 1); + } else { + if (undoFakeEOL) + m_tc.movePosition(Right, KeepAnchor, 1); + if (match == TextEditor::TextBlockUserData::NoMatch) { + // backward matching is according to the character before the cursor + bool undoMove = false; + if (!m_tc.atBlockEnd()) { + m_tc.movePosition(Right, KeepAnchor, 1); + undoMove = true; + } + match = TextEditor::TextBlockUserData::matchCursorBackward(&m_tc); + if (match != TextEditor::TextBlockUserData::Match && undoMove) + m_tc.movePosition(Left, KeepAnchor, 1); + } + } +#endif +} + int FakeVimHandler::Private::cursorLineOnScreen() const { if (!editor()) diff --git a/src/plugins/fakevim/fakevimhandler.h b/src/plugins/fakevim/fakevimhandler.h index 69bb363015f1b8b483db3904f22e087453d7bf6c..08df6d21b12a526f307b34346e3517cd2c662673 100644 --- a/src/plugins/fakevim/fakevimhandler.h +++ b/src/plugins/fakevim/fakevimhandler.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -34,7 +34,8 @@ #ifndef FAKEVIM_HANDLER_H #define FAKEVIM_HANDLER_H -#include <QObject> +#include <QtCore/QObject> +#include <QtGui/QTextEdit> QT_BEGIN_NAMESPACE class QString; @@ -69,6 +70,8 @@ signals: void statusDataChanged(const QString &msg); void extraInformationChanged(const QString &msg); void quitRequested(QWidget *); + void selectionChanged(QWidget *widget, + const QList<QTextEdit::ExtraSelection> &selection); private: bool eventFilter(QObject *ob, QEvent *ev); diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp index 9524e618e090e5c18833725b82bd5b7f86ff91fc..0a06fe7c112700e3fc54a8b108b10c25218d0c85 100644 --- a/src/plugins/fakevim/fakevimplugin.cpp +++ b/src/plugins/fakevim/fakevimplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -36,7 +36,7 @@ #include "fakevimconstants.h" #include "fakevimhandler.h" -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/coreconstants.h> #include <coreplugin/editormanager/editormanager.h> #include <coreplugin/icore.h> @@ -57,7 +57,7 @@ #include <utils/qtcassert.h> #include <QtCore/QDebug> -#include <QtCore/qplugin.h> +#include <QtCore/QtPlugin> #include <QtCore/QObject> #include <QtCore/QPoint> #include <QtCore/QSettings> @@ -66,6 +66,7 @@ #include <QtGui/QPlainTextEdit> #include <QtGui/QTextBlock> #include <QtGui/QTextCursor> +#include <QtGui/QTextEdit> using namespace FakeVim::Internal; @@ -87,26 +88,65 @@ const char * const INSTALL_KEY = "Alt+V,Alt+V"; /////////////////////////////////////////////////////////////////////// // -// FakeVimPlugin +// FakeVimPluginPrivate // /////////////////////////////////////////////////////////////////////// -FakeVimPlugin::FakeVimPlugin() +namespace FakeVim { +namespace Internal { + +class FakeVimPluginPrivate : public QObject { - m_core = 0; + Q_OBJECT + +public: + FakeVimPluginPrivate(FakeVimPlugin *); + ~FakeVimPluginPrivate(); + friend class FakeVimPlugin; + + bool initialize(const QStringList &arguments, QString *error_message); + void shutdown(); + +private slots: + void installHandler(); + void installHandler(QWidget *widget); + void removeHandler(QWidget *widget); + void showCommandBuffer(const QString &contents); + void showExtraInformation(const QString &msg); + void editorOpened(Core::IEditor *); + void editorAboutToClose(Core::IEditor *); + void changeSelection(QWidget *widget, + const QList<QTextEdit::ExtraSelection> &selections); + +private: + FakeVimPlugin *q; + FakeVimHandler *m_handler; + QAction *m_installHandlerAction; + Core::ICore *m_core; +}; + +} // namespace Internal +} // namespace FakeVim + +FakeVimPluginPrivate::FakeVimPluginPrivate(FakeVimPlugin *plugin) +{ + q = plugin; m_handler = 0; + m_installHandlerAction = 0; + m_core = 0; } -FakeVimPlugin::~FakeVimPlugin() -{} +FakeVimPluginPrivate::~FakeVimPluginPrivate() +{ +} -void FakeVimPlugin::shutdown() +void FakeVimPluginPrivate::shutdown() { delete m_handler; m_handler = 0; } -bool FakeVimPlugin::initialize(const QStringList &arguments, QString *error_message) +bool FakeVimPluginPrivate::initialize(const QStringList &arguments, QString *error_message) { Q_UNUSED(arguments); Q_UNUSED(error_message); @@ -116,7 +156,7 @@ bool FakeVimPlugin::initialize(const QStringList &arguments, QString *error_mess m_core = ExtensionSystem::PluginManager::instance()->getObject<Core::ICore>(); QTC_ASSERT(m_core, return false); - Core::ActionManagerInterface *actionManager = m_core->actionManager(); + Core::ActionManager *actionManager = m_core->actionManager(); QTC_ASSERT(actionManager, return false); QList<int> globalcontext; @@ -125,12 +165,12 @@ bool FakeVimPlugin::initialize(const QStringList &arguments, QString *error_mess m_installHandlerAction = new QAction(this); m_installHandlerAction->setText(tr("Set vi-Style Keyboard Action Handler")); - Core::ICommand *cmd = 0; + Core::Command *cmd = 0; cmd = actionManager->registerAction(m_installHandlerAction, Constants::INSTALL_HANDLER, globalcontext); cmd->setDefaultKeySequence(QKeySequence(Constants::INSTALL_KEY)); - IActionContainer *advancedMenu = + ActionContainer *advancedMenu = actionManager->actionContainer(Core::Constants::M_EDIT_ADVANCED); advancedMenu->addAction(cmd); @@ -147,17 +187,13 @@ bool FakeVimPlugin::initialize(const QStringList &arguments, QString *error_mess return true; } -void FakeVimPlugin::extensionsInitialized() -{ -} - -void FakeVimPlugin::installHandler() +void FakeVimPluginPrivate::installHandler() { if (Core::IEditor *editor = m_core->editorManager()->currentEditor()) installHandler(editor->widget()); } -void FakeVimPlugin::installHandler(QWidget *widget) +void FakeVimPluginPrivate::installHandler(QWidget *widget) { connect(m_handler, SIGNAL(extraInformationChanged(QString)), this, SLOT(showExtraInformation(QString))); @@ -165,14 +201,17 @@ void FakeVimPlugin::installHandler(QWidget *widget) this, SLOT(showCommandBuffer(QString))); connect(m_handler, SIGNAL(quitRequested(QWidget *)), this, SLOT(removeHandler(QWidget *))); + connect(m_handler, + SIGNAL(selectionChanged(QWidget*,QList<QTextEdit::ExtraSelection>)), + this, SLOT(changeSelection(QWidget*,QList<QTextEdit::ExtraSelection>))); m_handler->addWidget(widget); - BaseTextEditor *baseTextEditor = qobject_cast<BaseTextEditor *>(widget); - if (baseTextEditor) { + BaseTextEditor *bt = qobject_cast<BaseTextEditor *>(widget); + if (bt) { using namespace TextEditor; using namespace FakeVim::Constants; - TabSettings settings = baseTextEditor->tabSettings(); + TabSettings settings = bt->tabSettings(); m_handler->setConfigValue(ConfigTabStop, QString::number(settings.m_tabSize)); m_handler->setConfigValue(ConfigShiftWidth, @@ -181,42 +220,81 @@ void FakeVimPlugin::installHandler(QWidget *widget) settings.m_spacesForTabs ? ConfigOn : ConfigOff); m_handler->setConfigValue(ConfigSmartTab, settings.m_smartBackspace ? ConfigOn : ConfigOff); - //m_handler->setConfigValue(ConfigSmartTab, - // settings.m_autoIndent ? ConfigOn : ConfigOff); + m_handler->setConfigValue(ConfigAutoIndent, + settings.m_autoIndent ? ConfigOn : ConfigOff); } } -void FakeVimPlugin::removeHandler(QWidget *widget) +void FakeVimPluginPrivate::removeHandler(QWidget *widget) { - //m_handler->removeWidget(widget); + Q_UNUSED(widget); + m_handler->removeWidget(widget); Core::EditorManager::instance()->hideEditorInfoBar( QLatin1String(Constants::MINI_BUFFER)); } -void FakeVimPlugin::editorOpened(Core::IEditor *editor) +void FakeVimPluginPrivate::editorOpened(Core::IEditor *editor) { + Q_UNUSED(editor); //qDebug() << "OPENING: " << editor << editor->widget(); //installHandler(editor->widget()); } -void FakeVimPlugin::editorAboutToClose(Core::IEditor *editor) +void FakeVimPluginPrivate::editorAboutToClose(Core::IEditor *editor) { //qDebug() << "CLOSING: " << editor << editor->widget(); removeHandler(editor->widget()); } -void FakeVimPlugin::showCommandBuffer(const QString &contents) +void FakeVimPluginPrivate::showCommandBuffer(const QString &contents) { Core::EditorManager::instance()->showEditorInfoBar( QLatin1String(Constants::MINI_BUFFER), contents, tr("Quit FakeVim"), m_handler, SLOT(quit())); } -void FakeVimPlugin::showExtraInformation(const QString &text) +void FakeVimPluginPrivate::showExtraInformation(const QString &text) { QMessageBox::information(0, tr("FakeVim Information"), text); } -//#include "fakevimplugin.moc" +void FakeVimPluginPrivate::changeSelection(QWidget *widget, + const QList<QTextEdit::ExtraSelection> &selection) +{ + if (BaseTextEditor *bt = qobject_cast<BaseTextEditor *>(widget)) + bt->setExtraSelections(BaseTextEditor::FakeVimSelection, selection); +} + + +/////////////////////////////////////////////////////////////////////// +// +// FakeVimPlugin +// +/////////////////////////////////////////////////////////////////////// + +FakeVimPlugin::FakeVimPlugin() + : d(new FakeVimPluginPrivate(this)) +{} + +FakeVimPlugin::~FakeVimPlugin() +{ + delete d; +} + +bool FakeVimPlugin::initialize(const QStringList &arguments, QString *error_message) +{ + return d->initialize(arguments, error_message); +} + +void FakeVimPlugin::shutdown() +{ + d->shutdown(); +} + +void FakeVimPlugin::extensionsInitialized() +{ +} + +#include "fakevimplugin.moc" Q_EXPORT_PLUGIN(FakeVimPlugin) diff --git a/src/plugins/fakevim/fakevimplugin.h b/src/plugins/fakevim/fakevimplugin.h index 793c2264d0086b59e9b17c44275fe63b397b506f..33876d21ecab99feb43b243fe3eb914df4c49310 100644 --- a/src/plugins/fakevim/fakevimplugin.h +++ b/src/plugins/fakevim/fakevimplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -36,33 +36,13 @@ #include <extensionsystem/iplugin.h> -#include <QtCore/QObject> - -QT_BEGIN_NAMESPACE -class QAction; -QT_END_NAMESPACE - - -namespace Core { - -class ICore; -class IEditor; - -} // namespace Core - - -namespace TextEditor { - -class ITextEditor; - -} // namespace TextEditor - - namespace FakeVim { namespace Internal { class FakeVimHandler; +class FakeVimPluginPrivate; + class FakeVimPlugin : public ExtensionSystem::IPlugin { Q_OBJECT @@ -72,23 +52,14 @@ public: ~FakeVimPlugin(); private: + // implementation of ExtensionSystem::IPlugin bool initialize(const QStringList &arguments, QString *error_message); void shutdown(); void extensionsInitialized(); -private slots: - void installHandler(); - void installHandler(QWidget *widget); - void removeHandler(QWidget *widget); - void showCommandBuffer(const QString &contents); - void showExtraInformation(const QString &msg); - void editorOpened(Core::IEditor *); - void editorAboutToClose(Core::IEditor *); - private: - FakeVimHandler *m_handler; - QAction *m_installHandlerAction; - Core::ICore *m_core; + friend class FakeVimPluginPrivate; + FakeVimPluginPrivate *d; }; } // namespace Internal diff --git a/src/plugins/find/basetextfind.cpp b/src/plugins/find/basetextfind.cpp index 8b83975cb49f7d84a99158c4e230d4207976cc89..2428d25fbe58571ac1345836da8e063488940473 100644 --- a/src/plugins/find/basetextfind.cpp +++ b/src/plugins/find/basetextfind.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/find/basetextfind.h b/src/plugins/find/basetextfind.h index aa1fe59ec24f03c7213e31d07428ede5bc9f32e9..c1b66381f1f6f1929fe39220127c2db85cc19df6 100644 --- a/src/plugins/find/basetextfind.h +++ b/src/plugins/find/basetextfind.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/find/currentdocumentfind.cpp b/src/plugins/find/currentdocumentfind.cpp index dd25564a4373fee90f1112ebfeb24a8a1cc02fb8..b51504db7dfe803545f1eace2b54be5063a9ebdb 100644 --- a/src/plugins/find/currentdocumentfind.cpp +++ b/src/plugins/find/currentdocumentfind.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/find/currentdocumentfind.h b/src/plugins/find/currentdocumentfind.h index 6951cee5e71e03270b2e05b86ce44da8bb1a7343..2f41acbe7b023fe2af9af03d8858e85089ed6af6 100644 --- a/src/plugins/find/currentdocumentfind.h +++ b/src/plugins/find/currentdocumentfind.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/find/find_global.h b/src/plugins/find/find_global.h index c6c0ac5b10590ab5a966d511c0f60f9edbd30652..7da22f39fcf17e7c6db08b0a785037a90d7b7bf0 100644 --- a/src/plugins/find/find_global.h +++ b/src/plugins/find/find_global.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/find/findplugin.cpp b/src/plugins/find/findplugin.cpp index 0bf2ec4fdb929487f2e600807c6075eaef1a070c..b3c417debd303d27add21fc4a84be0730e1aa182 100644 --- a/src/plugins/find/findplugin.cpp +++ b/src/plugins/find/findplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -38,9 +38,9 @@ #include "findtoolwindow.h" #include "searchresultwindow.h" -#include <coreplugin/actionmanager/actionmanagerinterface.h> -#include <coreplugin/actionmanager/iactioncontainer.h> -#include <coreplugin/actionmanager/icommand.h> +#include <coreplugin/actionmanager/actionmanager.h> +#include <coreplugin/actionmanager/actioncontainer.h> +#include <coreplugin/actionmanager/command.h> #include <coreplugin/coreconstants.h> #include <utils/qtcassert.h> @@ -126,16 +126,16 @@ void FindPlugin::openFindFilter() void FindPlugin::setupMenu() { - Core::ActionManagerInterface *am = m_core->actionManager(); - Core::IActionContainer *medit = am->actionContainer(Core::Constants::M_EDIT); - Core::IActionContainer *mfind = am->createMenu(Constants::M_FIND); + Core::ActionManager *am = m_core->actionManager(); + Core::ActionContainer *medit = am->actionContainer(Core::Constants::M_EDIT); + Core::ActionContainer *mfind = am->createMenu(Constants::M_FIND); medit->addMenu(mfind, Core::Constants::G_EDIT_FIND); mfind->menu()->setTitle(tr("&Find/Replace")); mfind->appendGroup(Constants::G_FIND_FILTERS); mfind->appendGroup(Constants::G_FIND_FLAGS); mfind->appendGroup(Constants::G_FIND_ACTIONS); QList<int> globalcontext = QList<int>() << Core::Constants::C_GLOBAL_ID; - Core::ICommand *cmd; + Core::Command *cmd; QAction *separator; separator = new QAction(this); separator->setSeparator(true); @@ -149,13 +149,13 @@ void FindPlugin::setupMenu() void FindPlugin::setupFilterMenuItems() { - Core::ActionManagerInterface *am = m_core->actionManager(); + Core::ActionManager *am = m_core->actionManager(); QList<IFindFilter*> findInterfaces = ExtensionSystem::PluginManager::instance()->getObjects<IFindFilter>(); - Core::ICommand *cmd; + Core::Command *cmd; QList<int> globalcontext = QList<int>() << Core::Constants::C_GLOBAL_ID; - Core::IActionContainer *mfind = am->actionContainer(Constants::M_FIND); + Core::ActionContainer *mfind = am->actionContainer(Constants::M_FIND); m_filterActions.clear(); foreach (IFindFilter *filter, findInterfaces) { QAction *action = new QAction(filter->name(), this); diff --git a/src/plugins/find/findplugin.h b/src/plugins/find/findplugin.h index 4a3807913768b726585d56dae741ca321980b016..caad6daa0cc3be4d52181a4a9f630a9a43c48208 100644 --- a/src/plugins/find/findplugin.h +++ b/src/plugins/find/findplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/find/findtoolbar.cpp b/src/plugins/find/findtoolbar.cpp index edfb5015baaa1ac5a85e23471c71354264e66e0a..323fdbac58cbca395ba34409b204e22ae8d45c24 100644 --- a/src/plugins/find/findtoolbar.cpp +++ b/src/plugins/find/findtoolbar.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -37,9 +37,9 @@ #include <coreplugin/coreconstants.h> #include <coreplugin/findplaceholder.h> -#include <coreplugin/actionmanager/actionmanagerinterface.h> -#include <coreplugin/actionmanager/iactioncontainer.h> -#include <coreplugin/actionmanager/icommand.h> +#include <coreplugin/actionmanager/actionmanager.h> +#include <coreplugin/actionmanager/actioncontainer.h> +#include <coreplugin/actionmanager/command.h> #include <QtCore/QSettings> #include <QtGui/QPushButton> @@ -138,9 +138,9 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen QList<int> globalcontext; globalcontext << Core::Constants::C_GLOBAL_ID; - Core::ActionManagerInterface *am = ExtensionSystem::PluginManager::instance()->getObject<Core::ICore>()->actionManager(); - Core::IActionContainer *mfind = am->actionContainer(Constants::M_FIND); - Core::ICommand *cmd; + Core::ActionManager *am = ExtensionSystem::PluginManager::instance()->getObject<Core::ICore>()->actionManager(); + Core::ActionContainer *mfind = am->actionContainer(Constants::M_FIND); + Core::Command *cmd; m_findInDocumentAction = new QAction(tr("Current Document"), this); cmd = am->registerAction(m_findInDocumentAction, Constants::FIND_IN_DOCUMENT, globalcontext); diff --git a/src/plugins/find/findtoolbar.h b/src/plugins/find/findtoolbar.h index a0055bc18c99e3eef1feb62ba1608ed19b58c6f6..030a57876a38adde52cad9308cb804fb634141af 100644 --- a/src/plugins/find/findtoolbar.h +++ b/src/plugins/find/findtoolbar.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/find/findtoolwindow.cpp b/src/plugins/find/findtoolwindow.cpp index b448e47ba96955ac888003522cd8fe36f73fdfed..f45c99b2aa313e963ff0d11d4b98d4a18bb0d42c 100644 --- a/src/plugins/find/findtoolwindow.cpp +++ b/src/plugins/find/findtoolwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/find/findtoolwindow.h b/src/plugins/find/findtoolwindow.h index bbb82cdd27adff0707fefd61497f42c5e111f294..f633c641bd65d00c6780f1a8ea1ef765abf7bab5 100644 --- a/src/plugins/find/findtoolwindow.h +++ b/src/plugins/find/findtoolwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/find/ifindfilter.h b/src/plugins/find/ifindfilter.h index 2fc7b5f02a9d9f32a01feb8364fc87710e9ffda3..54bfa2f3672e29d950e157769c0d165776865ca9 100644 --- a/src/plugins/find/ifindfilter.h +++ b/src/plugins/find/ifindfilter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/find/ifindsupport.h b/src/plugins/find/ifindsupport.h index 532568471f1ab0e0385305b7e84b45c9c562a098..0a525ed8caf61a2e2c6eb556ced13a4c16e06830 100644 --- a/src/plugins/find/ifindsupport.h +++ b/src/plugins/find/ifindsupport.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/find/searchresulttreeitemdelegate.cpp b/src/plugins/find/searchresulttreeitemdelegate.cpp index 920e00650330af4e7717989909b4887d9471e028..1f375422607e3692c11b201179969d7c68953b6f 100644 --- a/src/plugins/find/searchresulttreeitemdelegate.cpp +++ b/src/plugins/find/searchresulttreeitemdelegate.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/find/searchresulttreeitemdelegate.h b/src/plugins/find/searchresulttreeitemdelegate.h index 37e2413aabf475da96bba7b14fe99a811b49171a..894fad525fcc99c61247f9261ca50633394f4d16 100644 --- a/src/plugins/find/searchresulttreeitemdelegate.h +++ b/src/plugins/find/searchresulttreeitemdelegate.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/find/searchresulttreeitemroles.h b/src/plugins/find/searchresulttreeitemroles.h index b6affc361f369138598015c56859dedca3e47aa4..2ce7128d6734f6bd0c99d5fe26da8f3606fbd537 100644 --- a/src/plugins/find/searchresulttreeitemroles.h +++ b/src/plugins/find/searchresulttreeitemroles.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/find/searchresulttreeitems.cpp b/src/plugins/find/searchresulttreeitems.cpp index b73adf506b65b4a31c7798eb73ae8f3b56e86440..31242ba092ed58388b4c56b1f6d7abb379f6069e 100644 --- a/src/plugins/find/searchresulttreeitems.cpp +++ b/src/plugins/find/searchresulttreeitems.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/find/searchresulttreeitems.h b/src/plugins/find/searchresulttreeitems.h index 7154ed1e46b810984bf1aa5cb74c2c9e089d8598..f4fa84d9c9e891d8920c5b1b2937dbfd7f9c8fa2 100644 --- a/src/plugins/find/searchresulttreeitems.h +++ b/src/plugins/find/searchresulttreeitems.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/find/searchresulttreemodel.cpp b/src/plugins/find/searchresulttreemodel.cpp index 0cabff4999584e8268bdb68e9bc0f06cb4c5b8da..8fe4f2bbb8c0d70f4d5a40362325fd61b0cea051 100644 --- a/src/plugins/find/searchresulttreemodel.cpp +++ b/src/plugins/find/searchresulttreemodel.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/find/searchresulttreemodel.h b/src/plugins/find/searchresulttreemodel.h index c12196b306d9f6976e06d3402904df35f33bcc54..ea01dc296f8f9bc01bef63947d6773df6ec8ea89 100644 --- a/src/plugins/find/searchresulttreemodel.h +++ b/src/plugins/find/searchresulttreemodel.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/find/searchresulttreeview.cpp b/src/plugins/find/searchresulttreeview.cpp index 15ce04b74f5eb7e019bb4812df434adab3012cad..ea950fb949ce68ab11660bc05fc021067094b272 100644 --- a/src/plugins/find/searchresulttreeview.cpp +++ b/src/plugins/find/searchresulttreeview.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/find/searchresulttreeview.h b/src/plugins/find/searchresulttreeview.h index 9c69c9519095f9dd3f8d549ae090ab1c0dced00b..6d546cc2f34fb47a15ac033ffe3b4f60a7d64a16 100644 --- a/src/plugins/find/searchresulttreeview.h +++ b/src/plugins/find/searchresulttreeview.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/find/searchresultwindow.cpp b/src/plugins/find/searchresultwindow.cpp index ffbc1ba4e5b2c8819346ce8657b5b6bfc9a40303..57cd669515b6a2a49f6ac8d9d5de03990d6f0192 100644 --- a/src/plugins/find/searchresultwindow.cpp +++ b/src/plugins/find/searchresultwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/find/searchresultwindow.h b/src/plugins/find/searchresultwindow.h index 82b88671282976023b08005562b21f276d53acac..c167727ea057781db090c7f10ec75f432e7ba82d 100644 --- a/src/plugins/find/searchresultwindow.h +++ b/src/plugins/find/searchresultwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/find/textfindconstants.h b/src/plugins/find/textfindconstants.h index a5ac526b9dea7082c903536494bae84aa473f136..334960bb544b09ba4659e95f39f09ad80312cd80 100644 --- a/src/plugins/find/textfindconstants.h +++ b/src/plugins/find/textfindconstants.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/git/annotationhighlighter.cpp b/src/plugins/git/annotationhighlighter.cpp index 6fff26f6bfd3f1338f1469d02d9d5d87aa61bfe0..9959002fe9c1051ce36f626d19128fa222d58b08 100644 --- a/src/plugins/git/annotationhighlighter.cpp +++ b/src/plugins/git/annotationhighlighter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/git/annotationhighlighter.h b/src/plugins/git/annotationhighlighter.h index 336942178cbaaf55430ef24ed750b0facfa6164b..1873b05c1c48e94b3153e482f6e05b13917d5ac2 100644 --- a/src/plugins/git/annotationhighlighter.h +++ b/src/plugins/git/annotationhighlighter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/git/changeselectiondialog.cpp b/src/plugins/git/changeselectiondialog.cpp index cd520aba700139eefa9d9e6c11d01e8bece217ff..c19b9e94a53e7be623054a74fa1b4b3016411439 100644 --- a/src/plugins/git/changeselectiondialog.cpp +++ b/src/plugins/git/changeselectiondialog.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/git/changeselectiondialog.h b/src/plugins/git/changeselectiondialog.h index cef4478e838f1258fdc87aad838a9fa3b06fa84f..68be160c10eed9d3c83abb4deb7faf8a84a7e32f 100644 --- a/src/plugins/git/changeselectiondialog.h +++ b/src/plugins/git/changeselectiondialog.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/git/commitdata.cpp b/src/plugins/git/commitdata.cpp index 8b96fe23c973c5e8fb1dd2238adce22bce9b6f21..1041d7573c09c011c2517ebfcea6c49e15550abf 100644 --- a/src/plugins/git/commitdata.cpp +++ b/src/plugins/git/commitdata.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -32,8 +32,12 @@ ***************************************************************************/ #include "commitdata.h" +#include <utils/qtcassert.h> #include <QtCore/QDebug> +#include <QtCore/QRegExp> + +const char *const kBranchIndicatorC = "# On branch"; namespace Git { namespace Internal { @@ -85,6 +89,135 @@ void CommitData::clear() untrackedFiles.clear(); } +// Split a state/file spec from git status output +// '#<tab>modified:<blanks>git .pro' +// into state and file ('modified', 'git .pro'). +CommitData::StateFilePair splitStateFileSpecification(const QString &line) +{ + QPair<QString, QString> rc; + const int statePos = 2; + const int colonIndex = line.indexOf(QLatin1Char(':'), statePos); + if (colonIndex == -1) + return rc; + rc.first = line.mid(statePos, colonIndex - statePos); + int filePos = colonIndex + 1; + const QChar blank = QLatin1Char(' '); + while (line.at(filePos) == blank) + filePos++; + if (filePos < line.size()) + rc.second = line.mid(filePos, line.size() - filePos); + return rc; +} + +// Convenience to add a state/file spec to a list +static inline bool addStateFileSpecification(const QString &line, QList<CommitData::StateFilePair> *list) +{ + const CommitData::StateFilePair sf = splitStateFileSpecification(line); + if (sf.first.isEmpty() || sf.second.isEmpty()) + return false; + list->push_back(sf); + return true; +} + +/* Parse a git status file list: + * \code + # Changes to be committed: + #<tab>modified:<blanks>git.pro + # Changed but not updated: + #<tab>modified:<blanks>git.pro + # Untracked files: + #<tab>git.pro + \endcode +*/ + +bool CommitData::filesEmpty() const +{ + return stagedFiles.empty() && unstagedFiles.empty() && untrackedFiles.empty(); +} + +bool CommitData::parseFilesFromStatus(const QString &output) +{ + enum State { None, CommitFiles, NotUpdatedFiles, UntrackedFiles }; + + const QStringList lines = output.split(QLatin1Char('\n')); + const QString branchIndicator = QLatin1String(kBranchIndicatorC); + const QString commitIndicator = QLatin1String("# Changes to be committed:"); + const QString notUpdatedIndicator = QLatin1String("# Changed but not updated:"); + const QString untrackedIndicator = QLatin1String("# Untracked files:"); + + State s = None; + // Match added/changed-not-updated files: "#<tab>modified: foo.cpp" + QRegExp filesPattern(QLatin1String("#\\t[^:]+:\\s+.+")); + QTC_ASSERT(filesPattern.isValid(), return false); + + const QStringList::const_iterator cend = lines.constEnd(); + for (QStringList::const_iterator it = lines.constBegin(); it != cend; ++it) { + const QString line = *it; + if (line.startsWith(branchIndicator)) { + panelInfo.branch = line.mid(branchIndicator.size() + 1); + } else { + if (line.startsWith(commitIndicator)) { + s = CommitFiles; + } else { + if (line.startsWith(notUpdatedIndicator)) { + s = NotUpdatedFiles; + } else { + if (line.startsWith(untrackedIndicator)) { + // Now match untracked: "#<tab>foo.cpp" + s = UntrackedFiles; + filesPattern = QRegExp(QLatin1String("#\\t.+")); + QTC_ASSERT(filesPattern.isValid(), return false); + } else { + if (filesPattern.exactMatch(line)) { + switch (s) { + case CommitFiles: + addStateFileSpecification(line, &stagedFiles); + break; + case NotUpdatedFiles: + addStateFileSpecification(line, &unstagedFiles); + break; + case UntrackedFiles: + untrackedFiles.push_back(line.mid(2).trimmed()); + break; + case None: + break; + } + } + } + } + } + } + } + return true; +} + +// Convert a spec pair list to a list of file names, optionally +// filter for a state +static QStringList specToFileNames(const QList<CommitData::StateFilePair> &files, + const QString &stateFilter) +{ + typedef QList<CommitData::StateFilePair>::const_iterator ConstIterator; + if (files.empty()) + return QStringList(); + const bool emptyFilter = stateFilter.isEmpty(); + QStringList rc; + const ConstIterator cend = files.constEnd(); + for (ConstIterator it = files.constBegin(); it != cend; ++it) + if (emptyFilter || stateFilter == it->first) + rc.push_back(it->second); + return rc; +} + +QStringList CommitData::stagedFileNames(const QString &stateFilter) const +{ + return specToFileNames(stagedFiles, stateFilter); +} + +QStringList CommitData::unstagedFileNames(const QString &stateFilter) const +{ + return specToFileNames(unstagedFiles, stateFilter); +} + QDebug operator<<(QDebug d, const CommitData &data) { d << data.panelInfo << data.panelData; diff --git a/src/plugins/git/commitdata.h b/src/plugins/git/commitdata.h index a1dc05ef42540be2b3ce927978efc69c41a1a720..069b9589fcc393df3120a3424edbe4bf22eee734 100644 --- a/src/plugins/git/commitdata.h +++ b/src/plugins/git/commitdata.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -35,6 +35,7 @@ #define COMMITDATA_H #include <QtCore/QStringList> +#include <QtCore/QPair> QT_BEGIN_NAMESPACE class QDebug; @@ -68,11 +69,26 @@ QDebug operator<<(QDebug d, const GitSubmitEditorPanelData &); struct CommitData { + // A pair of state string/file name ('modified', 'file.cpp'). + typedef QPair<QString, QString> StateFilePair; + void clear(); + // Parse the files and the branch of panelInfo + // from a git status output + bool parseFilesFromStatus(const QString &output); + + bool filesEmpty() const; + + // Convenience to retrieve the file names from + // the specification list. Optionally filter for a certain state + QStringList stagedFileNames(const QString &stateFilter = QString()) const; + QStringList unstagedFileNames(const QString &stateFilter = QString()) const; + GitSubmitEditorPanelInfo panelInfo; GitSubmitEditorPanelData panelData; - QStringList stagedFiles; - QStringList unstagedFiles; + + QList<StateFilePair> stagedFiles; + QList<StateFilePair> unstagedFiles; QStringList untrackedFiles; }; diff --git a/src/plugins/git/git.pro b/src/plugins/git/git.pro index 7f4ed2fc0ccb3ae49953a0c236dd9ecbb55e0fef..2bd1d00d9c45bef0543a4c4bbf3d3a608b761f58 100644 --- a/src/plugins/git/git.pro +++ b/src/plugins/git/git.pro @@ -20,7 +20,8 @@ HEADERS += gitplugin.h \ gitversioncontrol.h \ gitsettings.h \ branchdialog.h \ - branchmodel.h + branchmodel.h \ + gitcommand.h SOURCES += gitplugin.cpp \ gitoutputwindow.cpp \ gitclient.cpp \ @@ -34,7 +35,8 @@ SOURCES += gitplugin.cpp \ gitversioncontrol.cpp \ gitsettings.cpp \ branchdialog.cpp \ - branchmodel.cpp + branchmodel.cpp \ + gitcommand.cpp FORMS += changeselectiondialog.ui \ settingspage.ui \ gitsubmitpanel.ui \ diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 281a9572a215079dae27ad6176349236f7039f73..81820b8fa0fbb5097e207c9e7b11f07b8d8dcf25 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -32,24 +32,24 @@ ***************************************************************************/ #include "gitclient.h" +#include "gitcommand.h" #include "commitdata.h" #include "gitconstants.h" #include "gitplugin.h" #include "gitsubmiteditor.h" -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/coreconstants.h> #include <coreplugin/editormanager/editormanager.h> #include <coreplugin/icore.h> #include <coreplugin/messagemanager.h> -#include <coreplugin/progressmanager/progressmanagerinterface.h> +#include <coreplugin/progressmanager/progressmanager.h> #include <coreplugin/uniqueidmanager.h> #include <texteditor/itexteditor.h> #include <utils/qtcassert.h> #include <vcsbase/vcsbaseeditor.h> -#include <QtCore/QFuture> #include <QtCore/QRegExp> #include <QtCore/QTemporaryFile> #include <QtCore/QTime> @@ -61,7 +61,6 @@ using namespace Git; using namespace Git::Internal; -const char *const kGitCommand = "git"; const char *const kGitDirectoryC = ".git"; const char *const kBranchIndicatorC = "# On branch"; @@ -184,29 +183,59 @@ VCSBase::VCSBaseEditor return rc; } -void GitClient::diff(const QString &workingDirectory, const QStringList &fileNames) +void GitClient::diff(const QString &workingDirectory, + const QStringList &diffArgs, + const QStringList &unstagedFileNames, + const QStringList &stagedFileNames) { - if (Git::Constants::debug) - qDebug() << "diff" << workingDirectory << fileNames; - QStringList arguments; - arguments << QLatin1String("diff") << QLatin1String("--") << fileNames; + if (Git::Constants::debug) + qDebug() << "diff" << workingDirectory << unstagedFileNames << stagedFileNames; + + const QString binary = QLatin1String(Constants::GIT_BINARY); const QString kind = QLatin1String(Git::Constants::GIT_DIFF_EDITOR_KIND); const QString title = tr("Git Diff"); VCSBase::VCSBaseEditor *editor = createVCSEditor(kind, title, workingDirectory, true, "originalFileName", workingDirectory); - executeGit(workingDirectory, arguments, editor); + // Create a batch of 2 commands to be run after each other in case + // we have a mixture of staged/unstaged files as is the case + // when using the submit dialog. + GitCommand *command = createCommand(workingDirectory, editor); + // Directory diff? + if (unstagedFileNames.empty() && stagedFileNames.empty()) { + QStringList arguments; + arguments << QLatin1String("diff") << diffArgs; + m_plugin->outputWindow()->append(formatCommand(binary, arguments)); + command->addJob(arguments); + } else { + // Files diff. + if (!unstagedFileNames.empty()) { + QStringList arguments; + arguments << QLatin1String("diff") << diffArgs << QLatin1String("--") << unstagedFileNames; + m_plugin->outputWindow()->append(formatCommand(binary, arguments)); + command->addJob(arguments); + } + if (!stagedFileNames.empty()) { + QStringList arguments; + arguments << QLatin1String("diff") << QLatin1String("--cached") << diffArgs << QLatin1String("--") << stagedFileNames; + m_plugin->outputWindow()->append(formatCommand(binary, arguments)); + command->addJob(arguments); + } + } + command->execute(); } -void GitClient::diff(const QString &workingDirectory, const QString &fileName) +void GitClient::diff(const QString &workingDirectory, + const QStringList &diffArgs, + const QString &fileName) { if (Git::Constants::debug) qDebug() << "diff" << workingDirectory << fileName; QStringList arguments; arguments << QLatin1String("diff"); if (!fileName.isEmpty()) - arguments << QLatin1String("--") << fileName; + arguments << diffArgs << QLatin1String("--") << fileName; const QString kind = QLatin1String(Git::Constants::GIT_DIFF_EDITOR_KIND); const QString title = tr("Git Diff %1").arg(fileName); @@ -435,42 +464,47 @@ bool GitClient::synchronousShow(const QString &workingDirectory, const QString & return true; } - -void GitClient::executeGit(const QString &workingDirectory, const QStringList &arguments, - VCSBase::VCSBaseEditor* editor, - bool outputToWindow) +// Factory function to create an asynchronous command +GitCommand *GitClient::createCommand(const QString &workingDirectory, + VCSBase::VCSBaseEditor* editor, + bool outputToWindow) { if (Git::Constants::debug) - qDebug() << "executeGit" << workingDirectory << arguments << editor; + qDebug() << Q_FUNC_INFO << workingDirectory << editor; GitOutputWindow *outputWindow = m_plugin->outputWindow(); - outputWindow->append(formatCommand(QLatin1String(kGitCommand), arguments)); - QProcess process; ProjectExplorer::Environment environment = ProjectExplorer::Environment::systemEnvironment(); - if (m_settings.adoptPath) environment.set(QLatin1String("PATH"), m_settings.path); - GitCommand* command = new GitCommand(); + GitCommand* command = new GitCommand(workingDirectory, environment); if (outputToWindow) { if (!editor) { // assume that the commands output is the important thing - connect(command, SIGNAL(outputText(QString)), this, SLOT(appendAndPopup(QString))); connect(command, SIGNAL(outputData(QByteArray)), this, SLOT(appendDataAndPopup(QByteArray))); } else { - connect(command, SIGNAL(outputText(QString)), outputWindow, SLOT(append(QString))); connect(command, SIGNAL(outputData(QByteArray)), outputWindow, SLOT(appendData(QByteArray))); } } else { QTC_ASSERT(editor, /**/); - connect(command, SIGNAL(outputText(QString)), editor, SLOT(setPlainText(QString))); connect(command, SIGNAL(outputData(QByteArray)), editor, SLOT(setPlainTextData(QByteArray))); } if (outputWindow) connect(command, SIGNAL(errorText(QString)), this, SLOT(appendAndPopup(QString))); + return command; +} - command->execute(arguments, workingDirectory, environment); +// Execute a single command +void GitClient::executeGit(const QString &workingDirectory, + const QStringList &arguments, + VCSBase::VCSBaseEditor* editor, + bool outputToWindow) +{ + m_plugin->outputWindow()->append(formatCommand(QLatin1String(Constants::GIT_BINARY), arguments)); + GitCommand *command = createCommand(workingDirectory, editor, outputToWindow); + command->addJob(arguments); + command->execute(); } void GitClient::appendDataAndPopup(const QByteArray &data) @@ -493,7 +527,7 @@ bool GitClient::synchronousGit(const QString &workingDirectory, { if (Git::Constants::debug) qDebug() << "synchronousGit" << workingDirectory << arguments; - const QString binary = QLatin1String(kGitCommand); + const QString binary = QLatin1String(Constants::GIT_BINARY); if (logCommandToWindow) m_plugin->outputWindow()->append(formatCommand(binary, arguments)); @@ -622,73 +656,6 @@ GitClient::StatusResult GitClient::gitStatus(const QString &workingDirectory, return StatusChanged; } -/* Parse a git status file list: - * \code - # Changes to be committed: - #<tab>modified:<blanks>git.pro - # Changed but not updated: - #<tab>modified:<blanks>git.pro - # Untracked files: - #<tab>git.pro - \endcode -*/ -static bool parseFiles(const QString &output, CommitData *d) -{ - enum State { None, CommitFiles, NotUpdatedFiles, UntrackedFiles }; - - const QStringList lines = output.split(QLatin1Char('\n')); - const QString branchIndicator = QLatin1String(kBranchIndicatorC); - const QString commitIndicator = QLatin1String("# Changes to be committed:"); - const QString notUpdatedIndicator = QLatin1String("# Changed but not updated:"); - const QString untrackedIndicator = QLatin1String("# Untracked files:"); - - State s = None; - // Match added/changed-not-updated files: "#<tab>modified: foo.cpp" - QRegExp filesPattern(QLatin1String("#\\t[^:]+:\\s+.+")); - QTC_ASSERT(filesPattern.isValid(), return false); - - const QStringList::const_iterator cend = lines.constEnd(); - for (QStringList::const_iterator it = lines.constBegin(); it != cend; ++it) { - const QString line = *it; - if (line.startsWith(branchIndicator)) { - d->panelInfo.branch = line.mid(branchIndicator.size() + 1); - } else { - if (line.startsWith(commitIndicator)) { - s = CommitFiles; - } else { - if (line.startsWith(notUpdatedIndicator)) { - s = NotUpdatedFiles; - } else { - if (line.startsWith(untrackedIndicator)) { - // Now match untracked: "#<tab>foo.cpp" - s = UntrackedFiles; - filesPattern = QRegExp(QLatin1String("#\\t.+")); - QTC_ASSERT(filesPattern.isValid(), return false); - } else { - if (filesPattern.exactMatch(line)) { - const QString fileSpec = line.mid(2).trimmed(); - switch (s) { - case CommitFiles: - d->stagedFiles.push_back(trimFileSpecification(fileSpec)); - break; - case NotUpdatedFiles: - d->unstagedFiles.push_back(trimFileSpecification(fileSpec)); - break; - case UntrackedFiles: - d->untrackedFiles.push_back(fileSpec); - break; - case None: - break; - } - } - } - } - } - } - } - return !d->stagedFiles.empty() || !d->unstagedFiles.empty() || !d->untrackedFiles.empty(); -} - // Filter out untracked files that are not part of the project static void filterUntrackedFilesOfProject(const QString &repoDir, QStringList *l) { @@ -771,19 +738,15 @@ bool GitClient::getCommitData(const QString &workingDirectory, // # // # list of files... - if (!parseFiles(output, d)) { + if (!d->parseFilesFromStatus(output)) { *errorMessage = msgParseFilesFailed(); return false; } - // Filter out untracked files that are not part of the project and, - // for symmetry, insert the prefix "untracked:" (as "added:" or ":modified" - // for staged files). + // Filter out untracked files that are not part of the project filterUntrackedFilesOfProject(repoDirectory, &d->untrackedFiles); - if (!d->untrackedFiles.empty()) { - const QString untrackedPrefix = QLatin1String("untracked: "); - const QStringList::iterator pend = d->untrackedFiles.end(); - for (QStringList::iterator it = d->untrackedFiles.begin(); it != pend; ++it) - it->insert(0, untrackedPrefix); + if (d->filesEmpty()) { + *errorMessage = msgNoChangedFiles(); + return false; } d->panelData.author = readConfigValue(workingDirectory, QLatin1String("user.name")); @@ -881,7 +844,7 @@ GitClient::RevertResult GitClient::revertI(QStringList files, bool *ptrToIsDirec return RevertFailed; } CommitData data; - if (!parseFiles(output, &data)) { + if (!data.parseFilesFromStatus(output)) { *errorMessage = msgParseFilesFailed(); return RevertFailed; } @@ -896,9 +859,9 @@ GitClient::RevertResult GitClient::revertI(QStringList files, bool *ptrToIsDirec } // From the status output, determine all modified [un]staged files. - const QString modifiedPattern = QLatin1String("modified: "); - const QStringList allStagedFiles = GitSubmitEditor::statusListToFileList(data.stagedFiles.filter(modifiedPattern)); - const QStringList allUnstagedFiles = GitSubmitEditor::statusListToFileList(data.unstagedFiles.filter(modifiedPattern)); + const QString modifiedState = QLatin1String("modified"); + const QStringList allStagedFiles = data.stagedFileNames(modifiedState); + const QStringList allUnstagedFiles = data.unstagedFileNames(modifiedState); // Unless a directory was passed, filter all modified files for the // argument file list. QStringList stagedFiles = allStagedFiles; @@ -1040,67 +1003,3 @@ void GitClient::setSettings(const GitSettings &s) } } -// ------------------------ GitCommand -GitCommand::GitCommand() -{ -} - -GitCommand::~GitCommand() -{ -} - -void GitCommand::execute(const QStringList &arguments, - const QString &workingDirectory, - const ProjectExplorer::Environment &environment) -{ - if (Git::Constants::debug) - qDebug() << "GitCommand::execute" << workingDirectory << arguments; - - // For some reason QtConcurrent::run() only works on this - QFuture<void> task = QtConcurrent::run(this, &GitCommand::run - , arguments - , workingDirectory - , environment); - QString taskName = QLatin1String("Git ") + arguments[0]; - - Core::ICore *core = ExtensionSystem::PluginManager::instance()->getObject<Core::ICore>(); - core->progressManager()->addTask(task, taskName - , QLatin1String("Git.action") - , Core::ProgressManagerInterface::CloseOnSuccess); -} - -void GitCommand::run(const QStringList &arguments, - const QString &workingDirectory, - const ProjectExplorer::Environment &environment) -{ - if (Git::Constants::debug) - qDebug() << "GitCommand::run" << workingDirectory << arguments; - QProcess process; - if (!workingDirectory.isEmpty()) - process.setWorkingDirectory(workingDirectory); - - ProjectExplorer::Environment env = environment; - if (env.toStringList().isEmpty()) - env = ProjectExplorer::Environment::systemEnvironment(); - process.setEnvironment(env.toStringList()); - - process.start(QLatin1String(kGitCommand), arguments); - if (!process.waitForFinished()) { - emit errorText(QLatin1String("Error: Git timed out")); - return; - } - - const QByteArray output = process.readAllStandardOutput(); - if (output.isEmpty()) { - if (arguments.at(0) == QLatin1String("diff")) - emit outputText(tr("The file does not differ from HEAD")); - } else { - emit outputData(output); - } - const QByteArray error = process.readAllStandardError(); - if (!error.isEmpty()) - emit errorText(QString::fromLocal8Bit(error)); - - // As it is used asynchronously, we need to delete ourselves - this->deleteLater(); -} diff --git a/src/plugins/git/gitclient.h b/src/plugins/git/gitclient.h index f09daa00ab8e74d0106a12abfd6118cc83db2e57..aa4ad97015ae3c2360fb5c460dd047a0bb9ae26c 100644 --- a/src/plugins/git/gitclient.h +++ b/src/plugins/git/gitclient.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -38,7 +38,6 @@ #include <coreplugin/iversioncontrol.h> #include <coreplugin/editormanager/ieditor.h> -#include <projectexplorer/environment.h> #include <QtCore/QString> #include <QtCore/QStringList> @@ -78,8 +77,9 @@ public: static QString findRepositoryForFile(const QString &fileName); static QString findRepositoryForDirectory(const QString &dir); - void diff(const QString &workingDirectory, const QString &fileName); - void diff(const QString &workingDirectory, const QStringList &fileNames); + void diff(const QString &workingDirectory, const QStringList &diffArgs, const QString &fileName); + void diff(const QString &workingDirectory, const QStringList &diffArgs, + const QStringList &unstagedFileNames, const QStringList &stagedFileNames= QStringList()); void status(const QString &workingDirectory); void log(const QString &workingDirectory, const QString &fileName); @@ -154,11 +154,14 @@ private: const char *registerDynamicProperty, const QString &dynamicPropertyValue) const; + GitCommand *createCommand(const QString &workingDirectory, + VCSBase::VCSBaseEditor* editor = 0, + bool outputToWindow = false); void executeGit(const QString &workingDirectory, - const QStringList &arguments, - VCSBase::VCSBaseEditor* editor = 0, - bool outputToWindow = false); + const QStringList &arguments, + VCSBase::VCSBaseEditor* editor = 0, + bool outputToWindow = false); bool synchronousGit(const QString &workingDirectory, const QStringList &arguments, @@ -175,24 +178,6 @@ private: GitSettings m_settings; }; -class GitCommand : public QObject -{ - Q_OBJECT -public: - GitCommand(); - ~GitCommand(); - void execute(const QStringList &arguments, - const QString &workingDirectory, - const ProjectExplorer::Environment &environment); - void run(const QStringList &arguments, - const QString &workingDirectory, - const ProjectExplorer::Environment &environment); - -Q_SIGNALS: - void outputData(const QByteArray&); - void outputText(const QString&); - void errorText(const QString&); -}; } // namespace Internal } // namespace Git diff --git a/src/plugins/git/gitcommand.cpp b/src/plugins/git/gitcommand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..703e42a8668520b083ac0c92f98bd176b22e08f6 --- /dev/null +++ b/src/plugins/git/gitcommand.cpp @@ -0,0 +1,138 @@ +/*************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** +** Non-Open Source Usage +** +** Licensees may use this file in accordance with the Qt Beta Version +** License Agreement, Agreement version 2.2 provided with the Software or, +** alternatively, in accordance with the terms contained in a written +** agreement between you and Nokia. +** +** GNU General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the packaging +** of this file. Please review the following information to ensure GNU +** General Public Licensing requirements will be met: +** +** http://www.fsf.org/licensing/licenses/info/GPLv2.html and +** http://www.gnu.org/copyleft/gpl.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt GPL Exception +** version 1.3, included in the file GPL_EXCEPTION.txt in this package. +** +***************************************************************************/ + +#include "gitcommand.h" +#include "gitconstants.h" + +#include <coreplugin/icore.h> +#include <coreplugin/progressmanager/progressmanager.h> + +#include <QtCore/QDebug> +#include <QtCore/QProcess> +#include <QtCore/QFuture> +#include <QtCore/QtConcurrentRun> + +namespace Git { +namespace Internal { + +// Convert environment to list, default to system one. +static inline QStringList environmentToList(const ProjectExplorer::Environment &environment) +{ + const QStringList list = environment.toStringList(); + if (!list.empty()) + return list; + return ProjectExplorer::Environment::systemEnvironment().toStringList(); +} + +GitCommand::Job::Job(const QStringList &a) : + arguments(a) +{ +} + +GitCommand::GitCommand(const QString &workingDirectory, + ProjectExplorer::Environment &environment) : + m_workingDirectory(workingDirectory), + m_environment(environmentToList(environment)) +{ +} + +void GitCommand::addJob(const QStringList &arguments) +{ + m_jobs.push_back(Job(arguments)); +} + +void GitCommand::execute() +{ + if (Git::Constants::debug) + qDebug() << "GitCommand::execute" << m_workingDirectory << m_jobs.size(); + + if (m_jobs.empty()) + return; + + // For some reason QtConcurrent::run() only works on this + QFuture<void> task = QtConcurrent::run(this, &GitCommand::run); + const QString taskName = QLatin1String("Git ") + m_jobs.front().arguments.at(0); + + Core::ICore *core = ExtensionSystem::PluginManager::instance()->getObject<Core::ICore>(); + core->progressManager()->addTask(task, taskName, + QLatin1String("Git.action"), + Core::ProgressManager::CloseOnSuccess); +} + +void GitCommand::run() +{ + if (Git::Constants::debug) + qDebug() << "GitCommand::run" << m_workingDirectory << m_jobs.size(); + QProcess process; + if (!m_workingDirectory.isEmpty()) + process.setWorkingDirectory(m_workingDirectory); + + process.setEnvironment(m_environment); + + QByteArray output; + QString error; + + const int count = m_jobs.size(); + bool ok = true; + for (int j = 0; j < count; j++) { + if (Git::Constants::debug) + qDebug() << "GitCommand::run" << j << '/' << count << m_jobs.at(j).arguments; + + process.start(QLatin1String(Constants::GIT_BINARY), m_jobs.at(j).arguments); + if (!process.waitForFinished()) { + ok = false; + error += QLatin1String("Error: Git timed out"); + break; + } + + output += process.readAllStandardOutput(); + error += QString::fromLocal8Bit(process.readAllStandardError()); + } + + // Special hack: Always produce output for diff + if (ok && output.isEmpty() && m_jobs.front().arguments.at(0) == QLatin1String("diff")) { + output += "The file does not differ from HEAD"; + } + + if (ok && !output.isEmpty()) + emit outputData(output); + + if (!error.isEmpty()) + emit errorText(error); + + // As it is used asynchronously, we need to delete ourselves + this->deleteLater(); +} + +} // namespace Internal +} // namespace Git diff --git a/src/plugins/coreplugin/scriptmanager/scriptmanagerinterface.h b/src/plugins/git/gitcommand.h similarity index 51% rename from src/plugins/coreplugin/scriptmanager/scriptmanagerinterface.h rename to src/plugins/git/gitcommand.h index df145822e2aa117ddd5c557acf93754402957112..a587b74876140a3b6a29873b5c02456ada586080 100644 --- a/src/plugins/coreplugin/scriptmanager/scriptmanagerinterface.h +++ b/src/plugins/git/gitcommand.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -31,46 +31,49 @@ ** ***************************************************************************/ -#ifndef SCRIPTMANAGERINTERFACE_H -#define SCRIPTMANAGERINTERFACE_H +#ifndef GITCOMMAND_H +#define GITCOMMAND_H -#include <coreplugin/core_global.h> +#include <projectexplorer/environment.h> #include <QtCore/QObject> -#include <QtCore/QString> -#include <QtScript/QScriptEngine> -namespace Core { +namespace Git { +namespace Internal { -/* Script Manager. - * Provides a script engine that is initialized with - * QWorkBenchs interfaces and allows for running scripts. - * @{todo} Should it actually manage script files, too? */ - -class CORE_EXPORT ScriptManagerInterface : public QObject +class GitCommand : public QObject { Q_OBJECT public: - // A stack frame as returned by a failed invocation (exception) - // fileName may be empty. lineNumber can be 0 for the top frame (goof-up?). - struct StackFrame { - QString function; - QString fileName; - int lineNumber; + explicit GitCommand(const QString &workingDirectory, + ProjectExplorer::Environment &environment); + + + void addJob(const QStringList &arguments); + void execute(); + +private: + void run(); + +Q_SIGNALS: + void outputData(const QByteArray&); + void errorText(const QString&); + +private: + struct Job { + explicit Job(const QStringList &a); + + QStringList arguments; }; - typedef QList<StackFrame> Stack; - ScriptManagerInterface(QObject *parent = 0) : QObject(parent) {} - virtual ~ScriptManagerInterface() { } + QStringList environment() const; - // Access the engine (for plugins to wrap additional interfaces). - virtual QScriptEngine &scriptEngine() = 0; + const QString m_workingDirectory; + const QStringList m_environment; - // Run a script - virtual bool runScript(const QString &script, QString *errorMessage, Stack *errorStack) = 0; - virtual bool runScript(const QString &script, QString *errorMessage) = 0; + QList<Job> m_jobs; }; -} // namespace Core - -#endif // SCRIPTMANAGERINTERFACE_H +} // namespace Internal +} // namespace Git +#endif // GITCOMMAND_H diff --git a/src/plugins/git/gitconstants.h b/src/plugins/git/gitconstants.h index 6719221f4c0ec6a3f638d963dbc2b835b7f05683..b539046ffb5228a5637199b6fed2dccfac6c0272 100644 --- a/src/plugins/git/gitconstants.h +++ b/src/plugins/git/gitconstants.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -47,6 +47,7 @@ const char * const GITSUBMITEDITOR_KIND = "Git Submit Editor"; const char * const SUBMIT_CURRENT = "Nokia.Git.SubmitCurrentLog"; const char * const DIFF_SELECTED = "Nokia.Git.DiffSelectedFilesInLog"; const char * const SUBMIT_MIMETYPE = "application/vnd.nokia.text.git.submit"; +const char * const GIT_BINARY = "git"; const char * const DIFF_FILE_INDICATOR = "--- "; enum { debug = 0 }; diff --git a/src/plugins/git/giteditor.cpp b/src/plugins/git/giteditor.cpp index e45029d1aa6e588692f6924661554b3da9e50fd1..1a8ff4d09ba6ef3cfe98bf55c7b4491bb7b5be17 100644 --- a/src/plugins/git/giteditor.cpp +++ b/src/plugins/git/giteditor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/git/giteditor.h b/src/plugins/git/giteditor.h index 23a6953dd1817018f85e304300785462666582c2..d9490b8713085027f212815bab9beb5f9e27413c 100644 --- a/src/plugins/git/giteditor.h +++ b/src/plugins/git/giteditor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/git/gitoutputwindow.cpp b/src/plugins/git/gitoutputwindow.cpp index a1d76e7553e5946b3edfed89017a59879ff3e91c..b5ae4d129c5b04c5d7d837645d0c9f08e9cb7bc7 100644 --- a/src/plugins/git/gitoutputwindow.cpp +++ b/src/plugins/git/gitoutputwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/git/gitoutputwindow.h b/src/plugins/git/gitoutputwindow.h index 898381a3d90a493028d757f637d427baf52fc910..b539d6cef5afb64261c31c86fd48037a330b746e 100644 --- a/src/plugins/git/gitoutputwindow.h +++ b/src/plugins/git/gitoutputwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index fe2d93adbff2415f7a56cbf435c44e065d114ebf..e71ccfea45e7b1cda9cfcf4b9b0141d83f14e18a 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -47,7 +47,7 @@ #include <coreplugin/filemanager.h> #include <coreplugin/messagemanager.h> #include <coreplugin/uniqueidmanager.h> -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/editormanager/editormanager.h> #include <utils/qtcassert.h> @@ -210,14 +210,10 @@ GitPlugin *GitPlugin::instance() static const VCSBase::VCSBaseSubmitEditorParameters submitParameters = { Git::Constants::SUBMIT_MIMETYPE, Git::Constants::GITSUBMITEDITOR_KIND, - Git::Constants::C_GITSUBMITEDITOR, - Core::Constants::UNDO, - Core::Constants::REDO, - Git::Constants::SUBMIT_CURRENT, - Git::Constants::DIFF_SELECTED + Git::Constants::C_GITSUBMITEDITOR }; -static Core::ICommand *createSeparator(Core::ActionManagerInterface *am, +static Core::Command *createSeparator(Core::ActionManager *am, const QList<int> &context, const QString &id, QObject *parent) @@ -267,12 +263,12 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *error_message) addObject(m_versionControl); //register actions - Core::ActionManagerInterface *actionManager = m_core->actionManager(); + Core::ActionManager *actionManager = m_core->actionManager(); - Core::IActionContainer *toolsContainer = + Core::ActionContainer *toolsContainer = actionManager->actionContainer(Core::Constants::M_TOOLS); - Core::IActionContainer *gitContainer = + Core::ActionContainer *gitContainer = actionManager->createMenu(QLatin1String("Git")); gitContainer->menu()->setTitle(tr("&Git")); toolsContainer->addMenu(gitContainer); @@ -281,11 +277,11 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *error_message) connect(m_versionControl, SIGNAL(enabledChanged(bool)), ma, SLOT(setVisible(bool))); } - Core::ICommand *command; + Core::Command *command; m_diffAction = new QAction(tr("Diff current file"), this); command = actionManager->registerAction(m_diffAction, "Git.Diff", globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+D"))); connect(m_diffAction, SIGNAL(triggered()), this, SLOT(diffCurrentFile())); gitContainer->addAction(command); @@ -293,47 +289,47 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *error_message) m_statusAction = new QAction(tr("File Status"), this); command = actionManager->registerAction(m_statusAction, "Git.Status", globalcontext); command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+S"))); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); connect(m_statusAction, SIGNAL(triggered()), this, SLOT(statusFile())); gitContainer->addAction(command); m_logAction = new QAction(tr("Log File"), this); command = actionManager->registerAction(m_logAction, "Git.Log", globalcontext); command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+L"))); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); connect(m_logAction, SIGNAL(triggered()), this, SLOT(logFile())); gitContainer->addAction(command); m_blameAction = new QAction(tr("Blame"), this); command = actionManager->registerAction(m_blameAction, "Git.Blame", globalcontext); command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+B"))); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); connect(m_blameAction, SIGNAL(triggered()), this, SLOT(blameFile())); gitContainer->addAction(command); m_undoFileAction = new QAction(tr("Undo Changes"), this); command = actionManager->registerAction(m_undoFileAction, "Git.Undo", globalcontext); command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+U"))); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); connect(m_undoFileAction, SIGNAL(triggered()), this, SLOT(undoFileChanges())); gitContainer->addAction(command); m_stageAction = new QAction(tr("Stage file for commit"), this); command = actionManager->registerAction(m_stageAction, "Git.Stage", globalcontext); command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+A"))); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); connect(m_stageAction, SIGNAL(triggered()), this, SLOT(stageFile())); gitContainer->addAction(command); m_unstageAction = new QAction(tr("Unstage file from commit"), this); command = actionManager->registerAction(m_unstageAction, "Git.Unstage", globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); connect(m_unstageAction, SIGNAL(triggered()), this, SLOT(unstageFile())); gitContainer->addAction(command); m_revertAction = new QAction(tr("Revert..."), this); command = actionManager->registerAction(m_revertAction, "Git.Revert", globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); connect(m_revertAction, SIGNAL(triggered()), this, SLOT(revertFile())); gitContainer->addAction(command); @@ -342,26 +338,26 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *error_message) m_diffProjectAction = new QAction(tr("Diff current project"), this); command = actionManager->registerAction(m_diffProjectAction, "Git.DiffProject", globalcontext); command->setDefaultKeySequence(QKeySequence("Alt+G,Alt+Shift+D")); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); connect(m_diffProjectAction, SIGNAL(triggered()), this, SLOT(diffCurrentProject())); gitContainer->addAction(command); m_statusProjectAction = new QAction(tr("Project status"), this); command = actionManager->registerAction(m_statusProjectAction, "Git.StatusProject", globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); connect(m_statusProjectAction, SIGNAL(triggered()), this, SLOT(statusProject())); gitContainer->addAction(command); m_logProjectAction = new QAction(tr("Log project"), this); command = actionManager->registerAction(m_logProjectAction, "Git.LogProject", globalcontext); command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+K"))); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); connect(m_logProjectAction, SIGNAL(triggered()), this, SLOT(logProject())); gitContainer->addAction(command); m_undoProjectAction = new QAction(tr("Undo Project Changes"), this); command = actionManager->registerAction(m_undoProjectAction, "Git.UndoProject", globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); connect(m_undoProjectAction, SIGNAL(triggered()), this, SLOT(undoProjectChanges())); gitContainer->addAction(command); @@ -370,33 +366,33 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *error_message) m_stashAction = new QAction(tr("Stash"), this); m_stashAction->setToolTip("Saves the current state of your work."); command = actionManager->registerAction(m_stashAction, "Git.Stash", globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); connect(m_stashAction, SIGNAL(triggered()), this, SLOT(stash())); gitContainer->addAction(command); m_pullAction = new QAction(tr("Pull"), this); command = actionManager->registerAction(m_pullAction, "Git.Pull", globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); connect(m_pullAction, SIGNAL(triggered()), this, SLOT(pull())); gitContainer->addAction(command); m_stashPopAction = new QAction(tr("Stash pop"), this); m_stashAction->setToolTip("Restores changes saved to the stash list using \"Stash\"."); command = actionManager->registerAction(m_stashPopAction, "Git.StashPop", globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); connect(m_stashPopAction, SIGNAL(triggered()), this, SLOT(stashPop())); gitContainer->addAction(command); m_commitAction = new QAction(tr("Commit..."), this); command = actionManager->registerAction(m_commitAction, "Git.Commit", globalcontext); command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+C"))); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); connect(m_commitAction, SIGNAL(triggered()), this, SLOT(startCommit())); gitContainer->addAction(command); m_pushAction = new QAction(tr("Push"), this); command = actionManager->registerAction(m_pushAction, "Git.Push", globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); connect(m_pushAction, SIGNAL(triggered()), this, SLOT(push())); gitContainer->addAction(command); @@ -404,19 +400,19 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *error_message) m_branchListAction = new QAction(tr("Branches..."), this); command = actionManager->registerAction(m_branchListAction, "Git.BranchList", globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); connect(m_branchListAction, SIGNAL(triggered()), this, SLOT(branchList())); gitContainer->addAction(command); m_stashListAction = new QAction(tr("List stashes"), this); command = actionManager->registerAction(m_stashListAction, "Git.StashList", globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); connect(m_stashListAction, SIGNAL(triggered()), this, SLOT(stashList())); gitContainer->addAction(command); m_showAction = new QAction(tr("Show commit..."), this); command = actionManager->registerAction(m_showAction, "Git.ShowCommit", globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); connect(m_showAction, SIGNAL(triggered()), this, SLOT(showCommit())); gitContainer->addAction(command); @@ -450,19 +446,17 @@ void GitPlugin::extensionsInitialized() m_projectExplorer = ExtensionSystem::PluginManager::instance()->getObject<ProjectExplorer::ProjectExplorerPlugin>(); } -void GitPlugin::submitEditorDiff(const QStringList &files) +void GitPlugin::submitEditorDiff(const QStringList &unstaged, const QStringList &staged) { - if (files.empty()) - return; - m_gitClient->diff(m_submitRepository, files); + m_gitClient->diff(m_submitRepository, QStringList(), unstaged, staged); } void GitPlugin::diffCurrentFile() { - QFileInfo fileInfo = currentFile(); - QString fileName = fileInfo.fileName(); - QString workingDirectory = fileInfo.absolutePath(); - m_gitClient->diff(workingDirectory, fileName); + const QFileInfo fileInfo = currentFile(); + const QString fileName = fileInfo.fileName(); + const QString workingDirectory = fileInfo.absolutePath(); + m_gitClient->diff(workingDirectory, QStringList(), fileName); } void GitPlugin::diffCurrentProject() @@ -470,7 +464,7 @@ void GitPlugin::diffCurrentProject() QString workingDirectory = getWorkingDirectory(); if (workingDirectory.isEmpty()) return; - m_gitClient->diff(workingDirectory, QString()); + m_gitClient->diff(workingDirectory, QStringList(), QString()); } QFileInfo GitPlugin::currentFile() const @@ -602,7 +596,7 @@ void GitPlugin::startCommit() // Store repository for diff and the original list of // files to be able to unstage files the user unchecks m_submitRepository = data.panelInfo.repository; - m_submitOrigCommitFiles = GitSubmitEditor::statusListToFileList(data.stagedFiles); + m_submitOrigCommitFiles = data.stagedFileNames(); if (Git::Constants::debug) qDebug() << Q_FUNC_INFO << data << commitTemplate; @@ -635,12 +629,9 @@ Core::IEditor *GitPlugin::openSubmitEditor(const QString &fileName, const Commit QTC_ASSERT(submitEditor, return 0); // The actions are for some reason enabled by the context switching // mechanism. Disable them correctly. - m_submitCurrentAction->setEnabled(!cd.stagedFiles.empty()); - m_diffSelectedFilesAction->setEnabled(false); - m_undoAction->setEnabled(false); - m_redoAction->setEnabled(false); + submitEditor->registerActions(m_undoAction, m_redoAction, m_submitCurrentAction, m_diffSelectedFilesAction); submitEditor->setCommitData(cd); - connect(submitEditor, SIGNAL(diffSelectedFiles(QStringList)), this, SLOT(submitEditorDiff(QStringList))); + connect(submitEditor, SIGNAL(diff(QStringList,QStringList)), this, SLOT(submitEditorDiff(QStringList,QStringList))); return editor; } diff --git a/src/plugins/git/gitplugin.h b/src/plugins/git/gitplugin.h index 39287e1939a253c20c607c9625999b40b1e2fec1..22fcea7c0111aea490c3051b786cd367d49b3f5b 100644 --- a/src/plugins/git/gitplugin.h +++ b/src/plugins/git/gitplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -108,7 +108,7 @@ public slots: private slots: void diffCurrentFile(); void diffCurrentProject(); - void submitEditorDiff(const QStringList &); + void submitEditorDiff(const QStringList &unstaged, const QStringList &staged); void submitCurrentLog(); void statusFile(); void statusProject(); diff --git a/src/plugins/git/gitsettings.cpp b/src/plugins/git/gitsettings.cpp index dff33129186ae33c780fc952e7f1c45d9ecd14ab..2b528a72d2a8c477ff902c20ddf5285057489420 100644 --- a/src/plugins/git/gitsettings.cpp +++ b/src/plugins/git/gitsettings.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/git/gitsettings.h b/src/plugins/git/gitsettings.h index 6b012f36f6ddc1f6c5c75d6f1244bf10dccd97ad..59169922605e83c8d02d2016169220c6e5579dca 100644 --- a/src/plugins/git/gitsettings.h +++ b/src/plugins/git/gitsettings.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/git/gitsubmiteditor.cpp b/src/plugins/git/gitsubmiteditor.cpp index fe93a0c6ad14510f7e4a66565bc4eb7ece89d8d6..aa304a2be07619ffcb45f3929a760cecbec89c1a 100644 --- a/src/plugins/git/gitsubmiteditor.cpp +++ b/src/plugins/git/gitsubmiteditor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -36,15 +36,27 @@ #include "gitconstants.h" #include "commitdata.h" +#include <vcsbase/submitfilemodel.h> + #include <QtCore/QDebug> namespace Git { namespace Internal { +enum { FileTypeRole = Qt::UserRole + 1 }; +enum FileType { StagedFile , UnstagedFile, UntrackedFile }; + +/* The problem with git is that no diff can be obtained to for a random + * multiselection of staged/unstaged files; it requires the --cached + * option for staged files. So, we sort apart the diff file lists + * according to a type flag we add to the model. */ + GitSubmitEditor::GitSubmitEditor(const VCSBase::VCSBaseSubmitEditorParameters *parameters, QWidget *parent) : - VCSBaseSubmitEditor(parameters, new GitSubmitEditorWidget(parent)) + VCSBaseSubmitEditor(parameters, new GitSubmitEditorWidget(parent)), + m_model(0) { setDisplayName(tr("Git Commit")); + connect(this, SIGNAL(diffSelectedFiles(QStringList)), this, SLOT(slotDiffSelected(QStringList))); } GitSubmitEditorWidget *GitSubmitEditor::submitEditorWidget() @@ -52,14 +64,20 @@ GitSubmitEditorWidget *GitSubmitEditor::submitEditorWidget() return static_cast<GitSubmitEditorWidget *>(widget()); } -QStringList GitSubmitEditor::statusListToFileList(const QStringList &rawList) +// Utility to add a list of state/file pairs to the model +// setting a file type. +static void addStateFileListToModel(const QList<CommitData::StateFilePair> &l, + bool checked, FileType ft, + VCSBase::SubmitFileModel *model) { - if (rawList.empty()) - return rawList; - QStringList rc; - foreach (const QString &rf, rawList) - rc.push_back(fileFromStatusLine(rf)); - return rc; + + typedef QList<CommitData::StateFilePair>::const_iterator ConstIterator; + if (!l.empty()) { + const ConstIterator cend = l.constEnd(); + const QVariant fileTypeData(ft); + for (ConstIterator it = l.constBegin(); it != cend; ++it) + model->addFile(it->second, it->first, checked).front()->setData(fileTypeData, FileTypeRole); + } } void GitSubmitEditor::setCommitData(const CommitData &d) @@ -67,28 +85,49 @@ void GitSubmitEditor::setCommitData(const CommitData &d) submitEditorWidget()->setPanelData(d.panelData); submitEditorWidget()->setPanelInfo(d.panelInfo); - addFiles(d.stagedFiles, true, true); - // Not Updated: Initially unchecked - addFiles(d.unstagedFiles, false, true); - addFiles(d.untrackedFiles, false, true); + m_model = new VCSBase::SubmitFileModel(this); + addStateFileListToModel(d.stagedFiles, true, StagedFile, m_model); + addStateFileListToModel(d.unstagedFiles, false, UnstagedFile, m_model); + if (!d.untrackedFiles.empty()) { + const QString untrackedSpec = QLatin1String("untracked"); + const QVariant fileTypeData(UntrackedFile); + const QStringList::const_iterator cend = d.untrackedFiles.constEnd(); + for (QStringList::const_iterator it = d.untrackedFiles.constBegin(); it != cend; ++it) + m_model->addFile(*it, untrackedSpec, false).front()->setData(fileTypeData, FileTypeRole); + } + setFileModel(m_model); } -GitSubmitEditorPanelData GitSubmitEditor::panelData() const +void GitSubmitEditor::slotDiffSelected(const QStringList &files) { - return const_cast<GitSubmitEditor*>(this)->submitEditorWidget()->panelData(); + // Sort it apart into staged/unstaged files + QStringList unstagedFiles; + QStringList stagedFiles; + const int fileColumn = fileNameColumn(); + const int rowCount = m_model->rowCount(); + for (int r = 0; r < rowCount; r++) { + const QString fileName = m_model->item(r, fileColumn)->text(); + if (files.contains(fileName)) { + const FileType ft = static_cast<FileType>(m_model->item(r, 0)->data(FileTypeRole).toInt()); + switch (ft) { + case StagedFile: + stagedFiles.push_back(fileName); + break; + case UnstagedFile: + unstagedFiles.push_back(fileName); + break; + case UntrackedFile: + break; + } + } + } + if (!unstagedFiles.empty() || !stagedFiles.empty()) + emit diff(unstagedFiles, stagedFiles); } -QString GitSubmitEditor::fileFromStatusLine(const QString &line) +GitSubmitEditorPanelData GitSubmitEditor::panelData() const { - QString rc = line; - // "modified: mainwindow.cpp" - const int index = rc.indexOf(QLatin1Char(':')); - if (index != -1) - rc.remove(0, index + 1); - const QChar blank(' '); - while (rc.startsWith(blank)) - rc.remove(0, 1); - return rc; + return const_cast<GitSubmitEditor*>(this)->submitEditorWidget()->panelData(); } } // namespace Internal diff --git a/src/plugins/git/gitsubmiteditor.h b/src/plugins/git/gitsubmiteditor.h index 8199384d07f7a75ac1e483a53ae0b975512296a3..a56d7b5eb6904da295ec389b4b31ea25f6e344da 100644 --- a/src/plugins/git/gitsubmiteditor.h +++ b/src/plugins/git/gitsubmiteditor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -38,6 +38,10 @@ #include <QtCore/QStringList> +namespace VCSBase { + class SubmitFileModel; +} + namespace Git { namespace Internal { @@ -54,15 +58,16 @@ public: void setCommitData(const CommitData &); GitSubmitEditorPanelData panelData() const; - static QString fileFromStatusLine(const QString &line); - static QStringList statusListToFileList(const QStringList &); +signals: + void diff(const QStringList &unstagedFiles, const QStringList &stagedFiles); -protected: - virtual QStringList vcsFileListToFileList(const QStringList &l) const - { return statusListToFileList(l); } +private slots: + void slotDiffSelected(const QStringList &); private: inline GitSubmitEditorWidget *submitEditorWidget(); + + VCSBase::SubmitFileModel *m_model; }; } // namespace Internal diff --git a/src/plugins/git/gitsubmiteditorwidget.cpp b/src/plugins/git/gitsubmiteditorwidget.cpp index 312738968fa885fc86cbe913b703ad3019ec62b5..20c6f78f1298426ac30676dac67705d84fe1f955 100644 --- a/src/plugins/git/gitsubmiteditorwidget.cpp +++ b/src/plugins/git/gitsubmiteditorwidget.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/git/gitsubmiteditorwidget.h b/src/plugins/git/gitsubmiteditorwidget.h index 8763dd8a59be92829b91a941bafb155ba22e001a..08c07f8df179f32563a8472fe173a9e258cb0282 100644 --- a/src/plugins/git/gitsubmiteditorwidget.h +++ b/src/plugins/git/gitsubmiteditorwidget.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/git/gitversioncontrol.cpp b/src/plugins/git/gitversioncontrol.cpp index 0dcf99af2045bec8535e80388e1214774db4f316..5da80ebb611ca6b8808710d9c2cee3cd6153d7e1 100644 --- a/src/plugins/git/gitversioncontrol.cpp +++ b/src/plugins/git/gitversioncontrol.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/git/gitversioncontrol.h b/src/plugins/git/gitversioncontrol.h index ac72e4c9bf6d8dc18a2a0d01bad68fbfe4eaa354..f0f7112756984cc3da2bcfce9bf51a59f46ccb4a 100644 --- a/src/plugins/git/gitversioncontrol.h +++ b/src/plugins/git/gitversioncontrol.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/git/settingspage.cpp b/src/plugins/git/settingspage.cpp index 037176b52d9db472d8db115e7b5f7f1e6db00e95..a3b82194cec1a886ac72e2d9428cc1caed0eb227 100644 --- a/src/plugins/git/settingspage.cpp +++ b/src/plugins/git/settingspage.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -95,11 +95,10 @@ QWidget *SettingsPage::createPage(QWidget *parent) return m_widget; } -void SettingsPage::finished(bool accepted) +void SettingsPage::apply() { - if (!accepted || !m_widget) + if (!m_widget) return; GitPlugin::instance()->setSettings(m_widget->settings()); } - diff --git a/src/plugins/git/settingspage.h b/src/plugins/git/settingspage.h index e5cce4d34a3dd0c0aef84fb3b57e637dd712cff7..7da7a9f30c968fd8ed35d1f66b6e5c70cd4bd482 100644 --- a/src/plugins/git/settingspage.h +++ b/src/plugins/git/settingspage.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -77,7 +77,8 @@ public: QString trCategory() const; QWidget *createPage(QWidget *parent); - void finished(bool accepted); + void apply(); + void finish() { } private: QPointer<SettingsPageWidget> m_widget; diff --git a/src/plugins/helloworld/helloworldplugin.cpp b/src/plugins/helloworld/helloworldplugin.cpp index a8eb79c051914076687af58b9f659b58a648bb79..6dd0bc9c63f9feb9d65e007fa9789008f8dd0197 100644 --- a/src/plugins/helloworld/helloworldplugin.cpp +++ b/src/plugins/helloworld/helloworldplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -33,7 +33,7 @@ #include "helloworldplugin.h" -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/basemode.h> #include <coreplugin/coreconstants.h> #include <coreplugin/icore.h> @@ -91,13 +91,13 @@ bool HelloWorldPlugin::initialize(const QStringList &arguments, QString *error_m connect(helloWorldAction, SIGNAL(triggered()), SLOT(sayHelloWorld())); // Register the action with the action manager - Core::ActionManagerInterface *actionManager = core->actionManager(); - Core::ICommand *command = + Core::ActionManager *actionManager = core->actionManager(); + Core::Command *command = actionManager->registerAction( helloWorldAction, "HelloWorld.HelloWorldAction", context); // Create our own menu to place in the Tools menu - Core::IActionContainer *helloWorldMenu = + Core::ActionContainer *helloWorldMenu = actionManager->createMenu("HelloWorld.HelloWorldMenu"); QMenu *menu = helloWorldMenu->menu(); menu->setTitle(tr("&Hello World")); @@ -107,7 +107,7 @@ bool HelloWorldPlugin::initialize(const QStringList &arguments, QString *error_m helloWorldMenu->addAction(command); // Request the Tools menu and add the Hello World menu to it - Core::IActionContainer *toolsMenu = + Core::ActionContainer *toolsMenu = actionManager->actionContainer(Core::Constants::M_TOOLS); toolsMenu->addMenu(helloWorldMenu); diff --git a/src/plugins/helloworld/helloworldplugin.h b/src/plugins/helloworld/helloworldplugin.h index b598cc75239f0bb97f0bb93c741de615bd8341c5..8aa2a9aa127cef0aa00a6d571be54bba05da1fec 100644 --- a/src/plugins/helloworld/helloworldplugin.h +++ b/src/plugins/helloworld/helloworldplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/helloworld/helloworldwindow.cpp b/src/plugins/helloworld/helloworldwindow.cpp index 5524d32274b647a2a0f182eeadcc38d6f7451c68..4a76fa7ff3b3a0e5b7d79d8aca0a3d91a7f474ab 100644 --- a/src/plugins/helloworld/helloworldwindow.cpp +++ b/src/plugins/helloworld/helloworldwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/helloworld/helloworldwindow.h b/src/plugins/helloworld/helloworldwindow.h index 82c00186562c5c2d02981f7ea9b2b3b486e03143..763ce22b666ae75dc565936c13ad65be002c8f3e 100644 --- a/src/plugins/helloworld/helloworldwindow.h +++ b/src/plugins/helloworld/helloworldwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/help/centralwidget.cpp b/src/plugins/help/centralwidget.cpp index a263f3611194566206c723fa2ece2f80bf381d86..f18795c3d39a762dd96bdac5fd334af88c8b2e6f 100644 --- a/src/plugins/help/centralwidget.cpp +++ b/src/plugins/help/centralwidget.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/help/centralwidget.h b/src/plugins/help/centralwidget.h index 41db97a283824f59a31df225ff7fee2848363fa7..5532f5ded83661ecbeb5bc52217e4d0d38018b44 100644 --- a/src/plugins/help/centralwidget.h +++ b/src/plugins/help/centralwidget.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/help/contentstoolwindow.cpp b/src/plugins/help/contentstoolwindow.cpp index ef90a09344e9530725183952a1bbcead84687a54..4e5333092695687b71f62431b1022dff499b4ba7 100644 --- a/src/plugins/help/contentstoolwindow.cpp +++ b/src/plugins/help/contentstoolwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/help/contentstoolwindow.h b/src/plugins/help/contentstoolwindow.h index a6eabc156b3aeb63922d6d5b7f4f403d1353a5a4..60e42b0618883b48f02beb48e79f174720a59ab3 100644 --- a/src/plugins/help/contentstoolwindow.h +++ b/src/plugins/help/contentstoolwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/help/docsettingspage.cpp b/src/plugins/help/docsettingspage.cpp index 65fd2669b468d7fbd66a4c161c223035c74775e7..79e915557acd2bbad54bf84eb3e51c2a745b087c 100644 --- a/src/plugins/help/docsettingspage.cpp +++ b/src/plugins/help/docsettingspage.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -38,7 +38,7 @@ #include <QtHelp/QHelpEngine> using namespace Help::Internal; - + DocSettingsPage::DocSettingsPage(QHelpEngine *helpEngine) : m_helpEngine(helpEngine), m_registeredDocs(false) @@ -64,16 +64,16 @@ QWidget *DocSettingsPage::createPage(QWidget *parent) { QWidget *w = new QWidget(parent); m_ui.setupUi(w); - + connect(m_ui.addButton, SIGNAL(clicked()), this, SLOT(addDocumentation())); connect(m_ui.removeButton, SIGNAL(clicked()), this, SLOT(removeDocumentation())); - + m_ui.docsListWidget->addItems(m_helpEngine->registeredDocumentations()); m_registeredDocs = false; m_removeDocs.clear(); - + return w; } @@ -82,7 +82,7 @@ void DocSettingsPage::addDocumentation() QStringList files = QFileDialog::getOpenFileNames(m_ui.addButton->parentWidget(), tr("Add Documentation"), QString(), tr("Qt Help Files (*.qch)")); - + if (files.isEmpty()) return; @@ -107,23 +107,20 @@ void DocSettingsPage::removeDocumentation() QListWidgetItem *item = m_ui.docsListWidget->currentItem(); if (!item) return; - + m_removeDocs.append(item->text()); int row = m_ui.docsListWidget->currentRow(); - m_ui.docsListWidget->takeItem(row); + m_ui.docsListWidget->takeItem(row); if (row > 0) --row; if (m_ui.docsListWidget->count()) m_ui.docsListWidget->setCurrentRow(row); - delete item; + delete item; } -void DocSettingsPage::finished(bool accepted) +void DocSettingsPage::apply() { - if (!accepted) - return; - emit dialogAccepted(); } diff --git a/src/plugins/help/docsettingspage.h b/src/plugins/help/docsettingspage.h index 1e74ae5404c6df6bc847017b9b6bc90fb55e125f..0f65160b76482cac31e764c2b557ea3acdd9d8ba 100644 --- a/src/plugins/help/docsettingspage.h +++ b/src/plugins/help/docsettingspage.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -57,7 +57,8 @@ public: QString trCategory() const; QWidget *createPage(QWidget *parent); - void finished(bool accepted); + void apply(); + void finish() { } bool applyChanges(); diff --git a/src/plugins/help/filtersettingspage.cpp b/src/plugins/help/filtersettingspage.cpp index 73a5f615d3af01262b24c95d063af50806e5c522..432387615277718f9665a46459555db3e1464afa 100644 --- a/src/plugins/help/filtersettingspage.cpp +++ b/src/plugins/help/filtersettingspage.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -173,8 +173,10 @@ void FilterSettingsPage::removeFilter() m_ui.filterWidget->setCurrentRow(0); } -void FilterSettingsPage::finished(bool) +void FilterSettingsPage::apply() { + // This is handled via HelpPlugin::checkForHelpChanges, which is connected + // to DocSettingsPage::apply. } bool FilterSettingsPage::applyChanges() diff --git a/src/plugins/help/filtersettingspage.h b/src/plugins/help/filtersettingspage.h index 6eb12df1811a05123ab18578448e12bd75689403..be6469900e3ac5da5b7975ed88bd0dd9df1a61fb 100644 --- a/src/plugins/help/filtersettingspage.h +++ b/src/plugins/help/filtersettingspage.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -56,7 +56,8 @@ public: QString trCategory() const; QWidget *createPage(QWidget *parent); - void finished(bool accepted); + void apply(); + void finish() { } bool applyChanges(); diff --git a/src/plugins/help/help_global.h b/src/plugins/help/help_global.h index bac0cd4afd2d4f152703a22d31aec6a725f9c2a7..cc256ac9db6bf300daf88f06e2179c6f4f44d741 100644 --- a/src/plugins/help/help_global.h +++ b/src/plugins/help/help_global.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/help/helpengine.cpp b/src/plugins/help/helpengine.cpp index d6e4e667fc56c9a6c70cf673d423f35afcec96b9..31debec45663ce3be59063c02b026e493a5228f6 100644 --- a/src/plugins/help/helpengine.cpp +++ b/src/plugins/help/helpengine.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/help/helpengine.h b/src/plugins/help/helpengine.h index a6f2f1d5e54d7a43bc735c9e5c042654e3d7a608..cec4d9d1ffda41001567476f0429cb6f99568799 100644 --- a/src/plugins/help/helpengine.h +++ b/src/plugins/help/helpengine.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/help/helpfindsupport.cpp b/src/plugins/help/helpfindsupport.cpp index 78a867701eca1abc8e63f93496831f44d93a7272..4c8257936e99cfdb40142a36800e8c852bed8fee 100644 --- a/src/plugins/help/helpfindsupport.cpp +++ b/src/plugins/help/helpfindsupport.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/help/helpfindsupport.h b/src/plugins/help/helpfindsupport.h index 602bc6b712316445fea7cb228f6058014e18fc3b..421b53b846bed98e7119d843fa4d1fb9eff2ee44 100644 --- a/src/plugins/help/helpfindsupport.h +++ b/src/plugins/help/helpfindsupport.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/help/helpindexfilter.cpp b/src/plugins/help/helpindexfilter.cpp index 489e2aed1ef5846fe0fbfaf0847118818cd2331c..af90f240efb9e70b56996f208c3f072eac8a8eae 100644 --- a/src/plugins/help/helpindexfilter.cpp +++ b/src/plugins/help/helpindexfilter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/help/helpindexfilter.h b/src/plugins/help/helpindexfilter.h index 74438ee54de4baae55526fadc5a523c08e1a44b0..b2e92b188ba7867be3a25955a2e24ee47053fc45 100644 --- a/src/plugins/help/helpindexfilter.h +++ b/src/plugins/help/helpindexfilter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/help/helpmode.cpp b/src/plugins/help/helpmode.cpp index ee334af42e5fdc3a5967d8b6529a4e20730bd2ae..687a5f116e1108b70780c56088f659c344db1a51 100644 --- a/src/plugins/help/helpmode.cpp +++ b/src/plugins/help/helpmode.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -41,13 +41,14 @@ using namespace Help; using namespace Help::Internal; -HelpMode::HelpMode(QWidget *widget, QWidget *centralWidget, QObject *parent): - BaseMode(tr("Help"), - Constants::ID_MODE_HELP, - QIcon((QLatin1String(":/fancyactionbar/images/mode_Reference.png"))), - Constants::P_MODE_HELP, widget, parent), - m_centralWidget(centralWidget) +HelpMode::HelpMode(QWidget *widget, QWidget *centralWidget, QObject *parent) + : BaseMode(parent), m_centralWidget(centralWidget) { + setName(tr("Help")); + setUniqueModeName(Constants::ID_MODE_HELP); + setIcon(QIcon(QLatin1String(":/fancyactionbar/images/mode_Reference.png"))); + setPriority(Constants::P_MODE_HELP); + setWidget(widget); m_centralWidget->layout()->setSpacing(0); m_centralWidget->layout()->addWidget(new Core::FindToolBarPlaceHolder(this)); } diff --git a/src/plugins/help/helpmode.h b/src/plugins/help/helpmode.h index 85edcf26daaf80483f148ff4b2902aba681523c9..6e59ff144a57388b519dd422c5b9ed1772aed604 100644 --- a/src/plugins/help/helpmode.h +++ b/src/plugins/help/helpmode.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp index 3ed3263478d36ec732d984170715cf3d84c688f7..74900b6acee27f50eef532f6f56d10060f3d183c 100644 --- a/src/plugins/help/helpplugin.cpp +++ b/src/plugins/help/helpplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -49,7 +49,7 @@ #include <coreplugin/coreconstants.h> #include <coreplugin/modemanager.h> #include <coreplugin/uniqueidmanager.h> -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/minisplitter.h> #include <coreplugin/modemanager.h> #include <coreplugin/rightpane.h> @@ -165,8 +165,8 @@ bool HelpPlugin::initialize(const QStringList & /*arguments*/, QString *) connect(m_bookmarkWidget, SIGNAL(addBookmark()), this, SLOT(addBookmark())); - Core::ActionManagerInterface *am = m_core->actionManager(); - Core::ICommand *cmd; + Core::ActionManager *am = m_core->actionManager(); + Core::Command *cmd; // Add Home, Previous and Next actions (used in the toolbar) QAction *homeAction = new QAction(QIcon(QLatin1String(":/help/images/home.png")), tr("Home"), this); @@ -251,7 +251,7 @@ bool HelpPlugin::initialize(const QStringList & /*arguments*/, QString *) copyAction->setText(cmd->action()->text()); copyAction->setIcon(cmd->action()->icon()); - QMap<QString, Core::ICommand*> shortcutMap; + QMap<QString, Core::Command*> shortcutMap; QShortcut *shortcut = new QShortcut(splitter); shortcut->setWhatsThis(tr("Activate Index in Help mode")); cmd = am->registerShortcut(shortcut, QLatin1String("Help.IndexShortcut"), modecontext); @@ -607,7 +607,7 @@ void HelpPlugin::activateSearch() QToolBar *HelpPlugin::createToolBar() { QToolBar *toolWidget = new QToolBar; - Core::ActionManagerInterface *am = m_core->actionManager(); + Core::ActionManager *am = m_core->actionManager(); toolWidget->addAction(am->command(QLatin1String("Help.Home"))->action()); toolWidget->addAction(am->command(QLatin1String("Help.Previous"))->action()); toolWidget->addAction(am->command(QLatin1String("Help.Next"))->action()); diff --git a/src/plugins/help/helpplugin.h b/src/plugins/help/helpplugin.h index 40ff127e5b11db9c90c216cf44caea793593e66c..ef56c7e33649852f63e6dc681bf7f8391a880f46 100644 --- a/src/plugins/help/helpplugin.h +++ b/src/plugins/help/helpplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/help/indextoolwindow.cpp b/src/plugins/help/indextoolwindow.cpp index b6086cdea23aafd3c637127f00c1647fa323b3c3..fdae72b95967108d47bc3c1e20602b61e38255b5 100644 --- a/src/plugins/help/indextoolwindow.cpp +++ b/src/plugins/help/indextoolwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/help/indextoolwindow.h b/src/plugins/help/indextoolwindow.h index d891ec0cb1649e77fde00ff09c8dca91d29f4098..fc86c7e465b358a11f458cb3458411cf8051ac7d 100644 --- a/src/plugins/help/indextoolwindow.h +++ b/src/plugins/help/indextoolwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/help/searchwidget.cpp b/src/plugins/help/searchwidget.cpp index bbb3a9692ade0c2a0b7533729a38a550adb543b7..6ea7de23a6cd303241d5cc9c2fb7dc786a95da41 100644 --- a/src/plugins/help/searchwidget.cpp +++ b/src/plugins/help/searchwidget.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/help/searchwidget.h b/src/plugins/help/searchwidget.h index a565491b782290e6af6835c5ac400101f08dc88d..015aeac422a40a94d8b642164d277944f515d38f 100644 --- a/src/plugins/help/searchwidget.h +++ b/src/plugins/help/searchwidget.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/perforce/annotationhighlighter.cpp b/src/plugins/perforce/annotationhighlighter.cpp index 289157df66835f5d3df8535240fe732ca1bbe832..1a045e9c1f49bc9fbbece9f5c15e6298a63ee7b8 100644 --- a/src/plugins/perforce/annotationhighlighter.cpp +++ b/src/plugins/perforce/annotationhighlighter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/perforce/annotationhighlighter.h b/src/plugins/perforce/annotationhighlighter.h index 574d2781f5460ff0ba929b16d01b505d6c99c4c3..fbd251127b9127db1344b4313bccd0c1bf23e14d 100644 --- a/src/plugins/perforce/annotationhighlighter.h +++ b/src/plugins/perforce/annotationhighlighter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/perforce/changenumberdialog.cpp b/src/plugins/perforce/changenumberdialog.cpp index e310953d3764eccc2a977b4792e06f78b3bb449e..572914d449b63f4de62748bbc446c9eb83345863 100644 --- a/src/plugins/perforce/changenumberdialog.cpp +++ b/src/plugins/perforce/changenumberdialog.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/perforce/changenumberdialog.h b/src/plugins/perforce/changenumberdialog.h index 9432f9ad0dc28dd398d34d5a4da189057504ad5d..559cce168a580f0596ccf8097738a03f5003c1f8 100644 --- a/src/plugins/perforce/changenumberdialog.h +++ b/src/plugins/perforce/changenumberdialog.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/perforce/p4.h b/src/plugins/perforce/p4.h index bc93ac18d8dc88abb216460ee81aa9a5f96acae4..7e8e5a808c4196111e7b87f59f7dfcbdb03ac264 100644 --- a/src/plugins/perforce/p4.h +++ b/src/plugins/perforce/p4.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/perforce/pendingchangesdialog.cpp b/src/plugins/perforce/pendingchangesdialog.cpp index fd1b1b98aab0af935be47fbeafc8ff77c5d059e1..ee402328beee37ba74e5914d90e82bde2692d3b0 100644 --- a/src/plugins/perforce/pendingchangesdialog.cpp +++ b/src/plugins/perforce/pendingchangesdialog.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/perforce/pendingchangesdialog.h b/src/plugins/perforce/pendingchangesdialog.h index d6f88efd7ecba774a529d5ddaeb112785ae2b5cb..6d5f0d7f8d0fcfcd536905fc7bac55a5603ab72b 100644 --- a/src/plugins/perforce/pendingchangesdialog.h +++ b/src/plugins/perforce/pendingchangesdialog.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/perforce/perforceconstants.h b/src/plugins/perforce/perforceconstants.h index 4a755b32c4a8a317839144706fe5e4b8f16691eb..e0feb0c58e9a24652873e5f7e169c9839c3c7236 100644 --- a/src/plugins/perforce/perforceconstants.h +++ b/src/plugins/perforce/perforceconstants.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/perforce/perforceeditor.cpp b/src/plugins/perforce/perforceeditor.cpp index d54ce10de5ffd59156d133e205d5a61796f9933b..487603cc36107fc977055fda8000e847fb3eddcf 100644 --- a/src/plugins/perforce/perforceeditor.cpp +++ b/src/plugins/perforce/perforceeditor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/perforce/perforceeditor.h b/src/plugins/perforce/perforceeditor.h index 335bf8b3825e07a190f624727f15ff4f8f8caaf6..3f85281c17b67232a8a6dea7da3119c68aec13da 100644 --- a/src/plugins/perforce/perforceeditor.h +++ b/src/plugins/perforce/perforceeditor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/perforce/perforceoutputwindow.cpp b/src/plugins/perforce/perforceoutputwindow.cpp index 235f7da9cc54991f62d81f3985bbf7394757b023..6846aa11b309906f98fe80429282cf9b8a2318dd 100644 --- a/src/plugins/perforce/perforceoutputwindow.cpp +++ b/src/plugins/perforce/perforceoutputwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/perforce/perforceoutputwindow.h b/src/plugins/perforce/perforceoutputwindow.h index 9f825ae1665839684c5a2adc82d347ae246a9fa9..db6012a4304bcb9cdec0f81daca2d3c42b1a7d0b 100644 --- a/src/plugins/perforce/perforceoutputwindow.h +++ b/src/plugins/perforce/perforceoutputwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp index 0ad0224d1ca191b911ab9d2ed5fedd3a55ad8874..1b9c7e094d1082c3e9f8a94c80f585024fc7eca2 100644 --- a/src/plugins/perforce/perforceplugin.cpp +++ b/src/plugins/perforce/perforceplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -43,7 +43,7 @@ #include "perforceversioncontrol.h" #include "settingspage.h" -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/coreconstants.h> #include <coreplugin/editormanager/editormanager.h> #include <coreplugin/filemanager.h> @@ -179,11 +179,7 @@ PerforcePlugin::PerforcePlugin() : static const VCSBase::VCSBaseSubmitEditorParameters submitParameters = { Perforce::Constants::SUBMIT_MIMETYPE, Perforce::Constants::PERFORCESUBMITEDITOR_KIND, - Perforce::Constants::C_PERFORCESUBMITEDITOR, - Core::Constants::UNDO, - Core::Constants::REDO, - Perforce::Constants::SUBMIT_CURRENT, - Perforce::Constants::DIFF_SELECTED + Perforce::Constants::C_PERFORCESUBMITEDITOR }; bool PerforcePlugin::initialize(const QStringList & /*arguments*/, QString *errorMessage) @@ -229,12 +225,12 @@ bool PerforcePlugin::initialize(const QStringList & /*arguments*/, QString *erro //register actions - Core::ActionManagerInterface *am = m_coreInstance->actionManager(); + Core::ActionManager *am = m_coreInstance->actionManager(); - Core::IActionContainer *mtools = + Core::ActionContainer *mtools = am->actionContainer(Core::Constants::M_TOOLS); - Core::IActionContainer *mperforce = + Core::ActionContainer *mperforce = am->createMenu(QLatin1String(PERFORCE_MENU)); mperforce->menu()->setTitle(tr("&Perforce")); mtools->addMenu(mperforce); @@ -250,12 +246,12 @@ bool PerforcePlugin::initialize(const QStringList & /*arguments*/, QString *erro perforcesubmitcontext << m_coreInstance->uniqueIDManager()->uniqueIdentifier(Constants::C_PERFORCESUBMITEDITOR); - Core::ICommand *command; + Core::Command *command; QAction *tmpaction; m_editAction = new QAction(tr("Edit"), this); command = am->registerAction(m_editAction, PerforcePlugin::EDIT, globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+E"))); command->setDefaultText(tr("Edit File")); connect(m_editAction, SIGNAL(triggered()), this, SLOT(openCurrentFile())); @@ -263,7 +259,7 @@ bool PerforcePlugin::initialize(const QStringList & /*arguments*/, QString *erro m_addAction = new QAction(tr("Add"), this); command = am->registerAction(m_addAction, PerforcePlugin::ADD, globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+A"))); command->setDefaultText(tr("Add File")); connect(m_addAction, SIGNAL(triggered()), this, SLOT(addCurrentFile())); @@ -271,14 +267,14 @@ bool PerforcePlugin::initialize(const QStringList & /*arguments*/, QString *erro m_deleteAction = new QAction(tr("Delete"), this); command = am->registerAction(m_deleteAction, PerforcePlugin::DELETE_FILE, globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); command->setDefaultText(tr("Delete File")); connect(m_deleteAction, SIGNAL(triggered()), this, SLOT(deleteCurrentFile())); mperforce->addAction(command); m_revertAction = new QAction(tr("Revert"), this); command = am->registerAction(m_revertAction, PerforcePlugin::REVERT, globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+R"))); command->setDefaultText(tr("Revert File")); connect(m_revertAction, SIGNAL(triggered()), this, SLOT(revertCurrentFile())); @@ -291,14 +287,14 @@ bool PerforcePlugin::initialize(const QStringList & /*arguments*/, QString *erro m_diffCurrentAction = new QAction(tr("Diff Current File"), this); command = am->registerAction(m_diffCurrentAction, PerforcePlugin::DIFF_CURRENT, globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); command->setDefaultText(tr("Diff Current File")); connect(m_diffCurrentAction, SIGNAL(triggered()), this, SLOT(diffCurrentFile())); mperforce->addAction(command); m_diffProjectAction = new QAction(tr("Diff Current Project/Session"), this); command = am->registerAction(m_diffProjectAction, PerforcePlugin::DIFF_PROJECT, globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+D"))); command->setDefaultText(tr("Diff Current Project/Session")); connect(m_diffProjectAction, SIGNAL(triggered()), this, SLOT(diffCurrentProject())); @@ -350,7 +346,7 @@ bool PerforcePlugin::initialize(const QStringList & /*arguments*/, QString *erro m_annotateCurrentAction = new QAction(tr("Annotate Current File"), this); command = am->registerAction(m_annotateCurrentAction, PerforcePlugin::ANNOTATE_CURRENT, globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); command->setDefaultText(tr("Annotate Current File")); connect(m_annotateCurrentAction, SIGNAL(triggered()), this, SLOT(annotateCurrentFile())); mperforce->addAction(command); @@ -362,7 +358,7 @@ bool PerforcePlugin::initialize(const QStringList & /*arguments*/, QString *erro m_filelogCurrentAction = new QAction(tr("Filelog Current File"), this); command = am->registerAction(m_filelogCurrentAction, PerforcePlugin::FILELOG_CURRENT, globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+F"))); command->setDefaultText(tr("Filelog Current File")); connect(m_filelogCurrentAction, SIGNAL(triggered()), this, SLOT(filelogCurrentFile())); @@ -494,19 +490,19 @@ void PerforcePlugin::submit() QTC_ASSERT(m_coreInstance, return); if (!checkP4Command()) { - showOutput(tr("No p4 executable specified!")); + showOutput(tr("No p4 executable specified!"), true); return; } if (m_changeTmpFile) { - showOutput(tr("Another submit is currently executed.")); + showOutput(tr("Another submit is currently executed."), true); m_perforceOutputWindow->popup(false); return; } m_changeTmpFile = new QTemporaryFile(this); if (!m_changeTmpFile->open()) { - showOutput(tr("Cannot create temporary file.")); + showOutput(tr("Cannot create temporary file."), true); delete m_changeTmpFile; m_changeTmpFile = 0; return; @@ -558,12 +554,8 @@ Core::IEditor *PerforcePlugin::openPerforceSubmitEditor(const QString &fileName, PerforceSubmitEditor *submitEditor = dynamic_cast<PerforceSubmitEditor*>(editor); QTC_ASSERT(submitEditor, return 0); submitEditor->restrictToProjectFiles(depotFileNames); + submitEditor->registerActions(m_undoAction, m_redoAction, m_submitCurrentLogAction, m_diffSelectedFiles); connect(submitEditor, SIGNAL(diffSelectedFiles(QStringList)), this, SLOT(slotDiff(QStringList))); - // The actions are for some reason enabled by the context switching - // mechanism. Disable them correctly. - m_diffSelectedFiles->setEnabled(false); - m_undoAction->setEnabled(false); - m_redoAction->setEnabled(false); return editor; } @@ -970,7 +962,7 @@ bool PerforcePlugin::editorAboutToClose(Core::IEditor *editor) QByteArray change = m_changeTmpFile->readAll(); m_changeTmpFile->close(); if (!checkP4Command()) { - showOutput(tr("No p4 executable specified!")); + showOutput(tr("No p4 executable specified!"), true); delete m_changeTmpFile; m_changeTmpFile = 0; return false; @@ -981,8 +973,8 @@ bool PerforcePlugin::editorAboutToClose(Core::IEditor *editor) QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); proc.start(m_settings.p4Command, basicP4Args() << QLatin1String("submit") << QLatin1String("-i")); - if (!proc.waitForStarted(3000)) { - showOutput(tr("Cannot execute p4 submit.")); + if (!proc.waitForStarted(p4Timeout)) { + showOutput(tr("Cannot execute p4 submit."), true); QApplication::restoreOverrideCursor(); delete m_changeTmpFile; m_changeTmpFile = 0; @@ -992,7 +984,7 @@ bool PerforcePlugin::editorAboutToClose(Core::IEditor *editor) proc.closeWriteChannel(); if (!proc.waitForFinished()) { - showOutput(tr("Cannot execute p4 submit.")); + showOutput(tr("Cannot execute p4 submit."), true); QApplication::restoreOverrideCursor(); delete m_changeTmpFile; m_changeTmpFile = 0; @@ -1000,7 +992,7 @@ bool PerforcePlugin::editorAboutToClose(Core::IEditor *editor) } QString output = QString::fromUtf8(proc.readAll()); showOutput(output); - if (output.contains("Out of date files must be resolved or reverted")) { + if (output.contains("Out of date files must be resolved or reverted"), true) { QMessageBox::warning(editor->widget(), "Pending change", "Could not submit the change, because your workspace was out of date. Created a pending submit instead."); } QApplication::restoreOverrideCursor(); diff --git a/src/plugins/perforce/perforceplugin.h b/src/plugins/perforce/perforceplugin.h index cf37ed339ebe1eb81f5c7441bb83aeda77822c44..a5e52ba6b03f5a1dacbca938b73ebcc1bbddbbdb 100644 --- a/src/plugins/perforce/perforceplugin.h +++ b/src/plugins/perforce/perforceplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/perforce/perforcesettings.cpp b/src/plugins/perforce/perforcesettings.cpp index cdb4012be0ac551e889eadcf8367c6d46472699c..7ba51b78e00a360be8b0bfe716d221066f944088 100644 --- a/src/plugins/perforce/perforcesettings.cpp +++ b/src/plugins/perforce/perforcesettings.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/perforce/perforcesettings.h b/src/plugins/perforce/perforcesettings.h index 726f7f44efba61fd3daec815f613a88aa4d6ac11..4451d4ad617865a6ee07ae85c719588fde91536f 100644 --- a/src/plugins/perforce/perforcesettings.h +++ b/src/plugins/perforce/perforcesettings.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/perforce/perforcesubmiteditor.cpp b/src/plugins/perforce/perforcesubmiteditor.cpp index 6aa74f95fb236468ee1123f94f1d9d6f4733e14c..7c8967f2049efe3578896188550a992092fed2b2 100644 --- a/src/plugins/perforce/perforcesubmiteditor.cpp +++ b/src/plugins/perforce/perforcesubmiteditor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -36,6 +36,7 @@ #include "perforceplugin.h" #include "perforceconstants.h" +#include <vcsbase/submitfilemodel.h> #include <utils/qtcassert.h> #include <QtCore/QDebug> @@ -43,10 +44,14 @@ namespace Perforce { namespace Internal { +enum { FileSpecRole = Qt::UserRole + 1 }; + PerforceSubmitEditor::PerforceSubmitEditor(const VCSBase::VCSBaseSubmitEditorParameters *parameters, QWidget *parent) : - VCSBaseSubmitEditor(parameters, new PerforceSubmitEditorWidget(parent)) + VCSBaseSubmitEditor(parameters, new PerforceSubmitEditorWidget(parent)), + m_fileModel(new VCSBase::SubmitFileModel(this)) { setDisplayName(tr("Perforce Submit")); + setFileModel(m_fileModel); } PerforceSubmitEditorWidget *PerforceSubmitEditor::submitEditorWidget() @@ -54,14 +59,6 @@ PerforceSubmitEditorWidget *PerforceSubmitEditor::submitEditorWidget() return static_cast<PerforceSubmitEditorWidget *>(widget()); } -QStringList PerforceSubmitEditor::vcsFileListToFileList(const QStringList &rawList) const -{ - QStringList rc; - foreach (const QString &rf, rawList) - rc.push_back(fileFromChangeLine(rf)); - return rc; -} - QString PerforceSubmitEditor::fileContents() const { const_cast<PerforceSubmitEditor*>(this)->updateEntries(); @@ -121,25 +118,7 @@ bool PerforceSubmitEditor::parseText(QString text) void PerforceSubmitEditor::restrictToProjectFiles(const QStringList &knownProjectFiles) { - QStringList allFiles = submitEditorWidget()->fileList(); - const int oldSize = allFiles.size(); - for (int i = oldSize - 1; i >= 0; i--) - if (!knownProjectFiles.contains(fileFromChangeLine(allFiles.at(i)))) - allFiles.removeAt(i); - if (allFiles.size() != oldSize) - submitEditorWidget()->setFileList(allFiles); - if (Perforce::Constants::debug) - qDebug() << Q_FUNC_INFO << oldSize << "->" << allFiles.size(); -} - -QString PerforceSubmitEditor::fileFromChangeLine(const QString &line) -{ - QString rc = line; - // " foo.cpp#add" - const int index = rc.lastIndexOf(QLatin1Char('#')); - if (index != -1) - rc.truncate(index); - return rc.trimmed(); + m_fileModel->filter(knownProjectFiles, fileNameColumn()); } void PerforceSubmitEditor::updateFields() @@ -161,12 +140,15 @@ void PerforceSubmitEditor::updateFields() widget->setDescriptionText(lines.join(newLine)); lines = m_entries.value(QLatin1String("Files")).split(newLine); - lines.replaceInStrings(leadingTabPattern, QString()); - QStringList fileList; - foreach (const QString &line, lines) - if (!line.isEmpty()) - fileList.push_back(line); - widget->setFileList(fileList); + // split up "file#add" and store complete spec line as user data + foreach (const QString &specLine, lines) { + const QStringList list = specLine.split(QLatin1Char('#')); + if (list.size() == 2) { + const QString file = list.at(0).trimmed(); + const QString state = list.at(1).trimmed(); + m_fileModel->addFile(file, state).at(0)->setData(specLine, FileSpecRole); + } + } } void PerforceSubmitEditor::updateEntries() @@ -181,13 +163,14 @@ void PerforceSubmitEditor::updateEntries() lines.replaceInStrings(QRegExp(QLatin1String("^")), tab); m_entries.insert(QLatin1String("Description"), newLine + lines.join(newLine) + QLatin1String("\n\n")); QString files = newLine; - // Files - const QStringList fileList = submitEditorWidget()->fileList(); - const int count = fileList.size(); - for (int i = 0; i < count; i++) { - files += tab; - files += fileList.at(i); - files += newLine; + // Re-build the file spec '<tab>file#add' from the user data + const int count = m_fileModel->rowCount(); + for (int r = 0; r < count; r++) { + const QStandardItem *item = m_fileModel->item(r, 0); + if (item->checkState() == Qt::Checked) { + files += item->data(FileSpecRole).toString(); + files += newLine; + } } files += newLine; m_entries.insert(QLatin1String("Files"), files); diff --git a/src/plugins/perforce/perforcesubmiteditor.h b/src/plugins/perforce/perforcesubmiteditor.h index 0f44332a694f466fe22485af057f9d0ca6066201..a3a1805039da56f0293bec22d3ce292f47a9f26a 100644 --- a/src/plugins/perforce/perforcesubmiteditor.h +++ b/src/plugins/perforce/perforcesubmiteditor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -39,6 +39,10 @@ #include <QtCore/QStringList> #include <QtCore/QMap> +namespace VCSBase { + class SubmitFileModel; +} + namespace Perforce { namespace Internal { @@ -66,7 +70,6 @@ public: static QString fileFromChangeLine(const QString &line); protected: - virtual QStringList vcsFileListToFileList(const QStringList &) const; virtual QString fileContents() const; virtual bool setFileContents(const QString &contents); @@ -77,6 +80,7 @@ private: void updateEntries(); QMap<QString, QString> m_entries; + VCSBase::SubmitFileModel *m_fileModel; }; } // namespace Internal diff --git a/src/plugins/perforce/perforcesubmiteditorwidget.cpp b/src/plugins/perforce/perforcesubmiteditorwidget.cpp index 05d14327f3fd843c01d3c080d20a8f61e44f2920..e1cf25582723cb74cd70504e27277257aed96356 100644 --- a/src/plugins/perforce/perforcesubmiteditorwidget.cpp +++ b/src/plugins/perforce/perforcesubmiteditorwidget.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/perforce/perforcesubmiteditorwidget.h b/src/plugins/perforce/perforcesubmiteditorwidget.h index 6d1a8dea431e14681dc85165dc0ab708a3270131..46566ad4c72a49fd79554da49a985cf34449591b 100644 --- a/src/plugins/perforce/perforcesubmiteditorwidget.h +++ b/src/plugins/perforce/perforcesubmiteditorwidget.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/perforce/perforceversioncontrol.cpp b/src/plugins/perforce/perforceversioncontrol.cpp index 0b2814dbe1cbef9f89ca636c6261d7483a937a05..02102939a54572537f98f36ec3ccd1f01e4dbba9 100644 --- a/src/plugins/perforce/perforceversioncontrol.cpp +++ b/src/plugins/perforce/perforceversioncontrol.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/perforce/perforceversioncontrol.h b/src/plugins/perforce/perforceversioncontrol.h index 6d92fc9b0ffed7691de1df7f976f96f7a172cefa..8a2a27f8285d1a401d91eb13524abc2ee43e2f14 100644 --- a/src/plugins/perforce/perforceversioncontrol.h +++ b/src/plugins/perforce/perforceversioncontrol.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/perforce/settingspage.cpp b/src/plugins/perforce/settingspage.cpp index 18fec0f8469921829e64075fa8de99ad9485788d..70ef649b0e66c527512675a9dc65d3fb3dda5984 100644 --- a/src/plugins/perforce/settingspage.cpp +++ b/src/plugins/perforce/settingspage.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -96,9 +96,9 @@ QWidget *SettingsPage::createPage(QWidget *parent) return m_widget; } -void SettingsPage::finished(bool accepted) +void SettingsPage::apply() { - if (!accepted || !m_widget) + if (!m_widget) return; PerforcePlugin::perforcePluginInstance()->setSettings(m_widget->settings()); diff --git a/src/plugins/perforce/settingspage.h b/src/plugins/perforce/settingspage.h index e13dab53437fc0f9227cece595de3d2b85d186c0..f5c43599fadfa5dea1ab66fae351a904882ab1db 100644 --- a/src/plugins/perforce/settingspage.h +++ b/src/plugins/perforce/settingspage.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -70,7 +70,8 @@ public: QString trCategory() const; QWidget *createPage(QWidget *parent); - void finished(bool accepted); + void apply(); + void finish() { } private: QPointer<SettingsPageWidget> m_widget; diff --git a/src/plugins/perforce/workbenchclientuser.cpp b/src/plugins/perforce/workbenchclientuser.cpp index d148a47a884994e17717dbce4a71df177298c08e..d8943ffd085758c76a3bbb4bcc93fc9bef751713 100644 --- a/src/plugins/perforce/workbenchclientuser.cpp +++ b/src/plugins/perforce/workbenchclientuser.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/perforce/workbenchclientuser.h b/src/plugins/perforce/workbenchclientuser.h index a924decabd3a0714af82aab1fb7dae04b97386be..200b68a9683b06bb6c350ff45aada2ab6d8e551a 100644 --- a/src/plugins/perforce/workbenchclientuser.h +++ b/src/plugins/perforce/workbenchclientuser.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/ProjectExplorerInterfaces b/src/plugins/projectexplorer/ProjectExplorerInterfaces index 10d0b819104aef73eb1b887c9b5b84637aa126f5..b6eb45c7ac5516f9b815c98265487ad4e744ab3b 100644 --- a/src/plugins/projectexplorer/ProjectExplorerInterfaces +++ b/src/plugins/projectexplorer/ProjectExplorerInterfaces @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/abstractprocess.h b/src/plugins/projectexplorer/abstractprocess.h index d1a1c6443898a59aff87b493755eaf86f5a8bf26..491eed4a0b076b49c5bef752a0658935b61ca730 100644 --- a/src/plugins/projectexplorer/abstractprocess.h +++ b/src/plugins/projectexplorer/abstractprocess.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/abstractprocessstep.cpp b/src/plugins/projectexplorer/abstractprocessstep.cpp index 11dfa6d760dbecfbe1eacea0d6b15db7754821ea..f1c1f90a911f3183f841a77accb465a5a169c336 100644 --- a/src/plugins/projectexplorer/abstractprocessstep.cpp +++ b/src/plugins/projectexplorer/abstractprocessstep.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/abstractprocessstep.h b/src/plugins/projectexplorer/abstractprocessstep.h index 9c1756c0d70fb3fc6700c75e29e69e373dbaa4da..3aac602291cf4255d969b916e2b7d8f29f743f94 100644 --- a/src/plugins/projectexplorer/abstractprocessstep.h +++ b/src/plugins/projectexplorer/abstractprocessstep.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/allprojectsfilter.cpp b/src/plugins/projectexplorer/allprojectsfilter.cpp index b94edbef2598e1efb4ac41f6e36fd9ac17b8e53d..07e34399b0bef30b2c9c9b3de3b40981887fdd78 100644 --- a/src/plugins/projectexplorer/allprojectsfilter.cpp +++ b/src/plugins/projectexplorer/allprojectsfilter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/allprojectsfilter.h b/src/plugins/projectexplorer/allprojectsfilter.h index 45e8105ecc563a730d67fc5b99e5fd9fcc3bb6ad..8de2de425e60bad3dbb102b141d845c6bcb97043 100644 --- a/src/plugins/projectexplorer/allprojectsfilter.h +++ b/src/plugins/projectexplorer/allprojectsfilter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/allprojectsfind.cpp b/src/plugins/projectexplorer/allprojectsfind.cpp index 2118ccc658a987250b3eed25525712c17a0cc1d4..26998982614bbfaf40d29d6844eeab25e8a816e0 100644 --- a/src/plugins/projectexplorer/allprojectsfind.cpp +++ b/src/plugins/projectexplorer/allprojectsfind.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/allprojectsfind.h b/src/plugins/projectexplorer/allprojectsfind.h index 8479a1dfc5d00d0623ef0587f5dfeeaec4e557f4..48d1457b546a6a931f2ac6c51f17660255980a35 100644 --- a/src/plugins/projectexplorer/allprojectsfind.h +++ b/src/plugins/projectexplorer/allprojectsfind.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/applicationlauncher.h b/src/plugins/projectexplorer/applicationlauncher.h index 93b51e8b25fed14ced3bc6dd5d5082f7e53c7e44..ead2799453e5722472b2508577c62fb1ed7869c3 100644 --- a/src/plugins/projectexplorer/applicationlauncher.h +++ b/src/plugins/projectexplorer/applicationlauncher.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/applicationlauncher_win.cpp b/src/plugins/projectexplorer/applicationlauncher_win.cpp index c511d350f2769f5a8e1ff8cffb65ee9601cf88b7..09e0ee73c6c81e89bde73c83f6d182f83885158f 100644 --- a/src/plugins/projectexplorer/applicationlauncher_win.cpp +++ b/src/plugins/projectexplorer/applicationlauncher_win.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/applicationlauncher_x11.cpp b/src/plugins/projectexplorer/applicationlauncher_x11.cpp index 5891a647395b315bb8b98f07c194e6305f8f29ae..9a1c4c3d737b03c066fe2dd7cc2d16535e5a7321 100644 --- a/src/plugins/projectexplorer/applicationlauncher_x11.cpp +++ b/src/plugins/projectexplorer/applicationlauncher_x11.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/applicationrunconfiguration.cpp b/src/plugins/projectexplorer/applicationrunconfiguration.cpp index a0eb7af6a1947ad2f1094f1c23ff1ebfce5153f0..fc936d2c4311abe7911f03e6af8e20bc3baa42f2 100644 --- a/src/plugins/projectexplorer/applicationrunconfiguration.cpp +++ b/src/plugins/projectexplorer/applicationrunconfiguration.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/applicationrunconfiguration.h b/src/plugins/projectexplorer/applicationrunconfiguration.h index d6bfb4d8945efdac7030edafdc9cb301d8cb07a3..550bf621747e1979707caa2aa97b24a46245b6c8 100644 --- a/src/plugins/projectexplorer/applicationrunconfiguration.h +++ b/src/plugins/projectexplorer/applicationrunconfiguration.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/buildconfiguration.cpp b/src/plugins/projectexplorer/buildconfiguration.cpp index 2fdda571c0dd138ddf8b2ab4786c827b9a136c2a..f86898bbb76abcc8240477bac95f0d14afe391af 100644 --- a/src/plugins/projectexplorer/buildconfiguration.cpp +++ b/src/plugins/projectexplorer/buildconfiguration.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/buildconfiguration.h b/src/plugins/projectexplorer/buildconfiguration.h index 8bb01d15901dad201866c8cd596d2e1fd975cadb..d92b64a1d950bb027a7c7e3002d97b5cb0a3a3b0 100644 --- a/src/plugins/projectexplorer/buildconfiguration.h +++ b/src/plugins/projectexplorer/buildconfiguration.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/buildmanager.cpp b/src/plugins/projectexplorer/buildmanager.cpp index 72eb1766f11f24661d25671d53c2a4ae06995c97..ff426805c2eedb072a40820fbb12e947f3aa6db3 100644 --- a/src/plugins/projectexplorer/buildmanager.cpp +++ b/src/plugins/projectexplorer/buildmanager.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -40,7 +40,7 @@ #include "projectexplorer.h" #include "taskwindow.h" -#include <coreplugin/progressmanager/progressmanagerinterface.h> +#include <coreplugin/progressmanager/progressmanager.h> #include <coreplugin/progressmanager/futureprogress.h> #include <extensionsystem/pluginmanager.h> #include <utils/qtcassert.h> @@ -178,7 +178,7 @@ void BuildManager::startBuildQueue() { if (!m_running) { // Progress Reporting - Core::ProgressManagerInterface *progressManager = + Core::ProgressManager *progressManager = ExtensionSystem::PluginManager::instance()->getObject<Core::ICore>()->progressManager(); m_progressFutureInterface = new QFutureInterface<void>; m_progressWatcher.setFuture(m_progressFutureInterface->future()); diff --git a/src/plugins/projectexplorer/buildmanager.h b/src/plugins/projectexplorer/buildmanager.h index 248d6ae92716ea92f084effbfc6f60e4689093d8..2fa0cdcd356bfeb2a9ce622d7392a3c22128d8d0 100644 --- a/src/plugins/projectexplorer/buildmanager.h +++ b/src/plugins/projectexplorer/buildmanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/buildparserinterface.cpp b/src/plugins/projectexplorer/buildparserinterface.cpp index 57a069ea72a0d61549d1e5999af0e92475fd3117..39a6ced9dedbd5ab6dfcf095de98bc3c15a330e6 100644 --- a/src/plugins/projectexplorer/buildparserinterface.cpp +++ b/src/plugins/projectexplorer/buildparserinterface.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/buildparserinterface.h b/src/plugins/projectexplorer/buildparserinterface.h index 2fd92d868276bff13681528831497f52a80cf3fa..6dba4dfec00199f5cec6be02780764073be88cad 100644 --- a/src/plugins/projectexplorer/buildparserinterface.h +++ b/src/plugins/projectexplorer/buildparserinterface.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/buildprogress.cpp b/src/plugins/projectexplorer/buildprogress.cpp index afc228e460292ddc0619515a90baf054b1537de4..32c7e2279acbf0da29dc1b3326550db41416d914 100644 --- a/src/plugins/projectexplorer/buildprogress.cpp +++ b/src/plugins/projectexplorer/buildprogress.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/buildprogress.h b/src/plugins/projectexplorer/buildprogress.h index 11c5293a7cb0cf96db8a65a6c196818a6b86965c..f55984d527e32d5feb750b1d1bf7aa7fe5a0c66f 100644 --- a/src/plugins/projectexplorer/buildprogress.h +++ b/src/plugins/projectexplorer/buildprogress.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/buildsettingspropertiespage.cpp b/src/plugins/projectexplorer/buildsettingspropertiespage.cpp index b642a4e3867a399bb08771beabf2c112d0136673..aea512909abf05549961031b27d0d9cb8feaa80c 100644 --- a/src/plugins/projectexplorer/buildsettingspropertiespage.cpp +++ b/src/plugins/projectexplorer/buildsettingspropertiespage.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/buildsettingspropertiespage.h b/src/plugins/projectexplorer/buildsettingspropertiespage.h index 041719804944cf139678b703c0cbbd84ca89f21b..4278c83bcbe93908da83809ccb8833dbb03a9b36 100644 --- a/src/plugins/projectexplorer/buildsettingspropertiespage.h +++ b/src/plugins/projectexplorer/buildsettingspropertiespage.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/buildstep.cpp b/src/plugins/projectexplorer/buildstep.cpp index abcc431f05ead356e8449e12deab2af7e4e2afd3..27e2291152d23df889f55ff612fc43befb7a2be2 100644 --- a/src/plugins/projectexplorer/buildstep.cpp +++ b/src/plugins/projectexplorer/buildstep.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/buildstep.h b/src/plugins/projectexplorer/buildstep.h index 93c2fac2e442e5836143cdb417098b73b98dcbfe..2a3040a76ce966c1a753968e81d97e616311f4b3 100644 --- a/src/plugins/projectexplorer/buildstep.h +++ b/src/plugins/projectexplorer/buildstep.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/buildstepspage.cpp b/src/plugins/projectexplorer/buildstepspage.cpp index 735770877b0724465997ed14636f1e0848ec06b3..64d39d771b7c03def76403b117da9f1ba22a7f2d 100644 --- a/src/plugins/projectexplorer/buildstepspage.cpp +++ b/src/plugins/projectexplorer/buildstepspage.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/buildstepspage.h b/src/plugins/projectexplorer/buildstepspage.h index ef1e47d96460d94ba2b4006e79135ec91cce1bbe..a20cb5f737a43091de0d7c8187db69c748f4e602 100644 --- a/src/plugins/projectexplorer/buildstepspage.h +++ b/src/plugins/projectexplorer/buildstepspage.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/compileoutputwindow.cpp b/src/plugins/projectexplorer/compileoutputwindow.cpp index 72ecf9893eb2cdba91249eef1b953974247a2007..d3a4e2b86f88f912cc4691c28ce807052ac7d929 100644 --- a/src/plugins/projectexplorer/compileoutputwindow.cpp +++ b/src/plugins/projectexplorer/compileoutputwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/compileoutputwindow.h b/src/plugins/projectexplorer/compileoutputwindow.h index 655752cdd3c4f13bd71b2271b60d29f46cb7d4e7..5d9daa96c4d138c9c00f3160ede94c0e512a2de4 100644 --- a/src/plugins/projectexplorer/compileoutputwindow.h +++ b/src/plugins/projectexplorer/compileoutputwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/consoleprocess.h b/src/plugins/projectexplorer/consoleprocess.h index 51519fae3814824a20aa329dac2a720b5be7318e..aae64e97aacbd0b028d69021153ae6e5c9479719 100644 --- a/src/plugins/projectexplorer/consoleprocess.h +++ b/src/plugins/projectexplorer/consoleprocess.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/consoleprocess_unix.cpp b/src/plugins/projectexplorer/consoleprocess_unix.cpp index eb5f88121c83a23aed735ce9373ae9831e294044..7b432c0af03de2a2b75485fdd8511efd6962b867 100644 --- a/src/plugins/projectexplorer/consoleprocess_unix.cpp +++ b/src/plugins/projectexplorer/consoleprocess_unix.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/consoleprocess_win.cpp b/src/plugins/projectexplorer/consoleprocess_win.cpp index 17e280e3ad0c67bba9a3fbb1881abcc47d89ff1d..5b8760cd33effc665673b86ec48edcd2c32fa1a6 100644 --- a/src/plugins/projectexplorer/consoleprocess_win.cpp +++ b/src/plugins/projectexplorer/consoleprocess_win.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/currentprojectfilter.cpp b/src/plugins/projectexplorer/currentprojectfilter.cpp index 4de19f9be5bd9877057f2b262da25ad8696d8b99..4b9e585cc130196e3aa9d4b56c3884364fd693a9 100644 --- a/src/plugins/projectexplorer/currentprojectfilter.cpp +++ b/src/plugins/projectexplorer/currentprojectfilter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/currentprojectfilter.h b/src/plugins/projectexplorer/currentprojectfilter.h index c52f9f605ff7000f1f2863592a64d532361e6caf..92ae4b6863538839b2f2687a1e7555d700f4c27e 100644 --- a/src/plugins/projectexplorer/currentprojectfilter.h +++ b/src/plugins/projectexplorer/currentprojectfilter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/currentprojectfind.cpp b/src/plugins/projectexplorer/currentprojectfind.cpp index 451ae521c0cc0fa1e5c062ef2ec4a6ddbd13ded2..cf1d81c3bc7e591050d1e8bd9bf2b73530f244b7 100644 --- a/src/plugins/projectexplorer/currentprojectfind.cpp +++ b/src/plugins/projectexplorer/currentprojectfind.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/currentprojectfind.h b/src/plugins/projectexplorer/currentprojectfind.h index d44171d761aa1357f73d22e21a1b055a70794751..5c08be0f2fc70d0a91982a27133446e5b41f231c 100644 --- a/src/plugins/projectexplorer/currentprojectfind.h +++ b/src/plugins/projectexplorer/currentprojectfind.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp index f2b9c66ced1e72df2350d3e47d29404773cbb25c..4012cee8e13e6be8c9f060883dad07f5866fa3ec 100644 --- a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp +++ b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/customexecutablerunconfiguration.h b/src/plugins/projectexplorer/customexecutablerunconfiguration.h index bcf3fef091a67c7e479a8986439171fd9aa55de5..52cbedd51c688e9b67e2685989b589d297043741 100644 --- a/src/plugins/projectexplorer/customexecutablerunconfiguration.h +++ b/src/plugins/projectexplorer/customexecutablerunconfiguration.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/dependenciesdialog.cpp b/src/plugins/projectexplorer/dependenciesdialog.cpp index de7cee85f869fe3d26653fdb158cc3f8c4d8e4b5..9c78de543ad66f862ccf3865edf58b00a2a4fd26 100644 --- a/src/plugins/projectexplorer/dependenciesdialog.cpp +++ b/src/plugins/projectexplorer/dependenciesdialog.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/dependenciesdialog.h b/src/plugins/projectexplorer/dependenciesdialog.h index 3b815369ab937b942ace69bf5674056089cf1ddd..1dd8621a1ed6ddf77c0885128f9bdff4ddd94e6d 100644 --- a/src/plugins/projectexplorer/dependenciesdialog.h +++ b/src/plugins/projectexplorer/dependenciesdialog.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/dependenciesdialog.ui b/src/plugins/projectexplorer/dependenciesdialog.ui index 25ffdff8948945887be20f830adc15f99735f604..31a70dae9832c5d27b5eac73cbfe44665201aac8 100644 --- a/src/plugins/projectexplorer/dependenciesdialog.ui +++ b/src/plugins/projectexplorer/dependenciesdialog.ui @@ -1,59 +1,45 @@ -<ui version="4.0" > +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> <class>ProjectExplorer::Internal::DependenciesDialog</class> - <widget class="QDialog" name="ProjectExplorer::Internal::DependenciesDialog" > - <property name="geometry" > + <widget class="QDialog" name="ProjectExplorer::Internal::DependenciesDialog"> + <property name="geometry"> <rect> <x>0</x> <y>0</y> - <width>618</width> - <height>660</height> + <width>492</width> + <height>435</height> </rect> </property> - <property name="windowTitle" > + <property name="windowTitle"> <string>Project Dependencies</string> </property> - <layout class="QVBoxLayout" > - <property name="spacing" > + <layout class="QVBoxLayout"> + <property name="spacing"> <number>6</number> </property> - <property name="leftMargin" > - <number>9</number> - </property> - <property name="topMargin" > - <number>9</number> - </property> - <property name="rightMargin" > - <number>9</number> - </property> - <property name="bottomMargin" > + <property name="margin"> <number>9</number> </property> <item> - <widget class="QTableView" name="dependencyTable" > - <property name="minimumSize" > - <size> - <width>600</width> - <height>600</height> - </size> - </property> - <property name="selectionMode" > + <widget class="QTableView" name="dependencyTable"> + <property name="selectionMode"> <enum>QAbstractItemView::SingleSelection</enum> </property> </widget> </item> <item> - <widget class="Line" name="line" > - <property name="orientation" > + <widget class="Line" name="line"> + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> </widget> </item> <item> - <widget class="QDialogButtonBox" name="buttonBox" > - <property name="orientation" > + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> - <property name="standardButtons" > + <property name="standardButtons"> <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> </property> </widget> @@ -68,11 +54,11 @@ <receiver>ProjectExplorer::Internal::DependenciesDialog</receiver> <slot>accept()</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>142</x> <y>285</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>142</x> <y>155</y> </hint> @@ -84,11 +70,11 @@ <receiver>ProjectExplorer::Internal::DependenciesDialog</receiver> <slot>reject()</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>142</x> <y>285</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>142</x> <y>155</y> </hint> diff --git a/src/plugins/projectexplorer/directoryproject.cpp b/src/plugins/projectexplorer/directoryproject.cpp index 042d1ecaa91eeddf3601a857ae58d83e509996d9..58443ec62d25cb8d20542ecf61597ab516ae7aa1 100644 --- a/src/plugins/projectexplorer/directoryproject.cpp +++ b/src/plugins/projectexplorer/directoryproject.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/editorconfiguration.cpp b/src/plugins/projectexplorer/editorconfiguration.cpp index a836c4d9a03084ba4e389ebb675db503e702bc39..3f54b6c57e7b740c2ae59a6918c8be11d76aaf15 100644 --- a/src/plugins/projectexplorer/editorconfiguration.cpp +++ b/src/plugins/projectexplorer/editorconfiguration.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/editorconfiguration.h b/src/plugins/projectexplorer/editorconfiguration.h index d01fb8b719513ef1aebaed12c6390ea2a0547528..41cea2e7af9e34a4ef1c4e77d65dc48a1914e7f5 100644 --- a/src/plugins/projectexplorer/editorconfiguration.h +++ b/src/plugins/projectexplorer/editorconfiguration.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/editorsettingspropertiespage.cpp b/src/plugins/projectexplorer/editorsettingspropertiespage.cpp index f62bc485b98d287b609cbd715464f0511c1f2c26..7932a3d36cfe6b17887fad900343706ad76f164d 100644 --- a/src/plugins/projectexplorer/editorsettingspropertiespage.cpp +++ b/src/plugins/projectexplorer/editorsettingspropertiespage.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/editorsettingspropertiespage.h b/src/plugins/projectexplorer/editorsettingspropertiespage.h index caaad115f97a61d53deeafafc1543424108c5877..3be9f229c4f6a0697beec86a6b7c349379463721 100644 --- a/src/plugins/projectexplorer/editorsettingspropertiespage.h +++ b/src/plugins/projectexplorer/editorsettingspropertiespage.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/environment.cpp b/src/plugins/projectexplorer/environment.cpp index 9220564bba036e2ba88aa5a19b6ef8160f913254..7a767d75b2e1692f0dfd563bf6f2328e01383f68 100644 --- a/src/plugins/projectexplorer/environment.cpp +++ b/src/plugins/projectexplorer/environment.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -87,14 +87,16 @@ Environment::Environment(QStringList env) } } -QStringList Environment::toStringList() +QStringList Environment::toStringList() const { QStringList result; - QMap<QString, QString>::const_iterator it, end; - end = m_values.constEnd(); - for (it = m_values.constBegin(); it != end; ++it) - result<<(it.key() + "=" + it.value()); - + const QMap<QString, QString>::const_iterator end = m_values.constEnd(); + for (QMap<QString, QString>::const_iterator it = m_values.constBegin(); it != end; ++it) { + QString entry = it.key(); + entry += QLatin1Char('='); + entry += it.value(); + result.push_back(entry); + } return result; } diff --git a/src/plugins/projectexplorer/environment.h b/src/plugins/projectexplorer/environment.h index ba3aa9f161d6310555a6b18419305a8502df9e4c..71cd10cb952b407b38b282a2c1c48644cfed45db 100644 --- a/src/plugins/projectexplorer/environment.h +++ b/src/plugins/projectexplorer/environment.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -65,7 +65,7 @@ public: explicit Environment(QStringList env); static Environment systemEnvironment(); - QStringList toStringList(); + QStringList toStringList() const; QString value(const QString &key) const; void set(const QString &key, const QString &value); void unset(const QString &key); diff --git a/src/plugins/projectexplorer/environmenteditmodel.cpp b/src/plugins/projectexplorer/environmenteditmodel.cpp index caa5e571404a810eb3f1172f7d8623b0abbe86d2..8cfa9c31577430fd419f39d91c32a47215e9c5c4 100644 --- a/src/plugins/projectexplorer/environmenteditmodel.cpp +++ b/src/plugins/projectexplorer/environmenteditmodel.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/environmenteditmodel.h b/src/plugins/projectexplorer/environmenteditmodel.h index 070703cab145e5e5936d61634b434c176e70a8a7..e99c69da2ccaa34efabe77a5be5cbd7224771952 100644 --- a/src/plugins/projectexplorer/environmenteditmodel.h +++ b/src/plugins/projectexplorer/environmenteditmodel.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/foldernavigationwidget.cpp b/src/plugins/projectexplorer/foldernavigationwidget.cpp index 4fcca61516356f509ea9053559e671686207f2ff..029707155e5dffa7da2aee311eb28bb6befa6cb9 100644 --- a/src/plugins/projectexplorer/foldernavigationwidget.cpp +++ b/src/plugins/projectexplorer/foldernavigationwidget.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/foldernavigationwidget.h b/src/plugins/projectexplorer/foldernavigationwidget.h index f88bdd6d79c7c6fd8c7d58dd876fd58afe239252..c3eba4ce66282795859624d561f06c0c1ced37c6 100644 --- a/src/plugins/projectexplorer/foldernavigationwidget.h +++ b/src/plugins/projectexplorer/foldernavigationwidget.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/iprojectmanager.h b/src/plugins/projectexplorer/iprojectmanager.h index 3455375a0f8433c0bd0ba112e4f5af37f3ded323..e38de44efb2c91dab93b555f857c6a8fa790fdfb 100644 --- a/src/plugins/projectexplorer/iprojectmanager.h +++ b/src/plugins/projectexplorer/iprojectmanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/iprojectproperties.h b/src/plugins/projectexplorer/iprojectproperties.h index 0a4d762f3395fe4f696689b7c1ef4dedfb684a68..aab3b5043315a47a3cceb202296e6f34bb14794b 100644 --- a/src/plugins/projectexplorer/iprojectproperties.h +++ b/src/plugins/projectexplorer/iprojectproperties.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/metatypedeclarations.h b/src/plugins/projectexplorer/metatypedeclarations.h index 5ec03977a98439b9a44322f42ea335431e2558c2..67076b6a966c7d400f42a9a68129e1c6776818db 100644 --- a/src/plugins/projectexplorer/metatypedeclarations.h +++ b/src/plugins/projectexplorer/metatypedeclarations.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/nodesvisitor.cpp b/src/plugins/projectexplorer/nodesvisitor.cpp index 4ebe7913ef06d59b35472862cce708e2cf269bf2..17828ff5ea99985a5eb7f348963d6382d18c3783 100644 --- a/src/plugins/projectexplorer/nodesvisitor.cpp +++ b/src/plugins/projectexplorer/nodesvisitor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/nodesvisitor.h b/src/plugins/projectexplorer/nodesvisitor.h index f489ab95844cfb73751af67d4cae89842e0bdd80..3b02cd1a47a0681639c0ccb678b63f4b036528c0 100644 --- a/src/plugins/projectexplorer/nodesvisitor.h +++ b/src/plugins/projectexplorer/nodesvisitor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/outputwindow.cpp b/src/plugins/projectexplorer/outputwindow.cpp index 597a6daba6ee7c2266d38c96b29b75668dda7fdc..c02f21ff34b32bc597edbf25fc8e3ae669e93ae3 100644 --- a/src/plugins/projectexplorer/outputwindow.cpp +++ b/src/plugins/projectexplorer/outputwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -35,7 +35,7 @@ #include "projectexplorerconstants.h" #include "runconfiguration.h" -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/coreconstants.h> #include <coreplugin/icore.h> #include <find/basetextfind.h> @@ -78,7 +78,7 @@ OutputPane::OutputPane(Core::ICore *core) this, SLOT(reRunRunControl())); // Stop - Core::ActionManagerInterface *am = core->actionManager(); + Core::ActionManager *am = core->actionManager(); QList<int> globalcontext; globalcontext.append(Core::Constants::C_GLOBAL_ID); @@ -86,7 +86,7 @@ OutputPane::OutputPane(Core::ICore *core) m_stopAction->setToolTip(tr("Stop")); m_stopAction->setEnabled(false); - Core::ICommand *cmd = am->registerAction(m_stopAction, Constants::STOP, globalcontext); + Core::Command *cmd = am->registerAction(m_stopAction, Constants::STOP, globalcontext); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+R"))); m_stopButton = new QToolButton; diff --git a/src/plugins/projectexplorer/outputwindow.h b/src/plugins/projectexplorer/outputwindow.h index 3367909d804c1a2a7c8d9d2ab2f90edbde291f83..6bda6121af66f36e9b81ccc80ea60f1469f2ac8b 100644 --- a/src/plugins/projectexplorer/outputwindow.h +++ b/src/plugins/projectexplorer/outputwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/persistentsettings.cpp b/src/plugins/projectexplorer/persistentsettings.cpp index c8b38f1139892fcf1759602c2487ce6d7b7848d1..12ff44b0b4b0a32b2b3b9788b1fa938a621d0f06 100644 --- a/src/plugins/projectexplorer/persistentsettings.cpp +++ b/src/plugins/projectexplorer/persistentsettings.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/persistentsettings.h b/src/plugins/projectexplorer/persistentsettings.h index 011a61e28b7b8ff19b8a651c4590f2c2f75bc902..9df83d6d788c074607d4bfae71035a582e30ea06 100644 --- a/src/plugins/projectexplorer/persistentsettings.h +++ b/src/plugins/projectexplorer/persistentsettings.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/pluginfilefactory.cpp b/src/plugins/projectexplorer/pluginfilefactory.cpp index 09630139a44d9a50c4ac74238c3ec662d9a4ccfd..de7153c4015feb342d75f49f12f06a2c63e366e3 100644 --- a/src/plugins/projectexplorer/pluginfilefactory.cpp +++ b/src/plugins/projectexplorer/pluginfilefactory.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/pluginfilefactory.h b/src/plugins/projectexplorer/pluginfilefactory.h index ff6527713fa318d97a1f7f41d5f9a7379a0cc8fc..035eb50e665ea72f4143a99f9004b54ff9e58c55 100644 --- a/src/plugins/projectexplorer/pluginfilefactory.h +++ b/src/plugins/projectexplorer/pluginfilefactory.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/processstep.cpp b/src/plugins/projectexplorer/processstep.cpp index 3d8b11665ccb4322c73d16cc631a29acb6cd47ee..e53e6a109928e49a7928e24897fed8f52584cd07 100644 --- a/src/plugins/projectexplorer/processstep.cpp +++ b/src/plugins/projectexplorer/processstep.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/processstep.h b/src/plugins/projectexplorer/processstep.h index 11b40ba9afd473bff0f860113580906ccb076f0d..808aaa2a95bfee134d2ff3de615efbc8eae6bc6d 100644 --- a/src/plugins/projectexplorer/processstep.h +++ b/src/plugins/projectexplorer/processstep.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/project.cpp b/src/plugins/projectexplorer/project.cpp index 3d8d8c7b802457298a70c936e8cb39a0038917de..3f377b52a11c9502a07efd56bfcb89d9850e68c3 100644 --- a/src/plugins/projectexplorer/project.cpp +++ b/src/plugins/projectexplorer/project.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/project.h b/src/plugins/projectexplorer/project.h index 2ad175e48c23c7369a7211fa981b625554a07dce..2a30a0e20f3be4d7a546f3f7b349ef0328f9fa30 100644 --- a/src/plugins/projectexplorer/project.h +++ b/src/plugins/projectexplorer/project.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index b69469048b51b47b9d19aba0bceeebb32b9465be..2c840127c5f9ce8f073c863eb42ff84a9546b63e 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -66,7 +66,7 @@ #include <coreplugin/filemanager.h> #include <coreplugin/modemanager.h> #include <coreplugin/uniqueidmanager.h> -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/ieditor.h> #include <coreplugin/editormanager/ieditorfactory.h> @@ -155,7 +155,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin { ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); m_core = pm->getObject<Core::ICore>(); - Core::ActionManagerInterface *am = m_core->actionManager(); + Core::ActionManager *am = m_core->actionManager(); addObject(this); @@ -181,11 +181,12 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin QList<int> pecontext; pecontext << m_core->uniqueIDManager()->uniqueIdentifier(Constants::C_PROJECTEXPLORER); - Core::BaseMode *mode = new Core::BaseMode(tr("Projects"), - Constants::MODE_SESSION, - QIcon(QLatin1String(":/fancyactionbar/images/mode_Project.png")), - Constants::P_MODE_SESSION, - m_proWindow); + Core::BaseMode *mode = new Core::BaseMode; + mode->setName(tr("Projects")); + mode->setUniqueModeName(Constants::MODE_SESSION); + mode->setIcon(QIcon(QLatin1String(":/fancyactionbar/images/mode_Project.png"))); + mode->setPriority(Constants::P_MODE_SESSION); + mode->setWidget(m_proWindow); mode->setContext(QList<int>() << pecontext); addAutoReleasedObject(mode); m_proWindow->layout()->addWidget(new Core::FindToolBarPlaceHolder(mode)); @@ -232,15 +233,15 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin addAutoReleasedObject(new ProjectFileWizardExtension(m_core)); // context menus - Core::IActionContainer *msessionContextMenu = + Core::ActionContainer *msessionContextMenu = am->createMenu(Constants::M_SESSIONCONTEXT); - Core::IActionContainer *mproject = + Core::ActionContainer *mproject = am->createMenu(Constants::M_PROJECTCONTEXT); - Core::IActionContainer *msubProject = + Core::ActionContainer *msubProject = am->createMenu(Constants::M_SUBPROJECTCONTEXT); - Core::IActionContainer *mfolder = + Core::ActionContainer *mfolder = am->createMenu(Constants::M_FOLDERCONTEXT); - Core::IActionContainer *mfilec = + Core::ActionContainer *mfilec = am->createMenu(Constants::M_FILECONTEXT); m_sessionContextMenu = msessionContextMenu->menu(); @@ -249,22 +250,22 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin m_folderMenu = mfolder->menu(); m_fileMenu = mfilec->menu(); - Core::IActionContainer *mfile = + Core::ActionContainer *mfile = am->actionContainer(Core::Constants::M_FILE); - Core::IActionContainer *menubar = + Core::ActionContainer *menubar = am->actionContainer(Core::Constants::MENU_BAR); // mode manager (for fancy actions) Core::ModeManager *modeManager = m_core->modeManager(); // build menu - Core::IActionContainer *mbuild = + Core::ActionContainer *mbuild = am->createMenu(Constants::M_BUILDPROJECT); mbuild->menu()->setTitle("&Build"); menubar->addMenu(mbuild, Core::Constants::G_VIEW); // debug menu - Core::IActionContainer *mdebug = + Core::ActionContainer *mdebug = am->createMenu(Constants::M_DEBUG); mdebug->menu()->setTitle("&Debug"); menubar->addMenu(mdebug, Core::Constants::G_VIEW); @@ -308,7 +309,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin mfilec->appendGroup(Constants::G_FILE_CONFIG); // "open with" submenu - Core::IActionContainer * const openWith = + Core::ActionContainer * const openWith = am->createMenu(ProjectExplorer::Constants::M_OPENFILEWITHCONTEXT); m_openWithMenu = openWith->menu(); m_openWithMenu->setTitle(tr("Open With")); @@ -321,7 +322,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin // Separators // - Core::ICommand *cmd; + Core::Command *cmd; QAction *sep; sep = new QAction(this); @@ -416,7 +417,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin mfilec->addMenu(openWith, ProjectExplorer::Constants::G_FILE_OPEN); // recent projects menu - Core::IActionContainer *mrecent = + Core::ActionContainer *mrecent = am->createMenu(Constants::M_RECENTPROJECTS); mrecent->menu()->setTitle("Recent Projects"); mfile->addMenu(mrecent, Core::Constants::G_FILE_OPEN); @@ -426,7 +427,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin // unload action m_unloadAction = new QAction(tr("Unload Project"), this); cmd = am->registerAction(m_unloadAction, Constants::UNLOAD, globalcontext); - cmd->setAttribute(Core::ICommand::CA_UpdateText); + cmd->setAttribute(Core::Command::CA_UpdateText); cmd->setDefaultText(m_unloadAction->text()); mfile->addAction(cmd, Core::Constants::G_FILE_PROJECT); mproject->addAction(cmd, Constants::G_PROJECT_FILES); @@ -438,7 +439,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin msessionContextMenu->addAction(cmd, Constants::G_SESSION_FILES); // session menu - Core::IActionContainer *msession = am->createMenu(Constants::M_SESSION); + Core::ActionContainer *msession = am->createMenu(Constants::M_SESSION); msession->menu()->setTitle("&Session"); mfile->addMenu(msession, Core::Constants::G_FILE_PROJECT); m_sessionMenu = msession->menu(); @@ -446,7 +447,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin this, SLOT(updateSessionMenu())); // build menu - Core::IActionContainer *mbc = + Core::ActionContainer *mbc = am->createMenu(Constants::BUILDCONFIGURATIONMENU); m_buildConfigurationMenu = mbc->menu(); m_buildConfigurationMenu->setTitle(tr("Set Build Configuration")); @@ -484,6 +485,10 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin mbuild->addAction(cmd, Constants::G_BUILD_SESSION); msessionContextMenu->addAction(cmd, Constants::G_SESSION_BUILD); + // dependencies action + m_dependenciesAction = new QAction(tr("Edit Dependencies..."), this); + cmd = am->registerAction(m_dependenciesAction, Constants::DEPENDENCIES, globalcontext); + mbuild->addAction(cmd, Constants::G_BUILD_SESSION); // build action m_buildAction = new QAction(tr("Build Project"), this); @@ -519,7 +524,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin mbuild->addAction(cmd, Constants::G_BUILD_RUN); mproject->addAction(cmd, Constants::G_PROJECT_RUN); - Core::IActionContainer *mrc = am->createMenu(Constants::RUNCONFIGURATIONMENU); + Core::ActionContainer *mrc = am->createMenu(Constants::RUNCONFIGURATIONMENU); m_runConfigurationMenu = mrc->menu(); m_runConfigurationMenu->setTitle(tr("Set Run Configuration")); mbuild->addMenu(mrc, Constants::G_BUILD_RUN); @@ -549,18 +554,13 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin debuggerIcon.addFile(":/gdbdebugger/images/debugger_start.png"); m_debugAction = new QAction(debuggerIcon, tr("Start Debugging"), this); cmd = am->registerAction(m_debugAction, Constants::DEBUG, globalcontext); - cmd->setAttribute(Core::ICommand::CA_UpdateText); - cmd->setAttribute(Core::ICommand::CA_UpdateIcon); + cmd->setAttribute(Core::Command::CA_UpdateText); + cmd->setAttribute(Core::Command::CA_UpdateIcon); cmd->setDefaultText(tr("Start Debugging")); cmd->setDefaultKeySequence(QKeySequence(tr("F5"))); mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE); modeManager->addAction(cmd, Constants::P_ACTION_DEBUG, m_runConfigurationMenu); - // dependencies action - m_dependenciesAction = new QAction(tr("Edit Dependencies..."), this); - cmd = am->registerAction(m_dependenciesAction, Constants::DEPENDENCIES, pecontext); - msessionContextMenu->addAction(cmd, Constants::G_SESSION_CONFIG); - // add new file action m_addNewFileAction = new QAction(tr("Add New..."), this); cmd = am->registerAction(m_addNewFileAction, ProjectExplorer::Constants::ADDNEWFILE, @@ -1473,7 +1473,7 @@ void ProjectExplorerPlugin::updateRecentProjectMenu() if (debug) qDebug() << "ProjectExplorerPlugin::updateRecentProjectMenu"; - Core::IActionContainer *aci = + Core::ActionContainer *aci = m_core->actionManager()->actionContainer(Constants::M_RECENTPROJECTS); QMenu *menu = aci->menu(); menu->clear(); diff --git a/src/plugins/projectexplorer/projectexplorer.h b/src/plugins/projectexplorer/projectexplorer.h index fa6f34602caf537e7494f78bec7904aa5147116e..2c1127ff5c63b06ef201db6f6a41d4359bace26e 100644 --- a/src/plugins/projectexplorer/projectexplorer.h +++ b/src/plugins/projectexplorer/projectexplorer.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/projectexplorer_export.h b/src/plugins/projectexplorer/projectexplorer_export.h index ff288b1d17235727f814d07bd98cb0f75e11b825..67274a3ec4bf1c3bd51774dcf366dc8cacad5549 100644 --- a/src/plugins/projectexplorer/projectexplorer_export.h +++ b/src/plugins/projectexplorer/projectexplorer_export.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/projectexplorerconstants.h b/src/plugins/projectexplorer/projectexplorerconstants.h index 5cc5f5c67e28638dc80db5b71e063c4cd16b35cb..ef745e69c908961666a8dc1815e2fafdf4099cca 100644 --- a/src/plugins/projectexplorer/projectexplorerconstants.h +++ b/src/plugins/projectexplorer/projectexplorerconstants.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/projectfilewizardextension.cpp b/src/plugins/projectexplorer/projectfilewizardextension.cpp index 5f9b5f4926016bec18605309a3cbfa2c3aad241d..6b928db16b553ca39369ac295180aff76420b8bc 100644 --- a/src/plugins/projectexplorer/projectfilewizardextension.cpp +++ b/src/plugins/projectexplorer/projectfilewizardextension.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/projectfilewizardextension.h b/src/plugins/projectexplorer/projectfilewizardextension.h index 6e777cf19ecc521f3705ec0406b7574b477d3005..3008b0772e69f80d04bdde553f55c0f7483278f1 100644 --- a/src/plugins/projectexplorer/projectfilewizardextension.h +++ b/src/plugins/projectexplorer/projectfilewizardextension.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/projectmodels.cpp b/src/plugins/projectexplorer/projectmodels.cpp index 59ca5457e4f25b572064cbcd70a8c54b1556167c..7d9464cffb585ab26921634702fd87c5039caa3a 100644 --- a/src/plugins/projectexplorer/projectmodels.cpp +++ b/src/plugins/projectexplorer/projectmodels.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/projectmodels.h b/src/plugins/projectexplorer/projectmodels.h index 2cdf1e6f4d7cbbf5f4db0c90de226b6a0a5f7ac6..92574aa9ff9e86802d3c9b0774e80fc86c6594e1 100644 --- a/src/plugins/projectexplorer/projectmodels.h +++ b/src/plugins/projectexplorer/projectmodels.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/projectnodes.cpp b/src/plugins/projectexplorer/projectnodes.cpp index e7404b5753839a0f814af67cc8142dcfc316b39d..9d2299f0d4206dc5876a16b576385e35978b83d9 100644 --- a/src/plugins/projectexplorer/projectnodes.cpp +++ b/src/plugins/projectexplorer/projectnodes.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/projectnodes.h b/src/plugins/projectexplorer/projectnodes.h index e45cfbc9c0385c4f8c11743bd97067021e85003f..d8f0c725bbbded088d6f28785acffff82507d190 100644 --- a/src/plugins/projectexplorer/projectnodes.h +++ b/src/plugins/projectexplorer/projectnodes.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/projecttreewidget.cpp b/src/plugins/projectexplorer/projecttreewidget.cpp index 39b7214d2142cb8a0f1b789c5ada5476ec36b184..8c71ead433456dfedfff5f04f1cb706b81e2ad5b 100644 --- a/src/plugins/projectexplorer/projecttreewidget.cpp +++ b/src/plugins/projectexplorer/projecttreewidget.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/projecttreewidget.h b/src/plugins/projectexplorer/projecttreewidget.h index 91f83ca3a6956ba722654a160a057b92566a24eb..4d9224b46e95b1da574f3cdce80fd5403def5fec 100644 --- a/src/plugins/projectexplorer/projecttreewidget.h +++ b/src/plugins/projectexplorer/projecttreewidget.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/projectwindow.cpp b/src/plugins/projectexplorer/projectwindow.cpp index b02839a4c5abac8332bb3c75c5d465e1d692da90..e6e2455cced2f147d28b60ca86dd988cfb6661d1 100644 --- a/src/plugins/projectexplorer/projectwindow.cpp +++ b/src/plugins/projectexplorer/projectwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/projectwindow.h b/src/plugins/projectexplorer/projectwindow.h index 8bd546942244b7d2ab29e1cad2e7c6a3398459c4..c9b387ceaa29e0c7d9cde7742c78b254e001624a 100644 --- a/src/plugins/projectexplorer/projectwindow.h +++ b/src/plugins/projectexplorer/projectwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/projectwizardpage.cpp b/src/plugins/projectexplorer/projectwizardpage.cpp index a2d544393ac7e213a738be19522a60c6ac6e058f..f20fb6c42baf4b2d4d1dbadf9169e945add1bc3c 100644 --- a/src/plugins/projectexplorer/projectwizardpage.cpp +++ b/src/plugins/projectexplorer/projectwizardpage.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/projectwizardpage.h b/src/plugins/projectexplorer/projectwizardpage.h index e076a3f0a3cfe87f8e93243fb277e30fa7644e1a..864ef7565a798cafca04d9accaa96d07bbd481ee 100644 --- a/src/plugins/projectexplorer/projectwizardpage.h +++ b/src/plugins/projectexplorer/projectwizardpage.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/removefiledialog.cpp b/src/plugins/projectexplorer/removefiledialog.cpp index c08075f0e539f70aa02eddb26ff6d82c62d86c25..4ecd7e869637ea1d205c481f56ea56b61458d3de 100644 --- a/src/plugins/projectexplorer/removefiledialog.cpp +++ b/src/plugins/projectexplorer/removefiledialog.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/removefiledialog.h b/src/plugins/projectexplorer/removefiledialog.h index 3e9ac432c31784f202ed05bf956a371336e19fad..e5a57815d19c50d4eb1211573e5ace292fc24580 100644 --- a/src/plugins/projectexplorer/removefiledialog.h +++ b/src/plugins/projectexplorer/removefiledialog.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp index fc897a2f9fcee7e0be4b2627d4d8e6933d123518..76083833975378a0b4e49d24618c2b53b83cfd6d 100644 --- a/src/plugins/projectexplorer/runconfiguration.cpp +++ b/src/plugins/projectexplorer/runconfiguration.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/runconfiguration.h b/src/plugins/projectexplorer/runconfiguration.h index c7cf2519bf373605aa097a13aaff0e8732bb6050..acc11cd932ad0bdd68495d5287ddbc9968e8ea33 100644 --- a/src/plugins/projectexplorer/runconfiguration.h +++ b/src/plugins/projectexplorer/runconfiguration.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/runsettingspropertiespage.cpp b/src/plugins/projectexplorer/runsettingspropertiespage.cpp index 2f309814dd79bab29327154db1f68681e5bd7a8c..6b121ef20f5f9c13416559d398c6f1397c531de7 100644 --- a/src/plugins/projectexplorer/runsettingspropertiespage.cpp +++ b/src/plugins/projectexplorer/runsettingspropertiespage.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/runsettingspropertiespage.h b/src/plugins/projectexplorer/runsettingspropertiespage.h index 1f22bae7e719681d36995fc6aef678ad30c7385a..b7eb1201551d0410792ff094bd4c367399c18ed8 100644 --- a/src/plugins/projectexplorer/runsettingspropertiespage.h +++ b/src/plugins/projectexplorer/runsettingspropertiespage.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/scriptwrappers.cpp b/src/plugins/projectexplorer/scriptwrappers.cpp index 873785313303625df2e3200e443a63c6d09d8934..7851e86ee89393a97cb713508df4c3e558650b49 100644 --- a/src/plugins/projectexplorer/scriptwrappers.cpp +++ b/src/plugins/projectexplorer/scriptwrappers.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/scriptwrappers.h b/src/plugins/projectexplorer/scriptwrappers.h index 05ef55420ae8a4c33a47dbfde5a68e5594469eaf..86b2be4fafc962f2a30de33b2fc7da4a89960835 100644 --- a/src/plugins/projectexplorer/scriptwrappers.h +++ b/src/plugins/projectexplorer/scriptwrappers.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp index c8fdaf50c98085aa204198b05111e9ed268b45e0..ef848ff178b157c3458116a8fffd201d0df77883 100644 --- a/src/plugins/projectexplorer/session.cpp +++ b/src/plugins/projectexplorer/session.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -45,7 +45,7 @@ #include <coreplugin/filemanager.h> #include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/ieditor.h> -#include <coreplugin/progressmanager/progressmanagerinterface.h> +#include <coreplugin/progressmanager/progressmanager.h> #include <coreplugin/modemanager.h> #include <texteditor/itexteditor.h> @@ -161,7 +161,7 @@ bool SessionFile::load(const QString &fileName) m_core->progressManager()->addTask(future.future(), tr("Session"), QLatin1String("ProjectExplorer.SessionFile.Load"), - Core::ProgressManagerInterface::CloseOnSuccess); + Core::ProgressManager::CloseOnSuccess); const QStringList &keys = reader.restoreValue(QLatin1String("valueKeys")).toStringList(); foreach (const QString &key, keys) { diff --git a/src/plugins/projectexplorer/session.h b/src/plugins/projectexplorer/session.h index b44202f9a6aef0777b4729046c813f70afa2b458..49d15b7e8df43b52cc6eb99d5a03a4c9d48b4e41 100644 --- a/src/plugins/projectexplorer/session.h +++ b/src/plugins/projectexplorer/session.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/sessiondialog.cpp b/src/plugins/projectexplorer/sessiondialog.cpp index 0ce134edfb95cd4efb14296cff1e8c24e2053b38..8dd67943dd1af63772cec83183724e31a9bd1ec0 100644 --- a/src/plugins/projectexplorer/sessiondialog.cpp +++ b/src/plugins/projectexplorer/sessiondialog.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/sessiondialog.h b/src/plugins/projectexplorer/sessiondialog.h index 07aa28a0084dba08416857dd18a3aaf3672f4720..461577eac5edf9035f5349fbb2b0d3a95ba81e6e 100644 --- a/src/plugins/projectexplorer/sessiondialog.h +++ b/src/plugins/projectexplorer/sessiondialog.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/taskwindow.cpp b/src/plugins/projectexplorer/taskwindow.cpp index b702bb98bd36da12bcf65830b232a24d07b8cff3..5421b9bbe63f7c1a3a61e89705a33c0f81931436 100644 --- a/src/plugins/projectexplorer/taskwindow.cpp +++ b/src/plugins/projectexplorer/taskwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/taskwindow.h b/src/plugins/projectexplorer/taskwindow.h index 48b8de1eb11ef3e25d268f46c037ed218eddbf8a..71875f9e84fb7ace6514fb2a50bde22462d7bc6b 100644 --- a/src/plugins/projectexplorer/taskwindow.h +++ b/src/plugins/projectexplorer/taskwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/winguiprocess.cpp b/src/plugins/projectexplorer/winguiprocess.cpp index 13663e622fc22aa7e7351470e799c601a482ac97..a7e21fd27cd150a338d151326c54a94c26dca784 100644 --- a/src/plugins/projectexplorer/winguiprocess.cpp +++ b/src/plugins/projectexplorer/winguiprocess.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/projectexplorer/winguiprocess.h b/src/plugins/projectexplorer/winguiprocess.h index 02ab6d9ff66dfa8ab38625534b68dd8ac16cfcd3..73b62364f9cb610317eee70f6c3cc5df6a700843 100644 --- a/src/plugins/projectexplorer/winguiprocess.h +++ b/src/plugins/projectexplorer/winguiprocess.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qhelpproject/qhelpproject.cpp b/src/plugins/qhelpproject/qhelpproject.cpp index 4bdfaf38cf68e4fc7939e18e56bc487f55724c80..8185b7b47f4cad739ee3af4518955706c9eb6586 100644 --- a/src/plugins/qhelpproject/qhelpproject.cpp +++ b/src/plugins/qhelpproject/qhelpproject.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qhelpproject/qhelpproject.h b/src/plugins/qhelpproject/qhelpproject.h index bd9d2540b586ed29c35e58ec96426a0edf373d1c..0b1ea26b913d68f33d5e1526aa32246d36f7e7a9 100644 --- a/src/plugins/qhelpproject/qhelpproject.h +++ b/src/plugins/qhelpproject/qhelpproject.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qhelpproject/qhelpprojectitems.cpp b/src/plugins/qhelpproject/qhelpprojectitems.cpp index 1dad289404102c2896c1e359665d433396b2db70..994f29d06aa86bdeebf41030a7443ee677d14e2c 100644 --- a/src/plugins/qhelpproject/qhelpprojectitems.cpp +++ b/src/plugins/qhelpproject/qhelpprojectitems.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qhelpproject/qhelpprojectitems.h b/src/plugins/qhelpproject/qhelpprojectitems.h index ca6f793d8148c39fe5f04c0ebaccde3d848567b1..bad28bff225c8ba7a6b1b89b9745dfd4b859161c 100644 --- a/src/plugins/qhelpproject/qhelpprojectitems.h +++ b/src/plugins/qhelpproject/qhelpprojectitems.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qhelpproject/qhelpprojectmanager.cpp b/src/plugins/qhelpproject/qhelpprojectmanager.cpp index 88870e675e0b5e136ddd484c5b56dd35acfe1850..8941d7fa696cd152143293a7fb08ed4c3b358e96 100644 --- a/src/plugins/qhelpproject/qhelpprojectmanager.cpp +++ b/src/plugins/qhelpproject/qhelpprojectmanager.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -52,7 +52,7 @@ bool QHelpProjectManager::init(ExtensionSystem::PluginManager *pm, QString *erro { m_pm = pm; m_core = m_pm->interface<QWorkbench::ICore>(); - QWorkbench::ActionManagerInterface *am = m_core->actionManager(); + QWorkbench::ActionManager *am = m_core->actionManager(); m_projectContext = m_core->uniqueIDManager()-> uniqueIdentifier(QLatin1String("QHelpProject")); diff --git a/src/plugins/qhelpproject/qhelpprojectmanager.h b/src/plugins/qhelpproject/qhelpprojectmanager.h index 571d39c3289df1dab04f3fbf3f7f32ff09846ba3..ec870e110dfb772771c83b3af6c00ab1b8c6b61b 100644 --- a/src/plugins/qhelpproject/qhelpprojectmanager.h +++ b/src/plugins/qhelpproject/qhelpprojectmanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/applicationlauncher.h b/src/plugins/qt4projectmanager/applicationlauncher.h index 6f5aec1a141395ae687a2c3dd8bff2b3d67fc8d5..e5086d14c4bc393f887628bccc94e0d300e81127 100644 --- a/src/plugins/qt4projectmanager/applicationlauncher.h +++ b/src/plugins/qt4projectmanager/applicationlauncher.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/buildoptionspage.cpp b/src/plugins/qt4projectmanager/buildoptionspage.cpp index 5258776456e1a41ba8bce4b797be47cb897321eb..4c0d281a7274d997ca643f1f4dea32a24b7c6f83 100644 --- a/src/plugins/qt4projectmanager/buildoptionspage.cpp +++ b/src/plugins/qt4projectmanager/buildoptionspage.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/buildparserfactory.cpp b/src/plugins/qt4projectmanager/buildparserfactory.cpp index 34a62305f658206ad4cb444fb36dfc47735205df..9b52fafb23be7c833addd046bd9309b9a1175882 100644 --- a/src/plugins/qt4projectmanager/buildparserfactory.cpp +++ b/src/plugins/qt4projectmanager/buildparserfactory.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/buildparserfactory.h b/src/plugins/qt4projectmanager/buildparserfactory.h index 1c96b053ba741211278b495f6e5ee5d544967454..0e8495d5fb0f1a1970b6af59e37d23cf27cc5e50 100644 --- a/src/plugins/qt4projectmanager/buildparserfactory.h +++ b/src/plugins/qt4projectmanager/buildparserfactory.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/cesdkhandler.cpp b/src/plugins/qt4projectmanager/cesdkhandler.cpp index c4b5f5e22a6eaff3b872e039f19671f24a054476..a6e4dfe4925445855a6f67b331ae3d3e2e6f3bce 100644 --- a/src/plugins/qt4projectmanager/cesdkhandler.cpp +++ b/src/plugins/qt4projectmanager/cesdkhandler.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/cesdkhandler.h b/src/plugins/qt4projectmanager/cesdkhandler.h index d3e5bf4a03593632bec90b2a724fbc10c1955874..dd9c1d9b5e0e98e6d63fab95277a9926d30cd3cc 100644 --- a/src/plugins/qt4projectmanager/cesdkhandler.h +++ b/src/plugins/qt4projectmanager/cesdkhandler.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/deployhelper.cpp b/src/plugins/qt4projectmanager/deployhelper.cpp index 865d26e15a5d3d7cacdb181a51459b9db4eda5a8..b11cdb36f1c83760e9a1dc60b5d65c8db7f96f9a 100644 --- a/src/plugins/qt4projectmanager/deployhelper.cpp +++ b/src/plugins/qt4projectmanager/deployhelper.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/deployhelper.h b/src/plugins/qt4projectmanager/deployhelper.h index 49626f887dabec2e636476f47c1ea27773ef0b3f..8462f05b05c1c88fcc21c1fbd73a148121a0a03c 100644 --- a/src/plugins/qt4projectmanager/deployhelper.h +++ b/src/plugins/qt4projectmanager/deployhelper.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/directorywatcher.cpp b/src/plugins/qt4projectmanager/directorywatcher.cpp index e2e0828219fe934125cfaabcb406ccac437759b3..d20444098e0f1ae7084bc1a75d652fc5c615dee3 100644 --- a/src/plugins/qt4projectmanager/directorywatcher.cpp +++ b/src/plugins/qt4projectmanager/directorywatcher.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/directorywatcher.h b/src/plugins/qt4projectmanager/directorywatcher.h index af73a131f0d12feff0abaf4b2d6aa05393d58576..57f015330a1d764e9333f7e42e657721866e9437 100644 --- a/src/plugins/qt4projectmanager/directorywatcher.h +++ b/src/plugins/qt4projectmanager/directorywatcher.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/embeddedpropertiespage.cpp b/src/plugins/qt4projectmanager/embeddedpropertiespage.cpp index 61d9ff0bc3761dca4da8eab68af4849cfd0be759..2912084b6ce5febbad9641f998897cd112e5a66d 100644 --- a/src/plugins/qt4projectmanager/embeddedpropertiespage.cpp +++ b/src/plugins/qt4projectmanager/embeddedpropertiespage.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/embeddedpropertiespage.h b/src/plugins/qt4projectmanager/embeddedpropertiespage.h index 93b7bae4cac83c9927d96d50fad789fa340d89bb..e527e9e4546e1cd8b6c79bd5a4621c3ac00fe360 100644 --- a/src/plugins/qt4projectmanager/embeddedpropertiespage.h +++ b/src/plugins/qt4projectmanager/embeddedpropertiespage.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/gccparser.cpp b/src/plugins/qt4projectmanager/gccparser.cpp index 52187715fbfe697a7a62733a9844a6cd7d3a7820..1d43e77f574f6c4f63736756b4d5176e98b75594 100644 --- a/src/plugins/qt4projectmanager/gccparser.cpp +++ b/src/plugins/qt4projectmanager/gccparser.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/gccparser.h b/src/plugins/qt4projectmanager/gccparser.h index 76e2b11b31f2bba9f20be4f20b3313bed21c5eff..1b556dd6755f18c22a330ad35da3de29440f21db 100644 --- a/src/plugins/qt4projectmanager/gccparser.h +++ b/src/plugins/qt4projectmanager/gccparser.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/gccpreprocessor.cpp b/src/plugins/qt4projectmanager/gccpreprocessor.cpp index a946377873009d2ff58a6d787df77b30536ef4ad..4ceef15c0531d84188b18f51cc932981fcb9e303 100644 --- a/src/plugins/qt4projectmanager/gccpreprocessor.cpp +++ b/src/plugins/qt4projectmanager/gccpreprocessor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/gccpreprocessor.h b/src/plugins/qt4projectmanager/gccpreprocessor.h index 484dee0b5385197486791d5a1f0751da001f4f69..5ca59856e039f7889fa036d78105b233c7858eeb 100644 --- a/src/plugins/qt4projectmanager/gccpreprocessor.h +++ b/src/plugins/qt4projectmanager/gccpreprocessor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/gdbmacrosbuildstep.cpp b/src/plugins/qt4projectmanager/gdbmacrosbuildstep.cpp index 5b03ba2d5b0bc31aaa0fe964ba097bd431cbc764..49d8ccd8a30b8fae206084f729fca3d942663e92 100644 --- a/src/plugins/qt4projectmanager/gdbmacrosbuildstep.cpp +++ b/src/plugins/qt4projectmanager/gdbmacrosbuildstep.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/gdbmacrosbuildstep.h b/src/plugins/qt4projectmanager/gdbmacrosbuildstep.h index f5aa55d22e572c34a8bc3b411c38dfbbf787617e..140252c195bd9c1a21bf5e4d6d16c6e1a5ba871b 100644 --- a/src/plugins/qt4projectmanager/gdbmacrosbuildstep.h +++ b/src/plugins/qt4projectmanager/gdbmacrosbuildstep.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/headerpath.h b/src/plugins/qt4projectmanager/headerpath.h index 74012f89750c6ba4476b5f7c59f496490be59b72..46ea6095df8e886281bcaa6fbb2967a6e22f5f46 100644 --- a/src/plugins/qt4projectmanager/headerpath.h +++ b/src/plugins/qt4projectmanager/headerpath.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/makestep.cpp b/src/plugins/qt4projectmanager/makestep.cpp index 5e6d3fce824df9226db3e3262acc86345d407be3..2a032e63fd7202c0d270904f625fabefff19ac10 100644 --- a/src/plugins/qt4projectmanager/makestep.cpp +++ b/src/plugins/qt4projectmanager/makestep.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/makestep.h b/src/plugins/qt4projectmanager/makestep.h index ad066d23c40eccef8d86b30c94c604328a240ec6..6312f08a1e14de24b9e84c7e79d2136109c91ada 100644 --- a/src/plugins/qt4projectmanager/makestep.h +++ b/src/plugins/qt4projectmanager/makestep.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/msvcenvironment.cpp b/src/plugins/qt4projectmanager/msvcenvironment.cpp index dcfc15e10c8cf2eb9436ef9f57871d5a4aa5c998..2ae9bbebdf7da58e71445a9eaddb208c432da600 100644 --- a/src/plugins/qt4projectmanager/msvcenvironment.cpp +++ b/src/plugins/qt4projectmanager/msvcenvironment.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/msvcenvironment.h b/src/plugins/qt4projectmanager/msvcenvironment.h index b1aef04e1c9bd0bd880777138462a192d297a615..b3b50718256b8057bb8babfe69bdee74552841f7 100644 --- a/src/plugins/qt4projectmanager/msvcenvironment.h +++ b/src/plugins/qt4projectmanager/msvcenvironment.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/msvcparser.cpp b/src/plugins/qt4projectmanager/msvcparser.cpp index 7ef3d7c955ff585e40fe1a48fa3acb93df4ba4ff..d4a23264c79c2782f2f71bd3e4c19ffaee25cd87 100644 --- a/src/plugins/qt4projectmanager/msvcparser.cpp +++ b/src/plugins/qt4projectmanager/msvcparser.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/msvcparser.h b/src/plugins/qt4projectmanager/msvcparser.h index 4811c90773c73a05857007a82f5f6fd3a5f7a684..6eaee5c97e90e8ee54cb2d7c451c7800d9547049 100644 --- a/src/plugins/qt4projectmanager/msvcparser.h +++ b/src/plugins/qt4projectmanager/msvcparser.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/profilecache.h b/src/plugins/qt4projectmanager/profilecache.h index eef60ee5624e20d475682e79bf4f26b5b72b34e3..484978d662d16495fcc3df29f339d000b629d78b 100644 --- a/src/plugins/qt4projectmanager/profilecache.h +++ b/src/plugins/qt4projectmanager/profilecache.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/profileeditor.cpp b/src/plugins/qt4projectmanager/profileeditor.cpp index 6d4f36f1f790caeac2eb93552aa9d23022d62259..e173bff23160e49543b63b34d89371e94e06efaf 100644 --- a/src/plugins/qt4projectmanager/profileeditor.cpp +++ b/src/plugins/qt4projectmanager/profileeditor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/profileeditor.h b/src/plugins/qt4projectmanager/profileeditor.h index 36017aa6eb858492a83775b75c7196fa2ad10baf..e2c6c3be5c872ca5fe4b8f6a658462edb63010e4 100644 --- a/src/plugins/qt4projectmanager/profileeditor.h +++ b/src/plugins/qt4projectmanager/profileeditor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/profileeditorfactory.cpp b/src/plugins/qt4projectmanager/profileeditorfactory.cpp index bc9e1729eb4fc84fd68321cb987ca24ad0afbde4..dfe8c33232f29497cfdd1cb3d723ebe6385314df 100644 --- a/src/plugins/qt4projectmanager/profileeditorfactory.cpp +++ b/src/plugins/qt4projectmanager/profileeditorfactory.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/profileeditorfactory.h b/src/plugins/qt4projectmanager/profileeditorfactory.h index f73edc8f47bab578fb9bf0fe6345a8a87ff5a1fe..8f341855e8aa45bdac6fa8335c94578fc71be907 100644 --- a/src/plugins/qt4projectmanager/profileeditorfactory.h +++ b/src/plugins/qt4projectmanager/profileeditorfactory.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/profilehighlighter.cpp b/src/plugins/qt4projectmanager/profilehighlighter.cpp index 90338130378748bbec20e726b444c135a02a4a51..783acb35883823f81de5ccbc069388a02a9902b2 100644 --- a/src/plugins/qt4projectmanager/profilehighlighter.cpp +++ b/src/plugins/qt4projectmanager/profilehighlighter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/profilehighlighter.h b/src/plugins/qt4projectmanager/profilehighlighter.h index bdbf9c60457cfa4a70fa7ef678d71a22d215b076..0340b8efdce3818537738e6fdf615b41fccb0a01 100644 --- a/src/plugins/qt4projectmanager/profilehighlighter.h +++ b/src/plugins/qt4projectmanager/profilehighlighter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/profilereader.cpp b/src/plugins/qt4projectmanager/profilereader.cpp index a8069b54a797042242b947ebb779aeb7330efce8..51337d7f24213e9e613b848be8746f97b1d750d3 100644 --- a/src/plugins/qt4projectmanager/profilereader.cpp +++ b/src/plugins/qt4projectmanager/profilereader.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/profilereader.h b/src/plugins/qt4projectmanager/profilereader.h index 81e0ad2f944bcca8ed48a6ee9dc5ec607cbcdb67..c9df6ee7e017f39245f560b2087d006869d52d05 100644 --- a/src/plugins/qt4projectmanager/profilereader.h +++ b/src/plugins/qt4projectmanager/profilereader.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/projectloadwizard.cpp b/src/plugins/qt4projectmanager/projectloadwizard.cpp index 62bef9bcc6b7b7b49bdf3479b47c72a80040f3cc..970ae1247fa85eeb23761926992e769b970920e8 100644 --- a/src/plugins/qt4projectmanager/projectloadwizard.cpp +++ b/src/plugins/qt4projectmanager/projectloadwizard.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/projectloadwizard.h b/src/plugins/qt4projectmanager/projectloadwizard.h index 71dae75bf2968b90ab2f329c6fe0bb160f09f1d4..bce753f416022226c12d50ac7e5f9703a136b01a 100644 --- a/src/plugins/qt4projectmanager/projectloadwizard.h +++ b/src/plugins/qt4projectmanager/projectloadwizard.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/qmakebuildstepfactory.cpp b/src/plugins/qt4projectmanager/qmakebuildstepfactory.cpp index f6c422b9a0d9f8ce795af7db5ce018823aea7fa2..8d9eb1c2caac7ab530fb07720292434e55a77cad 100644 --- a/src/plugins/qt4projectmanager/qmakebuildstepfactory.cpp +++ b/src/plugins/qt4projectmanager/qmakebuildstepfactory.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/qmakebuildstepfactory.h b/src/plugins/qt4projectmanager/qmakebuildstepfactory.h index 2766701eab3a536fd3ce182a04c2341216e4a086..0f5e14a9d7bb8a1c76b0fe066388e0489b44b34d 100644 --- a/src/plugins/qt4projectmanager/qmakebuildstepfactory.h +++ b/src/plugins/qt4projectmanager/qmakebuildstepfactory.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/qmakestep.cpp b/src/plugins/qt4projectmanager/qmakestep.cpp index 1b50ee296d23e5fefc9845a12e0c1cbe5d128276..d8c4204ccdf7a008ab76e21bde8363c04c843c3e 100644 --- a/src/plugins/qt4projectmanager/qmakestep.cpp +++ b/src/plugins/qt4projectmanager/qmakestep.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/qmakestep.h b/src/plugins/qt4projectmanager/qmakestep.h index 4431e59bfb80244aec0cbf68646ea196ebdfa4e4..228aca7c2a396ac6ea8fb19737ebe54e4f85ae8c 100644 --- a/src/plugins/qt4projectmanager/qmakestep.h +++ b/src/plugins/qt4projectmanager/qmakestep.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/qt4buildconfigwidget.cpp b/src/plugins/qt4projectmanager/qt4buildconfigwidget.cpp index 13fb5980a907db410ffe71b93354e4af4bb19c3c..de7141b0794a2957808383ef6b7a5e725560cd07 100644 --- a/src/plugins/qt4projectmanager/qt4buildconfigwidget.cpp +++ b/src/plugins/qt4projectmanager/qt4buildconfigwidget.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/qt4buildconfigwidget.h b/src/plugins/qt4projectmanager/qt4buildconfigwidget.h index c7910b44b04fc8e8021ab445e54541f574f7cd4c..5e584fa149f4f52b6c2c894ab6b75b51b6c3c298 100644 --- a/src/plugins/qt4projectmanager/qt4buildconfigwidget.h +++ b/src/plugins/qt4projectmanager/qt4buildconfigwidget.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/qt4buildenvironmentwidget.cpp b/src/plugins/qt4projectmanager/qt4buildenvironmentwidget.cpp index f0195cfd8470b6bd3b61dec5602ccfb4c04f446f..8b207bc64a6cc25844366915399b774264906d89 100644 --- a/src/plugins/qt4projectmanager/qt4buildenvironmentwidget.cpp +++ b/src/plugins/qt4projectmanager/qt4buildenvironmentwidget.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/qt4buildenvironmentwidget.h b/src/plugins/qt4projectmanager/qt4buildenvironmentwidget.h index 1218607f5c5a1b3d5e51b42775304743ddd9cd14..bc8bab91d540bc7f96bebef7314857ea85a35b3e 100644 --- a/src/plugins/qt4projectmanager/qt4buildenvironmentwidget.h +++ b/src/plugins/qt4projectmanager/qt4buildenvironmentwidget.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/qt4nodes.cpp b/src/plugins/qt4projectmanager/qt4nodes.cpp index 7157c8788f5123f9df392b515f44b1b0d31aaf0c..8f836f649826dbb3e70a1c34880b3fc4427d8359 100644 --- a/src/plugins/qt4projectmanager/qt4nodes.cpp +++ b/src/plugins/qt4projectmanager/qt4nodes.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/qt4nodes.h b/src/plugins/qt4projectmanager/qt4nodes.h index 487177c84aedc69288a4f8d63a2afa9c86f328eb..9ea6b07c71cf1f3ac6dc2fcba405a216c1a99d90 100644 --- a/src/plugins/qt4projectmanager/qt4nodes.h +++ b/src/plugins/qt4projectmanager/qt4nodes.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/qt4project.cpp b/src/plugins/qt4projectmanager/qt4project.cpp index dd61dbde09980132e0807c50fa5931dffbd14491..7af448e233173f92f0ef9bd97459eef0f8dca814 100644 --- a/src/plugins/qt4projectmanager/qt4project.cpp +++ b/src/plugins/qt4projectmanager/qt4project.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/qt4project.h b/src/plugins/qt4projectmanager/qt4project.h index a70669f49f05250b013f6ff8c79d2eae4786218b..24b7e45d6e8dc8e4ee648925e678c89fdc8117a0 100644 --- a/src/plugins/qt4projectmanager/qt4project.h +++ b/src/plugins/qt4projectmanager/qt4project.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/qt4projectmanager.cpp b/src/plugins/qt4projectmanager/qt4projectmanager.cpp index 7e83418eaae3e6b0c27a15dfa31706310edf192b..dd8413aec149abd1998a1d2e942917290cd0f1c2 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanager.cpp +++ b/src/plugins/qt4projectmanager/qt4projectmanager.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/qt4projectmanager.h b/src/plugins/qt4projectmanager/qt4projectmanager.h index c6eb4127d75d638ccce162c5fc3587f4b34919fd..4bb4d6eaf188bed1ed8683a276c4ea4e367cecff 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanager.h +++ b/src/plugins/qt4projectmanager/qt4projectmanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h b/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h index e76b4ef5f8cbdbbf3b86c9c6e8ca3579a3434ee0..1ef68a68f5f89bb9301c982360fb983ed6e0ccb8 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h +++ b/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp b/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp index debb89dae447d23d8f0aba962afc127251c53835..01a0b91aae6bf9ec6b6723608e7910c099cdd23e 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp +++ b/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -52,7 +52,7 @@ #include <projectexplorer/projectnodes.h> #include <coreplugin/uniqueidmanager.h> #include <coreplugin/mimedatabase.h> -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> #include <texteditor/texteditoractionhandler.h> #include <QtCore/qplugin.h> @@ -82,7 +82,7 @@ Qt4ProjectManagerPlugin::~Qt4ProjectManagerPlugin() delete m_qt4ProjectManager; } /* -static Core::ICommand *createSeparator(Core::ActionManagerInterface *am, +static Core::Command *createSeparator(Core::ActionManager *am, QObject *parent, const QString &name, const QList<int> &context) @@ -100,7 +100,7 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList & /*arguments*/, QStr m_projectExplorer = m_core->pluginManager()->getObject<ProjectExplorer::ProjectExplorerPlugin>(); - Core::ActionManagerInterface *am = m_core->actionManager(); + Core::ActionManager *am = m_core->actionManager(); //create and register objects m_qt4ProjectManager = new Qt4Manager(this, m_core); @@ -139,16 +139,16 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList & /*arguments*/, QStr //addObject(m_embeddedPropertiesPage); //menus - Core::IActionContainer *mbuild = + Core::ActionContainer *mbuild = am->actionContainer(ProjectExplorer::Constants::M_BUILDPROJECT); - Core::IActionContainer *mproject = + Core::ActionContainer *mproject = am->actionContainer(ProjectExplorer::Constants::M_PROJECTCONTEXT); //register actions m_projectContext = m_core->uniqueIDManager()-> uniqueIdentifier(Qt4ProjectManager::Constants::PROJECT_KIND); QList<int> context = QList<int>() << m_projectContext; - Core::ICommand *command; + Core::Command *command; QIcon qmakeIcon(QLatin1String(":/qt4projectmanager/images/run_qmake.png")); qmakeIcon.addFile(QLatin1String(":/qt4projectmanager/images/run_qmake_small.png")); diff --git a/src/plugins/qt4projectmanager/qt4projectmanagerplugin.h b/src/plugins/qt4projectmanager/qt4projectmanagerplugin.h index ee46f1f6aa07ae69deaf7520d43221477412e8fa..584a9bfca47472b6e44dcfca319eabe7fc64380d 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanagerplugin.h +++ b/src/plugins/qt4projectmanager/qt4projectmanagerplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/qt4runconfiguration.cpp b/src/plugins/qt4projectmanager/qt4runconfiguration.cpp index 606e0be123929df66d7e45613d207448c8392d80..99c19e3a7e9957aae6216fdadacb9a6f47123096 100644 --- a/src/plugins/qt4projectmanager/qt4runconfiguration.cpp +++ b/src/plugins/qt4projectmanager/qt4runconfiguration.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/qt4runconfiguration.h b/src/plugins/qt4projectmanager/qt4runconfiguration.h index 9e2897914388cf36044f1e59c12e79f7556e8bfc..c51ac521fe53fbe9d3b3b957d78b61598860bef0 100644 --- a/src/plugins/qt4projectmanager/qt4runconfiguration.h +++ b/src/plugins/qt4projectmanager/qt4runconfiguration.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp index e39240118d1e0a8efa90f71f35372856e5d08a36..2becf5465507bb1e79b2ae5fc74951c0d347df3c 100644 --- a/src/plugins/qt4projectmanager/qtversionmanager.cpp +++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -162,11 +162,8 @@ void QtVersionManager::updateUniqueIdToIndexMap() m_uniqueIdToIndex.insert(m_versions.at(i)->uniqueId(), i); } -void QtVersionManager::finished(bool accepted) +void QtVersionManager::apply() { - if (!accepted) - return; - m_widget->finish(); QList<QtVersion*> newVersions = m_widget->versions(); bool versionPathsChanged = m_versions.size() != newVersions.size(); diff --git a/src/plugins/qt4projectmanager/qtversionmanager.h b/src/plugins/qt4projectmanager/qtversionmanager.h index a76a62ada0405cef44547839a1ac68ed7148b412..a9a76066a33cc5dbb81dbdf721a1173f3abb5f7b 100644 --- a/src/plugins/qt4projectmanager/qtversionmanager.h +++ b/src/plugins/qt4projectmanager/qtversionmanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -172,7 +172,8 @@ public: QString trCategory() const; QWidget *createPage(QWidget *parent); - void finished(bool accepted); + void apply(); + void finish() { } void writeVersionsIntoSettings(); diff --git a/src/plugins/qt4projectmanager/speinfo.cpp b/src/plugins/qt4projectmanager/speinfo.cpp index fefce92e5574ed3aa381b4bc2cde81cfa41d32fe..04df918bb518e1a877a620382cddcadabf0c5196 100644 --- a/src/plugins/qt4projectmanager/speinfo.cpp +++ b/src/plugins/qt4projectmanager/speinfo.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/speinfo.h b/src/plugins/qt4projectmanager/speinfo.h index 46ac60372a0f59f05e88ab6f3b68e0bba8dd774f..2d9db283ea41daea5b7e2d3ab29fd911e655b635 100644 --- a/src/plugins/qt4projectmanager/speinfo.h +++ b/src/plugins/qt4projectmanager/speinfo.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp b/src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp index 2be52a0a8d1671bd0aa2429f0770e5409b121c54..73884791fe829f8b4e9f36482e28aa269869a3d1 100644 --- a/src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp +++ b/src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/wizards/consoleappwizard.h b/src/plugins/qt4projectmanager/wizards/consoleappwizard.h index ffb398d1e7b706dd25f4c5a3165dfe8fdcff7aba..36fff218ddefd88be03bf18011f8b87b86ec02fe 100644 --- a/src/plugins/qt4projectmanager/wizards/consoleappwizard.h +++ b/src/plugins/qt4projectmanager/wizards/consoleappwizard.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp index 7a1bf47a4c4ee3325c01966c7bf0909c7deadbc0..8ab95fa74292c75feda9f5810bbbc7f6b21def6f 100644 --- a/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp +++ b/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.h b/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.h index e8ba72a5575b6caeeef0e50f9f353db3abc2b23f..975548eb6ead94f0c06f5caa406f6444f3fc7e86 100644 --- a/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.h +++ b/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/wizards/filespage.cpp b/src/plugins/qt4projectmanager/wizards/filespage.cpp index 73d5438ffeedcea544985d1ea6bac1066426480b..610781613af533c55cfe12ed180960469062f8ee 100644 --- a/src/plugins/qt4projectmanager/wizards/filespage.cpp +++ b/src/plugins/qt4projectmanager/wizards/filespage.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/wizards/filespage.h b/src/plugins/qt4projectmanager/wizards/filespage.h index f84812425b2016f77605f8a739dd80223425565f..f5d3bb86f4128b4102c9212a6cd1fee2a31a06e8 100644 --- a/src/plugins/qt4projectmanager/wizards/filespage.h +++ b/src/plugins/qt4projectmanager/wizards/filespage.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp b/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp index 1df3a0ba1a3eecc779b164937dd226a27a27538a..14df3821ccddfebb610926f50f4cc36298dc2618 100644 --- a/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp +++ b/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/wizards/guiappwizard.h b/src/plugins/qt4projectmanager/wizards/guiappwizard.h index f3098e17506115ea64eb01ca64b0a026831f0d55..dd7d7e7d02d3cb5e8f6c22981cefb204f93b39be 100644 --- a/src/plugins/qt4projectmanager/wizards/guiappwizard.h +++ b/src/plugins/qt4projectmanager/wizards/guiappwizard.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp index 1c525704675d322e2456e2d0a21208f472b30eaa..0bc379ecbeaf50e76741b4fa52175d8a67e84008 100644 --- a/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp +++ b/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.h b/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.h index 4092fee5dab857f53e0d583c44ba34dd27e71f0a..080cf802c26c606561f97a1752c9e8164dccbb59 100644 --- a/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.h +++ b/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/wizards/libraryparameters.cpp b/src/plugins/qt4projectmanager/wizards/libraryparameters.cpp index 16887d103048f7459afb7da4dcd2a1802586083a..713268736c6f50a2e55c6c6eb3f1a388acfd70de 100644 --- a/src/plugins/qt4projectmanager/wizards/libraryparameters.cpp +++ b/src/plugins/qt4projectmanager/wizards/libraryparameters.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/wizards/libraryparameters.h b/src/plugins/qt4projectmanager/wizards/libraryparameters.h index e02eaa32bb9fe65e8afae72204fe1bde5a22de15..680022c8085f16830b34c7f7bc655507bf34d3ec 100644 --- a/src/plugins/qt4projectmanager/wizards/libraryparameters.h +++ b/src/plugins/qt4projectmanager/wizards/libraryparameters.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/wizards/librarywizard.cpp b/src/plugins/qt4projectmanager/wizards/librarywizard.cpp index ff6639ad4844f9bc9f2f0a9afabcbc9f08dc2f5f..e79cd1b6588f04b3eea9e7093a29401fcd59351f 100644 --- a/src/plugins/qt4projectmanager/wizards/librarywizard.cpp +++ b/src/plugins/qt4projectmanager/wizards/librarywizard.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/wizards/librarywizard.h b/src/plugins/qt4projectmanager/wizards/librarywizard.h index 6e2eb725888cb57168e929576ed18c288572ace7..203179d4c9114e72ad00698bf552def824c9d558 100644 --- a/src/plugins/qt4projectmanager/wizards/librarywizard.h +++ b/src/plugins/qt4projectmanager/wizards/librarywizard.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp index 6b435b5e41586dee03801253990f55234164e37f..814164457e2b62ac76afde3052c8d3bd942cb264 100644 --- a/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp +++ b/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/wizards/librarywizarddialog.h b/src/plugins/qt4projectmanager/wizards/librarywizarddialog.h index 8472df61fe82ef6f07953c1ff61bf4f3684957ed..30f55bc84f31bd09c0449ad5224386c6c3b3b5e9 100644 --- a/src/plugins/qt4projectmanager/wizards/librarywizarddialog.h +++ b/src/plugins/qt4projectmanager/wizards/librarywizarddialog.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/wizards/modulespage.cpp b/src/plugins/qt4projectmanager/wizards/modulespage.cpp index fb362732d55f9b90f92405d879c9fdbf2c34a238..7ba0980c2d97ee1ffb1d9f82d5f68dc708556f59 100644 --- a/src/plugins/qt4projectmanager/wizards/modulespage.cpp +++ b/src/plugins/qt4projectmanager/wizards/modulespage.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/wizards/modulespage.h b/src/plugins/qt4projectmanager/wizards/modulespage.h index fdb63202f8dfa4c3406ddf94c42b4151db8ec430..d8cb661735c615d28134b9430c451b2baa43d6ad 100644 --- a/src/plugins/qt4projectmanager/wizards/modulespage.h +++ b/src/plugins/qt4projectmanager/wizards/modulespage.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/wizards/qtprojectparameters.cpp b/src/plugins/qt4projectmanager/wizards/qtprojectparameters.cpp index cab7b56b46a89ea0c89e0b888607593ffcb64cf4..910b0e5d07d66c3f6d310903f31a6300ef623de5 100644 --- a/src/plugins/qt4projectmanager/wizards/qtprojectparameters.cpp +++ b/src/plugins/qt4projectmanager/wizards/qtprojectparameters.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/wizards/qtprojectparameters.h b/src/plugins/qt4projectmanager/wizards/qtprojectparameters.h index e8146557f21d161b1ebca089369f4caf9a5e30af..854045bd6ed356a9233244f9f06b7ca12fa7461c 100644 --- a/src/plugins/qt4projectmanager/wizards/qtprojectparameters.h +++ b/src/plugins/qt4projectmanager/wizards/qtprojectparameters.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/wizards/qtwizard.cpp b/src/plugins/qt4projectmanager/wizards/qtwizard.cpp index 831e0e908dd7d990761b96680df84a60618d0e47..15f334cf2023008caf38b4d22a899fc940ec5ae2 100644 --- a/src/plugins/qt4projectmanager/wizards/qtwizard.cpp +++ b/src/plugins/qt4projectmanager/wizards/qtwizard.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qt4projectmanager/wizards/qtwizard.h b/src/plugins/qt4projectmanager/wizards/qtwizard.h index 1b4f1a6074acd1c08b3d30a9bb4321ba4d057b78..9858251a9dfd98f80383448d5518f58e7f527cf4 100644 --- a/src/plugins/qt4projectmanager/wizards/qtwizard.h +++ b/src/plugins/qt4projectmanager/wizards/qtwizard.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qtestlib/qtestlibplugin.cpp b/src/plugins/qtestlib/qtestlibplugin.cpp index a1889ef20d73c81dc89a57c0674ab9bdff42eca6..5b38e05b33afee294bbfe334759bcf521f07050f 100644 --- a/src/plugins/qtestlib/qtestlibplugin.cpp +++ b/src/plugins/qtestlib/qtestlibplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qtestlib/qtestlibplugin.h b/src/plugins/qtestlib/qtestlibplugin.h index d2f3ad850df490187cb7fb3e5e9ce008ca68b1b7..2c804a16c3a3d80b2ce92225b976b5d5712a340f 100644 --- a/src/plugins/qtestlib/qtestlibplugin.h +++ b/src/plugins/qtestlib/qtestlibplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qtscripteditor/qtscripteditor.cpp b/src/plugins/qtscripteditor/qtscripteditor.cpp index 39ba4f0d9426d1fa7b76792f2255dc7eda52fba3..4062b69e5079a2a262ddb02ed2c8db86a76417d6 100644 --- a/src/plugins/qtscripteditor/qtscripteditor.cpp +++ b/src/plugins/qtscripteditor/qtscripteditor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -39,7 +39,7 @@ #include <indenter.h> #include <coreplugin/icore.h> -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> #include <texteditor/basetextdocument.h> #include <texteditor/fontsettings.h> #include <texteditor/textblockiterator.h> @@ -157,7 +157,7 @@ void ScriptEditor::contextMenuEvent(QContextMenuEvent *e) { QMenu *menu = createStandardContextMenu(); - if (Core::IActionContainer *mcontext = m_core->actionManager()->actionContainer(QtScriptEditor::Constants::M_CONTEXT)) { + if (Core::ActionContainer *mcontext = m_core->actionManager()->actionContainer(QtScriptEditor::Constants::M_CONTEXT)) { QMenu *contextMenu = mcontext->menu(); foreach (QAction *action, contextMenu->actions()) menu->addAction(action); diff --git a/src/plugins/qtscripteditor/qtscripteditor.h b/src/plugins/qtscripteditor/qtscripteditor.h index 73e34fc527d9426109368017a69f74ffb8d8f4a7..1dda5a95e92677e97718a32346df491dab66aefa 100644 --- a/src/plugins/qtscripteditor/qtscripteditor.h +++ b/src/plugins/qtscripteditor/qtscripteditor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qtscripteditor/qtscripteditoractionhandler.cpp b/src/plugins/qtscripteditor/qtscripteditoractionhandler.cpp index f51d8a8329e29a558ea4f3fa73790eb7cb204b98..bb306f1a3f2d724c913d45961c44f731b484a051 100644 --- a/src/plugins/qtscripteditor/qtscripteditoractionhandler.cpp +++ b/src/plugins/qtscripteditor/qtscripteditoractionhandler.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -35,8 +35,8 @@ #include "qtscripteditorconstants.h" #include "qtscripteditor.h" -#include <coreplugin/actionmanager/actionmanagerinterface.h> -#include <coreplugin/scriptmanager/scriptmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> +#include <coreplugin/scriptmanager/scriptmanager.h> #include <QtGui/QAction> #include <QtGui/QMessageBox> @@ -45,7 +45,7 @@ static QAction *actionFromId(Core::ICore *core, const QString &id) { - Core::ICommand *cmd = core->actionManager()->command(id); + Core::Command *cmd = core->actionManager()->command(id); if (!cmd) return 0; return cmd->action(); @@ -79,7 +79,7 @@ void QtScriptEditorActionHandler::updateActions(UpdateMode um) void QtScriptEditorActionHandler::run() { - typedef Core::ScriptManagerInterface::Stack Stack; + typedef Core::ScriptManager::Stack Stack; if (!currentEditor()) return; diff --git a/src/plugins/qtscripteditor/qtscripteditoractionhandler.h b/src/plugins/qtscripteditor/qtscripteditoractionhandler.h index 3e21889bdffd1df1053e4e13bb4f534071c765e6..d18ee2d25ff454fa6bb5960015bcbc6d1b0b1b63 100644 --- a/src/plugins/qtscripteditor/qtscripteditoractionhandler.h +++ b/src/plugins/qtscripteditor/qtscripteditoractionhandler.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qtscripteditor/qtscripteditorconstants.h b/src/plugins/qtscripteditor/qtscripteditorconstants.h index da6b6948641b6c2c9fca7291679dffe1880bfdaa..0e2e52c36615e4d60c7a81a562ff9afafdd3745d 100644 --- a/src/plugins/qtscripteditor/qtscripteditorconstants.h +++ b/src/plugins/qtscripteditor/qtscripteditorconstants.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qtscripteditor/qtscripteditorfactory.cpp b/src/plugins/qtscripteditor/qtscripteditorfactory.cpp index e63c9d16c4411b88e2f3464b2fe75543e1f2b4c0..392b627363a74eca6b1df14aa89d35c3c1ab579a 100644 --- a/src/plugins/qtscripteditor/qtscripteditorfactory.cpp +++ b/src/plugins/qtscripteditor/qtscripteditorfactory.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qtscripteditor/qtscripteditorfactory.h b/src/plugins/qtscripteditor/qtscripteditorfactory.h index b2bfee27e20d9ea53476b3ddc264a8f4b9c76f6f..f97cdab1eed2682c18dedcebd7d026bb1d09d106 100644 --- a/src/plugins/qtscripteditor/qtscripteditorfactory.h +++ b/src/plugins/qtscripteditor/qtscripteditorfactory.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qtscripteditor/qtscripteditorplugin.cpp b/src/plugins/qtscripteditor/qtscripteditorplugin.cpp index d03692b9d6d3d6b453382908c358889fad591b59..1bf230155b644efbd6c0cceec9803839941073fd 100644 --- a/src/plugins/qtscripteditor/qtscripteditorplugin.cpp +++ b/src/plugins/qtscripteditor/qtscripteditorplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -42,7 +42,7 @@ #include <coreplugin/coreconstants.h> #include <coreplugin/mimedatabase.h> #include <coreplugin/uniqueidmanager.h> -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> #include <texteditor/fontsettings.h> #include <texteditor/storagesettings.h> #include <texteditor/texteditorconstants.h> @@ -131,12 +131,12 @@ void QtScriptEditorPlugin::initializeEditor(QtScriptEditor::Internal::ScriptEdit void QtScriptEditorPlugin::registerActions(Core::ICore *core) { - Core::ActionManagerInterface *am = core->actionManager(); - Core::IActionContainer *mcontext = am->createMenu(QtScriptEditor::Constants::M_CONTEXT); + Core::ActionManager *am = core->actionManager(); + Core::ActionContainer *mcontext = am->createMenu(QtScriptEditor::Constants::M_CONTEXT); QAction *action = new QAction(this); action->setSeparator(true); - Core::ICommand *cmd = am->registerAction(action, QtScriptEditor::Constants::RUN_SEP, m_scriptcontext); + Core::Command *cmd = am->registerAction(action, QtScriptEditor::Constants::RUN_SEP, m_scriptcontext); mcontext->addAction(cmd, Core::Constants::G_DEFAULT_THREE); action = new QAction(tr("Run"), this); diff --git a/src/plugins/qtscripteditor/qtscripteditorplugin.h b/src/plugins/qtscripteditor/qtscripteditorplugin.h index d1ab725b645f11408864f848aaa4790784836bc5..5bd1d5ba17e3158adf87c27ab1fdfa27d1fd54cf 100644 --- a/src/plugins/qtscripteditor/qtscripteditorplugin.h +++ b/src/plugins/qtscripteditor/qtscripteditorplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qtscripteditor/qtscripthighlighter.cpp b/src/plugins/qtscripteditor/qtscripthighlighter.cpp index 66bb3c88facc55bb2abb6f20291fb609cfcecb75..3c1a640cf3c411164deda73453738b7220b52910 100644 --- a/src/plugins/qtscripteditor/qtscripthighlighter.cpp +++ b/src/plugins/qtscripteditor/qtscripthighlighter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/qtscripteditor/qtscripthighlighter.h b/src/plugins/qtscripteditor/qtscripthighlighter.h index e1b60194860266ff2d97900819fd11392886a412..586671c2a7e860c776208b037370ef2ed1f0f783 100644 --- a/src/plugins/qtscripteditor/qtscripthighlighter.h +++ b/src/plugins/qtscripteditor/qtscripthighlighter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/quickopen/basefilefilter.cpp b/src/plugins/quickopen/basefilefilter.cpp index 1909f4af03177c7b9acd62e0a5447d0dec42e51c..65aea6d25527f4baf54ea11a88e644e300db571f 100644 --- a/src/plugins/quickopen/basefilefilter.cpp +++ b/src/plugins/quickopen/basefilefilter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/quickopen/basefilefilter.h b/src/plugins/quickopen/basefilefilter.h index 883fc078e1faf1e22225275f8152c3570eac025f..ee9d302be5cdc454bdffd75840cd43df91bb39ab 100644 --- a/src/plugins/quickopen/basefilefilter.h +++ b/src/plugins/quickopen/basefilefilter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/quickopen/directoryfilter.cpp b/src/plugins/quickopen/directoryfilter.cpp index 2948d990df11c636281d89ffcb1b726370cb5ce2..84c60dfa8c746260f088365f5b3b055310c068da 100644 --- a/src/plugins/quickopen/directoryfilter.cpp +++ b/src/plugins/quickopen/directoryfilter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/quickopen/directoryfilter.h b/src/plugins/quickopen/directoryfilter.h index 7df79ae700bf35e7d7a098108e35502a73d43b19..abe167d61d332f136dc711e434954d58d5df39a6 100644 --- a/src/plugins/quickopen/directoryfilter.h +++ b/src/plugins/quickopen/directoryfilter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/quickopen/directoryparser.cpp b/src/plugins/quickopen/directoryparser.cpp index dbafa92f63a271fbed454b7e9732c2cdf54ad49e..bca0cdbed75f944e96cb7b125b397443235810a8 100644 --- a/src/plugins/quickopen/directoryparser.cpp +++ b/src/plugins/quickopen/directoryparser.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/quickopen/directoryparser.h b/src/plugins/quickopen/directoryparser.h index 4a566e041dd9f2328cc160c52527db89856ffa0c..1765a3b4e82778f03e69982ec84f6e1153b291e8 100644 --- a/src/plugins/quickopen/directoryparser.h +++ b/src/plugins/quickopen/directoryparser.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/quickopen/filesystemfilter.cpp b/src/plugins/quickopen/filesystemfilter.cpp index 77c66cd0d78b0e7aaf36beb4749a27f9ee8706a2..f30f65aaa30b6b929808af800cf2c4a8b4640316 100644 --- a/src/plugins/quickopen/filesystemfilter.cpp +++ b/src/plugins/quickopen/filesystemfilter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/quickopen/filesystemfilter.h b/src/plugins/quickopen/filesystemfilter.h index fbf8c57ed67a028b77206a0f0d518ef6b8ca69a7..c935b9fb2c37b8db579df9197ba841258e01dccf 100644 --- a/src/plugins/quickopen/filesystemfilter.h +++ b/src/plugins/quickopen/filesystemfilter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/quickopen/iquickopenfilter.cpp b/src/plugins/quickopen/iquickopenfilter.cpp index adca7a71a4033cf86f5c8f6d73dedd4ab9468760..5cca4fa7d9280e4fd60535a57ccd9459fc3011e6 100644 --- a/src/plugins/quickopen/iquickopenfilter.cpp +++ b/src/plugins/quickopen/iquickopenfilter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/quickopen/iquickopenfilter.h b/src/plugins/quickopen/iquickopenfilter.h index b06e2bb9768697a74929681c6512af1802ce5da4..fa5664d18fedd5f7d9151a61ddbd1251118764ee 100644 --- a/src/plugins/quickopen/iquickopenfilter.h +++ b/src/plugins/quickopen/iquickopenfilter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/quickopen/opendocumentsfilter.cpp b/src/plugins/quickopen/opendocumentsfilter.cpp index d8039de87449bdac54d481eae15b047b9dba9778..7b09fdcede9c45709150cdc7b9ff8566481e1fa9 100644 --- a/src/plugins/quickopen/opendocumentsfilter.cpp +++ b/src/plugins/quickopen/opendocumentsfilter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/quickopen/opendocumentsfilter.h b/src/plugins/quickopen/opendocumentsfilter.h index 4462810ff257fa2e9cf29f02cbc94d9baf9c0d7a..2f2d6b2ff94b4854944778d55bb7d28a93ae66f8 100644 --- a/src/plugins/quickopen/opendocumentsfilter.h +++ b/src/plugins/quickopen/opendocumentsfilter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/quickopen/quickopen_global.h b/src/plugins/quickopen/quickopen_global.h index d887df382996ec290ad04aa55a373d2c0c9dd452..3c77f68a76dbee4e878a66313d122143f333b948 100644 --- a/src/plugins/quickopen/quickopen_global.h +++ b/src/plugins/quickopen/quickopen_global.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/quickopen/quickopenconstants.h b/src/plugins/quickopen/quickopenconstants.h index 9a0d2be319a795a6ec7402cc1b37f1429757a5f0..8b89503df4bcc10e5900d6aac1b83c5987b95103 100644 --- a/src/plugins/quickopen/quickopenconstants.h +++ b/src/plugins/quickopen/quickopenconstants.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/quickopen/quickopenfiltersfilter.cpp b/src/plugins/quickopen/quickopenfiltersfilter.cpp index 6bff7a73ed9156c0ed32ac0c30f3bb4d3c795ac0..05554dea8d063bafcde3d09127c3f4fd17ca634e 100644 --- a/src/plugins/quickopen/quickopenfiltersfilter.cpp +++ b/src/plugins/quickopen/quickopenfiltersfilter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -71,7 +71,7 @@ QList<FilterEntry> QuickOpenFiltersFilter::matchesFor(const QString &entry) { QList<FilterEntry> entries; if (entry.isEmpty()) { - foreach (IQuickOpenFilter *filter, m_plugin->filter()) { + foreach (IQuickOpenFilter *filter, m_plugin->filters()) { if (!filter->shortcutString().isEmpty() && !filter->isHidden()) { FilterEntry entry(this, filter->shortcutString(), diff --git a/src/plugins/quickopen/quickopenfiltersfilter.h b/src/plugins/quickopen/quickopenfiltersfilter.h index 3c68d815c247bdf3d5eb55211eb3507e66f563ab..d4ef1520d98ab5f21e3944f06b2cc32ca093b906 100644 --- a/src/plugins/quickopen/quickopenfiltersfilter.h +++ b/src/plugins/quickopen/quickopenfiltersfilter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/quickopen/quickopenmanager.cpp b/src/plugins/quickopen/quickopenmanager.cpp index b6e5cb9ccb1af6c4e47f18847c98fc1fa33fd9ce..c8175b8f1606d3bcc72fb39fd1c81307b6332e4b 100644 --- a/src/plugins/quickopen/quickopenmanager.cpp +++ b/src/plugins/quickopen/quickopenmanager.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/quickopen/quickopenmanager.h b/src/plugins/quickopen/quickopenmanager.h index 52277d0e545a6b9146458cae5e37f72a7c6cb62b..e9f9a5ed3ae1856bec8853c7c1c09e95b69b8c93 100644 --- a/src/plugins/quickopen/quickopenmanager.h +++ b/src/plugins/quickopen/quickopenmanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/quickopen/quickopenplugin.cpp b/src/plugins/quickopen/quickopenplugin.cpp index d38502815dee1a50cae6e678e32549e4ad97db62..fe599b215a0dfdc9583e607cfc26c0c91f3b9cbc 100644 --- a/src/plugins/quickopen/quickopenplugin.cpp +++ b/src/plugins/quickopen/quickopenplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -48,7 +48,7 @@ #include <coreplugin/baseview.h> #include <coreplugin/coreconstants.h> #include <coreplugin/uniqueidmanager.h> -#include <coreplugin/progressmanager/progressmanagerinterface.h> +#include <coreplugin/progressmanager/progressmanager.h> #include <coreplugin/actionmanager/actionmanager.h> #include <qtconcurrent/QtConcurrentTools> @@ -76,8 +76,7 @@ QuickOpenPlugin::~QuickOpenPlugin() delete m_openDocumentsFilter; delete m_fileSystemFilter; delete m_settingsPage; - foreach (IQuickOpenFilter *filter, m_customFilter) - delete filter; + qDeleteAll(m_customFilters); } bool QuickOpenPlugin::initialize(const QStringList &, QString *) @@ -97,11 +96,11 @@ bool QuickOpenPlugin::initialize(const QStringList &, QString *) const QString actionId = QLatin1String("QtCreator.View.QuickOpen.ToolWindow"); QAction *action = new QAction(m_quickOpenToolWindow->windowIcon(), m_quickOpenToolWindow->windowTitle(), this); - Core::ICommand *cmd = core->actionManager()->registerAction(action, actionId, QList<int>() << Core::Constants::C_GLOBAL_ID); + Core::Command *cmd = core->actionManager()->registerAction(action, actionId, QList<int>() << Core::Constants::C_GLOBAL_ID); cmd->setDefaultKeySequence(QKeySequence("Ctrl+K")); connect(action, SIGNAL(triggered()), this, SLOT(openQuickOpen())); - Core::IActionContainer *mtools = core->actionManager()->actionContainer(Core::Constants::M_TOOLS); + Core::ActionContainer *mtools = core->actionManager()->actionContainer(Core::Constants::M_TOOLS); mtools->addAction(cmd); addObject(new QuickOpenManager(m_quickOpenToolWindow)); @@ -125,8 +124,8 @@ void QuickOpenPlugin::openQuickOpen() void QuickOpenPlugin::extensionsInitialized() { - m_filter = ExtensionSystem::PluginManager::instance()->getObjects<IQuickOpenFilter>(); - qSort(m_filter.begin(), m_filter.end(), filterLessThan); + m_filters = ExtensionSystem::PluginManager::instance()->getObjects<IQuickOpenFilter>(); + qSort(m_filters.begin(), m_filters.end(), filterLessThan); } void QuickOpenPlugin::startSettingsLoad() @@ -141,7 +140,7 @@ void QuickOpenPlugin::loadSettings() QSettings settings; settings.beginGroup("QuickOpen"); m_refreshTimer.setInterval(settings.value("RefreshInterval", 60).toInt()*60000); - foreach (IQuickOpenFilter *filter, m_filter) { + foreach (IQuickOpenFilter *filter, m_filters) { if (settings.contains(filter->name())) { const QByteArray state = settings.value(filter->name()).toByteArray(); if (!state.isEmpty()) @@ -153,10 +152,10 @@ void QuickOpenPlugin::loadSettings() foreach (const QString &key, settings.childKeys()) { IQuickOpenFilter *filter = new DirectoryFilter(core); filter->restoreState(settings.value(key).toByteArray()); - m_filter.append(filter); + m_filters.append(filter); customFilters.append(filter); } - setCustomFilter(customFilters); + setCustomFilters(customFilters); settings.endGroup(); settings.endGroup(); } @@ -176,14 +175,14 @@ void QuickOpenPlugin::saveSettings() s->beginGroup("QuickOpen"); s->setValue("Interval", m_refreshTimer.interval()/60000); s->remove(""); - foreach (IQuickOpenFilter *filter, m_filter) { - if (!m_customFilter.contains(filter)) { + foreach (IQuickOpenFilter *filter, m_filters) { + if (!m_customFilters.contains(filter)) { s->setValue(filter->name(), filter->saveState()); } } s->beginGroup("CustomFilters"); int i = 0; - foreach (IQuickOpenFilter *filter, m_customFilter) { + foreach (IQuickOpenFilter *filter, m_customFilters) { s->setValue(QString("directory%1").arg(i), filter->saveState()); ++i; } @@ -197,9 +196,9 @@ void QuickOpenPlugin::saveSettings() Return all filters, including the ones created by the user. */ -QList<IQuickOpenFilter*> QuickOpenPlugin::filter() +QList<IQuickOpenFilter*> QuickOpenPlugin::filters() { - return m_filter; + return m_filters; } /*! @@ -208,20 +207,20 @@ QList<IQuickOpenFilter*> QuickOpenPlugin::filter() This returns a subset of all the filters, that contains only the filters that have been created by the user at some point (maybe in a previous session). */ -QList<IQuickOpenFilter*> QuickOpenPlugin::customFilter() +QList<IQuickOpenFilter*> QuickOpenPlugin::customFilters() { - return m_customFilter; + return m_customFilters; } -void QuickOpenPlugin::setFilter(QList<IQuickOpenFilter*> f) +void QuickOpenPlugin::setFilters(QList<IQuickOpenFilter*> f) { - m_filter = f; + m_filters = f; m_quickOpenToolWindow->updateFilterList(); } -void QuickOpenPlugin::setCustomFilter(QList<IQuickOpenFilter *> filter) +void QuickOpenPlugin::setCustomFilters(QList<IQuickOpenFilter *> filters) { - m_customFilter = filter; + m_customFilters = filters; } int QuickOpenPlugin::refreshInterval() @@ -243,10 +242,10 @@ void QuickOpenPlugin::setRefreshInterval(int interval) void QuickOpenPlugin::refresh(QList<IQuickOpenFilter*> filters) { if (filters.isEmpty()) - filters = m_filter; + filters = m_filters; QFuture<void> task = QtConcurrent::run(&IQuickOpenFilter::refresh, filters); Core::FutureProgress *progress = ExtensionSystem::PluginManager::instance()->getObject<Core::ICore>() - ->progressManager()->addTask(task, tr("Indexing"), Constants::TASK_INDEX, Core::ProgressManagerInterface::CloseOnSuccess); + ->progressManager()->addTask(task, tr("Indexing"), Constants::TASK_INDEX, Core::ProgressManager::CloseOnSuccess); connect(progress, SIGNAL(finished()), this, SLOT(saveSettings())); } diff --git a/src/plugins/quickopen/quickopenplugin.h b/src/plugins/quickopen/quickopenplugin.h index e87e8b313d660c509b7f617684aebdcbdb772721..fdbcb03434b34eeb31c290340d5e319be77baf4f 100644 --- a/src/plugins/quickopen/quickopenplugin.h +++ b/src/plugins/quickopen/quickopenplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -61,10 +61,10 @@ public: bool initialize(const QStringList &arguments, QString *error_message); void extensionsInitialized(); - QList<IQuickOpenFilter*> filter(); - QList<IQuickOpenFilter*> customFilter(); - void setFilter(QList<IQuickOpenFilter*> f); - void setCustomFilter(QList<IQuickOpenFilter*> f); + QList<IQuickOpenFilter*> filters(); + QList<IQuickOpenFilter*> customFilters(); + void setFilters(QList<IQuickOpenFilter*> f); + void setCustomFilters(QList<IQuickOpenFilter*> f); int refreshInterval(); void setRefreshInterval(int interval); @@ -83,8 +83,8 @@ private: QuickOpenToolWindow *m_quickOpenToolWindow; SettingsPage *m_settingsPage; - QList<IQuickOpenFilter*> m_filter; - QList<IQuickOpenFilter*> m_customFilter; + QList<IQuickOpenFilter*> m_filters; + QList<IQuickOpenFilter*> m_customFilters; int m_refreshInterval; QTimer m_refreshTimer; OpenDocumentsFilter *m_openDocumentsFilter; diff --git a/src/plugins/quickopen/quickopentoolwindow.cpp b/src/plugins/quickopen/quickopentoolwindow.cpp index c3f390f54b7d73c8311c7c6e8c5769c42f5a41ae..40cbeb7edcfde9f7958005af686a982f934a182b 100644 --- a/src/plugins/quickopen/quickopentoolwindow.cpp +++ b/src/plugins/quickopen/quickopentoolwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -313,7 +313,7 @@ bool QuickOpenToolWindow::isShowingTypeHereMessage() const void QuickOpenToolWindow::updateFilterList() { m_filterMenu->clear(); - foreach (IQuickOpenFilter *filter, m_quickOpenPlugin->filter()) { + foreach (IQuickOpenFilter *filter, m_quickOpenPlugin->filters()) { if (!filter->shortcutString().isEmpty() && !filter->isHidden()) { QAction *action = m_filterMenu->addAction(filter->trName(), this, SLOT(filterSelected())); action->setData(qVariantFromValue(filter)); @@ -379,7 +379,7 @@ void QuickOpenToolWindow::textEdited(const QString &text) QList<IQuickOpenFilter*> QuickOpenToolWindow::filtersFor(const QString &text, QString &searchText) { - QList<IQuickOpenFilter*> filters = m_quickOpenPlugin->filter(); + QList<IQuickOpenFilter*> filters = m_quickOpenPlugin->filters(); int whiteSpace = text.indexOf(" "); QString prefix; if (whiteSpace >= 0) @@ -460,7 +460,7 @@ void QuickOpenToolWindow::filterSelected() // add shortcut string at front or replace existing shortcut string if (!currentText.isEmpty()) { searchText = currentText; - foreach (IQuickOpenFilter *otherfilter, m_quickOpenPlugin->filter()) { + foreach (IQuickOpenFilter *otherfilter, m_quickOpenPlugin->filters()) { if (currentText.startsWith(otherfilter->shortcutString() + " ")) { searchText = currentText.mid(otherfilter->shortcutString().length()+1); break; diff --git a/src/plugins/quickopen/quickopentoolwindow.h b/src/plugins/quickopen/quickopentoolwindow.h index 896c1ab1edd07090631f69958f993fe6b7daa8f7..ddc753d67f66a4990d202e70e2e1135976c068a8 100644 --- a/src/plugins/quickopen/quickopentoolwindow.h +++ b/src/plugins/quickopen/quickopentoolwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/quickopen/settingspage.cpp b/src/plugins/quickopen/settingspage.cpp index c5ab95477b8db7dc96e21ba2cb8d98f938a3309a..174159163427a4b6f79b43dc9fc35f1f8f5616c0 100644 --- a/src/plugins/quickopen/settingspage.cpp +++ b/src/plugins/quickopen/settingspage.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -67,30 +67,41 @@ QWidget *SettingsPage::createPage(QWidget *parent) this, SLOT(removeCustomFilter())); } m_ui.refreshInterval->setValue(m_plugin->refreshInterval()); - m_filters = m_plugin->filter(); - m_customFilters = m_plugin->customFilter(); + m_filters = m_plugin->filters(); + m_customFilters = m_plugin->customFilters(); saveFilterStates(); updateFilterList(); return m_page; } -void SettingsPage::finished(bool accepted) +void SettingsPage::apply() { - if (!accepted) { - restoreFilterStates(); - foreach (IQuickOpenFilter *filter, m_addedFilters) - delete filter; - } else { - foreach (IQuickOpenFilter *filter, m_removedFilters) - delete filter; - m_plugin->setFilter(m_filters); - m_plugin->setCustomFilter(m_customFilters); - m_plugin->setRefreshInterval(m_ui.refreshInterval->value()); - requestRefresh(); - m_plugin->saveSettings(); - } + // Delete removed filters and clear added filters + qDeleteAll(m_removedFilters); + m_removedFilters.clear(); + m_addedFilters.clear(); + + // Pass the new configuration on to the plugin + m_plugin->setFilters(m_filters); + m_plugin->setCustomFilters(m_customFilters); + m_plugin->setRefreshInterval(m_ui.refreshInterval->value()); + requestRefresh(); + m_plugin->saveSettings(); + saveFilterStates(); +} + +void SettingsPage::finish() +{ + // If settings were applied, this shouldn't change anything. Otherwise it + // makes sure the filter states aren't changed permanently. + restoreFilterStates(); + + // Delete added filters and clear removed filters + qDeleteAll(m_addedFilters); m_addedFilters.clear(); m_removedFilters.clear(); + + // Further cleanup m_filters.clear(); m_customFilters.clear(); m_refreshFilters.clear(); diff --git a/src/plugins/quickopen/settingspage.h b/src/plugins/quickopen/settingspage.h index 755763b2f671d8e0fabda04432eb0113b14fe6ae..e169bca6a0b58d034b66c26f857e186e1e983435 100644 --- a/src/plugins/quickopen/settingspage.h +++ b/src/plugins/quickopen/settingspage.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -66,7 +66,8 @@ public: QString trCategory() const { return tr(Constants::QUICKOPEN_CATEGORY); } QWidget *createPage(QWidget *parent); - void finished(bool accepted); + void apply(); + void finish(); private slots: void updateButtonStates(); diff --git a/src/plugins/regexp/regexpplugin.cpp b/src/plugins/regexp/regexpplugin.cpp index 42070682f9afb191d113256c9e1361d35caec2b7..86a4ca0a7ca4b41a322fbf244cd859c9463a249e 100644 --- a/src/plugins/regexp/regexpplugin.cpp +++ b/src/plugins/regexp/regexpplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/regexp/regexpplugin.h b/src/plugins/regexp/regexpplugin.h index b4d8db227c34b6ac397008e000cc9eaf9a455c20..c944d37bc17fd739bd5fe53b253d386b37d22003 100644 --- a/src/plugins/regexp/regexpplugin.h +++ b/src/plugins/regexp/regexpplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/regexp/regexpwindow.cpp b/src/plugins/regexp/regexpwindow.cpp index 418faaf4f23fc4d3df0d3c2aa598cc0661ba1fa5..060d11aee5436473b2c3bbf35e78cf538b3ee774 100644 --- a/src/plugins/regexp/regexpwindow.cpp +++ b/src/plugins/regexp/regexpwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/regexp/regexpwindow.h b/src/plugins/regexp/regexpwindow.h index f6c87d587bf441f3241b607af6f3bf4cfd486262..b4216c66f0b5771cbce2ae29325b4eda6a04bb0a 100644 --- a/src/plugins/regexp/regexpwindow.h +++ b/src/plugins/regexp/regexpwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/regexp/settings.cpp b/src/plugins/regexp/settings.cpp index b2d9a6ceaf044b22481a741a04eee274c394b78f..e42082d4c1e63cc7e951a0def0140592260af7cc 100644 --- a/src/plugins/regexp/settings.cpp +++ b/src/plugins/regexp/settings.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/regexp/settings.h b/src/plugins/regexp/settings.h index 80d124db5489ed2355f33b51cb87817d6563cc2f..c853732350e8d6cd7e7ce6da0c219bfd15799270 100644 --- a/src/plugins/regexp/settings.h +++ b/src/plugins/regexp/settings.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/resourceeditor/resourceeditorconstants.h b/src/plugins/resourceeditor/resourceeditorconstants.h index df5d97c75690ddd60b159e2118bf7328a0eb2d8f..007d537c36e1cea34da0dfdf1629e7e30a39a753 100644 --- a/src/plugins/resourceeditor/resourceeditorconstants.h +++ b/src/plugins/resourceeditor/resourceeditorconstants.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/resourceeditor/resourceeditorfactory.cpp b/src/plugins/resourceeditor/resourceeditorfactory.cpp index 64c1dc9cfc7e312991ebec68c3ea461ff879db47..4a623c77f4aaedd0add95dd41b0ebfc6da376672 100644 --- a/src/plugins/resourceeditor/resourceeditorfactory.cpp +++ b/src/plugins/resourceeditor/resourceeditorfactory.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/resourceeditor/resourceeditorfactory.h b/src/plugins/resourceeditor/resourceeditorfactory.h index 8d6ffa9df6d62c41b4954689c979b960ad299838..0bcafd3ca569a9ae052d5eeee29a73091be0d928 100644 --- a/src/plugins/resourceeditor/resourceeditorfactory.h +++ b/src/plugins/resourceeditor/resourceeditorfactory.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/resourceeditor/resourceeditorplugin.cpp b/src/plugins/resourceeditor/resourceeditorplugin.cpp index 2d8c3370bf09dfb1274165248eba95cbc0cc39ba..851cf8634c15845ffeb14a065315344e612638e6 100644 --- a/src/plugins/resourceeditor/resourceeditorplugin.cpp +++ b/src/plugins/resourceeditor/resourceeditorplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -42,7 +42,7 @@ #include <coreplugin/mimedatabase.h> #include <coreplugin/coreconstants.h> #include <coreplugin/uniqueidmanager.h> -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/editormanager/editormanager.h> #include <utils/qtcassert.h> @@ -88,7 +88,7 @@ bool ResourceEditorPlugin::initialize(const QStringList & /*arguments*/, QString error_message->clear(); // Register undo and redo - Core::ActionManagerInterface * const actionManager = m_core->actionManager(); + Core::ActionManager * const actionManager = m_core->actionManager(); int const pluginId = m_core->uniqueIDManager()->uniqueIdentifier( Constants::C_RESOURCEEDITOR); QList<int> const idList = QList<int>() << pluginId; diff --git a/src/plugins/resourceeditor/resourceeditorplugin.h b/src/plugins/resourceeditor/resourceeditorplugin.h index d646be712a8e34964dff17a16526d5281c579b7b..fd9576ea00de1db41e644d64f240b6ce5bfdfb6d 100644 --- a/src/plugins/resourceeditor/resourceeditorplugin.h +++ b/src/plugins/resourceeditor/resourceeditorplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/resourceeditor/resourceeditorw.cpp b/src/plugins/resourceeditor/resourceeditorw.cpp index 652470cb8704f4688db6719b3ec561a849167247..db4ed08980501f7de66dbe1ede76de9e6aa3462a 100644 --- a/src/plugins/resourceeditor/resourceeditorw.cpp +++ b/src/plugins/resourceeditor/resourceeditorw.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/resourceeditor/resourceeditorw.h b/src/plugins/resourceeditor/resourceeditorw.h index 4aff0ae98983871a1dcf6fc2642c755e47b5e38a..4070e155cd6e936ca96f52a1e5f710482c2bbdea 100644 --- a/src/plugins/resourceeditor/resourceeditorw.h +++ b/src/plugins/resourceeditor/resourceeditorw.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/resourceeditor/resourcewizard.cpp b/src/plugins/resourceeditor/resourcewizard.cpp index 72e801b1ef058bebcb74743f789c6c533c68ccfe..b2e76ed154a9cce9f15dd6ad2396cae548bedcb8 100644 --- a/src/plugins/resourceeditor/resourcewizard.cpp +++ b/src/plugins/resourceeditor/resourcewizard.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/resourceeditor/resourcewizard.h b/src/plugins/resourceeditor/resourcewizard.h index 0ddc677f2a19d69d8db3bf929ac89d0d43db0001..e435755b2fc9b2cff629cbcd08f2850146cba0cb 100644 --- a/src/plugins/resourceeditor/resourcewizard.h +++ b/src/plugins/resourceeditor/resourcewizard.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/snippets/inputwidget.cpp b/src/plugins/snippets/inputwidget.cpp index 27b89154e532519cff2657cebf740691e8110dd5..6ec1438298c9cf1ba147db5856ff538bd5fb0ed2 100644 --- a/src/plugins/snippets/inputwidget.cpp +++ b/src/plugins/snippets/inputwidget.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/snippets/inputwidget.h b/src/plugins/snippets/inputwidget.h index de8b164059499f34823a55a9d4de1ae81d5f2af0..bd1afcb2d22cd1a016efdf17bec1c5bfab2c767a 100644 --- a/src/plugins/snippets/inputwidget.h +++ b/src/plugins/snippets/inputwidget.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/snippets/snippetscompletion.cpp b/src/plugins/snippets/snippetscompletion.cpp index 47a8fecc5dce73bcefbbc9473c9c932fdb616854..129d27d63cc7b2bd47c6077f0ea926fb672678da 100644 --- a/src/plugins/snippets/snippetscompletion.cpp +++ b/src/plugins/snippets/snippetscompletion.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/snippets/snippetscompletion.h b/src/plugins/snippets/snippetscompletion.h index 4fb83a48819f61328eda004475e039c1993d5ca4..5749bd0cbe98b6f1524b452eced30f898d381bf7 100644 --- a/src/plugins/snippets/snippetscompletion.h +++ b/src/plugins/snippets/snippetscompletion.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/snippets/snippetspec.cpp b/src/plugins/snippets/snippetspec.cpp index ca108d499acb6403478304cbedc1f0bc268e1517..1c9937cb1841ca66060b2df2282ef2a212060550 100644 --- a/src/plugins/snippets/snippetspec.cpp +++ b/src/plugins/snippets/snippetspec.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/snippets/snippetspec.h b/src/plugins/snippets/snippetspec.h index f97ae89a7c10706541e03e678f24c04787e3b887..072a9e68e474271e6276f494ac8e6113e6c41a9d 100644 --- a/src/plugins/snippets/snippetspec.h +++ b/src/plugins/snippets/snippetspec.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/snippets/snippetsplugin.cpp b/src/plugins/snippets/snippetsplugin.cpp index d46e773b7327cbae5409ac8eb3df5099fcb799db..c014a6432a1a5e4f27f467ddac2ad953fcf4eb30 100644 --- a/src/plugins/snippets/snippetsplugin.cpp +++ b/src/plugins/snippets/snippetsplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -72,7 +72,7 @@ void SnippetsPlugin::extensionsInitialized() bool SnippetsPlugin::initialize(const QStringList & /*arguments*/, QString *) { m_core = ExtensionSystem::PluginManager::instance()->getObject<Core::ICore>(); - Core::ActionManagerInterface *am = m_core->actionManager(); + Core::ActionManager *am = m_core->actionManager(); QList<int> context; context << m_core->uniqueIDManager()->uniqueIdentifier(TextEditor::Constants::C_TEXTEDITOR); diff --git a/src/plugins/snippets/snippetsplugin.h b/src/plugins/snippets/snippetsplugin.h index 9c4e03463f7362ee7cb850688075f6499d40cb1f..3647244d659ea820c80e395390a6be55bf4b8d85 100644 --- a/src/plugins/snippets/snippetsplugin.h +++ b/src/plugins/snippets/snippetsplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/snippets/snippetswindow.cpp b/src/plugins/snippets/snippetswindow.cpp index 6a0f3a0a7dc3e919130757364e98be5db2482218..f6377e199af1ab3de4b0b2167677405484bfdc15 100644 --- a/src/plugins/snippets/snippetswindow.cpp +++ b/src/plugins/snippets/snippetswindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/snippets/snippetswindow.h b/src/plugins/snippets/snippetswindow.h index 8c271a14db41f95e4bd94ebccc36877994b860f5..f0c4e0327518d933ccec69201ae6c57830cc946a 100644 --- a/src/plugins/snippets/snippetswindow.h +++ b/src/plugins/snippets/snippetswindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/subversion/annotationhighlighter.cpp b/src/plugins/subversion/annotationhighlighter.cpp index 919bb317abd98d5065e3d67fa79ee3afbc1c9af4..8a77b81af66987bb523a19a3f1b73bbe2963113e 100644 --- a/src/plugins/subversion/annotationhighlighter.cpp +++ b/src/plugins/subversion/annotationhighlighter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/subversion/annotationhighlighter.h b/src/plugins/subversion/annotationhighlighter.h index db9f65839506ba2ad67c4b891a2e6e2ded8a0bae..e2c0b418aa8624b0bde452a8b3b08be0ba12e156 100644 --- a/src/plugins/subversion/annotationhighlighter.h +++ b/src/plugins/subversion/annotationhighlighter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/subversion/changenumberdialog.cpp b/src/plugins/subversion/changenumberdialog.cpp index 42a00c8059e0c4033ba5c54b885995dc9f9f3243..dad23a7490cf1dd4a403d8a9edf14bf2b5f5a550 100644 --- a/src/plugins/subversion/changenumberdialog.cpp +++ b/src/plugins/subversion/changenumberdialog.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/subversion/changenumberdialog.h b/src/plugins/subversion/changenumberdialog.h index 9b857302c11f94016998624b7179158313de7ae7..933860e45c29cae4124d469e57f027ac0759fc76 100644 --- a/src/plugins/subversion/changenumberdialog.h +++ b/src/plugins/subversion/changenumberdialog.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/subversion/settingspage.cpp b/src/plugins/subversion/settingspage.cpp index e8c300c6006254f6363d5748c8fc314fa83e7528..fb2842602e2721494006b6e4df7ceec2719f0a8d 100644 --- a/src/plugins/subversion/settingspage.cpp +++ b/src/plugins/subversion/settingspage.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -100,9 +100,9 @@ QWidget *SettingsPage::createPage(QWidget *parent) return m_widget; } -void SettingsPage::finished(bool accepted) +void SettingsPage::apply() { - if (!accepted || !m_widget) + if (!m_widget) return; SubversionPlugin::subversionPluginInstance()->setSettings(m_widget->settings()); } diff --git a/src/plugins/subversion/settingspage.h b/src/plugins/subversion/settingspage.h index 973a2824e07c01a8131f91bc70a705be40f1c68a..777d0901ef2162f5e0e4da85b94b374bfbbf1288 100644 --- a/src/plugins/subversion/settingspage.h +++ b/src/plugins/subversion/settingspage.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -76,7 +76,8 @@ public: QString trCategory() const; QWidget *createPage(QWidget *parent); - void finished(bool accepted); + void apply(); + void finish() { } private: QPointer<SettingsPageWidget> m_widget; diff --git a/src/plugins/subversion/subversionconstants.h b/src/plugins/subversion/subversionconstants.h index 1d385e560d644f7328ed2ce492ac85a54f4a4f0e..bd06b2b0bd81a00b11427b95d3ba40a49a9d42da 100644 --- a/src/plugins/subversion/subversionconstants.h +++ b/src/plugins/subversion/subversionconstants.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/subversion/subversioncontrol.cpp b/src/plugins/subversion/subversioncontrol.cpp index a600f841f3781f0b1fb59210f911f458090e7e92..d319dd291553b371cee9f54d7a7918563f7791aa 100644 --- a/src/plugins/subversion/subversioncontrol.cpp +++ b/src/plugins/subversion/subversioncontrol.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/subversion/subversioncontrol.h b/src/plugins/subversion/subversioncontrol.h index bcccef45487fe6b1c4e548825193dba2fb229fe8..489fb1bfda541a430d953e5d76829604d68787cd 100644 --- a/src/plugins/subversion/subversioncontrol.h +++ b/src/plugins/subversion/subversioncontrol.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/subversion/subversioneditor.cpp b/src/plugins/subversion/subversioneditor.cpp index 44950872c225f6da40dcf2b578d59e5395479f25..375e0332411478af7ec5c13ee43e091b0eb08cd0 100644 --- a/src/plugins/subversion/subversioneditor.cpp +++ b/src/plugins/subversion/subversioneditor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/subversion/subversioneditor.h b/src/plugins/subversion/subversioneditor.h index 518c8e1b73052363197a12bcf0dab7781af32872..6966005de4a0a6df9ece0d245a865d2c80eb7667 100644 --- a/src/plugins/subversion/subversioneditor.h +++ b/src/plugins/subversion/subversioneditor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/subversion/subversionoutputwindow.cpp b/src/plugins/subversion/subversionoutputwindow.cpp index f8f4740b542b52692b9ea601cd2c1cc353ab02a8..e4be5a89bc2a49ff8b027db56895811ac0c26606 100644 --- a/src/plugins/subversion/subversionoutputwindow.cpp +++ b/src/plugins/subversion/subversionoutputwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/subversion/subversionoutputwindow.h b/src/plugins/subversion/subversionoutputwindow.h index 130c26a781d2f3856391cb69ee5abce0073f6c6d..52a278d4cb062e214c8a9dc041f982d1d59aa6b0 100644 --- a/src/plugins/subversion/subversionoutputwindow.h +++ b/src/plugins/subversion/subversionoutputwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/subversion/subversionplugin.cpp b/src/plugins/subversion/subversionplugin.cpp index 5f5200aab34528a3ae0a20cb0a62ce5447dadc0f..a98848a8b3777bfd32e209c3708e53e06dc79fe3 100644 --- a/src/plugins/subversion/subversionplugin.cpp +++ b/src/plugins/subversion/subversionplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -53,7 +53,7 @@ #include <coreplugin/messagemanager.h> #include <coreplugin/mimedatabase.h> #include <coreplugin/uniqueidmanager.h> -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/editormanager/editormanager.h> #include <projectexplorer/ProjectExplorerInterfaces> #include <utils/qtcassert.h> @@ -139,6 +139,29 @@ inline Core::IEditor* locateEditor(const Core::ICore *core, const char *property return 0; } +// Parse "svn status" output for added/modified/deleted files +// "M<7blanks>file" +typedef QList<SubversionSubmitEditor::StatusFilePair> StatusList; + +StatusList parseStatusOutput(const QString &output) +{ + StatusList changeSet; + const QString newLine = QString(QLatin1Char('\n')); + const QStringList list = output.split(newLine, QString::SkipEmptyParts); + foreach (const QString &l, list) { + const QString line =l.trimmed(); + if (line.size() > 8) { + const QChar state = line.at(0); + if (state == QLatin1Char('A') || state == QLatin1Char('D') || state == QLatin1Char('M')) { + const QString fileName = line.mid(7); + changeSet.push_back(SubversionSubmitEditor::StatusFilePair(QString(state), fileName)); + } + + } + } + return changeSet; +} + // ------------- SubversionPlugin Core::ICore *SubversionPlugin::m_coreInstance = 0; SubversionPlugin *SubversionPlugin::m_subversionPluginInstance = 0; @@ -222,11 +245,7 @@ void SubversionPlugin::cleanChangeTmpFile() static const VCSBase::VCSBaseSubmitEditorParameters submitParameters = { Subversion::Constants::SUBVERSION_SUBMIT_MIMETYPE, Subversion::Constants::SUBVERSIONCOMMITEDITOR_KIND, - Subversion::Constants::SUBVERSIONCOMMITEDITOR, - Core::Constants::UNDO, - Core::Constants::REDO, - Subversion::Constants::SUBMIT_CURRENT, - Subversion::Constants::DIFF_SELECTED + Subversion::Constants::SUBVERSIONCOMMITEDITOR }; bool SubversionPlugin::initialize(const QStringList & /*arguments*/, QString *errorMessage) @@ -270,10 +289,10 @@ bool SubversionPlugin::initialize(const QStringList & /*arguments*/, QString *er addObject(m_subversionOutputWindow); //register actions - Core::ActionManagerInterface *ami = m_coreInstance->actionManager(); - Core::IActionContainer *toolsContainer = ami->actionContainer(M_TOOLS); + Core::ActionManager *ami = m_coreInstance->actionManager(); + Core::ActionContainer *toolsContainer = ami->actionContainer(M_TOOLS); - Core::IActionContainer *subversionMenu = + Core::ActionContainer *subversionMenu = ami->createMenu(QLatin1String(SUBVERSION_MENU)); subversionMenu->menu()->setTitle(tr("&Subversion")); toolsContainer->addMenu(subversionMenu); @@ -285,11 +304,11 @@ bool SubversionPlugin::initialize(const QStringList & /*arguments*/, QString *er QList<int> globalcontext; globalcontext << m_coreInstance->uniqueIDManager()->uniqueIdentifier(C_GLOBAL); - Core::ICommand *command; + Core::Command *command; m_addAction = new QAction(tr("Add"), this); command = ami->registerAction(m_addAction, SubversionPlugin::ADD, globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); command->setDefaultKeySequence(QKeySequence(tr("Alt+S,Alt+A"))); connect(m_addAction, SIGNAL(triggered()), this, SLOT(addCurrentFile())); subversionMenu->addAction(command); @@ -297,14 +316,14 @@ bool SubversionPlugin::initialize(const QStringList & /*arguments*/, QString *er m_deleteAction = new QAction(tr("Delete"), this); command = ami->registerAction(m_deleteAction, SubversionPlugin::DELETE_FILE, globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); connect(m_deleteAction, SIGNAL(triggered()), this, SLOT(deleteCurrentFile())); subversionMenu->addAction(command); m_revertAction = new QAction(tr("Revert"), this); command = ami->registerAction(m_revertAction, SubversionPlugin::REVERT, globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); connect(m_revertAction, SIGNAL(triggered()), this, SLOT(revertCurrentFile())); subversionMenu->addAction(command); @@ -322,7 +341,7 @@ bool SubversionPlugin::initialize(const QStringList & /*arguments*/, QString *er m_diffCurrentAction = new QAction(tr("Diff Current File"), this); command = ami->registerAction(m_diffCurrentAction, SubversionPlugin::DIFF_CURRENT, globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); command->setDefaultKeySequence(QKeySequence(tr("Alt+S,Alt+D"))); connect(m_diffCurrentAction, SIGNAL(triggered()), this, SLOT(diffCurrentFile())); subversionMenu->addAction(command); @@ -341,7 +360,7 @@ bool SubversionPlugin::initialize(const QStringList & /*arguments*/, QString *er m_commitCurrentAction = new QAction(tr("Commit Current File"), this); command = ami->registerAction(m_commitCurrentAction, SubversionPlugin::COMMIT_CURRENT, globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); command->setDefaultKeySequence(QKeySequence(tr("Alt+S,Alt+C"))); connect(m_commitCurrentAction, SIGNAL(triggered()), this, SLOT(startCommitCurrentFile())); subversionMenu->addAction(command); @@ -354,7 +373,7 @@ bool SubversionPlugin::initialize(const QStringList & /*arguments*/, QString *er m_filelogCurrentAction = new QAction(tr("Filelog Current File"), this); command = ami->registerAction(m_filelogCurrentAction, SubversionPlugin::FILELOG_CURRENT, globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); connect(m_filelogCurrentAction, SIGNAL(triggered()), this, SLOT(filelogCurrentFile())); subversionMenu->addAction(command); @@ -362,7 +381,7 @@ bool SubversionPlugin::initialize(const QStringList & /*arguments*/, QString *er m_annotateCurrentAction = new QAction(tr("Annotate Current File"), this); command = ami->registerAction(m_annotateCurrentAction, SubversionPlugin::ANNOTATE_CURRENT, globalcontext); - command->setAttribute(Core::ICommand::CA_UpdateText); + command->setAttribute(Core::Command::CA_UpdateText); connect(m_annotateCurrentAction, SIGNAL(triggered()), this, SLOT(annotateCurrentFile())); subversionMenu->addAction(command); @@ -506,11 +525,7 @@ SubversionSubmitEditor *SubversionPlugin::openSubversionSubmitEditor(const QStri Core::IEditor *editor = m_coreInstance->editorManager()->openEditor(fileName, QLatin1String(Constants::SUBVERSIONCOMMITEDITOR_KIND)); SubversionSubmitEditor *submitEditor = qobject_cast<SubversionSubmitEditor*>(editor); QTC_ASSERT(submitEditor, /**/); - // The actions are for some reason enabled by the context switching - // mechanism. Disable them correctly. - m_submitDiffAction->setEnabled(false); - m_submitUndoAction->setEnabled(false); - m_submitRedoAction->setEnabled(false); + submitEditor->registerActions(m_submitUndoAction, m_submitRedoAction, m_submitCurrentLogAction, m_submitDiffAction); connect(submitEditor, SIGNAL(diffSelectedFiles(QStringList)), this, SLOT(diffFiles(QStringList))); return submitEditor; @@ -694,7 +709,7 @@ void SubversionPlugin::startCommit(const QStringList &files) if (response.error) return; // Get list of added/modified/deleted files - const QStringList statusOutput = parseStatusOutput(response.stdOut); + const StatusList statusOutput = parseStatusOutput(response.stdOut); if (statusOutput.empty()) { showOutput(tr("There are no modified files."), true); return; @@ -717,22 +732,7 @@ void SubversionPlugin::startCommit(const QStringList &files) m_changeTmpFile->seek(0); // Create a submit editor and set file list SubversionSubmitEditor *editor = openSubversionSubmitEditor(m_changeTmpFile->fileName()); - editor->setFileList(statusOutput); -} - -// Parse "status" output for added/modified/deleted files -QStringList SubversionPlugin::parseStatusOutput(const QString &output) const -{ - QStringList changeSet; - const QString newLine = QString(QLatin1Char('\n')); - const QStringList list = output.split(newLine, QString::SkipEmptyParts); - foreach (const QString &l, list) { - QString line(l.trimmed()); - if (line.startsWith(QLatin1Char('A')) || line.startsWith(QLatin1Char('D')) - || line.startsWith(QLatin1Char('M'))) - changeSet.append(line); - } - return changeSet; + editor->setStatusList(statusOutput); } bool SubversionPlugin::commit(const QString &messageFile, diff --git a/src/plugins/subversion/subversionplugin.h b/src/plugins/subversion/subversionplugin.h index 6c2c448241ea3de3323901cb9e5d624cf30cf18b..fb6bd17b7a912ba341c8b17e96850b6b882d12c1 100644 --- a/src/plugins/subversion/subversionplugin.h +++ b/src/plugins/subversion/subversionplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -133,7 +133,6 @@ private: SubversionResponse runSvn(const QStringList &arguments, int timeOut, bool showStdOutInOutputWindow, QTextCodec *outputCodec = 0); void showOutput(const QString &output, bool bringToForeground = true); - QStringList parseStatusOutput(const QString &output) const; void annotate(const QString &file); void filelog(const QString &file); bool managesDirectory(const QDir &directory) const; diff --git a/src/plugins/subversion/subversionsettings.cpp b/src/plugins/subversion/subversionsettings.cpp index 3460739f4f82c6b19606e5164a83ecd7e4d4bacb..65e95d5857b36c5e41c52469cb7bd792b8475ca3 100644 --- a/src/plugins/subversion/subversionsettings.cpp +++ b/src/plugins/subversion/subversionsettings.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/subversion/subversionsettings.h b/src/plugins/subversion/subversionsettings.h index 1719016c590df6a3c7e07759e19a031ac8f753f4..9b7c5a2fe526058d4ae33c52d2d2283b51c8fe55 100644 --- a/src/plugins/subversion/subversionsettings.h +++ b/src/plugins/subversion/subversionsettings.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/subversion/subversionsubmiteditor.cpp b/src/plugins/subversion/subversionsubmiteditor.cpp index b1e97e676e46dcecd1948231557d9e4d8ff94df6..95a901f6cd57c4da2eb56ee048c9986840d7244b 100644 --- a/src/plugins/subversion/subversionsubmiteditor.cpp +++ b/src/plugins/subversion/subversionsubmiteditor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -35,6 +35,7 @@ #include "subversionsubmiteditor.h" #include <utils/submiteditorwidget.h> +#include <vcsbase/submitfilemodel.h> using namespace Subversion::Internal; @@ -45,6 +46,19 @@ SubversionSubmitEditor::SubversionSubmitEditor(const VCSBase::VCSBaseSubmitEdito setDisplayName(tr("Subversion Submit")); } +void SubversionSubmitEditor::setStatusList(const QList<StatusFilePair> &statusOutput) +{ + typedef QList<StatusFilePair>::const_iterator ConstIterator; + VCSBase::SubmitFileModel *model = new VCSBase::SubmitFileModel(this); + + const ConstIterator cend = statusOutput.constEnd(); + for (ConstIterator it = statusOutput.constBegin(); it != cend; ++it) + model->addFile(it->second, it->first, true); + setFileModel(model); + +} + +/* QStringList SubversionSubmitEditor::vcsFileListToFileList(const QStringList &rl) const { QStringList files; @@ -59,3 +73,5 @@ QString SubversionSubmitEditor::fileFromStatusLine(const QString &statusLine) enum { filePos = 7 }; return statusLine.mid(filePos, statusLine.size() - filePos); } + +*/ diff --git a/src/plugins/subversion/subversionsubmiteditor.h b/src/plugins/subversion/subversionsubmiteditor.h index c6bf0845ebce135ce2f67658b2e6423ef49888b1..3b4b331c27e21495509b1635d59cf70a6028c3a1 100644 --- a/src/plugins/subversion/subversionsubmiteditor.h +++ b/src/plugins/subversion/subversionsubmiteditor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -34,6 +34,9 @@ #ifndef SUBVERSIONSUBMITEDITOR_H #define SUBVERSIONSUBMITEDITOR_H +#include <QtCore/QPair> +#include <QtCore/QStringList> + #include <vcsbase/vcsbasesubmiteditor.h> namespace Subversion { @@ -48,8 +51,10 @@ public: static QString fileFromStatusLine(const QString &statusLine); -private: - virtual QStringList vcsFileListToFileList(const QStringList &) const; + // A list of ( 'A','M','D') status indicators and file names. + typedef QPair<QString, QString> StatusFilePair; + + void setStatusList(const QList<StatusFilePair> &statusOutput); }; } // namespace Internal diff --git a/src/plugins/texteditor/basefilefind.cpp b/src/plugins/texteditor/basefilefind.cpp index 60072084c7b9533124f6f04639010f8eabb6841c..61fc6eadc175cc73affbc380af0277bdc7518c88 100644 --- a/src/plugins/texteditor/basefilefind.cpp +++ b/src/plugins/texteditor/basefilefind.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -34,7 +34,7 @@ #include "basefilefind.h" #include <coreplugin/stylehelper.h> -#include <coreplugin/progressmanager/progressmanagerinterface.h> +#include <coreplugin/progressmanager/progressmanager.h> #include <coreplugin/editormanager/editormanager.h> #include <find/textfindconstants.h> #include <texteditor/itexteditor.h> diff --git a/src/plugins/texteditor/basefilefind.h b/src/plugins/texteditor/basefilefind.h index e20a750330e28924abe77b68d5d3797f2d526d08..2aacf2d9650ee172d0ed0e83edbe31c30d9baff2 100644 --- a/src/plugins/texteditor/basefilefind.h +++ b/src/plugins/texteditor/basefilefind.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/basetextdocument.cpp b/src/plugins/texteditor/basetextdocument.cpp index de6054cfa8952c4c2e43f8f6f25f316b01b77f3a..eb6069df6d99eb4188018be40f0ea3d4973c66b0 100644 --- a/src/plugins/texteditor/basetextdocument.cpp +++ b/src/plugins/texteditor/basetextdocument.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/basetextdocument.h b/src/plugins/texteditor/basetextdocument.h index b54a45b888a808ed0bd6309114f79b5f963e3b7f..83f42dcee7be51ce24f617821e71cb19693e1b97 100644 --- a/src/plugins/texteditor/basetextdocument.h +++ b/src/plugins/texteditor/basetextdocument.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index ea4f665a7e9576bfce30f26c6d38dd2a1772f051..9f145bc08018fcb7caaea3bd69e63828e8c46392 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/basetexteditor.h b/src/plugins/texteditor/basetexteditor.h index 7cdcafdf7fb998280d308535b5c603cd77acdf5f..e5e79d4a4a2efc24cc794b5ca7debacc77ea889d 100644 --- a/src/plugins/texteditor/basetexteditor.h +++ b/src/plugins/texteditor/basetexteditor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -396,6 +396,7 @@ public: CodeWarningsSelection, CodeSemanticsSelection, OtherSelection, + FakeVimSelection, NExtraSelectionKinds }; void setExtraSelections(ExtraSelectionKind kind, const QList<QTextEdit::ExtraSelection> &selections); diff --git a/src/plugins/texteditor/basetexteditor_p.h b/src/plugins/texteditor/basetexteditor_p.h index 2b586823851f6639183e6694c75f9acd177e157a..3310b0665d2d8e538a42e54293d7d491fb8a81da 100644 --- a/src/plugins/texteditor/basetexteditor_p.h +++ b/src/plugins/texteditor/basetexteditor_p.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/basetextmark.cpp b/src/plugins/texteditor/basetextmark.cpp index 5d4c17ac9baf505e15340a30899ad16e0e8f6841..4e4adf28bdcfc091ed9d9e2c8e131782451ef300 100644 --- a/src/plugins/texteditor/basetextmark.cpp +++ b/src/plugins/texteditor/basetextmark.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/basetextmark.h b/src/plugins/texteditor/basetextmark.h index 4010db3f6bf3c60d8e6457164307502590855c8a..cbe9837e5a846f548aac3cb8da74c344a2a289f5 100644 --- a/src/plugins/texteditor/basetextmark.h +++ b/src/plugins/texteditor/basetextmark.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/codecselector.cpp b/src/plugins/texteditor/codecselector.cpp index 2c4138dbc7c6dbaaea96da4041d2fe6fd0c0eb4c..4252a3ff40b777eb46d899486c8eb70fc4084c47 100644 --- a/src/plugins/texteditor/codecselector.cpp +++ b/src/plugins/texteditor/codecselector.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/codecselector.h b/src/plugins/texteditor/codecselector.h index e221d279e6f1681e9a79da41d0a43652fa760a14..4631b6b49f6a1b22b35343bea512dc7f22e6a818 100644 --- a/src/plugins/texteditor/codecselector.h +++ b/src/plugins/texteditor/codecselector.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/completionsupport.cpp b/src/plugins/texteditor/completionsupport.cpp index 34648b4bb00567f30a8ebddf150eea6be07b8955..5c863e3afe231a08be5b2ea60bed06ed014e5d3e 100644 --- a/src/plugins/texteditor/completionsupport.cpp +++ b/src/plugins/texteditor/completionsupport.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -42,6 +42,8 @@ #include <QString> #include <QList> +#include <algorithm> + using namespace TextEditor; using namespace TextEditor::Internal; @@ -143,11 +145,32 @@ void CompletionSupport::autoComplete(ITextEditable *editor, bool forced) } } +static bool compareChar(const QChar &l, const QChar &r) +{ + if (l == QLatin1Char('_')) + return false; + else if (r == QLatin1Char('_')) + return true; + else + return l < r; +} + +static bool lessThan(const QString &l, const QString &r) +{ + return std::lexicographical_compare(l.begin(), l.end(), + r.begin(), r.end(), + compareChar); +} + static bool completionItemLessThan(const CompletionItem &i1, const CompletionItem &i2) { // The order is case-insensitive in principle, but case-sensitive when this would otherwise mean equality - const int c = i1.m_text.compare(i2.m_text, Qt::CaseInsensitive); - return c ? c < 0 : i1.m_text < i2.m_text; + const QString lower1 = i1.m_text.toLower(); + const QString lower2 = i2.m_text.toLower(); + if (lower1 == lower2) + return lessThan(i1.m_text, i2.m_text); + else + return lessThan(lower1, lower2); } QList<CompletionItem> CompletionSupport::getCompletions() const diff --git a/src/plugins/texteditor/completionsupport.h b/src/plugins/texteditor/completionsupport.h index d35a1347d771d8a49875965e01f0f8b077c29986..9704f80f2a229c9ce9a9fb07f4b44e56ce1ba4cd 100644 --- a/src/plugins/texteditor/completionsupport.h +++ b/src/plugins/texteditor/completionsupport.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/completionwidget.cpp b/src/plugins/texteditor/completionwidget.cpp index 2c9f6017b7f9773d9630cfab3ee94b82e9755104..5f4ccfe3e1081a79879d78b8df32d06f19d8c34f 100644 --- a/src/plugins/texteditor/completionwidget.cpp +++ b/src/plugins/texteditor/completionwidget.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/completionwidget.h b/src/plugins/texteditor/completionwidget.h index b124d2e257acaee4aca879370247b08e7a9b3b8e..b88dc7ffdc1971296752a8a169bd5a2ae6ee3516 100644 --- a/src/plugins/texteditor/completionwidget.h +++ b/src/plugins/texteditor/completionwidget.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/displaysettings.cpp b/src/plugins/texteditor/displaysettings.cpp index c3b3deb15f9507bd882270ddd94e7aec625db3a5..5a213b6670542e4a1425d6054508974c3bd4c1c0 100644 --- a/src/plugins/texteditor/displaysettings.cpp +++ b/src/plugins/texteditor/displaysettings.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/displaysettings.h b/src/plugins/texteditor/displaysettings.h index 86a216f24ccd05da8bd6b984e7aed15b89021c39..4d23b2889db5fbeb7d9fff4474d6966946c533f0 100644 --- a/src/plugins/texteditor/displaysettings.h +++ b/src/plugins/texteditor/displaysettings.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/findinfiles.cpp b/src/plugins/texteditor/findinfiles.cpp index ac2276ebed0ee3176daa47f4bbc7700e680b05c8..c8c1020563e1212b19bc6c9f82fc097317d66da5 100644 --- a/src/plugins/texteditor/findinfiles.cpp +++ b/src/plugins/texteditor/findinfiles.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/findinfiles.h b/src/plugins/texteditor/findinfiles.h index dc1ee8e53f076f5ba3e67da9bec9c441673463bb..e38c838f87dc5264bf600261e1b3150f4ed3fa33 100644 --- a/src/plugins/texteditor/findinfiles.h +++ b/src/plugins/texteditor/findinfiles.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/fontsettings.cpp b/src/plugins/texteditor/fontsettings.cpp index 2fcef19077f3f9dd571190b74df8c34e0a6abba8..d421a81d272a1f1e81a018da10ded14d64f7b151 100644 --- a/src/plugins/texteditor/fontsettings.cpp +++ b/src/plugins/texteditor/fontsettings.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/fontsettings.h b/src/plugins/texteditor/fontsettings.h index 130719f47e5a2fb3b6286a29df3384b71a4f7735..16c2f63962446a834329a39153d2730a4781ef14 100644 --- a/src/plugins/texteditor/fontsettings.h +++ b/src/plugins/texteditor/fontsettings.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/fontsettingspage.cpp b/src/plugins/texteditor/fontsettingspage.cpp index bdc86ca3e13d2b2c77e89125eb7516f1629c83f0..1eaccaba6e26689b16f82eb4c9a0f9a946a6b525 100644 --- a/src/plugins/texteditor/fontsettingspage.cpp +++ b/src/plugins/texteditor/fontsettingspage.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -435,13 +435,8 @@ void FontSettingsPage::delayedChange() emit changed(d_ptr->m_value); } -void FontSettingsPage::finished(bool accepted) +void FontSettingsPage::apply() { - if (!accepted) { - d_ptr->m_value = d_ptr->m_lastValue; - return; - } - d_ptr->m_value.setFamily(d_ptr->ui.familyComboBox->currentText()); bool ok = true; @@ -460,6 +455,12 @@ void FontSettingsPage::finished(bool accepted) } } +void FontSettingsPage::finish() +{ + // If changes were applied, these are equal. Otherwise restores last value. + d_ptr->m_value = d_ptr->m_lastValue; +} + const FontSettings &FontSettingsPage::fontSettings() const { return d_ptr->m_value; diff --git a/src/plugins/texteditor/fontsettingspage.h b/src/plugins/texteditor/fontsettingspage.h index dd1711cfce215ef09a34a32a0a0b592837cf33dd..6a518f518d361757d2eff3502c042bcba7f382b3 100644 --- a/src/plugins/texteditor/fontsettingspage.h +++ b/src/plugins/texteditor/fontsettingspage.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -99,7 +99,8 @@ public: QString trCategory() const; QWidget *createPage(QWidget *parent); - void finished(bool accepted); + void apply(); + void finish(); const FontSettings &fontSettings() const; diff --git a/src/plugins/texteditor/generalsettingspage.cpp b/src/plugins/texteditor/generalsettingspage.cpp index 149886cca52d6c17811006f3b8d4a5a4bd854d34..d20763b0cab82ff5f2a0b6c9983a5b592dcab548 100644 --- a/src/plugins/texteditor/generalsettingspage.cpp +++ b/src/plugins/texteditor/generalsettingspage.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -105,14 +105,12 @@ QWidget *GeneralSettingsPage::createPage(QWidget *parent) return w; } -void GeneralSettingsPage::finished(bool accepted) +void GeneralSettingsPage::apply() { - if (!accepted) - return; - TabSettings newTabSettings; StorageSettings newStorageSettings; DisplaySettings newDisplaySettings; + settingsFromUI(newTabSettings, newStorageSettings, newDisplaySettings); if (newTabSettings != m_d->m_tabSettings) { diff --git a/src/plugins/texteditor/generalsettingspage.h b/src/plugins/texteditor/generalsettingspage.h index 645390288b05270e2929866e561b1031cb8e0eac..eea75e2ccc8a72ada08b7881ccd666656c45aa91 100644 --- a/src/plugins/texteditor/generalsettingspage.h +++ b/src/plugins/texteditor/generalsettingspage.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -72,7 +72,8 @@ public: QString trCategory() const; QWidget *createPage(QWidget *parent); - void finished(bool accepted); + void apply(); + void finish() { } TabSettings tabSettings() const; StorageSettings storageSettings() const; diff --git a/src/plugins/texteditor/icompletioncollector.h b/src/plugins/texteditor/icompletioncollector.h index 3144427f498fc095064b6248f5417bc5ef17e9fb..c3faac470c47042911eddfeb73a2e53c44b405e2 100644 --- a/src/plugins/texteditor/icompletioncollector.h +++ b/src/plugins/texteditor/icompletioncollector.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/itexteditable.h b/src/plugins/texteditor/itexteditable.h index c24692e61dec5b69883d8281c37b68313ba6cdcf..09cd9b5773546f36cfe0061a3caf626e02c7dbc6 100644 --- a/src/plugins/texteditor/itexteditable.h +++ b/src/plugins/texteditor/itexteditable.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/itexteditor.h b/src/plugins/texteditor/itexteditor.h index 57b93461b6cf5acd2baf207d7feb2be8de7fe112..940f88477dff688d21adb2584a0e2714f80bf35c 100644 --- a/src/plugins/texteditor/itexteditor.h +++ b/src/plugins/texteditor/itexteditor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/linenumberfilter.cpp b/src/plugins/texteditor/linenumberfilter.cpp index a084ac6c332562a860b0084dc683e89a1d52842c..cb02b0f808803ca5c68b4d4d6bf25b11809ee43f 100644 --- a/src/plugins/texteditor/linenumberfilter.cpp +++ b/src/plugins/texteditor/linenumberfilter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/linenumberfilter.h b/src/plugins/texteditor/linenumberfilter.h index 353e7b005da352a5155bf7b0ab8c35d6ed98000f..bc29b1db374a556d9b7dca4ef88dc21ad744dfa6 100644 --- a/src/plugins/texteditor/linenumberfilter.h +++ b/src/plugins/texteditor/linenumberfilter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/plaintexteditor.cpp b/src/plugins/texteditor/plaintexteditor.cpp index 277d7fce0cac3a60aa6756001672e668f31be189..b9370bca9cf46089f343d9deb5948816fb772245 100644 --- a/src/plugins/texteditor/plaintexteditor.cpp +++ b/src/plugins/texteditor/plaintexteditor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/plaintexteditor.h b/src/plugins/texteditor/plaintexteditor.h index 15dbb1b9911255a80324ada16d9434380a4429ff..83067791eb6b94e808cb0ef2cbe3992c8df58262 100644 --- a/src/plugins/texteditor/plaintexteditor.h +++ b/src/plugins/texteditor/plaintexteditor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/plaintexteditorfactory.cpp b/src/plugins/texteditor/plaintexteditorfactory.cpp index 874619cce5516a446d5b79d4ae9aa56a234232ca..92a3a79ea4f8d697cddac7d0c9ec401ca25cc788 100644 --- a/src/plugins/texteditor/plaintexteditorfactory.cpp +++ b/src/plugins/texteditor/plaintexteditorfactory.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/plaintexteditorfactory.h b/src/plugins/texteditor/plaintexteditorfactory.h index b1604a94f126d8cd52580bc731c7c40e777aedd6..e0eec76f1372889f2bedcf990b9ab6c8ae7d0898 100644 --- a/src/plugins/texteditor/plaintexteditorfactory.h +++ b/src/plugins/texteditor/plaintexteditorfactory.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/storagesettings.cpp b/src/plugins/texteditor/storagesettings.cpp index 2d09e0d6b2a09a70e468a9fdc5a9497111555be5..b92b4973450f676cb197590ad295b8d2b294e9b3 100644 --- a/src/plugins/texteditor/storagesettings.cpp +++ b/src/plugins/texteditor/storagesettings.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/storagesettings.h b/src/plugins/texteditor/storagesettings.h index 7ccf80f981149d76284411a24e733aa6a6fbf0bf..d90b462d3211b920d24a2d4198728af4a088fc28 100644 --- a/src/plugins/texteditor/storagesettings.h +++ b/src/plugins/texteditor/storagesettings.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/tabsettings.cpp b/src/plugins/texteditor/tabsettings.cpp index 413e650c7bc0749602a1fa0fe9b6d43e9333c862..46d4100112f57f0a528944073fd5421cfa6fcbc2 100644 --- a/src/plugins/texteditor/tabsettings.cpp +++ b/src/plugins/texteditor/tabsettings.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/tabsettings.h b/src/plugins/texteditor/tabsettings.h index 2a8fbc31c3d6d74f3e2ae8cd81760104756c7a33..717ba07ea024282980e3b67032f226ae078ed84e 100644 --- a/src/plugins/texteditor/tabsettings.h +++ b/src/plugins/texteditor/tabsettings.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/textblockiterator.cpp b/src/plugins/texteditor/textblockiterator.cpp index b94f0a19f5c0be942dc45d3c67a96608f546d46f..b5814124b495f68157b51c7de1496a699eb23ee0 100644 --- a/src/plugins/texteditor/textblockiterator.cpp +++ b/src/plugins/texteditor/textblockiterator.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/textblockiterator.h b/src/plugins/texteditor/textblockiterator.h index d39a7af22912d56e077674740322c459a324a4ed..0955ec8c9c62cbede240812ce747674bf08ea840 100644 --- a/src/plugins/texteditor/textblockiterator.h +++ b/src/plugins/texteditor/textblockiterator.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/texteditor_global.h b/src/plugins/texteditor/texteditor_global.h index 5876f889a065a1f165c269a5ac052b3fccb7a192..7540d6302715b17beb04ee9f028bb280b337939b 100644 --- a/src/plugins/texteditor/texteditor_global.h +++ b/src/plugins/texteditor/texteditor_global.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/texteditoractionhandler.cpp b/src/plugins/texteditor/texteditoractionhandler.cpp index 12475d221b1cc98d02fba1aa8a245a472d41ef51..44b6f33b17d41bdf3df2c20ff78a974c9dcf5017 100644 --- a/src/plugins/texteditor/texteditoractionhandler.cpp +++ b/src/plugins/texteditor/texteditoractionhandler.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -40,7 +40,7 @@ #include <quickopen/quickopenmanager.h> #include <coreplugin/coreconstants.h> #include <coreplugin/uniqueidmanager.h> -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/editormanager/editormanager.h> #include <utils/qtcassert.h> @@ -111,13 +111,13 @@ void TextEditorActionHandler::createActions() m_gotoAction = registerNewAction(QLatin1String(Core::Constants::GOTO), this, SLOT(gotoAction())); m_printAction = registerNewAction(QLatin1String(Core::Constants::PRINT), this, SLOT(printAction())); - Core::ActionManagerInterface *am = m_core->actionManager(); + Core::ActionManager *am = m_core->actionManager(); - Core::IActionContainer *medit = am->actionContainer(Core::Constants::M_EDIT); - Core::IActionContainer *advancedMenu = am->actionContainer(Core::Constants::M_EDIT_ADVANCED); + Core::ActionContainer *medit = am->actionContainer(Core::Constants::M_EDIT); + Core::ActionContainer *advancedMenu = am->actionContainer(Core::Constants::M_EDIT_ADVANCED); m_selectEncodingAction = new QAction(tr("Select Encoding..."), this); - Core::ICommand *command = am->registerAction(m_selectEncodingAction, Constants::SELECT_ENCODING, m_contextId); + Core::Command *command = am->registerAction(m_selectEncodingAction, Constants::SELECT_ENCODING, m_contextId); connect(m_selectEncodingAction, SIGNAL(triggered()), this, SLOT(selectEncoding())); medit->addAction(command, Core::Constants::G_EDIT_OTHER); diff --git a/src/plugins/texteditor/texteditoractionhandler.h b/src/plugins/texteditor/texteditoractionhandler.h index 45dcca1f97fc7b7f48fcdd852691f40a4c2734d3..ea30cad741337c1bf5bb74c6d3577b4a1d2494f1 100644 --- a/src/plugins/texteditor/texteditoractionhandler.h +++ b/src/plugins/texteditor/texteditoractionhandler.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/texteditorconstants.h b/src/plugins/texteditor/texteditorconstants.h index f87e1df6b83d7c04cdbc5cd8528040b69eb1dffa..7db120f144a8bfc04176a4773e421c0f7aa1a206 100644 --- a/src/plugins/texteditor/texteditorconstants.h +++ b/src/plugins/texteditor/texteditorconstants.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/texteditorplugin.cpp b/src/plugins/texteditor/texteditorplugin.cpp index 01a6ccdf95fa3137cd35e5b4d89c5806a9e08396..d76bd7167082e15f07ee6941592c0752920f7093 100644 --- a/src/plugins/texteditor/texteditorplugin.cpp +++ b/src/plugins/texteditor/texteditorplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -46,8 +46,8 @@ #include <coreplugin/coreconstants.h> #include <coreplugin/mimedatabase.h> #include <coreplugin/uniqueidmanager.h> -#include <coreplugin/actionmanager/actionmanagerinterface.h> -#include <coreplugin/actionmanager/icommand.h> +#include <coreplugin/actionmanager/actionmanager.h> +#include <coreplugin/actionmanager/command.h> #include <coreplugin/editormanager/editormanager.h> #include <texteditor/texteditoractionhandler.h> #include <utils/qtcassert.h> @@ -120,14 +120,14 @@ bool TextEditorPlugin::initialize(const QStringList & /*arguments*/, QString *er int contextId = m_core->uniqueIDManager()->uniqueIdentifier(TextEditor::Constants::C_TEXTEDITOR); QList<int> context = QList<int>() << contextId; - Core::ActionManagerInterface *am = m_core->actionManager(); + Core::ActionManager *am = m_core->actionManager(); // Add shortcut for invoking automatic completion QShortcut *completionShortcut = new QShortcut(m_core->mainWindow()); completionShortcut->setWhatsThis(tr("Triggers a completion in this scope")); // Make sure the shortcut still works when the completion widget is active completionShortcut->setContext(Qt::ApplicationShortcut); - Core::ICommand *command = am->registerShortcut(completionShortcut, Constants::COMPLETE_THIS, context); + Core::Command *command = am->registerShortcut(completionShortcut, Constants::COMPLETE_THIS, context); #ifndef Q_OS_MAC command->setDefaultKeySequence(QKeySequence(tr("Ctrl+Space"))); #else diff --git a/src/plugins/texteditor/texteditorplugin.h b/src/plugins/texteditor/texteditorplugin.h index 8eeb1e3e8e6f34e7ac19b1abbd017b445984a291..65c7c3e48e83fb28197af9c289de0bf74e991fb6 100644 --- a/src/plugins/texteditor/texteditorplugin.h +++ b/src/plugins/texteditor/texteditorplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/texteditorsettings.cpp b/src/plugins/texteditor/texteditorsettings.cpp index 8ecabf2ce1f0f3bd5c7109e0fa838e6b15bf1733..2637b5da545c9c24d5dd5e3c11393760c547264a 100644 --- a/src/plugins/texteditor/texteditorsettings.cpp +++ b/src/plugins/texteditor/texteditorsettings.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/texteditorsettings.h b/src/plugins/texteditor/texteditorsettings.h index e64cb795b2d78bd44dba6de528a903c464f932f2..fda32d20faed52b8783e466d33eb17c8a7b8417d 100644 --- a/src/plugins/texteditor/texteditorsettings.h +++ b/src/plugins/texteditor/texteditorsettings.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/textfilewizard.cpp b/src/plugins/texteditor/textfilewizard.cpp index 1236a6453706a6a2669dce681aef3e1663c41d78..e755233735df41d296a58fb50b4a3afa553f402e 100644 --- a/src/plugins/texteditor/textfilewizard.cpp +++ b/src/plugins/texteditor/textfilewizard.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/texteditor/textfilewizard.h b/src/plugins/texteditor/textfilewizard.h index 788b60f21d18f3a2abf71b000bce7425dd056b8c..2cf2a01b39505af4e0ee6b13d585ea0dfd6d17e1 100644 --- a/src/plugins/texteditor/textfilewizard.h +++ b/src/plugins/texteditor/textfilewizard.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/vcsbase/baseannotationhighlighter.cpp b/src/plugins/vcsbase/baseannotationhighlighter.cpp index c55a526fc1d896461dc9d31e6c9bdcd785ebc399..f6d95a8030d7144a8c4796129a0ecf1ffc4d7974 100644 --- a/src/plugins/vcsbase/baseannotationhighlighter.cpp +++ b/src/plugins/vcsbase/baseannotationhighlighter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/vcsbase/baseannotationhighlighter.h b/src/plugins/vcsbase/baseannotationhighlighter.h index e32fdf077bf7aeb93cdd64ef204254e6d1d159a8..c1ca81a50e6f9ddbdd9f707ea0344aa6a7634cb5 100644 --- a/src/plugins/vcsbase/baseannotationhighlighter.h +++ b/src/plugins/vcsbase/baseannotationhighlighter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/vcsbase/basevcseditorfactory.cpp b/src/plugins/vcsbase/basevcseditorfactory.cpp index 4177608c2713efd66ba8ff6eb7771d69e5854e4f..392b9c269642b4f62e33e95356927491cf420a4d 100644 --- a/src/plugins/vcsbase/basevcseditorfactory.cpp +++ b/src/plugins/vcsbase/basevcseditorfactory.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/vcsbase/basevcseditorfactory.h b/src/plugins/vcsbase/basevcseditorfactory.h index 1bf543347b85173211e64e6bc6c19519dfb0acee..bc10a21180dd4712fa3d92eb5950c3d79cadde7f 100644 --- a/src/plugins/vcsbase/basevcseditorfactory.h +++ b/src/plugins/vcsbase/basevcseditorfactory.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/vcsbase/basevcssubmiteditorfactory.cpp b/src/plugins/vcsbase/basevcssubmiteditorfactory.cpp index f880d780666e2c9fde8584f45b0a7bce5ed8ff6e..b662abbf409f00655da680edaac5b15a22322c15 100644 --- a/src/plugins/vcsbase/basevcssubmiteditorfactory.cpp +++ b/src/plugins/vcsbase/basevcssubmiteditorfactory.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/vcsbase/basevcssubmiteditorfactory.h b/src/plugins/vcsbase/basevcssubmiteditorfactory.h index 20b8bd8232b987074511fc74cf870d41aacc8507..f64d45d153bd21dfda38698ac40fa072042735c0 100644 --- a/src/plugins/vcsbase/basevcssubmiteditorfactory.h +++ b/src/plugins/vcsbase/basevcssubmiteditorfactory.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/vcsbase/diffhighlighter.cpp b/src/plugins/vcsbase/diffhighlighter.cpp index b4cc9af0ff0ba0ae99c551ba80cd56b40109e4af..96379976172b92aebb8a478e4c4db480a1895cc7 100644 --- a/src/plugins/vcsbase/diffhighlighter.cpp +++ b/src/plugins/vcsbase/diffhighlighter.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/vcsbase/diffhighlighter.h b/src/plugins/vcsbase/diffhighlighter.h index 20d03c8058263bbd4892226c3c01217c17084cef..63258dcf6c12dec13837578cf90bf417125e62f8 100644 --- a/src/plugins/vcsbase/diffhighlighter.h +++ b/src/plugins/vcsbase/diffhighlighter.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/vcsbase/submiteditorfile.cpp b/src/plugins/vcsbase/submiteditorfile.cpp index 902b830f7d45f47dc5de3e0a87dfd000d48f90b7..9c7f2cca3f5d4e39ac76e478373f07933436dcf8 100644 --- a/src/plugins/vcsbase/submiteditorfile.cpp +++ b/src/plugins/vcsbase/submiteditorfile.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/vcsbase/submiteditorfile.h b/src/plugins/vcsbase/submiteditorfile.h index fd1bbf83688b5b9fb609bfcaa25119c5061058a7..cc4129f90150f4ed64391b09a93686e660af3995 100644 --- a/src/plugins/vcsbase/submiteditorfile.h +++ b/src/plugins/vcsbase/submiteditorfile.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/vcsbase/submitfilemodel.cpp b/src/plugins/vcsbase/submitfilemodel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2cad63e9caaea9af3f495481db15293ad5391643 --- /dev/null +++ b/src/plugins/vcsbase/submitfilemodel.cpp @@ -0,0 +1,105 @@ +/*************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** +** Non-Open Source Usage +** +** Licensees may use this file in accordance with the Qt Beta Version +** License Agreement, Agreement version 2.2 provided with the Software or, +** alternatively, in accordance with the terms contained in a written +** agreement between you and Nokia. +** +** GNU General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the packaging +** of this file. Please review the following information to ensure GNU +** General Public Licensing requirements will be met: +** +** http://www.fsf.org/licensing/licenses/info/GPLv2.html and +** http://www.gnu.org/copyleft/gpl.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt GPL Exception +** version 1.3, included in the file GPL_EXCEPTION.txt in this package. +** +***************************************************************************/ + +#include "submitfilemodel.h" +#include "vcsbaseconstants.h" + +#include <QtGui/QStandardItem> +#include <QtCore/QDebug> + +namespace VCSBase { + +SubmitFileModel::SubmitFileModel(QObject *parent) : + QStandardItemModel(0, 2, parent) +{ + // setColumnCount(2); + QStringList headerLabels; + headerLabels << tr("State") << tr("File"); + setHorizontalHeaderLabels(headerLabels); +} + +QList<QStandardItem *> SubmitFileModel::createFileRow(const QString &fileName, const QString &status, bool checked) +{ + if (VCSBase::Constants::Internal::debug) + qDebug() << Q_FUNC_INFO << fileName << status << checked; + QStandardItem *statusItem = new QStandardItem(status); + statusItem->setCheckable(true); + statusItem->setCheckState(checked ? Qt::Checked : Qt::Unchecked); + statusItem->setFlags(Qt::ItemIsSelectable|Qt::ItemIsUserCheckable|Qt::ItemIsEnabled); + QStandardItem *fileItem = new QStandardItem(fileName); + fileItem->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEnabled); + QList<QStandardItem *> row; + row << statusItem << fileItem; + return row; +} + +QList<QStandardItem *> SubmitFileModel::addFile(const QString &fileName, const QString &status, bool checked) +{ + const QList<QStandardItem *> row = createFileRow(fileName, status, checked); + appendRow(row); + return row; +} + +QList<QStandardItem *> SubmitFileModel::rowAt(int row) const +{ + const int colCount = columnCount(); + QList<QStandardItem *> rc; + for (int c = 0; c < colCount; c++) + rc.push_back(item(row, c)); + return rc; +} + +QList<QStandardItem *> SubmitFileModel::findRow(const QString &text, int column) const +{ + // Single item + const QList<QStandardItem *> items = findItems(text, Qt::MatchExactly, column); + if (items.empty()) + return items; + // Compile row + return rowAt(items.front()->row()); + } + +unsigned SubmitFileModel::filter(const QStringList &filter, int column) +{ + unsigned rc = 0; + for (int r = rowCount() - 1; r >= 0; r--) + if (const QStandardItem *i = item(r, column)) + if (!filter.contains(i->text())) { + qDeleteAll(takeRow(r)); + rc++; + } + if (VCSBase::Constants::Internal::debug) + qDebug() << Q_FUNC_INFO << " deleted " << rc << " items using " << filter << " , remaining " << rowCount(); + return rc; +} +} diff --git a/src/plugins/vcsbase/submitfilemodel.h b/src/plugins/vcsbase/submitfilemodel.h new file mode 100644 index 0000000000000000000000000000000000000000..e5e28dc093bc66869b63bc1ee245b0ad4706973b --- /dev/null +++ b/src/plugins/vcsbase/submitfilemodel.h @@ -0,0 +1,69 @@ +/*************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** +** Non-Open Source Usage +** +** Licensees may use this file in accordance with the Qt Beta Version +** License Agreement, Agreement version 2.2 provided with the Software or, +** alternatively, in accordance with the terms contained in a written +** agreement between you and Nokia. +** +** GNU General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the packaging +** of this file. Please review the following information to ensure GNU +** General Public Licensing requirements will be met: +** +** http://www.fsf.org/licensing/licenses/info/GPLv2.html and +** http://www.gnu.org/copyleft/gpl.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt GPL Exception +** version 1.3, included in the file GPL_EXCEPTION.txt in this package. +** +***************************************************************************/ + +#ifndef SUBMITMODEL_H +#define SUBMITMODEL_H + +#include "vcsbase_global.h" + +#include <QtGui/QStandardItemModel> + +namespace VCSBase { + +/* A 2-column (checkable, state, file name) model to be used to list the files- + * in the submit editor. Provides header items and a convience to add files. */ + +class VCSBASE_EXPORT SubmitFileModel : public QStandardItemModel +{ + Q_OBJECT +public: + explicit SubmitFileModel(QObject *parent = 0); + + // Convenience to create and add rows containing a file plus status text. + static QList<QStandardItem *> createFileRow(const QString &fileName, const QString &status = QString(), bool checked = true); + QList<QStandardItem *> addFile(const QString &fileName, const QString &status = QString(), bool checked = true); + + // Find convenience that returns the whole row (as opposed to QStandardItemModel::find). + QList<QStandardItem *> findRow(const QString &text, int column = 0) const; + + // Convenience to obtain a row + QList<QStandardItem *> rowAt(int row) const; + + // Filter for entries contained in the filter list. Returns the + // number of deleted entries. + unsigned filter(const QStringList &filter, int column); +}; + +} + +#endif // SUBMITMODEL_H diff --git a/src/plugins/vcsbase/vcsbase.pro b/src/plugins/vcsbase/vcsbase.pro index 329e27b0686c4def2c150583c84468d00033a563..d34fe84e7c05476658180ae46779d68540842f5b 100644 --- a/src/plugins/vcsbase/vcsbase.pro +++ b/src/plugins/vcsbase/vcsbase.pro @@ -1,31 +1,28 @@ TEMPLATE = lib TARGET = VCSBase - DEFINES += VCSBASE_LIBRARY - include(../../qworkbenchplugin.pri) include(vcsbase_dependencies.pri) - HEADERS += vcsbase_global.h \ -vcsbaseconstants.h \ -vcsbaseplugin.h \ -baseannotationhighlighter.h \ -diffhighlighter.h \ -vcsbasetextdocument.h \ -vcsbaseeditor.h \ -vcsbasesubmiteditor.h \ -basevcseditorfactory.h \ -submiteditorfile.h \ -basevcssubmiteditorfactory.h - + vcsbaseconstants.h \ + vcsbaseplugin.h \ + baseannotationhighlighter.h \ + diffhighlighter.h \ + vcsbasetextdocument.h \ + vcsbaseeditor.h \ + vcsbasesubmiteditor.h \ + basevcseditorfactory.h \ + submiteditorfile.h \ + basevcssubmiteditorfactory.h \ + submitfilemodel.h SOURCES += vcsbaseplugin.cpp \ -baseannotationhighlighter.cpp \ -diffhighlighter.cpp \ -vcsbasetextdocument.cpp \ -vcsbaseeditor.cpp \ -vcsbasesubmiteditor.cpp \ -basevcseditorfactory.cpp \ -submiteditorfile.cpp \ -basevcssubmiteditorfactory.cpp - -RESOURCES=vcsbase.qrc + baseannotationhighlighter.cpp \ + diffhighlighter.cpp \ + vcsbasetextdocument.cpp \ + vcsbaseeditor.cpp \ + vcsbasesubmiteditor.cpp \ + basevcseditorfactory.cpp \ + submiteditorfile.cpp \ + basevcssubmiteditorfactory.cpp \ + submitfilemodel.cpp +RESOURCES = vcsbase.qrc diff --git a/src/plugins/vcsbase/vcsbase_global.h b/src/plugins/vcsbase/vcsbase_global.h index 9196019fbd9b388cd344e42264d6b05a4245678d..a4dff9426fe4f997d54699c1d2eb467b86e16fc0 100644 --- a/src/plugins/vcsbase/vcsbase_global.h +++ b/src/plugins/vcsbase/vcsbase_global.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/vcsbase/vcsbaseconstants.h b/src/plugins/vcsbase/vcsbaseconstants.h index 9cdcbb8deab1fb60b3a58566be8015ef5bdfa3ca..583ffb0dd56d19169aaa99193579311107ac0c5a 100644 --- a/src/plugins/vcsbase/vcsbaseconstants.h +++ b/src/plugins/vcsbase/vcsbaseconstants.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/vcsbase/vcsbaseeditor.cpp b/src/plugins/vcsbase/vcsbaseeditor.cpp index 084109069d5091f71c11db7422f35d0f95af049e..6951d39eea58b0776d35883a23e472101ac84e11 100644 --- a/src/plugins/vcsbase/vcsbaseeditor.cpp +++ b/src/plugins/vcsbase/vcsbaseeditor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/vcsbase/vcsbaseeditor.h b/src/plugins/vcsbase/vcsbaseeditor.h index fcb323e693009040df09e906dbd559ef94b1350e..42c31c6c37dfb18b6fd0c6fb9789fb0bec2d3e09 100644 --- a/src/plugins/vcsbase/vcsbaseeditor.h +++ b/src/plugins/vcsbase/vcsbaseeditor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/vcsbase/vcsbaseplugin.cpp b/src/plugins/vcsbase/vcsbaseplugin.cpp index 9633f60ba14104ab955a9574388c32347e81c9f6..7cbd8a9233ed6f2ad6a929d6065f63b18e41b242 100644 --- a/src/plugins/vcsbase/vcsbaseplugin.cpp +++ b/src/plugins/vcsbase/vcsbaseplugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/vcsbase/vcsbaseplugin.h b/src/plugins/vcsbase/vcsbaseplugin.h index 3474c4a05f2aa777e3ad33ab40acd887dfd25a13..c97125b9108c9515db263a7b60811e4b6c6c09a1 100644 --- a/src/plugins/vcsbase/vcsbaseplugin.h +++ b/src/plugins/vcsbase/vcsbaseplugin.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/vcsbase/vcsbasesubmiteditor.cpp b/src/plugins/vcsbase/vcsbasesubmiteditor.cpp index 9d668f16a767735ca789f369e0315ff050cd432f..a47a66ab064be7d2983f0c0dd97c3fd44e2317ae 100644 --- a/src/plugins/vcsbase/vcsbasesubmiteditor.cpp +++ b/src/plugins/vcsbase/vcsbasesubmiteditor.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -37,7 +37,7 @@ #include <coreplugin/ifile.h> #include <coreplugin/icore.h> #include <coreplugin/uniqueidmanager.h> -#include <coreplugin/actionmanager/actionmanagerinterface.h> +#include <coreplugin/actionmanager/actionmanager.h> #include <utils/submiteditorwidget.h> #include <find/basetextfind.h> @@ -57,17 +57,6 @@ enum { debug = 0 }; enum { wantToolBar = 0 }; -static inline QAction *actionFromId(const Core::ICore *core, const char *id) -{ - QAction *rc = 0; - if (id) - if (const Core::ICommand *cmd = core->actionManager()->command(id)) - rc = cmd->action(); - if (debug) - qDebug() << Q_FUNC_INFO << id << rc; - return rc; -} - namespace VCSBase { struct VCSBaseSubmitEditorPrivate { @@ -83,10 +72,8 @@ struct VCSBaseSubmitEditorPrivate { VCSBase::Internal::SubmitEditorFile *m_file; QList<int> m_contexts; - QPointer<QAction> m_undoAction; - QPointer<QAction> m_redoAction; - QPointer<QAction> m_submitAction; QPointer<QAction> m_diffAction; + QPointer<QAction> m_submitAction; }; VCSBaseSubmitEditorPrivate::VCSBaseSubmitEditorPrivate(const VCSBaseSubmitEditorParameters *parameters, @@ -96,11 +83,7 @@ VCSBaseSubmitEditorPrivate::VCSBaseSubmitEditorPrivate(const VCSBaseSubmitEditor m_widget(editorWidget), m_toolWidget(0), m_parameters(parameters), - m_file(new VCSBase::Internal::SubmitEditorFile(QLatin1String(m_parameters->mimeType), q)), - m_undoAction(actionFromId(m_core, m_parameters->undoActionId)), - m_redoAction(actionFromId(m_core, m_parameters->redoActionId)), - m_submitAction(actionFromId(m_core, m_parameters->submitActionId)), - m_diffAction(actionFromId(m_core, m_parameters->diffActionId)) + m_file(new VCSBase::Internal::SubmitEditorFile(QLatin1String(m_parameters->mimeType), q)) { m_contexts << m_core->uniqueIDManager()->uniqueIdentifier(m_parameters->context); } @@ -113,7 +96,6 @@ VCSBaseSubmitEditor::VCSBaseSubmitEditor(const VCSBaseSubmitEditorParameters *pa // We are always clean to prevent the editor manager from asking to save. connect(m_d->m_file, SIGNAL(saveMe(QString)), this, SLOT(save(QString))); - m_d->m_widget->registerActions(m_d->m_undoAction, m_d->m_redoAction, m_d->m_submitAction, m_d->m_diffAction); connect(m_d->m_widget, SIGNAL(diffSelected(QStringList)), this, SLOT(slotDiffSelectedVCSFiles(QStringList))); connect(m_d->m_widget->descriptionEdit(), SIGNAL(textChanged()), this, SLOT(slotDescriptionChanged())); @@ -129,6 +111,41 @@ VCSBaseSubmitEditor::~VCSBaseSubmitEditor() delete m_d; } +void VCSBaseSubmitEditor::registerActions(QAction *editorUndoAction, QAction *editorRedoAction, + QAction *submitAction, QAction *diffAction)\ +{ + m_d->m_widget->registerActions(editorUndoAction, editorRedoAction, submitAction, diffAction); + m_d->m_diffAction = diffAction; + m_d->m_submitAction = submitAction; +} + +void VCSBaseSubmitEditor::unregisterActions(QAction *editorUndoAction, QAction *editorRedoAction, + QAction *submitAction, QAction *diffAction) +{ + m_d->m_widget->unregisterActions(editorUndoAction, editorRedoAction, submitAction, diffAction); + m_d->m_diffAction = m_d->m_submitAction = 0; +} +int VCSBaseSubmitEditor::fileNameColumn() const +{ + return m_d->m_widget->fileNameColumn(); +} + +void VCSBaseSubmitEditor::setFileNameColumn(int c) +{ + m_d->m_widget->setFileNameColumn(c); +} + +QAbstractItemView::SelectionMode VCSBaseSubmitEditor::fileListSelectionMode() const +{ + return m_d->m_widget->fileListSelectionMode(); +} + +void VCSBaseSubmitEditor::setFileListSelectionMode(QAbstractItemView::SelectionMode sm) +{ + m_d->m_widget->setFileListSelectionMode(sm); +} + + void VCSBaseSubmitEditor::slotDescriptionChanged() { } @@ -246,22 +263,22 @@ bool VCSBaseSubmitEditor::restoreState(const QByteArray &/*state*/) QStringList VCSBaseSubmitEditor::checkedFiles() const { - return vcsFileListToFileList(m_d->m_widget->checkedFiles()); + return m_d->m_widget->checkedFiles(); } -void VCSBaseSubmitEditor::setFileList(const QStringList &l) +void VCSBaseSubmitEditor::setFileModel(QAbstractItemModel *m) { - m_d->m_widget->setFileList(l); + m_d->m_widget->setFileModel(m); } -void VCSBaseSubmitEditor::addFiles(const QStringList& list, bool checked, bool userCheckable) +QAbstractItemModel *VCSBaseSubmitEditor::fileModel() const { - m_d->m_widget->addFiles(list, checked, userCheckable); + return m_d->m_widget->fileModel(); } void VCSBaseSubmitEditor::slotDiffSelectedVCSFiles(const QStringList &rawList) { - emit diffSelectedFiles(vcsFileListToFileList(rawList)); + emit diffSelectedFiles(rawList); } bool VCSBaseSubmitEditor::save(const QString &fileName) diff --git a/src/plugins/vcsbase/vcsbasesubmiteditor.h b/src/plugins/vcsbase/vcsbasesubmiteditor.h index 72553672411b003cdd3c0012e7b5df2157edd443..9bea506126d681e501d20dd38b5f92e7cd3dfb46 100644 --- a/src/plugins/vcsbase/vcsbasesubmiteditor.h +++ b/src/plugins/vcsbase/vcsbasesubmiteditor.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** @@ -39,9 +39,12 @@ #include <coreplugin/editormanager/ieditor.h> #include <QtCore/QList> +#include <QtGui/QAbstractItemView> QT_BEGIN_NAMESPACE class QIcon; +class QAbstractItemModel; +class QAction; QT_END_NAMESPACE namespace Core { @@ -59,10 +62,6 @@ struct VCSBASE_EXPORT VCSBaseSubmitEditorParameters { const char *mimeType; const char *kind; const char *context; - const char *undoActionId; - const char *redoActionId; - const char *submitActionId; - const char *diffActionId; }; /* Base class for a submit editor based on the Core::Utils::SubmitEditorWidget @@ -84,12 +83,15 @@ struct VCSBASE_EXPORT VCSBaseSubmitEditorParameters { * signal and then asking the IFile interface of the editor to save the file * within a IFileManager::blockFileChange() section * and to launch the submit process. In addition, the action registered - * for submit should be connected to a slot triggering the close of the + * for submit sho src/libs/utils/submiteditorwidget.h +uld be connected to a slot triggering the close of the * current editor in the editor manager. */ class VCSBASE_EXPORT VCSBaseSubmitEditor : public Core::IEditor { Q_OBJECT + Q_PROPERTY(int fileNameColumn READ fileNameColumn WRITE setFileNameColumn DESIGNABLE false) + Q_PROPERTY(QAbstractItemView::SelectionMode fileListSelectionMode READ fileListSelectionMode WRITE setFileListSelectionMode DESIGNABLE true) public: typedef QList<int> Context; @@ -98,8 +100,20 @@ protected: Core::Utils::SubmitEditorWidget *editorWidget); public: + // Register the actions with the submit editor widget. + void registerActions(QAction *editorUndoAction, QAction *editorRedoAction, + QAction *submitAction = 0, QAction *diffAction = 0); + void unregisterActions(QAction *editorUndoAction, QAction *editorRedoAction, + QAction *submitAction = 0, QAction *diffAction = 0); + virtual ~VCSBaseSubmitEditor(); + int fileNameColumn() const; + void setFileNameColumn(int c); + + QAbstractItemView::SelectionMode fileListSelectionMode() const; + void setFileListSelectionMode(QAbstractItemView::SelectionMode sm); + // Core::IEditor virtual bool createNew(const QString &contents); virtual bool open(const QString &fileName); @@ -119,8 +133,8 @@ public: QStringList checkedFiles() const; - void setFileList(const QStringList&); - void addFiles(const QStringList&, bool checked = true, bool userCheckable = true); + void setFileModel(QAbstractItemModel *m); + QAbstractItemModel *fileModel() const; // Utilities returning some predefined icons for actions static QIcon diffIcon(); @@ -139,11 +153,6 @@ private slots: void slotDescriptionChanged(); protected: - /* Implemented this to extract the real file list from the status - * output of the versioning system as displayed in the file list - * for example "M foo.cpp" -> "foo.cpp". */ - virtual QStringList vcsFileListToFileList(const QStringList &) const = 0; - /* These hooks allow for modifying the contents that goes to * the file. The default implementation uses the text * of the description editor. */ diff --git a/src/plugins/vcsbase/vcsbasetextdocument.cpp b/src/plugins/vcsbase/vcsbasetextdocument.cpp index fcd50c12f4bf28a6bd4d118594de476fb6dacd8b..75a9fdf53f5db8b3f8296aa45827af50bac2fd1f 100644 --- a/src/plugins/vcsbase/vcsbasetextdocument.cpp +++ b/src/plugins/vcsbase/vcsbasetextdocument.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/plugins/vcsbase/vcsbasetextdocument.h b/src/plugins/vcsbase/vcsbasetextdocument.h index e4bb7d1ce839c4ed82f271acc1cdd7e85ebf26fa..6517037859a5c0ad0856c2eb445ad811212b7677 100644 --- a/src/plugins/vcsbase/vcsbasetextdocument.h +++ b/src/plugins/vcsbase/vcsbasetextdocument.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/tools/makespy/main.cpp b/src/tools/makespy/main.cpp index fe9d0d616e0c32bd737c0fe68935e196e738e9ca..636f2d617c921e40c19b7bc7e6610ffa924e8bf2 100644 --- a/src/tools/makespy/main.cpp +++ b/src/tools/makespy/main.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/tools/qdebugger/lean.h b/src/tools/qdebugger/lean.h index 4d06d8437cd610cca1e8c92f08df7446b822aa9b..b1b0eaab6cf4412de42f4357d5ff7d65baeaf2e6 100644 --- a/src/tools/qdebugger/lean.h +++ b/src/tools/qdebugger/lean.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/tools/qdebugger/main.cpp b/src/tools/qdebugger/main.cpp index d151bb6fa28ab93d035120a64e70854911e39501..312ed53dbdacb305dcbf046278dfc9ea31f603f5 100644 --- a/src/tools/qdebugger/main.cpp +++ b/src/tools/qdebugger/main.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/tools/qdebugger/mainwindow.cpp b/src/tools/qdebugger/mainwindow.cpp index 7984626a78815967e517c981dcd05f7ac1ab1dc9..8b881aad4bfbfe14c86ae5210558cca6a86e8bc2 100644 --- a/src/tools/qdebugger/mainwindow.cpp +++ b/src/tools/qdebugger/mainwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/tools/qdebugger/mainwindow.h b/src/tools/qdebugger/mainwindow.h index 1c0d17a7bce7b917bd1c8b616c8a105435f3e49f..911e421f3f910aabb67ab2cf57593b235e142672 100644 --- a/src/tools/qdebugger/mainwindow.h +++ b/src/tools/qdebugger/mainwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/tools/qtcreatorwidgets/customwidget.h b/src/tools/qtcreatorwidgets/customwidget.h index 76edcd317650deb716d0e23353116bbdb78e9b3b..81ed0393096d067ba7d103cf4051f5aedaf99b7e 100644 --- a/src/tools/qtcreatorwidgets/customwidget.h +++ b/src/tools/qtcreatorwidgets/customwidget.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/tools/qtcreatorwidgets/customwidgets.cpp b/src/tools/qtcreatorwidgets/customwidgets.cpp index 3b40172633aeff2a77d7297528f4c96ac597322b..35140ebd99f2d84a9a6dd176398f2ba57c3969f7 100644 --- a/src/tools/qtcreatorwidgets/customwidgets.cpp +++ b/src/tools/qtcreatorwidgets/customwidgets.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/tools/qtcreatorwidgets/customwidgets.h b/src/tools/qtcreatorwidgets/customwidgets.h index f78e88939e5cc69bbd97a961086ded8aedd2abde..4bc970b78ab8a583042ee75b4a5f212ac8ff91f6 100644 --- a/src/tools/qtcreatorwidgets/customwidgets.h +++ b/src/tools/qtcreatorwidgets/customwidgets.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/tools/texteditor/main.cpp b/src/tools/texteditor/main.cpp index d080780f93f032ef77117d30e958e1842b525050..715c6d2f0c21acf26a76545dc9f109ca446f39ae 100644 --- a/src/tools/texteditor/main.cpp +++ b/src/tools/texteditor/main.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/tools/texteditor/mainwindow.cpp b/src/tools/texteditor/mainwindow.cpp index 7935a1cc49823e16ea39fc1d5b64f2cd3cfe3419..5f5368fb7aeefe6737805fa73c1501ecd2c0234b 100644 --- a/src/tools/texteditor/mainwindow.cpp +++ b/src/tools/texteditor/mainwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/src/tools/texteditor/mainwindow.h b/src/tools/texteditor/mainwindow.h index bf6f53cee39b5086fb1ec8d285931d9c4d438c64..df5e3c59a2fc24ee55f9a89a88b75c9c1efbbf1d 100644 --- a/src/tools/texteditor/mainwindow.h +++ b/src/tools/texteditor/mainwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/tests/auto/extensionsystem/tst_composite.cpp b/tests/auto/extensionsystem/tst_composite.cpp index 6606f243acc663f61bbe93e31f372de156ecc222..011fb508747cf46fd5ac614bf3f8bdc5892b5baa 100644 --- a/tests/auto/extensionsystem/tst_composite.cpp +++ b/tests/auto/extensionsystem/tst_composite.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/tests/auto/fakevim/fakevim.pro b/tests/auto/fakevim/fakevim.pro index 29936b2568f830affa15379605d726d55b68e6d6..539a40f335c9e64b377e9fba993e7e8906094088 100644 --- a/tests/auto/fakevim/fakevim.pro +++ b/tests/auto/fakevim/fakevim.pro @@ -1,7 +1,7 @@ QT += testlib -FAKEVIMSOURCE = /data/qt-creator/src/plugins/fakevim +FAKEVIMSOURCE = ../../../src/plugins/fakevim INCLUDEPATH += $$FAKEVIMSOURCE diff --git a/tests/auto/fakevim/main.cpp b/tests/auto/fakevim/main.cpp index 28a05dcd5303d16c7fe83ddc276e15203d184841..b22504b862b43a2d9bec8e12378537e99cc91068 100644 --- a/tests/auto/fakevim/main.cpp +++ b/tests/auto/fakevim/main.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/tests/auto/profilereader/main.cpp b/tests/auto/profilereader/main.cpp index ec5945d2b798352cdf2b6007d20adb6854ca4dff..bb06561dd52224cb111cbe3a21c1c48a6c3e0a37 100644 --- a/tests/auto/profilereader/main.cpp +++ b/tests/auto/profilereader/main.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/tests/auto/profilereader/profilecache.h b/tests/auto/profilereader/profilecache.h index eef60ee5624e20d475682e79bf4f26b5b72b34e3..484978d662d16495fcc3df29f339d000b629d78b 100644 --- a/tests/auto/profilereader/profilecache.h +++ b/tests/auto/profilereader/profilecache.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/tests/auto/profilereader/qtversionmanager.h b/tests/auto/profilereader/qtversionmanager.h index 29ec0ff10525f780bd724bba5efe1d219b7acdf4..098a3bf2f8a8d7394b60c8591ac1f98dd9d64480 100644 --- a/tests/auto/profilereader/qtversionmanager.h +++ b/tests/auto/profilereader/qtversionmanager.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/tests/manual/cplusplus/main.cpp b/tests/manual/cplusplus/main.cpp index 4292fe929f62d933063ff6e13ef8bd7cf257c54f..533e05e1027d6bfdc8fdc63a42ad3db594949384 100644 --- a/tests/manual/cplusplus/main.cpp +++ b/tests/manual/cplusplus/main.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/tests/manual/dockwidgets/main.cpp b/tests/manual/dockwidgets/main.cpp index 28fae357951e75326a95bc74dab460babf6fc7f5..55343c8b9985e5e44d22dcad886260920c3b68c7 100644 --- a/tests/manual/dockwidgets/main.cpp +++ b/tests/manual/dockwidgets/main.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/tests/manual/dockwidgets/mainwindow.cpp b/tests/manual/dockwidgets/mainwindow.cpp index 3e9f8622fba2167fcfd27fd06f3142748faa389e..18b63be1478abda49dd518bd9ea320f4a31ca28b 100644 --- a/tests/manual/dockwidgets/mainwindow.cpp +++ b/tests/manual/dockwidgets/mainwindow.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/tests/manual/dockwidgets/mainwindow.h b/tests/manual/dockwidgets/mainwindow.h index d2d9e6dd387718d8e69121f8bf63e2dd2818afb4..1d26abfb46339a3e1f89657269953db6c7cdbb7d 100644 --- a/tests/manual/dockwidgets/mainwindow.h +++ b/tests/manual/dockwidgets/mainwindow.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/tests/manual/fakevim/fakevim.pro b/tests/manual/fakevim/fakevim.pro index ed3046b76c9d110aaaa89196878a54adf73d2758..8624a100b370ba3738b5e7813f04a4b505148904 100644 --- a/tests/manual/fakevim/fakevim.pro +++ b/tests/manual/fakevim/fakevim.pro @@ -3,9 +3,9 @@ FAKEVIMHOME = ../../../src/plugins/fakevim SOURCES += \ main.cpp \ - $$FAKEVIMHOME/handler.cpp + $$FAKEVIMHOME/fakevimhandler.cpp HEADERS += \ - $$FAKEVIMHOME/handler.h + $$FAKEVIMHOME/fakevimhandler.h INCLUDEPATH += $$FAKEVIMHOME diff --git a/tests/manual/fakevim/main.cpp b/tests/manual/fakevim/main.cpp index 8c504a62a81b353fe92683f375e9e909ba4909dd..c668601e78dd108d6ba20ef4a9668496050de1cb 100644 --- a/tests/manual/fakevim/main.cpp +++ b/tests/manual/fakevim/main.cpp @@ -1,5 +1,5 @@ -#include "handler.h" +#include "fakevimhandler.h" #include <QtCore/QDebug> @@ -11,6 +11,25 @@ using namespace FakeVim::Internal; +class Proxy : public QObject +{ + Q_OBJECT + +public: + Proxy(QWidget *widget) : QObject(0), m_widget(widget) {} + +public slots: + void changeSelection(QWidget *w, const QList<QTextEdit::ExtraSelection> &s) + { + if (QPlainTextEdit *ed = qobject_cast<QPlainTextEdit *>(w)) + ed->setExtraSelections(s); + else if (QTextEdit *ed = qobject_cast<QTextEdit *>(w)) + ed->setExtraSelections(s); + } +private: + QWidget *m_widget; +}; + int main(int argc, char *argv[]) { QApplication app(argc, argv); @@ -31,8 +50,10 @@ int main(int argc, char *argv[]) widget->resize(450, 350); widget->setFocus(); + Proxy proxy(widget); + - FakeVimHandler fakeVim; + FakeVimHandler handler; QMainWindow mw; mw.setWindowTitle("Fakevim (" + title + ")"); @@ -50,14 +71,19 @@ int main(int argc, char *argv[]) widget->setFont(font); mw.statusBar()->setFont(font); - QObject::connect(&fakeVim, SIGNAL(commandBufferChanged(QString)), + QObject::connect(&handler, SIGNAL(commandBufferChanged(QString)), mw.statusBar(), SLOT(showMessage(QString))); - QObject::connect(&fakeVim, SIGNAL(quitRequested(QWidget *)), + QObject::connect(&handler, SIGNAL(quitRequested(QWidget *)), &app, SLOT(quit())); + QObject::connect(&handler, + SIGNAL(selectionChanged(QWidget*,QList<QTextEdit::ExtraSelection>)), + &proxy, SLOT(changeSelection(QWidget*,QList<QTextEdit::ExtraSelection>))); - fakeVim.addWidget(widget); + handler.addWidget(widget); if (args.size() >= 1) - fakeVim.handleCommand(widget, "r " + args.at(0)); + handler.handleCommand(widget, "r " + args.at(0)); return app.exec(); } + +#include "main.moc" diff --git a/tests/manual/gdbdebugger/script/math.js b/tests/manual/gdbdebugger/script/math.js index 9c0d96c859d4f9883899a11f2257e083779a7b17..9058a10f8770107018cf2bc55af3a8f2fc2bcdc9 100644 --- a/tests/manual/gdbdebugger/script/math.js +++ b/tests/manual/gdbdebugger/script/math.js @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/tests/manual/gdbdebugger/simple/app.cpp b/tests/manual/gdbdebugger/simple/app.cpp index 15ec4a7bd8efe9f6f2c0501aa1a6c3207249a86d..a20311822f8436336695ccff0186ff7b55ad856c 100644 --- a/tests/manual/gdbdebugger/simple/app.cpp +++ b/tests/manual/gdbdebugger/simple/app.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/tests/manual/gdbdebugger/simple/plugin.cpp b/tests/manual/gdbdebugger/simple/plugin.cpp index 90c1ffd562f4016c3f0ec6e913ec37420f7c50ae..4e02c7f9f7e5628c7b000cfa93a41684dc0905d8 100644 --- a/tests/manual/gdbdebugger/simple/plugin.cpp +++ b/tests/manual/gdbdebugger/simple/plugin.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/tests/manual/gdbdebugger/spacy path/app with space.cpp b/tests/manual/gdbdebugger/spacy path/app with space.cpp index 451d93ca813d4ea9bb047fef896ff24ac4df4b6b..ad7416bd299fadd7288833f377cabb8c2d8d5f69 100644 --- a/tests/manual/gdbdebugger/spacy path/app with space.cpp +++ b/tests/manual/gdbdebugger/spacy path/app with space.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) ** diff --git a/tests/manual/gdbdebugger/spacy path/plugin with space.cpp b/tests/manual/gdbdebugger/spacy path/plugin with space.cpp index 90c1ffd562f4016c3f0ec6e913ec37420f7c50ae..4e02c7f9f7e5628c7b000cfa93a41684dc0905d8 100644 --- a/tests/manual/gdbdebugger/spacy path/plugin with space.cpp +++ b/tests/manual/gdbdebugger/spacy path/plugin with space.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Qt Software Information (qt-info@nokia.com) **