diff --git a/bin/gdbmacros/gdbmacros.cpp b/bin/gdbmacros/gdbmacros.cpp index 2af0e4b2301..7a304607b6c 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 1485e964631..1cf030faaca 100644 --- a/doc/api/qtcreator-api.qdoc +++ b/doc/api/qtcreator-api.qdoc @@ -79,8 +79,3 @@ \generatelist functionindex */ -/*! - \group qtc - - \title Core Plugin -*/ diff --git a/doc/doc.pri b/doc/doc.pri index d8e65d4a944..4207e364c76 100644 --- a/doc/doc.pri +++ b/doc/doc.pri @@ -2,14 +2,18 @@ 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 } QHP_FILE = $$OUT_PWD/doc/html/qtcreator.qhp QCH_FILE = $$OUT_PWD/doc/qtcreator.qch -html_docs.commands =$$QDOC $$PWD/qtcreator.qdocconf +unix { +html_docs.commands = $$QDOC $$PWD/qtcreator.qdocconf +} else { +html_docs.commands = \"$$QDOC $$PWD/qtcreator.qdocconf\" +} html_docs.depends += $$PWD/qtcreator.qdoc $$PWD/qtcreator.qdocconf html_docs.files = $$QHP_FILE diff --git a/doc/example/textfinder/main.cpp b/doc/example/textfinder/main.cpp index 5e73ed9d91c..30fe49baf0c 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 c289b45e8ce..20050f603dd 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 a712a1d12d2..ebcb0fb87c3 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 3c50c9d4280..4918da9f61a 100644 --- a/doc/qtcreator.qdoc +++ b/doc/qtcreator.qdoc @@ -49,7 +49,9 @@ \list \o \l{A Quick Tour of Qt Creator} \o \l{Creating a Project in Qt Creator} + \o \l{The Code Editor} \o \l{Build Settings} + \o \l{Qt Version Management} \o \l{Writing a Simple Program with Qt Creator} \o \l{Navigating Quickly Around Your Code with Locator} \o \l{Debugging with Qt Creator} @@ -206,10 +208,67 @@ are available to help speed up the process of developing your application. */ +/*! \contentspage index.html + \previouspage creator-quick-tour.html + \page creator-code-editor.html + \nextpage creator-build-settings.html + + \title The Code Editor + + ### SCREENSHOT of the editor in action + + + \table + \row + \i Block navigation + \i To navigate between blocks, e.g., from one \c{\{} to another + \c{\c}}, use \key{Ctrl+[} and \key{Ctrl+]}. + \row + \i Block selection + \i To select a current block, use \key{Ctrl+U}. Pressing + \key{Ctrl+U} again extends the selection to the parent block. + To deselect, use \key{Ctrl+Shift+U}. + \row + \i Moving lines up and down + \i + + \row + \i Completion + \i + + \row + \i Indenting + \i + \row + \i Commenting or Uncommenting + \i + \endtable + + + More: + + Collapse + + Up/Down/Page Up/Page Down - hold ctrl to prevent the cursor from moving + + F2 and Shift F2 - follows symbols under the cursor (works for namespaces, classes, methods, variables, includes, macros). + + F4 - switch header and source + + Ctrl + Scroll wheel -- used to quickly change the font size (handy for presentatiaons) + + + + To switch to an external editor, select \gui{Open in external editor} from + the \gui{Edit -> Advanced} menu. + +*/ + + /*! \contentspage index.html - \previouspage creator-quick-tour.html + \previouspage creator-editor-settings.html \page creator-build-settings.html \nextpage creator-creating-project.html @@ -266,8 +325,15 @@ remove the build step. You will still be able to debug applications, but the contents of Qt and STL data types will not be displayed properly. +*/ - \section1 Qt Version Management +/*! + \contentspage index.html + \previouspage creator-build-settings.html + \page creator-version-management.html + \nextpage creator-creating-project.html + + \title Qt Version Management Qt Creator allows you to use multiple versions of Qt installed on your hard disk and switch between them easily. diff --git a/examples/scripting/demo.js b/examples/scripting/demo.js index b823995fa66..804a87d0c2e 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 eeeea1ac855..fddbbc18a28 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 d1b904348e6..b615ee79fe1 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 39995d899f4..11cfb9d24e8 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 d188412f76a..e532d88a1e8 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 5c20cc44c5e..b55cb8e8505 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 f60896dbd0b..fb1121b6d60 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 490108136f3..3b79d0153a0 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 9b333c19e0f..57fb3349405 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 f1fd664b794..a38c5763506 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 f5eb4113323..79485b5dbe8 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 11be99ea48a..3d710db3669 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(this); } +CompoundLiteralAST *AST::asCompoundLiteral() +{ return dynamic_cast(this); } + CompoundStatementAST *AST::asCompoundStatement() { return dynamic_cast(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 6607e76805b..d7f346c5b0c 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 9fbf242700e..7b9ca1ed7fa 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 28097c14f70..f8d2d6790ee 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 79f794f629e..b4f5283a748 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 e6b9c9f4fe1..7159008fd42 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 08618fce03a..c639affc89f 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 78f06e647d3..31b01bfd815 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 bb83b6a6706..610d57626f4 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 6c6148ce6a5..6e82678fa01 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 d21f14cecf0..13120fec589 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 11f14c5e501..b1de623b00e 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 9976cbf500e..e546a99a539 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 e018e7dc89b..5b5ae884b77 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 c2976a9aa38..09b90f3cb80 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 98caed462d8..4b0631b0025 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 dabb4f4bd21..eeb59eebcc0 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 d93c8db4808..3e6ddc57bae 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 7758bd0381f..67902ff252b 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 a6f02fe3916..856f64be8f8 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 f6b4e229c21..e44d84a1aee 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 87015c20e80..98c1bacdd29 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 b9184b48d5c..cf5a3ca4fb7 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 b05bd96e4fe..c3c04618385 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 32ade8a066c..12670adef93 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 de60b120c4e..6fa06887c6c 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 18b556c0099..71dec2934bc 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 c484b943edf..d156fff5ab6 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 8cf8dbbd103..180feb341db 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 1f4a0f51751..73c12524d79 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 b6e361d3da7..4cb62493db8 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 e448330ef8a..21e3b2d8dd7 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 23de104dd8d..35744fe3601 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 a2d517d8b61..f7ac69f568a 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 53e5c0dbef3..f55978b270e 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 a7c04691449..880c6bb8846 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 9647b673a6e..13c61c9d248 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 8fc1d82c01c..89e875a93cb 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 ba7a359fae8..1f30a285166 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 8573759be4a..d4f1af6575f 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 3f8ece38859..5cea38b9f88 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 186dfa9e17b..35bb84b44c2 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 18b21f14d3e..86e6813c6c2 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 407cbc36fd8..eefa3d5b9fe 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 +#include #include CPLUSPLUS_BEGIN_NAMESPACE @@ -750,6 +751,9 @@ bool Parser::parseCvQualifiers(SpecifierAST *&node) spec->specifier_token = consumeToken(); *ast = spec; ast = &(*ast)->next; + } else if(LA() == T___ATTRIBUTE__) { + parseAttributeSpecifier(*ast); + ast = &(*ast)->next; } else { break; } @@ -1621,8 +1625,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 +2705,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 +3577,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 +3598,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 +3628,7 @@ bool Parser::parseObjCInstanceVariableDeclaration(DeclarationAST *&node) return true; default: - return parseBlockDeclaration(node); + return parseSimpleDeclaration(node, true); } } @@ -3612,7 +3651,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 +3775,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 84bf03e74e6..75fad457fad 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 72338576b6b..6acb109dcfb 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 966ebacd0e6..c69ea2cf544 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 e6a6add9e0f..bdca9f8536d 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 8d5dd29c753..44387718ff3 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 79da36b891c..41716eb5aad 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 113b373024c..ac7b1b8c86f 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 979c7f69a35..27b1a56429c 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 453e517b2a6..0ecdeac6035 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 5d392f38263..cdcd3891188 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 fe274339a5d..e9d150e8d5e 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 6a066175962..95cab998ed5 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 a09924d0172..f0f4738de7f 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 7dd497426d8..a7ed4682ffe 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 3bedf3e8882..c69483a2519 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 5ebd873dce2..eb672958cd6 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 fdc3298202f..f48654aa773 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 caaa9c7d4e7..40a95c0f05d 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 ada079ff484..aa490701ef9 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 e5d70e088ad..98ccd3c893f 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 e6d360bc4fd..7cc347d5532 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 1428addedc7..937080e5a5f 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 2bd6fb15c92..16fb37c4ad0 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 9e1816a9668..29326f69895 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 c88619b8049..c76c644a73e 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 f5c67a47e6f..7d6c21407ef 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 2438781227c..1800f29f50d 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 cdda8e3a1a8..bc5d6336e0d 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 8aaf1d781d8..c8500aff908 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 e71b3a2dd1f..f42f1851ac2 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 bb223eb2068..dfe4b7f9d5f 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 892c74b77c4..a1b5e7171ae 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 768a1223ed9..464f5839472 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 bbd4a26a3d3..f61f5e1e72a 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 197bf290f79..74d1b001879 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 f5b90279893..00aa1eb485c 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 59c6df629a4..9b86d8e1cf3 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 75659da5633..b268fa260cb 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 3879dfc8c2f..f55148c91d5 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 7f9ddff0998..19cbca8b24a 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 31b8d52c05e..df9fbf9897c 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 e29a9aae7e1..37fb3ab14c8 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 9c66b8d2606..ec6b743a3ae 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 ea078a2c80c..03fb705a7ce 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 135cbc41092..b09685e44d2 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 26ffbdc4e3c..9adca6a3ee2 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 1eb8fed086b..9a63debfde5 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 340e7a00b5b..adc224ff707 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 fa0df436983..2be4ad69f43 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 5d0dbb93787..2c493bac033 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 63215a9f295..23eef39c77c 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 bef371c27b1..6469245f5e5 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 7708c991eaf..787ea76410f 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 ab5bafae13e..22f6c87e3de 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 7f029f00185..790edab4571 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 9b7b77fb0c7..a0b860dba0a 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 5905acfb0ad..7ada47a301a 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 9d7e1bac8ad..01be6a4f83b 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 1e686c5578b..60c5b29b71b 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 01ecf0f0f2d..9e531479346 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 6705ffad39f..7c751c9c273 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 e1e28eb4c51..d5558e9b8c0 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 664ab6db151..a2282b357e1 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 f3d1edb31a4..96091436ee5 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 059d90f7e91..f343c703cf5 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 aafbddbf73c..b85d70cf2a4 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 f3fd2f9c87d..5ed6cbea2bc 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 741ac12f63e..e4f04c9762e 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 3c4f3a2497e..44eab566230 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 a0b7117c2cf..b88444c6e16 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 28c01745416..61b6c594b64 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 95caef48201..ee9c507337f 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 e3ac2f1c4e0..ae11b2db93d 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 01fb1f9e7d9..481a3b09e78 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 e737efc52ef..22941ca59a4 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 cb33eebab85..fec9d01402b 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 a6d23a21287..171fffafa72 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 5e277f59e8a..5a6f5af9a2d 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 776d9ca7432..390e3ca4664 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 bdb59ec49f7..332026c77c8 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 cf914d0d59d..9bfdf22d286 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 f02012c23d2..fe2bf5ad672 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 a530f72f388..fe2acfd612f 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 8dfbbb14c2a..abf44fa4520 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 499198053b8..10ae8f69c31 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 cc156b03644..f1d74e30fc5 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 dbc6d3a6830..4b68c67c3dd 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 b0d78005c90..e4021c9b121 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 90bd9cd35e8..8505d5b49c3 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 f3a41c044be..7e023ab981c 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 1bb8d14f482..c244459afb8 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 9b712fe6201..a765c7d0703 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 e8dadffb99f..8ec308fe7e1 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) ** @@ -34,7 +34,6 @@ #ifndef INTERFACE_WRAP_HELPERS_H #define INTERFACE_WRAP_HELPERS_H -#include #include namespace SharedTools { diff --git a/shared/scriptwrapper/wrap_helpers.h b/shared/scriptwrapper/wrap_helpers.h index 961b1fef6d0..bba83728b90 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 2efc04f1451..479ef576c3b 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 1dd6ce03392..d0429076ad1 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 98b1693dd51..c4af87e579e 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 324a2493950..5cd24f26aef 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 87bfe784e28..b638067a99c 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 69e6f1caf8e..4f68c01fd05 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 78c78f05e1a..2996aed6f2d 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 1a26dc01253..84ef50c4b92 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 453f3367af4..1f4621e9703 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 d872dd3a1af..73bae23679c 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 d55a19e8859..03702840a95 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 c979c103e2a..45bf92e56c9 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 447db104bcf..e0b50903c39 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 eb31a07dcf4..b16576cd550 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 bf5df8b499b..2941489e01c 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 &candidates) +{ + if (((mode & ResolveNamespace) && symbol->isNamespace()) || + ((mode & ResolveClass) && symbol->isClass()) || + (mode & ResolveSymbol)) { + return ! candidates.contains(symbol); + } + + return false; +} + QList LookupContext::resolve(Name *name, const QList &visibleScopes, ResolveMode mode) const { if (QualifiedNameId *q = name->asQualifiedNameId()) { + QList candidates; QList 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 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 LookupContext::resolve(Name *name, const QList &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 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 8759a79210e..014d1be2c91 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 buildVisibleScopes(); static bool isNameCompatibleWithIdentifier(Name *name, Identifier *id); + static bool maybeValidSymbol(Symbol *symbol, + ResolveMode mode, + const QList &candidates); + private: Control *_control; diff --git a/src/libs/cplusplus/Macro.cpp b/src/libs/cplusplus/Macro.cpp index d5492b983b7..1c1fecf9f2d 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 3957f13fab6..050c310a883 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 12690881bf8..bdb1d8ac16c 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 3aec6a54300..255d98ffbfd 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 50f12b5d979..bc2be0193ef 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 fea6e079672..9be21726ad5 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 e394415dad9..2494d11ec5e 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 6a4bcdc2378..fa1f3cf919f 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 92b20d9f733..fe78cb34332 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 124382e80ac..f6456d2ee5f 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 2eb5656446e..fe05ff7a971 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 2d37dac3e6d..f0290c04a00 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 693fe6160ea..930e4b3a6c7 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 48ee5b2715a..7f712cd49cc 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 6f8ae2ba9b9..e6d4d81adce 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 e7cf1c0a3af..b288bc751fc 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 440946cdb38..62ecaa174e8 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 3f5b736e2dd..ed48e9360bf 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 af0a72284e7..d103a0307f7 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 68638329190..c8fe792e939 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 7f08d5874d8..90ec7837a73 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 c0eafb2e37f..78af0346347 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 f7727572308..2784d9d695a 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 e80b1d435a2..790999dc824 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 d55d6c2e4e9..2031b71bf78 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 6c5930de182..6ed55492e50 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 d0a573aed9c..24e1ac13de0 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 40bbc8090b6..e4ab03d867a 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 3e6217476fa..0307401d4a0 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 8f0f9bf9ae8..2c69706f0b0 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 71bd04476ba..481af95adfc 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 96c81867163..79e6e54d6eb 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/extensionsystem_global.h b/src/libs/extensionsystem/extensionsystem_global.h index 7ff0d1d471e..578350f8190 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 0ce65bf5c0a..26adaefec38 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 fe242b0fb78..9c811870659 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 cc7e1bdae32..ac87390bf3c 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 414895c9dec..93c159aebcc 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 1be8531d537..8ebedec99f4 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 1f3070411fe..392f8adb818 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 9ae44dad340..19b543f93d3 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 dae77d0b872..f619a6c70f7 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 d6c8897931d..f53cf393b4b 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 fc4600630f3..5a1c8a00e6a 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) ** diff --git a/src/libs/extensionsystem/pluginmanager.h b/src/libs/extensionsystem/pluginmanager.h index 42e3029bc5d..85dc06f4e9e 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 cfe2d6d17ad..9d03777c748 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 0e5fa53996f..48aa88950e9 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 6ab9d465914..5c98e551112 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 436a1f44b01..66611c18b66 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 c60ae334736..716cef20d14 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 dc4c5f1c844..4e094502ff2 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 77e511ba2cc..7c122a59d65 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 68332a77b3e..c720a28f570 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 c15a30bf165..3ef8b8959a1 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 fd788e4da6b..f8d7c4928de 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 431fa8201fd..f4ee2b6979a 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 9da1403df8b..5b95f050609 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 0878a907be8..ce14b9f92d3 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 f67dd11e9e7..d6d3ba481c6 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 498d827dd12..b65aa19d683 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 4cd3a89f6d4..a8b5662dd15 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 c509439800d..ff2fc32a2c3 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 7e170878e60..a9569bbdeeb 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 484ceace7a6..bc323afc655 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 ca2b00fc71a..08f64763037 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 eff30909c7b..e3f60a3df0b 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 1cc205c334d..353487fce5c 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 93b2bdb2d72..e1c00013695 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 59683feb04b..5ab40b33a66 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 468a06dda0e..484b755be7d 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 7eaffeef47d..cc0400b4afb 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 465215ec42c..e6e5f908a25 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 77648b733b9..702648b57f9 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 b74b339b237..40471cba1b7 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 c13f47f925e..3c067b71d62 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 888e3fb662b..9538caf9a63 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 c6d865b8856..c038b5e7bfc 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 b618f1cb49d..a60a4cdf266 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 b23c6e35804..d477d0e4ed4 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 6c49354ffff..c9c81d18259 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 c5c2954db92..89c8d18ad67 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 6c26d0bf4b4..c9368a757be 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 4a9468e7148..1e57bcfd5fc 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 a4e55ccd813..1a2a3c6e385 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 321bc9e34f2..86771587a4c 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 4bfa9098cdc..892a1fc1b2f 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 e8b844784a6..839d94e2cec 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 8e9911f8f47..e016046e8dc 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 10b5f32129b..ae60f20618d 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 e11c578070d..80b4e827942 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 95440c83f37..2f5bfe6b4b7 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 a04e6a42958..feb3acc2399 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 09bef9d1bec..559d58a0ac0 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 0e8655bf7ca..2bf7ecbcdca 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 5a01a9558d6..6d483c505d0 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 0e5c7b24550..7d0dd6ab0b6 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 18e89af9d04..48c32d1f30f 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 75e1dd27085..f651347835e 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 1ae84ccac95..239092150ec 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 fa260e0ed75..fcb2875bcd3 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 46db9fda71b..006cf61cbba 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 7b141f8c370..9f8d9a80bbe 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 91504b496c9..0f83cf1c4cb 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 5fcc8ee228c..5a6721ac67a 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 85bf22b14c5..16a06eec4ac 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 7f6b34bc886..597ace33ecf 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 bbd8d73466d..3c5e84db60d 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 d660c1aa4a5..0ab8d92bcc3 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 3206e8c38b3..db0736a64e4 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 a30b3e5f55f..8cb08e6cc73 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 2fee344d78b..63f574087c3 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 509d2417415..45160c06709 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 ec7d7b41175..d1afafb61ad 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 5394c746d68..568fd7b4ab3 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 3777587a406..664aa3e77b7 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 3513c27715d..7a084add032 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) ** @@ -234,6 +234,16 @@ void SubmitEditorWidget::setFileNameColumn(int c) m_d->m_fileNameColumn = c; } +QAbstractItemView::SelectionMode SubmitEditorWidget::fileListSelectionMode() const +{ + return m_d->m_ui.fileView->selectionMode(); +} + +void SubmitEditorWidget::setFileListSelectionMode(QAbstractItemView::SelectionMode sm) +{ + m_d->m_ui.fileView->setSelectionMode(sm); +} + void SubmitEditorWidget::setFileModel(QAbstractItemModel *model) { m_d->m_ui.fileView->clearSelection(); // trigger the change signals diff --git a/src/libs/utils/submiteditorwidget.h b/src/libs/utils/submiteditorwidget.h index 788709f773b..c24ae5e6d8a 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,6 +37,7 @@ #include "utils_global.h" #include +#include QT_BEGIN_NAMESPACE class QPlainTextEdit; @@ -75,6 +76,7 @@ class QWORKBENCH_UTILS_EXPORT SubmitEditorWidget : public QWidget Q_DISABLE_COPY(SubmitEditorWidget) Q_PROPERTY(QString descriptionText READ descriptionText WRITE setDescriptionText 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(); @@ -92,6 +94,9 @@ public: int fileNameColumn() const; void setFileNameColumn(int c); + QAbstractItemView::SelectionMode fileListSelectionMode() const; + void setFileListSelectionMode(QAbstractItemView::SelectionMode sm); + void setFileModel(QAbstractItemModel *model); QAbstractItemModel *fileModel() const; diff --git a/src/libs/utils/synchronousprocess.cpp b/src/libs/utils/synchronousprocess.cpp index a8e2979f819..852f5546be7 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 5b51f53cd4c..e9218f43d80 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 5a326faa45e..eb3a2dc615c 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 b7576f98030..05b064b83e4 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 1940434b425..804a820145b 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 86cdb5ea5be..9cbf40d5af3 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 ff07d5e876e..883459ba7d7 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 #include #include -#include +#include #include #include #include diff --git a/src/plugins/bineditor/bineditorplugin.h b/src/plugins/bineditor/bineditorplugin.h index b5bedb49aa0..51ff129dd62 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 f622bff74b3..f12ec6dc683 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 72ead1d0548..1ca4fd16f1b 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 ea59be83772..735afc37989 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) ** @@ -37,10 +37,10 @@ #include "bookmarksplugin.h" #include "bookmarks_global.h" -#include #include #include #include +#include #include #include @@ -49,6 +49,7 @@ #include #include +#include #include Q_DECLARE_METATYPE(Bookmarks::Internal::Bookmark*) diff --git a/src/plugins/bookmarks/bookmarkmanager.h b/src/plugins/bookmarks/bookmarkmanager.h index d0d84d50ed0..1763b4e5260 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 59e639e6348..469c7acd325 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 63fbb1c2eef..55b28ec82a3 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 #include #include -#include +#include #include #include @@ -68,7 +68,7 @@ void BookmarksPlugin::extensionsInitialized() bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *) { m_core = ExtensionSystem::PluginManager::instance()->getObject(); - Core::ActionManagerInterface *am = m_core->actionManager(); + Core::ActionManager *am = m_core->actionManager(); QList context = QList() << 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 9bf68c6b9bc..f4853c48cb8 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 c2fafed14f8..d98539969af 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) ** diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.h b/src/plugins/cmakeprojectmanager/cmakeproject.h index 13bec80bb9c..cad7b5fe5df 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) ** diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectconstants.h b/src/plugins/cmakeprojectmanager/cmakeprojectconstants.h index 4e753c570e9..0c543055668 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 2282f0cb527..1f4bc59e9ef 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 b3335702de1..34d97f1cc7c 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 2d48295f0f6..b998a18bb70 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 3f7b8442fa9..ba569dbaf4a 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 1c4a44710de..e1b2b1279b6 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) ** diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectplugin.h b/src/plugins/cmakeprojectmanager/cmakeprojectplugin.h index d3cd8941b53..fd40f322c48 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 356cfba3b38..b688fa6bb11 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 3108ab2a945..1452ca3908c 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) ** diff --git a/src/plugins/cmakeprojectmanager/cmakestep.cpp b/src/plugins/cmakeprojectmanager/cmakestep.cpp index b914b51b2c1..9f114893fc4 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) ** diff --git a/src/plugins/cmakeprojectmanager/cmakestep.h b/src/plugins/cmakeprojectmanager/cmakestep.h index fdf93c31a83..c5006a3eadc 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,7 +37,9 @@ #include #include +QT_BEGIN_NAMESPACE class QLineEdit; +QT_END_NAMESPACE namespace CMakeProjectManager { namespace Internal { diff --git a/src/plugins/cmakeprojectmanager/makestep.cpp b/src/plugins/cmakeprojectmanager/makestep.cpp index 279e9e75485..60f5d04903e 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) ** diff --git a/src/plugins/cmakeprojectmanager/makestep.h b/src/plugins/cmakeprojectmanager/makestep.h index 1b32ab6f2fc..fbfc007dbe4 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,9 +36,11 @@ #include +QT_BEGIN_NAMESPACE class QLineEdit; class QListWidget; class QListWidgetItem; +QT_END_NAMESPACE namespace CMakeProjectManager { namespace Internal { diff --git a/src/plugins/coreplugin/actionmanager/actioncontainer.cpp b/src/plugins/coreplugin/actionmanager/actioncontainer.cpp index bec545cc262..bf2d49826c0 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" @@ -48,146 +50,112 @@ Q_DECLARE_METATYPE(Core::Internal::MenuActionContainer*) using namespace Core; using namespace Core::Internal; -/*! - \class IActionContainer - \mainclass - \ingroup qwb - \inheaderfile iactioncontainer.h - - \brief The class... - - The Action Container interface... -*/ - -/*! - \enum IActionContainer::ContainerType -*/ - -/*! - \enum IActionContainer::EmptyAction -*/ - -/*! - \fn virtual IActionContainer::setEmptyAction(EmptyAction ea) -*/ - -/*! - \fn virtual int IActionContainer::id() const -*/ - -/*! - \fn virtual ContainerType IActionContainer::type() const -*/ - -/*! - \fn virtual QMenu *IActionContainer::menu() const -*/ - -/*! - \fn virtual QToolBar *IActionContainer::toolBar() const -*/ - -/*! - \fn virtual QMenuBar *IActionContainer::menuBar() const -*/ - -/*! - \fn virtual QAction *IActionContainer::insertLocation(const QString &group) const -*/ - -/*! - \fn virtual void IActionContainer::appendGroup(const QString &group, bool global) -*/ - -/*! - \fn virtual void IActionContainer::addAction(Core::ICommand *action, const QString &group) -*/ - -/*! - \fn virtual void IActionContainer::addMenu(Core::IActionContainer *menu, const QString &group) -*/ - -/*! - \fn virtual bool IActionContainer::update() -*/ - -/*! - \fn virtual IActionContainer::~IActionContainer() -*/ - -// ---------- ActionContainer ------------ - /*! \class ActionContainer - \ingroup qwb - \inheaderfile actioncontainer.h + \mainclass + + \brief The ActionContainer class represents a menu or menu bar in Qt Creator. + + */ /*! - \enum ActionContainer::ContainerState + \enum ActionContainer::ContainerType */ /*! -\fn ActionContainer::ActionContainer(ContainerType type, int id) + \enum ActionContainer::EmptyAction */ -ActionContainer::ActionContainer(ContainerType type, int id) - : m_data(CS_None), m_type(type), m_id(id) -{ -} +/*! + \fn virtual ActionContainer::setEmptyAction(EmptyAction ea) +*/ + +/*! + \fn virtual int ActionContainer::id() const +*/ + +/*! + \fn virtual ContainerType ActionContainer::type() const +*/ + +/*! + \fn virtual QMenu *ActionContainer::menu() const +*/ + +/*! + \fn virtual QToolBar *ActionContainer::toolBar() const +*/ + +/*! + \fn virtual QMenuBar *ActionContainer::menuBar() const +*/ + +/*! + \fn virtual QAction *ActionContainer::insertLocation(const QString &group) const +*/ + +/*! + \fn virtual void ActionContainer::appendGroup(const QString &group, bool global) +*/ + +/*! + \fn virtual void ActionContainer::addAction(Core::Command *action, const QString &group) +*/ + +/*! + \fn virtual void ActionContainer::addMenu(Core::ActionContainer *menu, const QString &group) +*/ + +/*! + \fn virtual bool ActionContainer::update() +*/ /*! \fn virtual ActionContainer::~ActionContainer() */ +// ---------- ActionContainerPrivate ------------ + /*! - ... + \class Core::Internal::ActionContainerPrivate + \internal */ -void ActionContainer::setEmptyAction(EmptyAction ea) + +ActionContainerPrivate::ActionContainerPrivate(int id) + : m_data(CS_None), m_id(id) +{ + +} + +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 ActionContainer::commands() const -*/ - -/*! -\fn QList 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); - if (a->stateFlags() & Command::CS_PreLocation) { + if (a->stateFlags() & CommandPrivate::CS_PreLocation) { QList locs = a->locations(); for (int i=0; iactionContainer(locs.at(i).m_container)) { - ActionContainer *ac = static_cast(aci); + if (ActionContainer *aci = am->actionContainer(locs.at(i).m_container)) { + ActionContainerPrivate *ac = static_cast(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(menu); + if (!container->canBeAddedToMenu()) return; - ActionManager *am = ActionManager::instance(); + ActionManagerPrivate *am = ActionManagerPrivate::instance(); MenuActionContainer *mc = static_cast(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(aci); + if (ActionContainer *aci = am->actionContainer(loc.m_container)) { + ActionContainerPrivate *ac = static_cast(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 +QMenu *ActionContainerPrivate::menu() const { return 0; } -/*! - ... -*/ -QToolBar *ActionContainer::toolBar() const +QMenuBar *ActionContainerPrivate::menuBar() const { return 0; } -/*! - ... -*/ -QMenuBar *ActionContainer::menuBar() const +bool ActionContainerPrivate::canAddAction(Command *action) const { - return 0; -} - -/*! - ... -*/ -bool ActionContainer::canAddAction(ICommand *action) const -{ - if (action->type() != ICommand::CT_OverridableAction) + if (action->type() != Command::CT_OverridableAction) return false; - Command *cmd = static_cast(action); - if (cmd->stateFlags() & Command::CS_Initialized) + CommandPrivate *cmd = static_cast(action); + if (cmd->stateFlags() & CommandPrivate::CS_Initialized) return false; return true; } -/*! - ... -*/ -bool ActionContainer::canAddMenu(IActionContainer *menu) const -{ - if (menu->type() != IActionContainer::CT_Menu) - return false; - - ActionContainer *container = static_cast(menu); - if (container->hasState(ActionContainer::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); @@ -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(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) +bool MenuActionContainer::canBeAddedToMenu() const { - setEmptyAction(EA_None); + if (hasState(ActionContainerPrivate::CS_Initialized)) + return false; + + return true; } -/*! - ... -*/ -void ToolBarActionContainer::setToolBar(QToolBar *toolBar) -{ - m_toolBar = toolBar; -} - -/*! - ... -*/ -QToolBar *ToolBarActionContainer::toolBar() const -{ - return m_toolBar; -} - -/*! - ... -*/ -void ToolBarActionContainer::insertAction(QAction *before, QAction *action) -{ - m_toolBar->insertAction(before, action); -} - -/*! - ... -*/ -void ToolBarActionContainer::insertMenu(QAction *, QMenu *) -{ - // not implemented -} - -/*! - ... -*/ -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 6d116426f20..adad9a3d342 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 -#include +#include +#include +#include +#include +#include namespace Core { -namespace Internal { -class ActionContainer : public Core::IActionContainer +class Command; + +class ActionContainer : public QObject { public: - enum ContainerState { - CS_None = 0x000000, - CS_Initialized = 0x010000, - CS_PreLocation = 0x020000, - CS_UserDefined = 0x040000 + enum EmptyAction { + EA_Mask = 0xFF00, + EA_None = 0x0100, + EA_Hide = 0x0200, + EA_Disable = 0x0300 }; - ActionContainer(ContainerType type, int id); + virtual void setEmptyAction(EmptyAction ea) = 0; + + virtual int id() const = 0; + + virtual QMenu *menu() const = 0; + virtual QMenuBar *menuBar() const = 0; + + 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; + + virtual bool update() = 0; 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 commands() const { return m_commands; } - QList 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 m_groups; - int m_data; - ContainerType m_type; - int m_id; - QMap m_posmap; - QList m_subContainers; - QList 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 ToolBarActionContainer : public ActionContainer -{ -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(); - -private: - QToolBar *m_toolBar; -}; - -class MenuBarActionContainer : public ActionContainer -{ -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(); - -private: - QMenuBar *m_menuBar; -}; - -} // 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 00000000000..6521cff5748 --- /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 +#include + +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 commands() const { return m_commands; } + QList 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 m_groups; + int m_data; + int m_id; + QMap m_posmap; + QList m_subContainers; + QList 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 bc43374f0e4..3932d42598b 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 @@ -44,7 +44,6 @@ #include #include #include -#include #include 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()->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. + 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. - 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 + 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()->actionManager(); + QAction *myAction = new QAction(tr("My Action"), this); + Core::Command *cmd = am->registerAction(myAction, + "myplugin.myaction", + QList() << 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. + + 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 IActionContainer *ActionManagerInterface::createMenuBar(const QString &id) = 0 - ... + \fn ActionContainer *ActionManager::createMenuBar(const QString &id) + \brief Creates a new menu bar with the given string \a id. + + 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, const QList &context) = 0 - ... + \fn Command *ActionManager::registerAction(QAction *action, const QString &id, const QList &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 ICommand *ActionManagerInterface::registerShortcut(QShortcut *shortcut, const QString &id, const QList &context) = 0 - ... + \fn Command *ActionManager::registerShortcut(QShortcut *shortcut, const QString &id, const QList &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 ICommand *ActionManagerInterface::registerAction(QAction *action, const QString &id) = 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 void ActionManagerInterface::addAction(ICommand *action, const QString &globalGroup) = 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. -/*! - \fn virtual void ActionManagerInterface::addMenu(IActionContainer *menu, const QString &globalGroup) = 0 - ... + \sa ActionManager::createMenu() + \sa ActionManager::createMenuBar() */ - /*! - \fn virtual ICommand *ActionManagerInterface::command(const QString &id) const = 0 - ... + \fn ActionManager::ActionManager(QObject *parent) + \internal */ - /*! - \fn virtual IActionContainer *ActionManagerInterface::actionContainer(const QString &id) const = 0 - ... -*/ - -/*! - \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 ActionManager::defaultGroups() const +QList ActionManagerPrivate::defaultGroups() const { return m_defaultGroups; } -/*! - ... -*/ -QList ActionManager::commands() const +QList ActionManagerPrivate::commands() const { return m_idCmdMap.values(); } -/*! - ... -*/ -QList ActionManager::containers() const +QList 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 &context) +void ActionManagerPrivate::setContext(const QList &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 &context) it.value()->update(); } -/*! - \internal -*/ -bool ActionManager::hasContext(QList context) const +bool ActionManagerPrivate::hasContext(QList context) const { for (int i=0; i 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 &context) +Command *ActionManagerPrivate::registerAction(QAction *action, const QString &id, const QList &context) { OverrideableAction *a = 0; - ICommand *c = registerOverridableAction(action, id, false); + Command *c = registerOverridableAction(action, id, false); a = static_cast(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 &context) +Command *ActionManagerPrivate::registerShortcut(QShortcut *shortcut, const QString &id, const QList &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 dd5e2f61e92..8550aaf5d38 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 +#include "coreplugin/core_global.h" -#include -#include -#include +#include +#include + +#include +#include 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(); + ActionManager(QObject *parent = 0) : QObject(parent) {} + virtual ~ActionManager() {} - void setContext(const QList &context); - static ActionManager* instance(); + virtual ActionContainer *createMenu(const QString &id) = 0; + virtual ActionContainer *createMenuBar(const QString &id) = 0; - void saveSettings(QSettings *settings); - QList defaultGroups() const; + virtual Command *registerAction(QAction *action, const QString &id, const QList &context) = 0; + virtual Command *registerShortcut(QShortcut *shortcut, const QString &id, const QList &context) = 0; - QList commands() const; - QList 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 &context); - ICommand *registerAction(QAction *action, const QString &id); - ICommand *registerShortcut(QShortcut *shortcut, const QString &id, - const QList &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 context) const; - ICommand *registerOverridableAction(QAction *action, const QString &id, - bool checkUnique); - - static ActionManager* m_instance; - QList m_defaultGroups; - - typedef QHash IdCmdMap; - IdCmdMap m_idCmdMap; - - typedef QHash IdContainerMap; - IdContainerMap m_idContainerMap; - - typedef QMap GlobalGroupMap; - GlobalGroupMap m_globalgroups; - - QList m_context; - - 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 00000000000..31513276ec1 --- /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 + +#include +#include +#include + +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 &context); + static ActionManagerPrivate* instance(); + + void saveSettings(QSettings *settings); + QList defaultGroups() const; + + QList commands() const; + QList 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 &context); + Command *registerShortcut(QShortcut *shortcut, const QString &id, + const QList &context); + + Core::Command *command(const QString &id) const; + Core::ActionContainer *actionContainer(const QString &id) const; + +private: + bool hasContext(QList context) const; + Command *registerOverridableAction(QAction *action, const QString &id, + bool checkUnique); + + static ActionManagerPrivate* m_instance; + QList m_defaultGroups; + + typedef QHash IdCmdMap; + IdCmdMap m_idCmdMap; + + typedef QHash IdContainerMap; + IdContainerMap m_idContainerMap; + +// typedef QMap GlobalGroupMap; +// GlobalGroupMap m_globalgroups; +// + QList 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 f77e9ca484c..00000000000 --- 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 -#include - -#include -#include - -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 &context) = 0; - virtual ICommand *registerShortcut(QShortcut *shortcut, const QString &id, const QList &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 d5370e4ffee..21056cfc5dd 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 #include -#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() -*/ - -using namespace Core::Internal; - -/*! - \class Command - \ingroup qwb - \inheaderfile command.h -*/ - -/*! - \enum Command::CommandState -*/ - -/*! - \fn Command::Command(CommandType type, int id) -*/ -Command::Command(CommandType type, int id) - : m_type(type), m_id(id) -{ -} - /*! \fn virtual Command::~Command() */ +using namespace Core::Internal; + /*! - ... + \class CommandPrivate + \inheaderfile command_p.h + \internal */ -void Command::setStateFlags(int state) + +CommandPrivate::CommandPrivate(CommandType type, int id) + : m_type(type), m_id(id) +{ +} + +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 %2").arg(str).arg( keySequence().toString(QKeySequence::NativeText)); } -/*! - \fn virtual bool Command::setCurrentContext(const QList &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 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 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 848114c8b96..53342555d13 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 -#include -#include -#include +#include +#include #include 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); + 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 ~Command() {} - void setStateFlags(int state); - int stateFlags() const; + virtual QString stringWithAppendedShortcut(const QString &str) const = 0; - 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 &context) = 0; - - QString stringWithAppendedShortcut(const QString &str) const; - -protected: - QString m_category; - int m_type; - int m_id; - QKeySequence m_defaultKey; - QString m_defaultText; +signals: + void keySequenceChanged(); }; -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 &context); - QList context() const; - bool setCurrentContext(const QList &context); - - bool isActive() const; -private: - QList m_context; - QShortcut *m_shortcut; - QString m_defaultText; -}; - -class Action : public Command -{ - 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 &locations); - QList locations() const; - -protected: - void updateToolTipWithKeySequence(); - - QAction *m_action; - QList m_locations; - QString m_toolTip; -}; - -class OverrideableAction : public Action -{ - Q_OBJECT - -public: - OverrideableAction(int id); - - void setAction(QAction *action); - bool setCurrentContext(const QList &context); - void addOverrideAction(QAction *action, const QList &context); - bool isActive() const; - -private slots: - void actionChanged(); - -private: - QPointer m_currentAction; - QList m_context; - QMap > m_contextActionMap; - bool m_active; - bool m_contextInitialized; -}; - -} // 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 00000000000..c41053bb55e --- /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 +#include +#include +#include + +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 &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 &context); + QList context() const; + bool setCurrentContext(const QList &context); + + bool isActive() const; +private: + QList 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 &locations); + QList locations() const; + +protected: + void updateToolTipWithKeySequence(); + + QAction *m_action; + QList m_locations; + QString m_toolTip; +}; + +class OverrideableAction : public Action +{ + Q_OBJECT + +public: + OverrideableAction(int id); + + void setAction(QAction *action); + bool setCurrentContext(const QList &context); + void addOverrideAction(QAction *action, const QList &context); + bool isActive() const; + +private slots: + void actionChanged(); + +private: + QPointer m_currentAction; + QList m_context; + QMap > 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 99602efaa85..abdecf43660 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 diff --git a/src/plugins/coreplugin/actionmanager/commandsfile.h b/src/plugins/coreplugin/actionmanager/commandsfile.h index 7c515a32c26..79eeaed6311 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 ad510393521..00000000000 --- 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 -#include -#include -#include -#include - -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 7ab5145b74a..00000000000 --- 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 - -#include -#include -#include - -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 468c76a0dc6..aad82af6677 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 d530b728aa5..40e98793cb9 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 1a428aa4df7..ea2d202fc24 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 c6fea7d4807..bca1f24347b 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 5367062d371..ae93c281fa5 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) ** @@ -33,7 +33,7 @@ #include "baseview.h" -#include +#include using namespace Core; diff --git a/src/plugins/coreplugin/baseview.h b/src/plugins/coreplugin/baseview.h index 0312de6613b..a39e4dc8ca2 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 630b660c0c9..6fe5d150107 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 dd8155db820..cdada0a1ccb 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) ** @@ -34,8 +34,6 @@ #ifndef CORECONSTANTS_H #define CORECONSTANTS_H -#include - namespace Core { namespace Constants { diff --git a/src/plugins/coreplugin/coreimpl.cpp b/src/plugins/coreplugin/coreimpl.cpp index cd96a9c24fc..68653b52fc7 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(); } @@ -94,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(); } diff --git a/src/plugins/coreplugin/coreimpl.h b/src/plugins/coreplugin/coreimpl.h index fc5375d3701..b09de4101f6 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,14 +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; 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; diff --git a/src/plugins/coreplugin/coreplugin.cpp b/src/plugins/coreplugin/coreplugin.cpp index 252e7cc2073..4b18570037a 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) ** diff --git a/src/plugins/coreplugin/coreplugin.h b/src/plugins/coreplugin/coreplugin.h index a8341c97e90..020f407829a 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.pro b/src/plugins/coreplugin/coreplugin.pro index 2dc558a5422..7ba648c1619 100644 --- a/src/plugins/coreplugin/coreplugin.pro +++ b/src/plugins/coreplugin/coreplugin.pro @@ -98,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 \ @@ -112,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 \ @@ -132,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 df38e3562a6..f00c14ef9f0 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 53216a0ed3d..e8417349a2e 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 a77d5935416..3aee7e994e1 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 057d2e82697..d1169ddd3c0 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 35a5152b17e..620e65177bc 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 b4ff9675082..e4acc6a339b 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 36da081e2dd..6d7547cca96 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 471c74b2b44..a2543c98a2a 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 e2865bf1830..669ea09bf92 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 6dd8a2a37da..6a9194a8176 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 ec1c3975c4d..3d51e00b874 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 -#include +#include #include #include @@ -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 categories; - m_am = ActionManager::instance(); + m_am = ActionManagerPrivate::instance(); UniqueIDManager *uidm = CoreImpl::instance()->uniqueIDManager(); - QList cmds = m_am->commands(); + QList 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 99d4a8fbbc4..0466c84e6ec 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 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 503c52ac8f7..dacb31e355c 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 2f7555915d8..423480a553a 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 91adef17805..d487f79374b 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 83eb6cf240d..bd384be6f05 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 1eb3abb133d..8a135183579 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 #include #include -#include +#include #include #include #include @@ -207,13 +207,13 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) : const QList editManagerContext = QList() << 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())); @@ -227,7 +227,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); @@ -258,7 +258,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())); @@ -315,8 +315,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")); @@ -1391,7 +1391,7 @@ void EditorManager::readSettings(QSettings *settings) if (settings->contains(QLatin1String("EditorManager/DocumentStates"))) m_d->m_editorStates = settings->value(QLatin1String("EditorManager/DocumentStates")) .value >(); - 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 eec20a4a05d..004bcaba87a 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 370cae409fd..7e4f53f4e40 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 #include #include -#include +#include #include @@ -72,9 +72,9 @@ void EditorSplitter::registerActions() const QList editorManagerContext = QList() << 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 0a52aa77449..94aac2df231 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 02f65d94e00..c650d43c26c 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 c3a25162c7a..eabf81c0a3a 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 755826c94a4..63950714942 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 4aa9743e753..be17df06459 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 c7fe93b7155..f9fe4ffe5cc 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 270849fb1f7..c715beb559d 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 0111be02b76..edceea70002 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 250e643c86e..7557830239e 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 a4da55d393a..b144a731ad4 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 e7946e8ed95..07a3c984556 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 ccf9c92322c..1302dc71d67 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 58a59794370..24865fe8d0e 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 0c4b4a39de1..bf48ba37013 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 ce4939605a5..8a92666ba4e 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 27276fbe149..c4f515547a1 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 817c0d2a5ab..bffbb088355 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 866b9eadcd4..b3416f01b44 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 860b16a7878..c7d36d6328a 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 c48190f9e2e..95097f74e52 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 efdd3a72807..af709c2bd16 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 294bb36dec8..b21b96fd5e4 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 ead56930333..aff4d0c8809 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 3a45cfa4123..b2d32d4d846 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 index 317ebbbc45a..5d6d3274177 100644 --- a/src/plugins/coreplugin/icore.cpp +++ b/src/plugins/coreplugin/icore.cpp @@ -1,3 +1,36 @@ +/*************************************************************************** +** +** 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" /*! @@ -51,7 +84,7 @@ */ /*! - \fn ActionManagerInterface *ICore::actionManager() const + \fn ActionManager *ICore::actionManager() const \brief Returns the application's action manager. The action manager is responsible for registration of menus and @@ -98,7 +131,7 @@ */ /*! - \fn ProgressManagerInterface *ICore::progressManager() const + \fn ProgressManager *ICore::progressManager() const \brief Returns the application's progress manager. Use the progress manager to register a concurrent task to @@ -106,7 +139,7 @@ */ /*! - \fn ScriptManagerInterface *ICore::scriptManager() const + \fn ScriptManager *ICore::scriptManager() const \internal */ diff --git a/src/plugins/coreplugin/icore.h b/src/plugins/coreplugin/icore.h index 53ff1e96f90..7244782b495 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,15 +50,15 @@ QT_END_NAMESPACE namespace Core { // forward declarations -class ActionManagerInterface; +class ActionManager; class IFile; class FileManager; class MessageManager; class IEditor; class UniqueIDManager; class EditorManager; -class ProgressManagerInterface; -class ScriptManagerInterface; +class ProgressManager; +class ScriptManager; class VariableManager; class IContext; class VCSManager; @@ -81,14 +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 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; diff --git a/src/plugins/coreplugin/icorelistener.h b/src/plugins/coreplugin/icorelistener.h index c0aab3b1aae..25468fbfd1a 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 a6ecdfbcb05..7ac816dcf88 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 d208d447f68..cd69fd5127d 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 6e2c36c7594..76c94957653 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 58602c083b6..34e04559906 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 f2ac6d8d539..4d64ad65876 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 a8f1dbbe42c..e3bb73e7b30 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 44d2d09291a..7c4bfcb28bb 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 4e82731b77c..12c4667f206 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 fb472b73475..0bce0f53544 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 b368ad8cf4d..9dc93c0133d 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), @@ -186,6 +186,7 @@ MainWindow::MainWindow() : QCoreApplication::setOrganizationName(QLatin1String("Nokia")); QSettings::setDefaultFormat(QSettings::IniFormat); QString baseName = qApp->style()->objectName(); +#ifdef Q_WS_X11 if (baseName == "windows") { // Sometimes we get the standard windows 95 style as a fallback // e.g. if we are running on a KDE4 desktop @@ -195,6 +196,7 @@ MainWindow::MainWindow() : else baseName = "cleanlooks"; } +#endif qApp->setStyle(new ManhattanStyle(baseName)); statusBar()->setProperty("p_styled", true); } @@ -283,11 +285,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 +365,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 +380,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 +394,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 +420,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 &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 +508,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 +541,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 +553,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); @@ -815,7 +818,7 @@ void MainWindow::openFileWith() } } -ActionManagerInterface *MainWindow::actionManager() const +ActionManager *MainWindow::actionManager() const { return m_actionManager; } @@ -845,12 +848,12 @@ 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; } @@ -962,17 +965,6 @@ void MainWindow::resetContext() updateContextObject(0); } -QMenu *MainWindow::createPopupMenu() -{ - QMenu *menu = new QMenu(this); - QList 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"; @@ -1066,7 +1058,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 913e6728e71..4a1c08f16ef 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,14 +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; 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; @@ -128,8 +128,6 @@ public: void updateContext(); - QMenu *createPopupMenu(); - void setSuppressNavigationWidget(bool suppress); signals: @@ -176,12 +174,12 @@ private: QList 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 9237883221b..a38a6c9774b 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 991d976a79e..1f61b931e9d 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 081dfb68327..1b74995ef4d 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 6e28b0a7e30..12a1524cb47 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 8833507ff54..9a37af27a03 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 44bf29ca1cf..03ae5854643 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 abca6a8e51d..5e57da02241 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 2f43be45cd4..d7d696bd723 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 1270a9ccf3f..7cd3653b541 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 0a2beaf17ae..2e7fbcc4b74 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 2e1713d05f9..579881a215d 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 -#include -#include +#include +#include #include #include #include @@ -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() << Constants::C_GLOBAL_ID); + Command *cmd = am->registerShortcut(shortcut, shortcutId, QList() << 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(sender()); + Command *cmd = qobject_cast(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 d3b328c29e0..4d783f461d6 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 m_actions; + QMap m_actions; QVector m_modes; - QVector m_modeShortcuts; + QVector m_modeShortcuts; QSignalMapper *m_signalMapper; QList m_addedContexts; }; diff --git a/src/plugins/coreplugin/navigationwidget.cpp b/src/plugins/coreplugin/navigationwidget.cpp index 491c3943438..41b5116ba54 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,8 +38,7 @@ #include #include #include -#include -#include +#include #include #include @@ -316,14 +315,14 @@ void NavigationWidget::objectAdded(QObject * obj) return; Core::ICore *core = ExtensionSystem::PluginManager::instance()->getObject(); - Core::ActionManagerInterface *am = core->actionManager(); + Core::ActionManager *am = core->actionManager(); QList navicontext = QList() << 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 +491,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 commandMap = m_parentWidget->commandMap(); - QHash::const_iterator r = commandMap.find(title); + const QHash commandMap = m_parentWidget->commandMap(); + QHash::const_iterator r = commandMap.find(title); if (r != commandMap.end()) return r.value(); return 0; @@ -510,7 +509,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 77dbf43ecef..016fbcd0bda 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 commandMap() const { return m_commandMap; } + QHash commandMap() const { return m_commandMap; } protected: void resizeEvent(QResizeEvent *); @@ -113,7 +113,7 @@ private: NavigationSubWidget *insertSubItem(int position); QList m_subWidgets; QHash m_shortcutMap; - QHash m_commandMap; + QHash 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 6b5c3b146d1..36fc9de9cf8 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 -#include +#include +#include #include #include @@ -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 096567a8a66..5a7c928a546 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 829c28e9c39..29ea470411c 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 c264978918b..ace03bb3c17 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 476a80a3667..bfd00ef37b3 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 8b286dbf217..5f8e5353b3f 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 ab1b0370323..968d2bb9fc8 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,7 +31,7 @@ ** ***************************************************************************/ -#include "progressmanager.h" +#include "progressmanager_p.h" #include "progressview.h" #include "coreimpl.h" #include "baseview.h" @@ -44,23 +44,23 @@ 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 *, QString>::iterator task = m_runningTasks.begin(); while (task != m_runningTasks.end()) { @@ -75,7 +75,7 @@ void ProgressManager::cancelTasks(const QString &type) } } -void ProgressManager::cancelAllRunningTasks() +void ProgressManagerPrivate::cancelAllRunningTasks() { QMap *, QString>::const_iterator task = m_runningTasks.constBegin(); while (task != m_runningTasks.constEnd()) { @@ -87,7 +87,7 @@ void ProgressManager::cancelAllRunningTasks() m_runningTasks.clear(); } -FutureProgress *ProgressManager::addTask(const QFuture &future, const QString &title, const QString &type, PersistentType persistency) +FutureProgress *ProgressManagerPrivate::addTask(const QFuture &future, const QString &title, const QString &type, PersistentType persistency) { QFutureWatcher *watcher = new QFutureWatcher(); m_runningTasks.insert(watcher, type); @@ -96,12 +96,12 @@ FutureProgress *ProgressManager::addTask(const QFuture &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 7df78fe26b8..a82bd24b517 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 +#include -#include -#include -#include +#include +#include +#include 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 &future, const QString &title, const QString &type, PersistentType persistency); + ProgressManager(QObject *parent = 0) : QObject(parent) {} + virtual ~ProgressManager() {} - QWidget *progressView(); + virtual FutureProgress *addTask(const QFuture &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 m_progressView; - QMap *, 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 2d64ca6f072..92140904b05 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 +#include "progressmanager.h" -#include #include +#include +#include -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 &future, const QString &title, const QString &type, PersistentType persistency); + + QWidget *progressView(); + +public slots: + void cancelTasks(const QString &type); private slots: - void focusCurrentEditor(Core::IMode *mode); - + void taskFinished(); + void cancelAllRunningTasks(); private: - QToolBar *createToolBar(); - void writeSettings() const; - void readSettings(); - - QPointer m_manager; - QAction *m_toggleLockedAction; + QPointer m_progressView; + QMap *, 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 620b369c547..be2a3e124b5 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 1914b51b13b..e878a024ea4 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 a4e686d494b..cee81c697b0 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 &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 &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 455362009cf..939b162639e 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 #include @@ -59,7 +59,7 @@ public: FutureProgress *addTask(const QFuture &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 389afbced91..69c0e51e188 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 84739ab4e66..776b9fdb2bb 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 6431e426519..1e068b7cf45 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 5d1b58ea0f0..de98aecb215 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) ** diff --git a/src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.h b/src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.h index b1db715f8c4..d90030bc9a7 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) ** diff --git a/src/plugins/coreplugin/scriptmanager/scriptmanager.cpp b/src/plugins/coreplugin/scriptmanager/scriptmanager.cpp index 084888c4dd2..937af4f66a3 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,11 +31,10 @@ ** ***************************************************************************/ -#include "scriptmanager.h" +#include "scriptmanager_p.h" #include "qworkbench_wrapper.h" #include "metatypedeclarations.h" -#include #include #include #include @@ -177,19 +176,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 +199,7 @@ QScriptEngine &ScriptManager::scriptEngine() // demoProjectExplorer()@:237 // ()@:276 // ()@: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 +212,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 +220,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 +246,7 @@ bool ScriptManager::runScript(const QString &script, QString *errorMessage, Stac return !failed; } -void ScriptManager::ensureEngineInitialized() +void ScriptManagerPrivate::ensureEngineInitialized() { if (m_initialized) return; @@ -304,7 +303,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 305da45ca3a..c39cc21e0a0 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 -#include +#include #include -#include +#include #include 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); + // 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 Stack; - virtual QScriptEngine &scriptEngine(); + ScriptManager(QObject *parent = 0) : QObject(parent) {} + virtual ~ScriptManager() { } - virtual bool runScript(const QString &script, QString *errorMessage, Stack *stack); - virtual bool runScript(const QString &script, QString *errorMessage); + // Access the engine (for plugins to wrap additional interfaces). + virtual QScriptEngine &scriptEngine() = 0; - static QString engineError(QScriptEngine &scriptEngine); - -private: - void ensureEngineInitialized(); - - 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 8bb55cc96dd..40768f0fa9b 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 -#include +#include +#include #include -#include -#include +#include +#include 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); - ProgressManagerInterface(QObject *parent = 0) : QObject(parent) {} - virtual ~ProgressManagerInterface() {} + virtual QScriptEngine &scriptEngine(); - virtual FutureProgress *addTask(const QFuture &future, const QString &title, const QString &type, PersistentType persistency = KeepOnFinish) = 0; + virtual bool runScript(const QString &script, QString *errorMessage, Stack *stack); + virtual bool runScript(const QString &script, QString *errorMessage); -public slots: - virtual void cancelTasks(const QString &type) = 0; + static QString engineError(QScriptEngine &scriptEngine); + +private: + void ensureEngineInitialized(); + + 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/scriptmanager/scriptmanagerinterface.h b/src/plugins/coreplugin/scriptmanager/scriptmanagerinterface.h deleted file mode 100644 index d8273ac9584..00000000000 --- a/src/plugins/coreplugin/scriptmanager/scriptmanagerinterface.h +++ /dev/null @@ -1,76 +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 SCRIPTMANAGERINTERFACE_H -#define SCRIPTMANAGERINTERFACE_H - -#include - -#include -#include -#include - -namespace Core { - -/* 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 ScriptManagerInterface : 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; - }; - typedef QList Stack; - - ScriptManagerInterface(QObject *parent = 0) : QObject(parent) {} - virtual ~ScriptManagerInterface() { } - - // Access the engine (for plugins to wrap additional interfaces). - virtual QScriptEngine &scriptEngine() = 0; - - // Run a script - virtual bool runScript(const QString &script, QString *errorMessage, Stack *errorStack) = 0; - virtual bool runScript(const QString &script, QString *errorMessage) = 0; -}; - -} // namespace Core - -#endif // SCRIPTMANAGERINTERFACE_H diff --git a/src/plugins/coreplugin/sidebar.cpp b/src/plugins/coreplugin/sidebar.cpp index 17887450d9b..b84947d3706 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 #include @@ -206,12 +206,12 @@ void SideBar::activateItem(SideBarItem *item) item->widget()->setFocus(); } -void SideBar::setShortcutMap(const QMap &shortcutMap) +void SideBar::setShortcutMap(const QMap &shortcutMap) { m_shortcutMap = shortcutMap; } -QMap SideBar::shortcutMap() const +QMap 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 shortcutMap = m_sideBar->shortcutMap(); - QMap::const_iterator r = shortcutMap.find(title); + const QMap shortcutMap = m_sideBar->shortcutMap(); + QMap::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 dd8e5727c19..e5b1f9c3afa 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 &shortcutMap); - QMap shortcutMap() const; + void setShortcutMap(const QMap &shortcutMap); + QMap shortcutMap() const; private slots: void split(); @@ -126,7 +126,7 @@ private: QMap m_itemMap; QStringList m_availableItems; QStringList m_defaultVisible; - QMap m_shortcutMap; + QMap 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 fa8ccd93de2..f0fda1f512c 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 f4b6e9f95ce..7a75056af5d 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 9fcb5180deb..b102f6e2086 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 ec46f9a1c57..3a1e8f5b4a2 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 2de5da922b7..ae292a785a4 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 4c5290596f2..55162cb838f 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 b06d6a7e590..475448935b1 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 1aa8489685b..0a8ed6fcd07 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 9a5c9dd783f..793ca04f1b7 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 10a0efde9de..dc85e8dc3ff 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 c2f18a0b1cd..1ac0d698e1a 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 753db773805..3947fc8cb62 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 52810c00efc..a61e29e50d7 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 "
" "
" - "Copyright 2006-%3 %4. All rights reserved.
" + "Copyright 2008-%3 %4. All rights reserved.
" "
" "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 c7ba26db0e9..bfa61f1d52d 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 5032d45b4d4..a7a2bf9a45e 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,9 +38,8 @@ #include "uniqueidmanager.h" #include "iview.h" -#include -#include -#include +#include +#include #include #include diff --git a/src/plugins/coreplugin/viewmanager.h b/src/plugins/coreplugin/viewmanager.h index c22e68d891d..80d24ed775c 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 0eb21187ccb..24813cc9414 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 a0f5f98b998..ee66ac7f33c 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 05ba96c3eee..bcd205072f8 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 548c48be7d3..1ab4daa0a4a 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 #include #include -#include +#include #include #include #include @@ -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 9940df0840c..56c41144a96 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) ** @@ -40,8 +40,8 @@ #include #include -#include #include +#include #include diff --git a/src/plugins/cpaster/settingspage.cpp b/src/plugins/cpaster/settingspage.cpp index af35e7e576d..33363063617 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 9f2b4b25f7b..a492030752c 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 4ecb56b884c..ecdcc110197 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 177d8a1fbb1..b117dc7ad09 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 1eb298aa378..c8e9a946b90 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 #include -#include +#include #include #include #include @@ -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 3667b5d6f7f..6773a5308ae 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 c1d8f32db72..dad179aea73 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 4eb4543a679..f8f2510523b 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 6a0391c1e8a..12428c3343e 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 96359b0bb65..f0c7bff4c34 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 07398bac9d4..9b4ce75c0d7 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 df464aa576f..d65fed17669 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 adb94d911f4..51c91d9465c 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 0eb3b67e69b..f7d12b0add7 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 3df54c26acb..3c74460e653 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 6ebf51b2a2c..febf86f6510 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 d8bd48031c3..27daccc35d7 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 c30bc97f29d..077bea90274 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 #include #include -#include -#include +#include +#include #include #include #include @@ -194,10 +194,10 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess QList 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 42dae09c6f6..52655e6ae70 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 a885f45e06d..589b1b399e4 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 b241ccd3b12..c59ed87e17d 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 04c3bffd87b..212db82700b 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 9cf52ac6829..a84931d64c7 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 2cd859ecb9e..573c9a25466 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 &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 5720adbbc51..6d4690babca 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 3bf2137dff6..f9b031c68ae 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 f8476001d72..43145c95b49 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 df611294751..49e7cbfc7db 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 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 570ee58f451..361c714fee7 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 0247c9c514e..ca1c57f8635 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 03bd8d78bb2..135876cf7d7 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 b867194f689..d52aee62ba6 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 7b63a15b813..1793c738769 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 8279eef501d..42a0def4d6a 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 73e34e41132..5a907a2d175 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 042e5dcd1cf..2bce101e523 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 866a3d05c94..5ec67bf4a35 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 #include #include -#include +#include #include #include @@ -81,7 +81,7 @@ CppToolsPlugin::~CppToolsPlugin() bool CppToolsPlugin::initialize(const QStringList & /*arguments*/, QString *) { m_core = ExtensionSystem::PluginManager::instance()->getObject(); - 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 context = QList() << 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 39af36e86f1..092de535b3e 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) ** @@ -35,7 +35,7 @@ #define CPPTOOLS_H #include -#include +#include QT_BEGIN_NAMESPACE class QFileInfo; diff --git a/src/plugins/cpptools/searchsymbols.cpp b/src/plugins/cpptools/searchsymbols.cpp index 1d555fd6265..9e5c1160772 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 e3cba1f30fd..9e4fd1c2529 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 7ca50470fb5..5177605ac81 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 d04d1bd61b5..83e5fbdc88b 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 e13d7b6ebc2..f7868bab0da 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 5e0bee93490..7558284f04c 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 7f8d48da732..a03586e55e2 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 9d4c82ec205..31c24d352f2 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 a86f1b2e827..16ff2bcfd62 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 1db2175e8bb..4915b7fc5fa 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 b47e7d5ee02..5a21d6a42d7 100644 --- a/src/plugins/debugger/debugger.pro +++ b/src/plugins/debugger/debugger.pro @@ -22,12 +22,10 @@ HEADERS += attachexternaldialog.h \ debuggeroutputwindow.h \ debuggerplugin.h \ debuggerrunner.h \ - mode.h \ disassemblerhandler.h \ disassemblerwindow.h \ gdbengine.h \ gdbmi.h \ - gdboptionpage.h \ idebuggerengine.h \ imports.h \ moduleshandler.h \ @@ -52,12 +50,10 @@ SOURCES += attachexternaldialog.cpp \ debuggeroutputwindow.cpp \ debuggerplugin.cpp \ debuggerrunner.cpp \ - mode.cpp \ disassemblerhandler.cpp \ disassemblerwindow.cpp \ gdbengine.cpp \ gdbmi.cpp \ - gdboptionpage.cpp \ gdbengine.h \ moduleshandler.cpp \ moduleswindow.cpp \ diff --git a/src/plugins/debugger/debuggerconstants.h b/src/plugins/debugger/debuggerconstants.h index 5215870976a..7cec9b8ba59 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 2d6def04da4..ea0e6623b06 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) ** @@ -86,6 +86,18 @@ using namespace Debugger::Constants; static const QString tooltipIName = "tooltip"; + +DebuggerSettings::DebuggerSettings() +{ + m_autoRun = false; + m_autoQuit = false; + m_skipKnownFrames = false; + m_debugDumpers = false; + m_useToolTips = false; + m_useToolTips = false; + m_useCustomDumpers = true; +} + /////////////////////////////////////////////////////////////////////// // // BreakByFunctionDialog @@ -322,56 +334,6 @@ void DebuggerManager::init() m_breakAtMainAction = new QAction(this); m_breakAtMainAction->setText(tr("Set Breakpoint at Function 'main'")); - m_debugDumpersAction = new QAction(this); - m_debugDumpersAction->setText(tr("Debug Custom Dumpers")); - m_debugDumpersAction->setToolTip(tr("This is an internal tool to " - "make debugging the Custom Data Dumper code easier. " - "Using this action is in general not needed unless you " - "want do debug Qt Creator itself.")); - m_debugDumpersAction->setCheckable(true); - - m_skipKnownFramesAction = new QAction(this); - m_skipKnownFramesAction->setText(tr("Skip Known Frames When Stepping")); - m_skipKnownFramesAction->setToolTip(tr("After checking this option" - "'Step Into' combines in certain situations several steps, " - "leading to 'less noisy' debugging. So will, e.g., the atomic " - "reference counting code be skipped, and a single 'Step Into' " - "for a signal emission will end up directly in the slot connected " - "to it")); - m_skipKnownFramesAction->setCheckable(true); - - m_useCustomDumpersAction = new QAction(this); - m_useCustomDumpersAction->setText(tr("Use Custom Display for Qt Objects")); - m_useCustomDumpersAction->setToolTip(tr("Checking this will make the debugger " - "try to use code to format certain data (QObject, QString, ...) nicely. ")); - m_useCustomDumpersAction->setCheckable(true); - m_useCustomDumpersAction->setChecked(true); - - m_useFastStartAction = new QAction(this); - m_useFastStartAction->setText(tr("Fast Debugger Start")); - m_useFastStartAction->setToolTip(tr("Checking this will make the debugger " - "start fast by loading only very few debug symbols on start up. This " - "might lead to situations where breakpoints can not be set properly. " - "So uncheck this option if you experience breakpoint related problems.")); - m_useFastStartAction->setCheckable(true); - m_useFastStartAction->setChecked(true); - - m_useToolTipsAction = new QAction(this); - m_useToolTipsAction->setText(tr("Use Tooltips While Debugging")); - m_useToolTipsAction->setToolTip(tr("Checking this will make enable " - "tooltips for variable values during debugging. Since this can slow " - "down debugging and does not provide reliable information as it does " - "not use scope information, it is switched off by default.")); - m_useToolTipsAction->setCheckable(true); - m_useToolTipsAction->setChecked(false); - - // FIXME - m_useFastStartAction->setChecked(false); - m_useFastStartAction->setEnabled(false); - - m_dumpLogAction = new QAction(this); - m_dumpLogAction->setText(tr("Dump Log File for Debugging Purposes")); - m_watchAction = new QAction(this); m_watchAction->setText(tr("Add to Watch Window")); @@ -416,14 +378,6 @@ void DebuggerManager::init() connect(m_breakAtMainAction, SIGNAL(triggered()), this, SLOT(breakAtMain())); - connect(m_useFastStartAction, SIGNAL(triggered()), - this, SLOT(saveSessionData())); - connect(m_useCustomDumpersAction, SIGNAL(triggered()), - this, SLOT(saveSessionData())); - connect(m_skipKnownFramesAction, SIGNAL(triggered()), - this, SLOT(saveSessionData())); - connect(m_dumpLogAction, SIGNAL(triggered()), - this, SLOT(dumpLog())); connect(m_statusTimer, SIGNAL(timeout()), this, SLOT(clearStatusMessage())); @@ -483,11 +437,6 @@ IDebuggerManagerAccessForEngines *DebuggerManager::engineInterface() return dynamic_cast(this); } -IDebuggerManagerAccessForDebugMode *DebuggerManager::debugModeInterface() -{ - return dynamic_cast(this); -} - void DebuggerManager::createDockWidgets() { QSplitter *localsAndWatchers = new QSplitter(Qt::Vertical, 0); @@ -952,16 +901,6 @@ void DebuggerManager::loadSessionData() { m_breakHandler->loadSessionData(); m_watchHandler->loadSessionData(); - - QVariant value; - querySessionValue(QLatin1String("UseFastStart"), &value); - m_useFastStartAction->setChecked(value.toBool()); - querySessionValue(QLatin1String("UseToolTips"), &value); - m_useToolTipsAction->setChecked(value.toBool()); - querySessionValue(QLatin1String("UseCustomDumpers"), &value); - m_useCustomDumpersAction->setChecked(!value.isValid() || value.toBool()); - querySessionValue(QLatin1String("SkipKnownFrames"), &value); - m_skipKnownFramesAction->setChecked(value.toBool()); engine()->loadSessionData(); } @@ -969,15 +908,6 @@ void DebuggerManager::saveSessionData() { m_breakHandler->saveSessionData(); m_watchHandler->saveSessionData(); - - setSessionValue(QLatin1String("UseFastStart"), - m_useFastStartAction->isChecked()); - setSessionValue(QLatin1String("UseToolTips"), - m_useToolTipsAction->isChecked()); - setSessionValue(QLatin1String("UseCustomDumpers"), - m_useCustomDumpersAction->isChecked()); - setSessionValue(QLatin1String("SkipKnownFrames"), - m_skipKnownFramesAction->isChecked()); engine()->saveSessionData(); } @@ -1144,22 +1074,22 @@ void DebuggerManager::setBusyCursor(bool busy) bool DebuggerManager::skipKnownFrames() const { - return m_skipKnownFramesAction->isChecked(); + return m_settings.m_skipKnownFrames; } bool DebuggerManager::debugDumpers() const { - return m_debugDumpersAction->isChecked(); + return m_settings.m_debugDumpers; } bool DebuggerManager::useCustomDumpers() const { - return m_useCustomDumpersAction->isChecked(); + return m_settings.m_useCustomDumpers; } bool DebuggerManager::useFastStart() const { - return 0; // && m_useFastStartAction->isChecked(); + return 0; // && m_settings.m_useFastStart; } void DebuggerManager::queryCurrentTextEditor(QString *fileName, int *lineNumber, diff --git a/src/plugins/debugger/debuggermanager.h b/src/plugins/debugger/debuggermanager.h index 4ae7e66a87d..9a5b5da37d3 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) ** @@ -167,8 +167,8 @@ private: virtual WatchHandler *watchHandler() = 0; virtual void showApplicationOutput(const QString &prefix, const QString &data) = 0; - virtual QAction *useCustomDumpersAction() const = 0; - virtual QAction *debugDumpersAction() const = 0; + //virtual QAction *useCustomDumpersAction() const = 0; + //virtual QAction *debugDumpersAction() const = 0; virtual bool skipKnownFrames() const = 0; virtual bool debugDumpers() const = 0; virtual bool useCustomDumpers() const = 0; @@ -181,31 +181,35 @@ private: // -// IDebuggerManagerAccessForDebugMode +// DebuggerSettings // -class IDebuggerManagerAccessForDebugMode +class DebuggerSettings { public: - virtual ~IDebuggerManagerAccessForDebugMode() {} + DebuggerSettings(); -private: - friend class DebugMode; +public: + QString m_gdbCmd; + QString m_gdbEnv; + bool m_autoRun; + bool m_autoQuit; - virtual QWidget *threadsWindow() const = 0; - virtual QLabel *statusLabel() const = 0; - virtual QList dockWidgets() const = 0; - virtual void createDockWidgets() = 0; + bool m_useCustomDumpers; + bool m_skipKnownFrames; + bool m_debugDumpers; + bool m_useFastStart; + bool m_useToolTips; + + QString m_scriptFile; }; - // // DebuggerManager // class DebuggerManager : public QObject, - public IDebuggerManagerAccessForEngines, - public IDebuggerManagerAccessForDebugMode + public IDebuggerManagerAccessForEngines { Q_OBJECT @@ -214,9 +218,9 @@ public: ~DebuggerManager(); IDebuggerManagerAccessForEngines *engineInterface(); - IDebuggerManagerAccessForDebugMode *debugModeInterface(); QMainWindow *mainWindow() const { return m_mainWindow; } QLabel *statusLabel() const { return m_statusLabel; } + DebuggerSettings *settings() { return &m_settings; } enum StartMode { startInternal, startExternal, attachExternal }; enum DebuggerType { GdbDebugger, ScriptDebugger, WinDebugger }; @@ -307,9 +311,9 @@ private: StackHandler *stackHandler() { return m_stackHandler; } ThreadsHandler *threadsHandler() { return m_threadsHandler; } WatchHandler *watchHandler() { return m_watchHandler; } - QAction *useCustomDumpersAction() const { return m_useCustomDumpersAction; } - QAction *useToolTipsAction() const { return m_useToolTipsAction; } - QAction *debugDumpersAction() const { return m_debugDumpersAction; } + //QAction *useCustomDumpersAction() const { return m_useCustomDumpersAction; } + //QAction *useToolTipsAction() const { return m_useToolTipsAction; } + //QAction *debugDumpersAction() const { return m_debugDumpersAction; } bool skipKnownFrames() const; bool debugDumpers() const; bool useCustomDumpers() const; @@ -363,7 +367,6 @@ signals: void setConfigValueRequested(const QString &name, const QVariant &value); void applicationOutputAvailable(const QString &prefix, const QString &msg); - public: // FIXME: make private QString m_executable; @@ -427,13 +430,6 @@ private: QAction *m_sepAction; QAction *m_stepIAction; QAction *m_nextIAction; - QAction *m_skipKnownFramesAction; - - QAction *m_debugDumpersAction; - QAction *m_useCustomDumpersAction; - QAction *m_useFastStartAction; - QAction *m_useToolTipsAction; - QAction *m_dumpLogAction; QWidget *m_breakWindow; QWidget *m_disassemblerWindow; @@ -453,9 +449,9 @@ private: IDebuggerEngine *engine(); IDebuggerEngine *m_engine; + DebuggerSettings m_settings; }; - } // namespace Internal } // namespace Debugger diff --git a/src/plugins/debugger/debuggeroutputwindow.cpp b/src/plugins/debugger/debuggeroutputwindow.cpp index 6818ee9620b..3a8afcde2aa 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 d530d501e4b..5df743923a6 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 d65f9ac9acd..bf8edf404e2 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) ** @@ -36,18 +36,27 @@ #include "debuggerconstants.h" #include "debuggermanager.h" #include "debuggerrunner.h" -#include "gdboptionpage.h" #include "gdbengine.h" -#include "mode.h" -#include +#include "ui_gdboptionpage.h" + +#include +#include #include +#include #include +#include #include #include +#include #include +#include +#include +#include #include +#include + #include #include @@ -68,17 +77,21 @@ #include #include +#include +#include +#include #include #include #include -using namespace Debugger::Internal; -using namespace Debugger::Constants; -using namespace TextEditor; +namespace ExtensionSystem { class PluginManager; } + using namespace Core; +using namespace Debugger::Constants; +using namespace Debugger::Internal; using namespace ProjectExplorer; -using namespace CPlusPlus; +using namespace TextEditor; namespace Debugger { @@ -137,14 +150,57 @@ const char * const ADD_TO_WATCH_KEY = "Ctrl+Alt+Q"; } // namespace Debugger +/////////////////////////////////////////////////////////////////////// +// +// DebugMode +// +/////////////////////////////////////////////////////////////////////// + +namespace Debugger { +namespace Internal { + +class DebugMode : public Core::BaseMode +{ + Q_OBJECT + +public: + DebugMode(QObject *parent = 0); + ~DebugMode(); + + // IMode + void activated() {} + void shutdown() {} +}; + +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); +} + +} // namespace Internal +} // namespace Debugger + + /////////////////////////////////////////////////////////////////////// // // LocationMark // /////////////////////////////////////////////////////////////////////// -class Debugger::Internal::LocationMark - : public TextEditor::BaseTextMark +namespace Debugger { +namespace Internal { + +class LocationMark : public TextEditor::BaseTextMark { Q_OBJECT @@ -171,6 +227,113 @@ QIcon LocationMark::icon() const return icon; } +} // namespace Internal +} // namespace Debugger + + +/////////////////////////////////////////////////////////////////////// +// +// GdbOptionPage +// +/////////////////////////////////////////////////////////////////////// + +namespace Debugger { +namespace Internal { + +class GdbOptionPage : public Core::IOptionsPage +{ + Q_OBJECT + +public: + GdbOptionPage(DebuggerPlugin *plugin) : m_plugin(plugin) {} + + // IOptionsPage + QString name() const { return tr("Gdb"); } + QString category() const { return "Debugger"; } + QString trCategory() const { return tr("Debugger"); } + + QWidget *createPage(QWidget *parent); + void apply(); + void finish() {} // automatically calls "apply" + +private: + Ui::GdbOptionPage m_ui; + + DebuggerSettings m_settings; + DebuggerPlugin *m_plugin; +}; + +QWidget *GdbOptionPage::createPage(QWidget *parent) +{ + QWidget *w = new QWidget(parent); + m_settings = *m_plugin->m_manager->settings(); + m_ui.setupUi(w); + m_ui.gdbLocationChooser->setExpectedKind(Core::Utils::PathChooser::Command); + m_ui.gdbLocationChooser->setPromptDialogTitle(tr("Choose Gdb Location")); + m_ui.gdbLocationChooser->setPath(m_settings.m_gdbCmd); + m_ui.scriptFileChooser->setExpectedKind(Core::Utils::PathChooser::File); + m_ui.scriptFileChooser->setPromptDialogTitle(tr("Choose Location of Startup Script File")); + m_ui.scriptFileChooser->setPath(m_settings.m_scriptFile); + m_ui.environmentEdit->setText(m_settings.m_gdbEnv); + m_ui.autoStartBox->setChecked(m_settings.m_autoRun); + m_ui.autoQuitBox->setChecked(m_settings.m_autoQuit); + + m_ui.checkBoxSkipKnownFrames->setChecked(m_settings.m_skipKnownFrames); + m_ui.checkBoxDebugDumpers->setChecked(m_settings.m_debugDumpers); + m_ui.checkBoxUseCustomDumpers->setChecked(m_settings.m_useCustomDumpers); + m_ui.checkBoxFastStart->setChecked(m_settings.m_useFastStart); + m_ui.checkBoxUseToolTips->setChecked(m_settings.m_useToolTips); + +#ifndef QT_DEBUG +#if 0 + 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 = am->registerAction(m_manager->m_debugDumpersAction, + Constants::DEBUG_DUMPERS, debuggercontext); + mdebug->addAction(cmd); +#endif +#endif + + // FIXME + m_ui.autoStartBox->hide(); + m_ui.autoQuitBox->hide(); + m_ui.environmentEdit->hide(); + m_ui.labelEnvironment->hide(); + + m_ui.checkBoxFastStart->setChecked(false); + m_ui.checkBoxFastStart->hide(); + + //m_dumpLogAction = new QAction(this); + //m_dumpLogAction->setText(tr("Dump Log File for Debugging Purposes")); + return w; +} + +void GdbOptionPage::apply() +{ + m_settings.m_gdbCmd = m_ui.gdbLocationChooser->path(); + m_settings.m_gdbEnv = m_ui.environmentEdit->text(); + m_settings.m_autoRun = m_ui.autoStartBox->isChecked(); + m_settings.m_autoQuit = m_ui.autoQuitBox->isChecked(); + m_settings.m_scriptFile = m_ui.scriptFileChooser->path(); + + m_settings.m_skipKnownFrames = m_ui.checkBoxSkipKnownFrames->isChecked(); + m_settings.m_debugDumpers = m_ui.checkBoxDebugDumpers->isChecked(); + m_settings.m_useCustomDumpers = m_ui.checkBoxUseCustomDumpers->isChecked(); + m_settings.m_useFastStart = m_ui.checkBoxFastStart->isChecked(); + m_settings.m_useToolTips = m_ui.checkBoxUseToolTips->isChecked(); + + *m_plugin->m_manager->settings() = m_settings; + m_plugin->writeSettings(); +} + +} // namespace Internal +} // namespace Debugger + + /////////////////////////////////////////////////////////////////////// // // DebuggerPlugin @@ -183,11 +346,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()->settings(); +} + void DebuggerPlugin::shutdown() { if (m_debugMode) @@ -196,6 +365,8 @@ void DebuggerPlugin::shutdown() if (m_manager) m_manager->shutdown(); + writeSettings(); + //qDebug() << "DebuggerPlugin::~DebuggerPlugin"; removeObject(m_debugMode); removeObject(m_generalOptionPage); @@ -227,8 +398,8 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *error_mes ICore *core = m_pm->getObject(); 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,165 +427,248 @@ 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()<< 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, - Constants::SKIP_KNOWN_FRAMES, globalcontext); - mdebug->addAction(cmd); - - cmd = actionManager->registerAction(m_manager->m_useCustomDumpersAction, - Constants::USE_CUSTOM_DUMPERS, globalcontext); - mdebug->addAction(cmd); - - cmd = actionManager->registerAction(m_manager->m_useFastStartAction, - Constants::USE_FAST_START, globalcontext); - mdebug->addAction(cmd); - - cmd = actionManager->registerAction(m_manager->m_useToolTipsAction, - Constants::USE_TOOL_TIPS, globalcontext); - mdebug->addAction(cmd); - -#ifdef QT_DEBUG - cmd = actionManager->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, - 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: - m_generalOptionPage = new GdbOptionPage(&theGdbSettings()); + m_generalOptionPage = new GdbOptionPage(this); addObject(m_generalOptionPage); 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 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())); @@ -550,7 +804,7 @@ void DebuggerPlugin::requestMark(TextEditor::ITextEditor *editor, int lineNumber void DebuggerPlugin::showToolTip(TextEditor::ITextEditor *editor, const QPoint &point, int pos) { - if (!m_manager->useToolTipsAction()->isChecked()) + if (!m_manager->settings()->m_useToolTips) return; QPlainTextEdit *plaintext = qobject_cast(editor->widget()); @@ -567,7 +821,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 +849,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 +890,72 @@ void DebuggerPlugin::changeStatus(int status) } } +void DebuggerPlugin::writeSettings() const +{ + QTC_ASSERT(m_manager, return); + QTC_ASSERT(m_manager->mainWindow(), return); + + QSettings *s = settings(); + DebuggerSettings *m = m_manager->settings(); + s->beginGroup(QLatin1String("DebugMode")); + s->setValue("State", m_manager->mainWindow()->saveState()); + s->setValue("Locked", m_toggleLockedAction->isChecked()); + s->setValue("Location", m->m_gdbCmd); + s->setValue("Environment", m->m_gdbEnv); + s->setValue("AutoRun", m->m_autoRun); + s->setValue("AutoQuit", m->m_autoQuit); + + s->setValue("UseFastStart", m->m_useFastStart); + s->setValue("UseToolTips", m->m_useToolTips); + s->setValue("UseCustomDumpers", m->m_useCustomDumpers); + s->setValue("SkipKnowFrames", m->m_skipKnownFrames); + s->setValue("DebugDumpers", m->m_debugDumpers); + s->endGroup(); +} + +void DebuggerPlugin::readSettings() +{ + QSettings *s = settings(); + DebuggerSettings *m = &m_manager->m_settings; + + QString defaultCommand("gdb"); +#if defined(Q_OS_WIN32) + defaultCommand.append(".exe"); +#endif + Core::ICore *coreIFace = m_pm->getObject(); + QString defaultScript = coreIFace->resourcePath() + + QLatin1String("/gdb/qt4macros"); + + s->beginGroup(QLatin1String("DebugMode")); + QByteArray ba = s->value("State", QByteArray()).toByteArray(); + m_toggleLockedAction->setChecked(s->value("Locked", true).toBool()); + m->m_gdbCmd = s->value("Location", defaultCommand).toString(); + m->m_scriptFile= s->value("ScriptFile", defaultScript).toString(); + m->m_gdbEnv = s->value("Environment", "").toString(); + m->m_autoRun = s->value("AutoRun", true).toBool(); + m->m_autoQuit = s->value("AutoQuit", true).toBool(); + + m->m_skipKnownFrames = s->value("SkipKnownFrames", false).toBool(); + m->m_debugDumpers = s->value("DebugDumpers", false).toBool(); + m->m_useCustomDumpers = s->value("UseCustomDupers", false).toBool(); + m->m_useFastStart = s->value("UseFastStart", false).toBool(); + m->m_useToolTips = s->value("UseToolTips", false).toBool(); + s->endGroup(); + + m_manager->mainWindow()->restoreState(ba); +} + +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 6dbc64ee74c..4ab9c5b89f8 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) ** @@ -78,7 +78,6 @@ private slots: void changeStatus(int status); void requestMark(TextEditor::ITextEditor *editor, int lineNumber); void showToolTip(TextEditor::ITextEditor *editor, const QPoint &pnt, int pos); - void querySessionValue(const QString &name, QVariant *value); void setSessionValue(const QString &name, const QVariant &value); void queryConfigValue(const QString &name, QVariant *value); @@ -90,9 +89,14 @@ 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 GdbOptionPage; friend class DebugMode; // FIXME: Just a hack now so that it can access the views ProjectExplorer::ProjectExplorerPlugin *projectExplorer() const; @@ -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 e3e8728fde8..45eecd6514e 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 94ccddf8d14..c10a84e4795 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 c3ddd5fa506..ff935dabfdf 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 0074be9217f..106b414eeb1 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 f23cd1b7a90..4545965e88b 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 28b49eb93d4..925081003d3 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 fa6f9ab3250..2370a55eed2 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) ** @@ -84,19 +84,6 @@ Q_DECLARE_METATYPE(Debugger::Internal::GdbMi); static const QString tooltipIName = "tooltip"; -/////////////////////////////////////////////////////////////////////// -// -// GdbSettings -// -/////////////////////////////////////////////////////////////////////// - -GdbSettings &Debugger::Internal::theGdbSettings() -{ - static GdbSettings settings; - return settings; -} - - /////////////////////////////////////////////////////////////////////// // // GdbCommandType @@ -265,7 +252,6 @@ void GdbEngine::init() m_pendingRequests = 0; m_gdbVersion = 100; m_shared = 0; - qq->debugDumpersAction()->setChecked(false); m_oldestAcceptableToken = -1; @@ -279,11 +265,6 @@ void GdbEngine::init() connect(&m_gdbProc, SIGNAL(finished(int, QProcess::ExitStatus)), q, SLOT(exitDebugger())); - connect(qq->debugDumpersAction(), SIGNAL(toggled(bool)), - this, SLOT(setDebugDumpers(bool))); - connect(qq->useCustomDumpersAction(), SIGNAL(toggled(bool)), - this, SLOT(setCustomDumpersWanted(bool))); - // Output connect(this, SIGNAL(gdbResponseAvailable()), this, SLOT(handleResponse()), Qt::QueuedConnection); @@ -306,7 +287,7 @@ void GdbEngine::gdbProcError(QProcess::ProcessError error) case QProcess::FailedToStart: msg = QString(tr("The Gdb process failed to start. Either the " "invoked program '%1' is missing, or you may have insufficient " - "permissions to invoke the program.")).arg(theGdbSettings().m_gdbCmd); + "permissions to invoke the program.")).arg(q->settings()->m_gdbCmd); break; case QProcess::Crashed: msg = tr("The Gdb process crashed some time after starting " @@ -1503,7 +1484,7 @@ void GdbEngine::exitDebugger() m_varToType.clear(); m_dataDumperState = DataDumperUninitialized; m_shared = 0; - qq->debugDumpersAction()->setChecked(false); + //q->settings()->m_debugDumpers = false; } @@ -1535,7 +1516,7 @@ bool GdbEngine::startDebugger() m_gdbProc.setEnvironment(q->m_environment); #if 0 - qDebug() << "Command: " << theGdbSettings().m_gdbCmd; + qDebug() << "Command: " << q->settings()->m_gdbCmd; qDebug() << "WorkingDirectory: " << m_gdbProc.workingDirectory(); qDebug() << "Environment: " << m_gdbProc.environment(); qDebug() << "Arguments: " << gdbArgs; @@ -1544,9 +1525,9 @@ bool GdbEngine::startDebugger() #endif q->showStatusMessage(tr("Starting Debugger")); - emit gdbInputAvailable(QString(), theGdbSettings().m_gdbCmd + ' ' + gdbArgs.join(" ")); + emit gdbInputAvailable(QString(), q->settings()->m_gdbCmd + ' ' + gdbArgs.join(" ")); - m_gdbProc.start(theGdbSettings().m_gdbCmd, gdbArgs); + m_gdbProc.start(q->settings()->m_gdbCmd, gdbArgs); m_gdbProc.waitForStarted(); if (m_gdbProc.state() != QProcess::Running) @@ -2589,7 +2570,7 @@ void GdbEngine::setToolTipExpression(const QPoint &pos, const QString &exp0) return; } - if (qq->debugDumpersAction()->isChecked()) { + if (q->settings()->m_debugDumpers) { // minimize interference return; } @@ -2909,10 +2890,10 @@ void GdbEngine::setCustomDumpersWanted(bool on) bool GdbEngine::isCustomValueDumperAvailable(const QString &type) const { - if (!qq->useCustomDumpers()) + DebuggerSettings *s = q->settings(); + if (!s->m_useCustomDumpers) return false; - if (qq->debugDumpersAction()->isChecked() - && qq->stackHandler()->isDebuggingDumpers()) + if (s->m_debugDumpers && qq->stackHandler()->isDebuggingDumpers()) return false; if (m_dataDumperState != DataDumperAvailable) return false; @@ -3470,7 +3451,7 @@ void GdbEngine::handleDumpCustomValue1(const GdbResultRecord &record, //qDebug() << "CUSTOM DUMPER ERROR MESSAGE: " << msg; #ifdef QT_DEBUG // Make debugging of dumers easier - if (qq->debugDumpersAction()->isChecked() + if (q->settings()->m_debugDumpers && msg.startsWith("The program being debugged stopped while") && msg.contains("qDumpObjectData440")) { // Fake full stop diff --git a/src/plugins/debugger/gdbengine.h b/src/plugins/debugger/gdbengine.h index 000c0b84a95..e07e6a228c3 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) ** @@ -81,23 +81,6 @@ enum DataDumperState }; -class GdbSettings -{ -public: - GdbSettings() { m_autoRun = m_autoQuit = false; } - -public: - QString m_gdbCmd; - QString m_gdbEnv; - bool m_autoRun; - bool m_autoQuit; - - QString m_scriptFile; - QMap m_typeMacros; -}; - -GdbSettings &theGdbSettings(); - class GdbEngine : public IDebuggerEngine { Q_OBJECT diff --git a/src/plugins/debugger/gdbmi.cpp b/src/plugins/debugger/gdbmi.cpp index 5f20b217317..88060d7b350 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 dbe2ef73c37..0e6c36e9756 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 deleted file mode 100644 index efbb959fcf0..00000000000 --- a/src/plugins/debugger/gdboptionpage.cpp +++ /dev/null @@ -1,148 +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 "gdboptionpage.h" - -#include "gdbengine.h" - -#include -#include - -#include -#include -#include - -using namespace Debugger::Internal; - -GdbOptionPage::GdbOptionPage(GdbSettings *settings) -{ - m_pm = ExtensionSystem::PluginManager::instance(); - m_settings = settings; - - Core::ICore *coreIFace = m_pm->getObject(); - if (!coreIFace || !coreIFace->settings()) - return; - QSettings *s = coreIFace->settings(); - s->beginGroup("GdbOptions"); - QString defaultCommand("gdb"); -#if defined(Q_OS_WIN32) - defaultCommand.append(".exe"); -#endif - QString defaultScript = coreIFace->resourcePath() + - QLatin1String("/gdb/qt4macros"); - - m_settings->m_gdbCmd = s->value("Location", defaultCommand).toString(); - m_settings->m_scriptFile= s->value("ScriptFile", defaultScript).toString(); - m_settings->m_gdbEnv = s->value("Environment", "").toString(); - m_settings->m_autoRun = s->value("AutoRun", true).toBool(); - m_settings->m_autoQuit = s->value("AutoQuit", true).toBool(); - s->endGroup(); -} - -QString GdbOptionPage::name() const -{ - return tr("Gdb"); -} - -QString GdbOptionPage::category() const -{ - return "Debugger"; -} - -QString GdbOptionPage::trCategory() const -{ - return tr("Debugger"); -} - -QWidget *GdbOptionPage::createPage(QWidget *parent) -{ - QWidget *w = new QWidget(parent); - m_ui.setupUi(w); - m_ui.gdbLocationChooser->setExpectedKind(Core::Utils::PathChooser::Command); - m_ui.gdbLocationChooser->setPromptDialogTitle(tr("Choose Gdb Location")); - m_ui.gdbLocationChooser->setPath(m_settings->m_gdbCmd); - m_ui.scriptFileChooser->setExpectedKind(Core::Utils::PathChooser::File); - m_ui.scriptFileChooser->setPromptDialogTitle(tr("Choose Location of Startup Script File")); - m_ui.scriptFileChooser->setPath(m_settings->m_scriptFile); - m_ui.environmentEdit->setText(m_settings->m_gdbEnv); - m_ui.autoStartBox->setChecked(m_settings->m_autoRun); - m_ui.autoQuitBox->setChecked(m_settings->m_autoQuit); - - // FIXME - m_ui.autoStartBox->hide(); - m_ui.autoQuitBox->hide(); - m_ui.environmentEdit->hide(); - m_ui.labelEnvironment->hide(); - - connect(m_ui.gdbLocationChooser, SIGNAL(changed()), - this, SLOT(onGdbLocationChanged())); - connect(m_ui.scriptFileChooser, SIGNAL(changed()), - this, SLOT(onScriptFileChanged())); - - return w; -} - -void GdbOptionPage::onGdbLocationChanged() -{ - m_settings->m_gdbCmd = m_ui.gdbLocationChooser->path(); -} - -void GdbOptionPage::onScriptFileChanged() -{ - m_settings->m_scriptFile = m_ui.scriptFileChooser->path(); -} - -void GdbOptionPage::finished(bool accepted) -{ - 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(); - m_settings->m_autoQuit = m_ui.autoQuitBox->isChecked(); - m_settings->m_scriptFile = m_ui.scriptFileChooser->path(); - - Core::ICore *coreIFace = m_pm->getObject(); - if (!coreIFace || !coreIFace->settings()) - return; - - QSettings *s = coreIFace->settings(); - - s->beginGroup("GdbOptions"); - s->setValue("Location", m_settings->m_gdbCmd); - s->setValue("Environment", m_settings->m_gdbEnv); - s->setValue("AutoRun", m_settings->m_autoRun); - s->setValue("AutoQuit", m_settings->m_autoQuit); - s->endGroup(); -} diff --git a/src/plugins/debugger/gdboptionpage.h b/src/plugins/debugger/gdboptionpage.h deleted file mode 100644 index bb48d9e3492..00000000000 --- a/src/plugins/debugger/gdboptionpage.h +++ /dev/null @@ -1,108 +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 GDBOPTIONPAGE_H -#define GDBOPTIONPAGE_H - -#include "ui_gdboptionpage.h" - -#include - -#include - -namespace ExtensionSystem { class PluginManager; } - -namespace Debugger { -namespace Internal { - -class GdbSettings; - -class GdbOptionPage : public Core::IOptionsPage -{ - Q_OBJECT - -public: - GdbOptionPage(GdbSettings *settings); - - QString name() const; - QString category() const; - QString trCategory() const; - - QWidget *createPage(QWidget *parent); - void finished(bool accepted); - -public slots: - void onGdbLocationChanged(); - void onScriptFileChanged(); - -private: - ExtensionSystem::PluginManager *m_pm; - Ui::GdbOptionPage m_ui; - - GdbSettings *m_settings; -}; - -#if 0 -class TypeMacroPage : public Core::IOptionsPage -{ - Q_OBJECT - -public: - TypeMacroPage(GdbSettings *settings); - - QString name() const; - QString category() const; - QString trCategory() const; - - QWidget *createPage(QWidget *parent); - void finished(bool accepted); - -private slots: - void onAddButton(); - void onDelButton(); - void currentItemChanged(QTreeWidgetItem *item); - void updateButtonState(); - -private: - ExtensionSystem::PluginManager *m_pm; - Ui::TypeMacroPage m_ui; - - GdbSettings *m_settings; - QWidget *m_widget; -}; -#endif - -} // namespace Internal -} // namespace Debugger - -#endif // GDBOPTIONPAGE_H diff --git a/src/plugins/debugger/gdboptionpage.ui b/src/plugins/debugger/gdboptionpage.ui index 580f13c0d66..354eb64233f 100644 --- a/src/plugins/debugger/gdboptionpage.ui +++ b/src/plugins/debugger/gdboptionpage.ui @@ -6,8 +6,8 @@ 0 0 - 433 - 233 + 465 + 372 @@ -74,6 +74,58 @@ + + + + Checking this will make the debugger try to use code to format certain data (QObject, QString, std::string etc.) nicely. + + + Use custom display for Qt and Standard Library objects + + + + + + + Checking this will make the debugger start fast by loading only very few debug symbols on start up. This might lead to situations where breakpoints can not be set properly. So uncheck this option if you experience breakpoint related problems. + + + Fast debugger start + + + + + + + fter checking this option 'Step Into' combines in certain situations several steps, leading to 'less noisy' debugging. So will, e.g., the atomic +reference counting code be skipped, and a single 'Step Into' for a signal emission will end up directly in the slot connected to it. + + + + Skip known frames when stepping + + + + + + + Checking this will make enable tooltips for variable values during debugging. Since this can slow down debugging and does not provide reliable information as it does not use scope information, it is switched off by default. + + + Use tooltips while debugging + + + + + + + This is an internal tool to make debugging the Custom Data Dumper code easier. Using this action is in general not needed unless you want do debug Qt Creator itself. + + + Debug Custom Dumpers + + + diff --git a/src/plugins/debugger/gdbtypemacros.cpp b/src/plugins/debugger/gdbtypemacros.cpp index 26d7aebf441..d392a836f0e 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 5ab4ce066bc..50fbafda559 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 644067d4f35..fa8e7413f86 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 44994148583..00000000000 --- 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include - -#include -#include -#include -#include -#include - -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()->uniqueIDManager(); - QList 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()->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()->settings(); -} diff --git a/src/plugins/debugger/moduleshandler.cpp b/src/plugins/debugger/moduleshandler.cpp index 782fb6f9f7f..e87c92a73d2 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 9c7a3570b75..4db8c6fe7ad 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 1e2d2c492c9..5a1273c2942 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 e2b9b57e568..95dfec746a7 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 801dbbc8dc3..08f7d392805 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 9af88d33578..c98f780a3fb 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 b37fe752e8f..e594326009a 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 0b580d22d9f..4c038f41eee 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 1721aa09fba..339b09609e5 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 773ee93108a..958535378f7 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 14b0d8a49de..b868dcd99ad 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 8330826ef8e..0f7cc47ac1f 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 85abf6f7488..70d0b22ab06 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 53c941881e4..1e68d001f3b 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 2ef86a3d3b1..d40f8a3c5ff 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 7955b7f4eb5..cea4dcffa4a 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 ba88f5f74c2..465b8acec04 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 0707252774d..12074057307 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 99cb74d93bf..bf418cd0fc5 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 373bb0804ec..afc50a7638f 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 25fa770823d..b2c43b28f64 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 4c2a20b167f..763d04b89b2 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 97d27d5f016..f357c451061 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 4a13ac65955..42a2928974f 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 be21968a58c..b4e618490d4 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 028ed199cc3..39b99c92037 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 3250961d63d..748e1b1d021 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 f4f3d947cc7..4c61e5f09c7 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 3a0e0065926..6cc0ced4215 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 b5270fa42de..8643c67dd99 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 2441cddc3a0..81c67331de3 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 169ff2446bc..e68ce952304 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 f2458816d2f..0f4024f2b9a 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 a6654411acc..71e28de7ba2 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 e144f486982..83a7b264197 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 684ad07e8a9..81d910ee9df 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 8de03dc4e53..5d13e45080a 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) ** @@ -34,7 +34,6 @@ #ifndef FORMEDITORFACTORY_H #define FORMEDITORFACTORY_H -#include #include #include diff --git a/src/plugins/designer/formeditorplugin.cpp b/src/plugins/designer/formeditorplugin.cpp index 3f1895e0fe1..bc9f6a23337 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 fdcdfdb84f9..5743ab3f763 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 59e64c4cf9a..e302eabb3c1 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 #include -#include +#include #include #include @@ -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 &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 &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 &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); } diff --git a/src/plugins/designer/formeditorw.h b/src/plugins/designer/formeditorw.h index 0e36ff3b9ff..f41d3554e25 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) ** @@ -34,12 +34,12 @@ #ifndef FORMEDITORW_H #define FORMEDITORW_H -#include #include -#include #include +#include #include +#include #include "designerconstants.h" @@ -65,8 +65,8 @@ namespace qdesigner_internal { QT_END_NAMESPACE namespace Core { -class ActionManagerInterface; -class IActionContainer; +class ActionManager; +class ActionContainer; class ICore; class IEditor; } @@ -142,7 +142,7 @@ private: typedef QList 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 e6ed5a1da5d..4a8c9907009 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 d123b52998c..6b375386b58 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 9bc3340299d..1c142c483e0 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 518f3e63488..e448d8a6514 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 b5a145736da..49387adb45b 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 54468c388f7..c94e25da5b7 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 c54ed911429..e1de87af80e 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 fc31d65847c..411949c27ed 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 5c3f84a8349..4bb492ce354 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 e4274a8a7be..b49fea1eb7a 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 958d627503d..67ed8160198 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 234d3ce42bd..52aaed4cd02 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 56ae6f0236f..3edad0921b8 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 30bb51dd31f..ba6c89e133a 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 7e0952ae763..8de4cad5dc2 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 397bb36b3a0..8ad707dd769 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 0291bd21058..42043c3cd20 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 10732865b04..55acd931ec6 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 66a091e283d..a420040ac8a 100644 --- a/src/plugins/fakevim/FakeVim.pluginspec +++ b/src/plugins/fakevim/FakeVim.pluginspec @@ -6,6 +6,7 @@ http://www.trolltech.com/ + diff --git a/src/plugins/fakevim/fakevim.pro b/src/plugins/fakevim/fakevim.pro index 2165ffed202..2c85f8c50b2 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 13c71695434..93472b66d30 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 379b7eb42b5..72c68c1654d 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) ** @@ -57,6 +57,11 @@ #include #include +//#include +//#include +//#include + +//#include using namespace FakeVim::Internal; using namespace FakeVim::Constants; @@ -101,6 +106,9 @@ enum SubMode ChangeSubMode, DeleteSubMode, FilterSubMode, + ReplaceSubMode, + YankSubMode, + IndentSubMode, ZSubMode, }; @@ -183,8 +191,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); @@ -269,6 +285,10 @@ public: // vi style configuration QHash m_config; + + // for restoring cursor position + int m_savedPosition; + int m_desiredColumn; }; FakeVimHandler::Private::Private(FakeVimHandler *parent) @@ -285,6 +305,7 @@ FakeVimHandler::Private::Private(FakeVimHandler *parent) m_textedit = 0; m_plaintextedit = 0; m_visualMode = NoVisualMode; + m_desiredColumn = 0; m_core = ExtensionSystem::PluginManager::instance()->getObject(); @@ -293,6 +314,7 @@ FakeVimHandler::Private::Private(FakeVimHandler *parent) m_config[ConfigSmartTab] = ConfigOff; m_config[ConfigShiftWidth] = "8"; m_config[ConfigExpandTab] = ConfigOff; + m_config[ConfigAutoIndent] = ConfigOff; } bool FakeVimHandler::Private::handleEvent(QKeyEvent *ev) @@ -314,15 +336,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 @@ -340,6 +365,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) @@ -380,6 +406,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(); @@ -389,6 +432,7 @@ void FakeVimHandler::Private::finishMovement(const QString &dotCommand) updateSelection(); updateMiniBuffer(); + m_desiredColumn = leftDist(); } void FakeVimHandler::Private::updateSelection() @@ -438,7 +482,7 @@ void FakeVimHandler::Private::updateSelection() } } } - EDITOR(setExtraSelections(selections)); + emit q->selectionChanged(editor(), selections); } void FakeVimHandler::Private::updateMiniBuffer() @@ -510,7 +554,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; @@ -525,6 +569,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 @@ -598,12 +656,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; @@ -613,6 +675,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(); @@ -664,7 +731,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(); @@ -682,6 +749,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) @@ -689,8 +758,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) { @@ -704,8 +781,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(); @@ -724,15 +810,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)); @@ -749,6 +840,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') { @@ -787,6 +885,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()) { @@ -813,9 +915,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) @@ -835,17 +939,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); @@ -864,7 +972,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; } @@ -950,6 +1081,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); @@ -1173,7 +1315,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()) { @@ -1183,6 +1325,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 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 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) @@ -1276,6 +1484,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 69bb363015f..08df6d21b12 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 +#include +#include 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 &selection); private: bool eventFilter(QObject *ob, QEvent *ev); diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp index 9524e618e09..0a06fe7c112 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 +#include #include #include #include @@ -57,7 +57,7 @@ #include #include -#include +#include #include #include #include @@ -66,6 +66,7 @@ #include #include #include +#include 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 &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(); QTC_ASSERT(m_core, return false); - Core::ActionManagerInterface *actionManager = m_core->actionManager(); + Core::ActionManager *actionManager = m_core->actionManager(); QTC_ASSERT(actionManager, return false); QList 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)), + this, SLOT(changeSelection(QWidget*,QList))); m_handler->addWidget(widget); - BaseTextEditor *baseTextEditor = qobject_cast(widget); - if (baseTextEditor) { + BaseTextEditor *bt = qobject_cast(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 &selection) +{ + if (BaseTextEditor *bt = qobject_cast(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 793c2264d00..33876d21eca 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 -#include - -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 8b83975cb49..2428d25fbe5 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 aa1fe59ec24..c1b66381f1f 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 dd25564a437..b51504db7df 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 6951cee5e71..2f41acbe7b0 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 c6c0ac5b105..7da22f39fcf 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 0bf2ec4fdb9..b3c417debd3 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 -#include -#include +#include +#include +#include #include #include @@ -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 globalcontext = QList() << 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 findInterfaces = ExtensionSystem::PluginManager::instance()->getObjects(); - Core::ICommand *cmd; + Core::Command *cmd; QList globalcontext = QList() << 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 4a380791376..caad6daa0cc 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 edfb5015baa..323fdbac58c 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 #include -#include -#include -#include +#include +#include +#include #include #include @@ -138,9 +138,9 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen QList globalcontext; globalcontext << Core::Constants::C_GLOBAL_ID; - Core::ActionManagerInterface *am = ExtensionSystem::PluginManager::instance()->getObject()->actionManager(); - Core::IActionContainer *mfind = am->actionContainer(Constants::M_FIND); - Core::ICommand *cmd; + Core::ActionManager *am = ExtensionSystem::PluginManager::instance()->getObject()->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 a0055bc18c9..030a57876a3 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 b448e47ba96..f45c99b2aa3 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 bbb82cdd27a..f633c641bd6 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 2fc7b5f02a9..54bfa2f3672 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 532568471f1..0a525ed8caf 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 920e0065033..1f375422607 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 37e2413aabf..894fad525fc 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 b6affc361f3..2ce7128d673 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 b73adf506b6..31242ba092e 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 7154ed1e46b..f4fa84d9c9e 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 0cabff49995..8fe4f2bbb8c 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 c12196b306d..ea01dc296f8 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 15ce04b74f5..ea950fb949c 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 9c69c951909..6d546cc2f34 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 ffbc1ba4e5b..57cd669515b 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 82b88671282..c167727ea05 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 a5ac526b9de..334960bb544 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 6fff26f6bfd..9959002fe9c 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 336942178cb..1873b05c1c4 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 cd520aba700..c19b9e94a53 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 cef4478e838..68be160c10e 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 ada478e3743..1041d7573c0 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) ** @@ -130,6 +130,11 @@ static inline bool addStateFileSpecification(const QString &line, QList +#include #include #include #include #include -#include +#include #include #include #include #include -#include #include #include #include @@ -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)); @@ -710,6 +744,10 @@ bool GitClient::getCommitData(const QString &workingDirectory, } // Filter out untracked files that are not part of the project filterUntrackedFilesOfProject(repoDirectory, &d->untrackedFiles); + if (d->filesEmpty()) { + *errorMessage = msgNoChangedFiles(); + return false; + } d->panelData.author = readConfigValue(workingDirectory, QLatin1String("user.name")); d->panelData.email = readConfigValue(workingDirectory, QLatin1String("user.email")); @@ -965,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 task = QtConcurrent::run(this, &GitCommand::run - , arguments - , workingDirectory - , environment); - QString taskName = QLatin1String("Git ") + arguments[0]; - - Core::ICore *core = ExtensionSystem::PluginManager::instance()->getObject(); - 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 f09daa00ab8..aa4ad97015a 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 #include -#include #include #include @@ -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 00000000000..703e42a8668 --- /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 +#include + +#include +#include +#include +#include + +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 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->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/libs/extensionsystem/ExtensionSystemInterfaces b/src/plugins/git/gitcommand.h similarity index 58% rename from src/libs/extensionsystem/ExtensionSystemInterfaces rename to src/plugins/git/gitcommand.h index db175b40504..a587b748761 100644 --- a/src/libs/extensionsystem/ExtensionSystemInterfaces +++ 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,9 +31,49 @@ ** ***************************************************************************/ -#include "extensionsystem/pluginmanager.h" -#include "extensionsystem/pluginspec.h" -#include "extensionsystem/iplugin.h" -#include "extensionsystem/pluginview.h" -#include "extensionsystem/pluginerrorview.h" -#include "extensionsystem/plugindetailsview.h" +#ifndef GITCOMMAND_H +#define GITCOMMAND_H + +#include + +#include + +namespace Git { +namespace Internal { + +class GitCommand : public QObject +{ + Q_OBJECT +public: + 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; + }; + + QStringList environment() const; + + const QString m_workingDirectory; + const QStringList m_environment; + + QList m_jobs; +}; + +} // namespace Internal +} // namespace Git +#endif // GITCOMMAND_H diff --git a/src/plugins/git/gitconstants.h b/src/plugins/git/gitconstants.h index 6719221f4c0..b539046ffb5 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 e45029d1aa6..1a8ff4d09ba 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 23a6953dd18..d9490b87130 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 a1d76e7553e..b5ae4d129c5 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 898381a3d90..b539d6cef5a 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 2ef08083393..e71ccfea45e 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 #include #include -#include +#include #include #include @@ -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 &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(); } -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 @@ -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 39287e1939a..19c61db291a 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) ** @@ -39,8 +39,8 @@ #include #include -#include #include +#include #include #include @@ -53,20 +53,20 @@ class QTemporaryFile; QT_END_NAMESPACE namespace Core { - class IEditorFactory; - class ICore; - class IVersionControl; -} +class IEditorFactory; +class ICore; +class IVersionControl; +} // namespace Core namespace Git { namespace Internal { - class GitPlugin; - class GitClient; - class ChangeSelectionDialog; - class GitSubmitEditor; - struct CommitData; - struct GitSettings; +class GitPlugin; +class GitClient; +class ChangeSelectionDialog; +class GitSubmitEditor; +struct CommitData; +struct GitSettings; // Just a proxy for GitPlugin class CoreListener : public Core::ICoreListener @@ -85,83 +85,83 @@ class GitPlugin : public ExtensionSystem::IPlugin Q_OBJECT public: - GitPlugin(); - ~GitPlugin(); + GitPlugin(); + ~GitPlugin(); + static GitPlugin *instance(); - bool initialize(const QStringList &arguments - , QString *error_message); - void extensionsInitialized(); + bool initialize(const QStringList &arguments, QString *error_message); + void extensionsInitialized(); - QString getWorkingDirectory(); + QString getWorkingDirectory(); - GitOutputWindow *outputWindow() const; + GitOutputWindow *outputWindow() const; - GitSettings settings() const; + GitSettings settings() const; void setSettings(const GitSettings &s); public slots: - void updateActions(); - bool editorAboutToClose(Core::IEditor *editor); + void updateActions(); + bool editorAboutToClose(Core::IEditor *editor); private slots: - void diffCurrentFile(); - void diffCurrentProject(); - void submitEditorDiff(const QStringList &); - void submitCurrentLog(); - void statusFile(); - void statusProject(); - void logFile(); - void blameFile(); - void logProject(); - void undoFileChanges(); - void undoProjectChanges(); - void stageFile(); - void unstageFile(); - void revertFile(); + void diffCurrentFile(); + void diffCurrentProject(); + void submitEditorDiff(const QStringList &unstaged, const QStringList &staged); + void submitCurrentLog(); + void statusFile(); + void statusProject(); + void logFile(); + void blameFile(); + void logProject(); + void undoFileChanges(); + void undoProjectChanges(); + void stageFile(); + void unstageFile(); + void revertFile(); - void showCommit(); - void startCommit(); - void stash(); - void stashPop(); - void branchList(); - void stashList(); - void pull(); - void push(); + void showCommit(); + void startCommit(); + void stash(); + void stashPop(); + void branchList(); + void stashList(); + void pull(); + void push(); private: - QFileInfo currentFile() const; - Core::IEditor *openSubmitEditor(const QString &fileName, const CommitData &cd); - void cleanChangeTmpFile(); + QFileInfo currentFile() const; + Core::IEditor *openSubmitEditor(const QString &fileName, const CommitData &cd); + void cleanChangeTmpFile(); - static GitPlugin *m_instance; - Core::ICore *m_core; - QAction *m_diffAction; - QAction *m_diffProjectAction; - QAction *m_statusAction; - QAction *m_statusProjectAction; - QAction *m_logAction; - QAction *m_blameAction; - QAction *m_logProjectAction; - QAction *m_undoFileAction; - QAction *m_undoProjectAction; - QAction *m_showAction; - QAction *m_stageAction; - QAction *m_unstageAction; - QAction *m_revertAction; - QAction *m_commitAction; - QAction *m_pullAction; - QAction *m_pushAction; + static GitPlugin *m_instance; + Core::ICore *m_core; + QAction *m_diffAction; + QAction *m_diffProjectAction; + QAction *m_statusAction; + QAction *m_statusProjectAction; + QAction *m_logAction; + QAction *m_blameAction; + QAction *m_logProjectAction; + QAction *m_undoFileAction; + QAction *m_undoProjectAction; + QAction *m_showAction; + QAction *m_stageAction; + QAction *m_unstageAction; + QAction *m_revertAction; + QAction *m_commitAction; + QAction *m_pullAction; + QAction *m_pushAction; - QAction *m_submitCurrentAction; - QAction *m_diffSelectedFilesAction; - QAction *m_undoAction; - QAction *m_redoAction; - QAction *m_stashAction; - QAction *m_stashPopAction; - QAction *m_stashListAction; - QAction *m_branchListAction; + QAction *m_submitCurrentAction; + QAction *m_diffSelectedFilesAction; + QAction *m_undoAction; + QAction *m_redoAction; + QAction *m_stashAction; + QAction *m_stashPopAction; + QAction *m_stashListAction; + QAction *m_branchListAction; ProjectExplorer::ProjectExplorerPlugin *m_projectExplorer; GitClient *m_gitClient; diff --git a/src/plugins/git/gitsettings.cpp b/src/plugins/git/gitsettings.cpp index dff33129186..2b528a72d2a 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 6b012f36f6d..59169922605 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 d34a78240d2..aa304a2be07 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) ** @@ -43,10 +43,20 @@ 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() @@ -54,14 +64,20 @@ GitSubmitEditorWidget *GitSubmitEditor::submitEditorWidget() return static_cast(widget()); } -static void addStateFileListToModel(const QList &l, - VCSBase::SubmitFileModel *model, - bool checked) +// Utility to add a list of state/file pairs to the model +// setting a file type. +static void addStateFileListToModel(const QList &l, + bool checked, FileType ft, + VCSBase::SubmitFileModel *model) { + typedef QList::const_iterator ConstIterator; - const ConstIterator cend = l.constEnd(); - for (ConstIterator it = l.constBegin(); it != cend; ++it) - model->addFile(it->second, it->first, checked); + 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) @@ -69,16 +85,44 @@ void GitSubmitEditor::setCommitData(const CommitData &d) submitEditorWidget()->setPanelData(d.panelData); submitEditorWidget()->setPanelInfo(d.panelInfo); - VCSBase::SubmitFileModel *model = new VCSBase::SubmitFileModel(this); - addStateFileListToModel(d.stagedFiles, model, true); - addStateFileListToModel(d.unstagedFiles, model, false); + 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) - model->addFile(*it, untrackedSpec, false); + m_model->addFile(*it, untrackedSpec, false).front()->setData(fileTypeData, FileTypeRole); } - setFileModel(model); + setFileModel(m_model); +} + +void GitSubmitEditor::slotDiffSelected(const QStringList &files) +{ + // 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(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); } GitSubmitEditorPanelData GitSubmitEditor::panelData() const diff --git a/src/plugins/git/gitsubmiteditor.h b/src/plugins/git/gitsubmiteditor.h index a1a80ac22cf..a56d7b5eb69 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 +namespace VCSBase { + class SubmitFileModel; +} + namespace Git { namespace Internal { @@ -54,8 +58,16 @@ public: void setCommitData(const CommitData &); GitSubmitEditorPanelData panelData() const; +signals: + void diff(const QStringList &unstagedFiles, const QStringList &stagedFiles); + +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 312738968fa..20c6f78f129 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 8763dd8a59b..08c07f8df17 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 0dcf99af204..5da80ebb611 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 ac72e4c9bf6..f0f71127569 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 037176b52d9..a3b82194cec 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 e5cce4d34a3..7da7a9f30c9 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 m_widget; diff --git a/src/plugins/helloworld/helloworldplugin.cpp b/src/plugins/helloworld/helloworldplugin.cpp index a8eb79c0519..6dd0bc9c63f 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 +#include #include #include #include @@ -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 b598cc75239..8aa2a9aa127 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 5524d32274b..4a76fa7ff3b 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 82c00186562..763ce22b666 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 a263f361119..f18795c3d39 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 41db97a2838..5532f5ded83 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 ef90a09344e..4e533309269 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 a6eabc156b3..60e42b06188 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 65fd2669b46..79e915557ac 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 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 1e74ae5404c..0f65160b764 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 73a5f615d3a..43238761527 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 6eb12df1811..be6469900e3 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 bac0cd4afd2..cc256ac9db6 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 d6e4e667fc5..31debec4566 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 a6f2f1d5e54..cec4d9d1ffd 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 78a867701ec..4c8257936e9 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 602bc6b7123..421b53b846b 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 489e2aed1ef..af90f240efb 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 74438ee54de..b2e92b188ba 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 ee334af42e5..687a5f116e1 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 85edcf26daa..6e59ff144a5 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 3ed3263478d..74900b6acee 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 #include #include -#include +#include #include #include #include @@ -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 shortcutMap; + QMap 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 40ff127e5b1..ef56c7e3364 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 b6086cdea23..fdae72b9596 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 d891ec0cb16..fc86c7e465b 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 bbb3a9692ad..6ea7de23a6c 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 a565491b782..015aeac422a 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 289157df668..1a045e9c1f4 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 574d2781f54..fbd251127b9 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 e310953d376..572914d449b 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 9432f9ad0dc..559cce168a5 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 bc93ac18d8d..7e8e5a808c4 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 fd1b1b98aab..ee402328bee 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 d6f88efd7ec..6d5f0d7f8d0 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 4a755b32c4a..e0feb0c58e9 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 d54ce10de5f..487603cc361 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 335bf8b3825..3f85281c17b 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 235f7da9cc5..6846aa11b30 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 9f825ae1665..db6012a4304 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 aa4b0a4fa48..1b9c7e094d1 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 +#include #include #include #include @@ -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())); @@ -558,12 +554,8 @@ Core::IEditor *PerforcePlugin::openPerforceSubmitEditor(const QString &fileName, PerforceSubmitEditor *submitEditor = dynamic_cast(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; } diff --git a/src/plugins/perforce/perforceplugin.h b/src/plugins/perforce/perforceplugin.h index cf37ed339eb..8069154a25c 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) ** @@ -39,8 +39,8 @@ #include #include #include -#include #include +#include #ifdef USE_P4_API #include "workbenchclientuser.h" diff --git a/src/plugins/perforce/perforcesettings.cpp b/src/plugins/perforce/perforcesettings.cpp index cdb4012be0a..7ba51b78e00 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 726f7f44efb..4451d4ad617 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 826f2275718..7c8967f2049 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) ** diff --git a/src/plugins/perforce/perforcesubmiteditor.h b/src/plugins/perforce/perforcesubmiteditor.h index 5dba0683158..a3a1805039d 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) ** diff --git a/src/plugins/perforce/perforcesubmiteditorwidget.cpp b/src/plugins/perforce/perforcesubmiteditorwidget.cpp index 05d14327f3f..e1cf2558272 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 6d1a8dea431..46566ad4c72 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 0b2814dbe1c..02102939a54 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 6d92fc9b0ff..8a2a27f8285 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 18fec0f8469..70ef649b0e6 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 e13dab53437..f5c43599fad 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 m_widget; diff --git a/src/plugins/perforce/workbenchclientuser.cpp b/src/plugins/perforce/workbenchclientuser.cpp index d148a47a884..d8943ffd085 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 a924decabd3..200b68a9683 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 deleted file mode 100644 index 10d0b819104..00000000000 --- a/src/plugins/projectexplorer/ProjectExplorerInterfaces +++ /dev/null @@ -1,44 +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 "projectexplorer/buildparserinterface.h" -#include "projectexplorer/projectexplorerconstants.h" -#include "projectexplorer/project.h" -#include "projectexplorer/buildstep.h" -#include "projectexplorer/buildconfiguration.h" -#include "projectexplorer/buildmanager.h" -#include "projectexplorer/projectexplorer.h" -#include "projectexplorer/persistentsettings.h" -#include "projectexplorer/environment.h" -#include "projectexplorer/environmenteditmodel.h" -#include "projectexplorer/abstractprocessstep.h" diff --git a/src/plugins/projectexplorer/abstractprocess.h b/src/plugins/projectexplorer/abstractprocess.h index d1a1c644389..491eed4a0b0 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 11dfa6d760d..f1c1f90a911 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 9c1756c0d70..3aac602291c 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 b94edbef259..07e34399b0b 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 45e8105ecc5..8de2de425e6 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 2118ccc658a..26998982614 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 8479a1dfc5d..48d1457b546 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 93b51e8b25f..ead2799453e 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 c511d350f27..c6279b4c3cf 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) ** @@ -34,7 +34,6 @@ #include "applicationlauncher.h" #include "consoleprocess.h" #include "winguiprocess.h" -#include #include diff --git a/src/plugins/projectexplorer/applicationlauncher_x11.cpp b/src/plugins/projectexplorer/applicationlauncher_x11.cpp index 5891a647395..79933d4518b 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) ** @@ -34,10 +34,7 @@ #include "applicationlauncher.h" #include "consoleprocess.h" -#include - #include -#include using namespace ProjectExplorer::Internal; diff --git a/src/plugins/projectexplorer/applicationrunconfiguration.cpp b/src/plugins/projectexplorer/applicationrunconfiguration.cpp index a0eb7af6a19..fc936d2c431 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 d6bfb4d8945..550bf621747 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 2fdda571c0d..f86898bbb76 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 8bb01d15901..d92b64a1d95 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 72eb1766f11..ff426805c2e 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 +#include #include #include #include @@ -178,7 +178,7 @@ void BuildManager::startBuildQueue() { if (!m_running) { // Progress Reporting - Core::ProgressManagerInterface *progressManager = + Core::ProgressManager *progressManager = ExtensionSystem::PluginManager::instance()->getObject()->progressManager(); m_progressFutureInterface = new QFutureInterface; m_progressWatcher.setFuture(m_progressFutureInterface->future()); diff --git a/src/plugins/projectexplorer/buildmanager.h b/src/plugins/projectexplorer/buildmanager.h index 248d6ae9271..2fa0cdcd356 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 57a069ea72a..39a6ced9ded 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 2fd92d86827..6dba4dfec00 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 afc228e4602..32c7e2279ac 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 11c5293a7cb..f55984d527e 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 b642a4e3867..aea512909ab 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 04171980494..4278c83bcbe 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 abcc431f05e..27e2291152d 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 93c2fac2e44..2a3040a76ce 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 735770877b0..64d39d771b7 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 ef1e47d9646..a20cb5f737a 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 72ecf9893eb..d3a4e2b86f8 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 655752cdd3c..5d9daa96c4d 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 51519fae381..aae64e97aac 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 eb5f88121c8..7b432c0af03 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 17e280e3ad0..5b8760cd33e 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 4de19f9be5b..4b9e585cc13 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 c52f9f605ff..92ae4b68635 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 451ae521c0c..cf1d81c3bc7 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 d44171d761a..5c08be0f2fc 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 f2b9c66ced1..4012cee8e13 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 bcf3fef091a..52cbedd51c6 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 de7cee85f86..9c78de543ad 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 3b815369ab9..1dd8621a1ed 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/directoryproject.cpp b/src/plugins/projectexplorer/directoryproject.cpp index 042d1ecaa91..58443ec62d2 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 a836c4d9a03..3f54b6c57e7 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 d01fb8b7195..41cea2e7af9 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 f62bc485b98..7932a3d36cf 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 caaad115f97..3be9f229c4f 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 9220564bba0..7a767d75b2e 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::const_iterator it, end; - end = m_values.constEnd(); - for (it = m_values.constBegin(); it != end; ++it) - result<<(it.key() + "=" + it.value()); - + const QMap::const_iterator end = m_values.constEnd(); + for (QMap::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 ba3aa9f161d..71cd10cb952 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 caa5e571404..8cfa9c31577 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 070703cab14..e99c69da2cc 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 4fcca615163..029707155e5 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 f88bdd6d79c..c3eba4ce662 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/images/filtericon.png b/src/plugins/projectexplorer/images/filtericon.png index 7e46d226758..0915b5e5f61 100644 Binary files a/src/plugins/projectexplorer/images/filtericon.png and b/src/plugins/projectexplorer/images/filtericon.png differ diff --git a/src/plugins/projectexplorer/iprojectmanager.h b/src/plugins/projectexplorer/iprojectmanager.h index 3455375a0f8..e38de44efb2 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 0a4d762f339..aab3b504331 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 5ec03977a98..67076b6a966 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 4ebe7913ef0..17828ff5ea9 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 f489ab95844..3b02cd1a47a 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 597a6daba6e..c02f21ff34b 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 +#include #include #include #include @@ -78,7 +78,7 @@ OutputPane::OutputPane(Core::ICore *core) this, SLOT(reRunRunControl())); // Stop - Core::ActionManagerInterface *am = core->actionManager(); + Core::ActionManager *am = core->actionManager(); QList 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 3367909d804..6bda6121af6 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 c8b38f11398..12ff44b0b4b 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 011a61e28b7..9df83d6d788 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 09630139a44..de7153c4015 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 ff6527713fa..035eb50e665 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 3d8b11665cc..e53e6a10992 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 11b40ba9afd..808aaa2a95b 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 3d8d8c7b802..3f377b52a11 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 2ad175e48c2..2a30a0e20f3 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 3548023d641..2d6224bbdda 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 #include #include -#include +#include #include #include #include @@ -155,7 +155,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin { ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); m_core = pm->getObject(); - 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 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() << 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")); @@ -522,7 +523,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); @@ -552,8 +553,8 @@ 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); @@ -1471,7 +1472,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 fa6f34602ca..2c1127ff5c6 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 ff288b1d172..67274a3ec4b 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 5cc5f5c67e2..ef745e69c90 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 5f9b5f49260..6b928db16b5 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 6e777cf19ec..3008b0772e6 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 59ca5457e4f..7d9464cffb5 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 2cdf1e6f4d7..92574aa9ff9 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 e7404b57538..9d2299f0d42 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 e45cfbc9c03..d8f0c725bbb 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 39b7214d214..8c71ead4334 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 91f83ca3a69..4d9224b46e9 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 b02839a4c5a..e6e2455cced 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 8bd54694224..c9b387ceaa2 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 a2d544393ac..f20fb6c42ba 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 e076a3f0a3c..864ef7565a7 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 c08075f0e53..4ecd7e86963 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 3e9ac432c31..e5a57815d19 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 fc897a2f9fc..76083833975 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 c7cf2519bf3..acc11cd932a 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 2f309814dd7..6b121ef20f5 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 1f22bae7e71..b7eb1201551 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 87378531330..7851e86ee89 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 05ef55420ae..86b2be4fafc 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 c8fdaf50c98..ef848ff178b 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 #include #include -#include +#include #include #include @@ -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 b44202f9a6a..49d15b7e8df 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 0ce134edfb9..8dd67943dd1 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 07aa28a0084..461577eac5e 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 b702bb98bd3..5421b9bbe63 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 48b8de1eb11..71875f9e84f 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 13663e622fc..a7e21fd27cd 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 02ab6d9ff66..73b62364f9c 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 4bdfaf38cf6..8185b7b47f4 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 bd9d2540b58..0b1ea26b913 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 1dad2894041..994f29d06aa 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 ca6f793d814..bad28bff225 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 88870e675e0..8941d7fa696 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::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 571d39c3289..ec870e110df 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 6f5aec1a141..e5086d14c4b 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 5258776456e..4c0d281a727 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 34a62305f65..9b52fafb23b 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 1c96b053ba7..a52c33f7193 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) ** @@ -34,12 +34,8 @@ #ifndef BUILDPARSERFACTORY_H #define BUILDPARSERFACTORY_H -#include +#include - -namespace ProjectExplorer { -class BuildParserInterface; -} namespace Qt4ProjectManager { namespace Internal { @@ -66,5 +62,4 @@ public: } // namespace Internal } // namespace Qt4ProjectManager - #endif // BUILDPARSERFACTORY_H diff --git a/src/plugins/qt4projectmanager/cesdkhandler.cpp b/src/plugins/qt4projectmanager/cesdkhandler.cpp index c4b5f5e22a6..a6e4dfe4925 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 d3e5bf4a035..d46a65c2ab9 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) ** @@ -31,13 +31,13 @@ ** ***************************************************************************/ -#ifndef CE_SDK_HANDLER_INCL -#define CE_SDK_HANDLER_INCL +#ifndef CE_SDK_HANDLER_H +#define CE_SDK_HANDLER_H -#include +#include -#include -#include +#include +#include #define VCINSTALL_MACRO "$(VCInstallDir)" #define VSINSTALL_MACRO "$(VSInstallDir)" @@ -105,4 +105,4 @@ inline QString CeSdkHandler::fixPaths(QString path) const } // namespace Internal } // namespace Qt4ProjectManager -#endif // CE_SDK_HANDLER_INCL +#endif // CE_SDK_HANDLER_H diff --git a/src/plugins/qt4projectmanager/deployhelper.cpp b/src/plugins/qt4projectmanager/deployhelper.cpp index 865d26e15a5..b11cdb36f1c 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 49626f887da..b633ae34392 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) ** @@ -34,7 +34,7 @@ #ifndef DEPLOYHELPER_H #define DEPLOYHELPER_H -#include +#include #include #include diff --git a/src/plugins/qt4projectmanager/directorywatcher.cpp b/src/plugins/qt4projectmanager/directorywatcher.cpp index e2e0828219f..b054f1ff291 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) ** @@ -44,165 +44,6 @@ enum { debugWatcher = 0 }; namespace Qt4ProjectManager { namespace Internal { -int DirectoryWatcher::m_objectCount = 0; -QHash DirectoryWatcher::m_directoryCount; -QFileSystemWatcher *DirectoryWatcher::m_watcher = 0; - -/* - \class DirectoryWatcher - - A wrapper for QFileSystemWatcher that collects - consecutive changes to a registered directory and emits directoryChanged() and fileChanged(). - - Note that files added are only monitored if the parent directory is added, too. - - All instances of DirectoryWatcher share one QFileSystemWatcher object. - That's because every QFileSystemWatcher object consumes a file descriptor, - even if no files are watched. -*/ -DirectoryWatcher::DirectoryWatcher(QObject *parent) : - QObject(parent), - m_timer(0) -{ - if (!m_watcher) - m_watcher = new QFileSystemWatcher(); - ++m_objectCount; - connect(m_watcher, SIGNAL(directoryChanged(QString)), - this, SLOT(slotDirectoryChanged(QString))); -} - -DirectoryWatcher::~DirectoryWatcher() -{ - foreach (const QString &dir, m_directories) - removeDirectory(dir); - if (--m_objectCount == 0) { - delete m_watcher; - m_watcher = 0; - } -} - -QStringList DirectoryWatcher::directories() const -{ - if (debugWatcher) - qDebug() << Q_FUNC_INFO << m_directories; - return m_directories; -} - -void DirectoryWatcher::addDirectory(const QString &dir) -{ - if (debugWatcher) - qDebug() << Q_FUNC_INFO << dir; - if (m_directories.contains(dir)) - return; - m_directories += dir; - if (m_directoryCount[dir] == 0) - m_watcher->addPath(dir); - m_directoryCount[dir] += 1; -} - -void DirectoryWatcher::removeDirectory(const QString &dir) -{ - if (debugWatcher) - qDebug() << Q_FUNC_INFO << dir; - m_directories.removeOne(dir); - m_directoryCount[dir] -= 1; - if (m_directoryCount[dir] == 0) - m_watcher->removePath(dir); -} - -QStringList DirectoryWatcher::files() const -{ - if (debugWatcher) - qDebug() << Q_FUNC_INFO << m_files.keys(); - return m_files.keys(); -} - -void DirectoryWatcher::addFile(const QString &filePath) -{ - addFiles(QStringList() << filePath); -} - -void DirectoryWatcher::addFiles(const QStringList &filePaths) -{ - foreach (const QString filePath, filePaths) { - QFileInfo file(filePath); - m_files.insert(file.absoluteFilePath(),file.lastModified()); - } -} - -void DirectoryWatcher::removeFile(const QString &filePath) -{ - m_files.remove(filePath); -} - -void DirectoryWatcher::slotDirectoryChanged(const QString &path) -{ - if (debugWatcher) - qDebug() << Q_FUNC_INFO << path; - if (!m_directories.contains(path) - || m_pendingDirectories.contains(path)) - return; - - if (!m_timer) { - m_timer = new QTimer(this); - m_timer->setSingleShot(true); - m_timer->setInterval(500); // delay for 0.5 sec - connect(m_timer, SIGNAL(timeout()), this, SLOT(slotDelayedDirectoriesChanged())); - } - if (!m_timer->isActive()) - m_timer->start(); - m_pendingDirectories.push_back(path); -} - -void DirectoryWatcher::slotDelayedDirectoriesChanged() -{ - if (debugWatcher) - qDebug() << Q_FUNC_INFO << " emitting " << m_pendingDirectories; - const QStringList::const_iterator cend = m_pendingDirectories.constEnd(); - for (QStringList::const_iterator it = m_pendingDirectories.constBegin(); it != cend; ++it) { - const QString dir = *it; - if (!QFileInfo(dir).exists()) - removeDirectory(*it); - emit directoryChanged(*it); - updateFileList(*it); - } - m_pendingDirectories.clear(); -} - -void DirectoryWatcher::updateFileList(const QString &dir) -{ - const QStringList monitoredFiles = m_files.keys(); - QStringList removedFiles = monitoredFiles; - if (QFileInfo(dir).exists()) { - // Compare directory contents and emit signals - QFileInfoList entryInfoList - = QDir(dir).entryInfoList(QDir::Files|QDir::CaseSensitive); - // Loop over directory creating the new map of file->time, removing - // the existing entries from the old map - const QFileInfoList::const_iterator cend = entryInfoList.constEnd(); - for (QFileInfoList::const_iterator filIt = entryInfoList.constBegin(); - filIt != cend; ++filIt) { - const QString path = filIt->absoluteFilePath(); - FileModificationTimeMap::iterator mapIt = m_files.find(path); - if (mapIt != m_files.end()) { - const QDateTime lastModified = filIt->lastModified(); - if (lastModified > mapIt.value()) { - if (debugWatcher) - qDebug() << Q_FUNC_INFO << "emitting file changed" << path; - emit fileChanged(path); - m_files[path] = lastModified; - } - removedFiles.removeOne(path); - } - } - } - - if (!removedFiles.isEmpty()) { - foreach (const QString &file, removedFiles) - removeFile(file); - } -} - int FileWatcher::m_objectCount = 0; QHash FileWatcher::m_fileCount; QFileSystemWatcher *FileWatcher::m_watcher = 0; @@ -256,7 +97,5 @@ void FileWatcher::removeFile(const QString &file) m_watcher->removePath(file); } - - } // namespace Internal } // namespace Qt4ProjectManager diff --git a/src/plugins/qt4projectmanager/directorywatcher.h b/src/plugins/qt4projectmanager/directorywatcher.h index af73a131f0d..35ceaed91e1 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) ** @@ -47,46 +47,6 @@ QT_END_NAMESPACE namespace Qt4ProjectManager { namespace Internal { -class DirectoryWatcher : public QObject -{ - Q_DISABLE_COPY(DirectoryWatcher) - Q_OBJECT -public: - explicit DirectoryWatcher(QObject *parent = 0); - virtual ~DirectoryWatcher(); - - QStringList directories() const; - void addDirectory(const QString &dir); - void removeDirectory(const QString &dir); - - QStringList files() const; - void addFile(const QString &filePath); - void addFiles(const QStringList &filePaths); - void removeFile(const QString &filePath); - -signals: - void directoryChanged(const QString &path); - void fileChanged(const QString &path); - -private slots: - void slotDirectoryChanged(const QString &); - void slotDelayedDirectoriesChanged(); - -private: - void updateFileList(const QString &dir); - - static int m_objectCount; - static QHash m_directoryCount; - static QFileSystemWatcher *m_watcher; - - QTimer *m_timer; - QStringList m_directories; - QStringList m_pendingDirectories; - - typedef QHash FileModificationTimeMap; - FileModificationTimeMap m_files; -}; - class FileWatcher : public QObject { Q_DISABLE_COPY(FileWatcher) diff --git a/src/plugins/qt4projectmanager/embeddedpropertiespage.cpp b/src/plugins/qt4projectmanager/embeddedpropertiespage.cpp index 61d9ff0bc37..2912084b6ce 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 93b7bae4cac..e527e9e4546 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 52187715fbf..1d43e77f574 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 76e2b11b31f..24b21cde6f3 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) ** @@ -34,7 +34,7 @@ #ifndef GCCPARSER_H #define GCCPARSER_H -#include +#include #include diff --git a/src/plugins/qt4projectmanager/gccpreprocessor.cpp b/src/plugins/qt4projectmanager/gccpreprocessor.cpp index a9463778730..4ceef15c053 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 484dee0b538..5ca59856e03 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 5b03ba2d5b0..49d8ccd8a30 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 f5aa55d22e5..140252c195b 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 74012f89750..46ea6095df8 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 5e6d3fce824..34d4a7e881f 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) ** @@ -36,7 +36,7 @@ #include "qt4project.h" #include "qt4projectmanagerconstants.h" -#include +#include #include #include diff --git a/src/plugins/qt4projectmanager/makestep.h b/src/plugins/qt4projectmanager/makestep.h index ad066d23c40..0f0f189bfda 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) ** @@ -37,14 +37,13 @@ #include "qtversionmanager.h" #include "ui_makestep.h" -#include -#include +#include +#include namespace Qt4ProjectManager { class Qt4Project; - // NBS move this class to an own plugin? So that there can be a make project at a future time class MakeStep : public ProjectExplorer::AbstractProcessStep { diff --git a/src/plugins/qt4projectmanager/msvcenvironment.cpp b/src/plugins/qt4projectmanager/msvcenvironment.cpp index dcfc15e10c8..ebe54104f8d 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) ** @@ -33,12 +33,13 @@ #include "msvcenvironment.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include using namespace Qt4ProjectManager::Internal; using ProjectExplorer::Environment; diff --git a/src/plugins/qt4projectmanager/msvcenvironment.h b/src/plugins/qt4projectmanager/msvcenvironment.h index b1aef04e1c9..c7d7729a99c 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) ** @@ -34,10 +34,10 @@ #ifndef MSVCENVIRONMENT_H #define MSVCENVIRONMENT_H -#include -#include +#include +#include -#include +#include namespace Qt4ProjectManager { namespace Internal { diff --git a/src/plugins/qt4projectmanager/msvcparser.cpp b/src/plugins/qt4projectmanager/msvcparser.cpp index 7ef3d7c955f..d4a23264c79 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 4811c90773c..06e0c3e6d61 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) ** @@ -34,7 +34,7 @@ #ifndef MSVCPARSER_H #define MSVCPARSER_H -#include +#include #include @@ -58,4 +58,4 @@ private: } // namespace ProjectExplorer -#endif // MsvcParser +#endif // MSVCPARSER_H diff --git a/src/plugins/qt4projectmanager/profilecache.h b/src/plugins/qt4projectmanager/profilecache.h index eef60ee5624..484978d662d 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 6d4f36f1f79..e173bff2316 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 36017aa6eb8..e2c6c3be5c8 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 bc9e1729eb4..dfe8c33232f 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 f73edc8f47b..8f341855e8a 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 90338130378..783acb35883 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 bdbf9c60457..0340b8efdce 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 a8069b54a79..51337d7f242 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 81e0ad2f944..c9df6ee7e01 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 62bef9bcc6b..970ae1247fa 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 71dae75bf29..bce753f4160 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 f6c422b9a0d..8d9eb1c2caa 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 2766701eab3..0f5e14a9d7b 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 1b50ee296d2..d8c4204ccdf 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 4431e59bfb8..d2d7980df04 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) ** @@ -34,10 +34,12 @@ #ifndef QMAKESTEP_H #define QMAKESTEP_H -#include +#include "ui_qmakestep.h" + +#include + #include -#include "ui_qmakestep.h" namespace Qt4ProjectManager { @@ -46,10 +48,11 @@ class Qt4Project; class QMakeStep : public ProjectExplorer::AbstractProcessStep { Q_OBJECT + public: QMakeStep(Qt4Project * project); ~QMakeStep(); - virtual bool init(const QString & name); + virtual bool init(const QString &name); virtual void run(QFutureInterface &); virtual QString name(); virtual QString displayName(); @@ -58,6 +61,7 @@ public: QStringList arguments(const QString &buildConfiguration); void setForced(bool b); bool forced(); + protected: virtual void processStartupFailed(); virtual bool processFinished(int exitCode, QProcess::ExitStatus status); diff --git a/src/plugins/qt4projectmanager/qt4buildconfigwidget.cpp b/src/plugins/qt4projectmanager/qt4buildconfigwidget.cpp index 13fb5980a90..de7141b0794 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 c7910b44b04..5e584fa149f 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 f0195cfd847..8b207bc64a6 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 1218607f5c5..bc8bab91d54 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 7157c8788f5..14fb56a38e9 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) ** @@ -49,6 +49,7 @@ #include #include +#include #include @@ -488,6 +489,9 @@ QStringList Qt4PriFileNode::varNames(FileType type) return vars; } +#include +#include + /*! \class Qt4ProFileNode Implements abstract ProjectNode class @@ -498,8 +502,7 @@ Qt4ProFileNode::Qt4ProFileNode(Qt4Project *project, : Qt4PriFileNode(project, this, filePath), // own stuff m_projectType(InvalidProject), - m_isQBuildProject(false), - m_dirWatcher(new DirectoryWatcher(this)) + m_isQBuildProject(false) { if (parent) setParent(parent); @@ -507,14 +510,13 @@ Qt4ProFileNode::Qt4ProFileNode(Qt4Project *project, m_updateTimer.setInterval(100); m_updateTimer.setSingleShot(true); - connect(m_dirWatcher, SIGNAL(directoryChanged(const QString&)), - this, SLOT(updateGeneratedFiles())); - connect(m_dirWatcher, SIGNAL(fileChanged(const QString&)), - this, SLOT(fileChanged(const QString&))); connect(m_project, SIGNAL(activeBuildConfigurationChanged()), this, SLOT(update())); connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(update())); + + connect(ProjectExplorer::ProjectExplorerPlugin::instance()->buildManager(), SIGNAL(buildStateChanged(ProjectExplorer::Project*)), + this, SLOT(buildStateChanged(ProjectExplorer::Project*))); } Qt4ProFileNode::~Qt4ProFileNode() @@ -522,6 +524,12 @@ Qt4ProFileNode::~Qt4ProFileNode() } +void Qt4ProFileNode::buildStateChanged(ProjectExplorer::Project *project) +{ + if (project == m_project && !ProjectExplorer::ProjectExplorerPlugin::instance()->buildManager()->isBuilding(m_project)) + updateUiFiles(); +} + bool Qt4ProFileNode::hasTargets() const { return (projectType() == ApplicationTemplate) || (projectType() == LibraryTemplate); @@ -689,7 +697,7 @@ void Qt4ProFileNode::update() emit qt4Watcher->variablesChanged(this, m_varValues, newVarValues); } - updateGeneratedFiles(); + updateUiFiles(); foreach (NodesWatcher *watcher, watchers()) if (Qt4NodesWatcher *qt4Watcher = qobject_cast(watcher)) @@ -698,15 +706,6 @@ void Qt4ProFileNode::update() delete reader; } -void Qt4ProFileNode::fileChanged(const QString &filePath) -{ - CppTools::CppModelManagerInterface *modelManager = - ExtensionSystem::PluginManager::instance()->getObject(); - - // TODO compress - modelManager->updateSourceFiles(QStringList() << filePath); -} - namespace { // find all ui files in project class FindUiFileNodesVisitor : public ProjectExplorer::NodesVisitor { @@ -726,53 +725,54 @@ namespace { }; } -/* - Adds ui_xxx.h files to tree and monitors them / the UI_DIR directory for changes - */ -void Qt4ProFileNode::updateGeneratedFiles() +// This function is triggered after a build, and updates the state ui files +// That is it adds files that didn't exist yet to the project tree, and calls +// updateSourceFiles() for files that changed +// It does so by storing a modification time for each ui file we know about. + +// TODO this function should also be called if the build configuration changes +// since the build directory could change, and thus the generated files that are present +// TODO check that it works +void Qt4ProFileNode::updateUiFiles() { + // Only those two project types can have ui files for us if (m_projectType != ApplicationTemplate && m_projectType != LibraryTemplate) return; + // Find all ui files FindUiFileNodesVisitor uiFilesVisitor; this->accept(&uiFilesVisitor); const QList uiFiles = uiFilesVisitor.uiFileNodes; - // monitor uic dir (only if there are .ui files) + // Find the UiDir, there can only ever be one + QString uiDir; // We should default to the build directory + QStringList tmp = m_varValues[UiDirVar]; + if (tmp.size() != 0) + uiDir = tmp.first(); - QSet oldUiDirs = m_dirWatcher->directories().toSet(); - QSet newUiDirs = - (!uiFiles.isEmpty()) ? m_varValues[UiDirVar].toSet() : QSet(); - foreach (const QString &uiDir, oldUiDirs - newUiDirs) - m_dirWatcher->removeDirectory(uiDir); - foreach (const QString &uiDir, newUiDirs - oldUiDirs) - m_dirWatcher->addDirectory(uiDir); - - // update generated files - - // Already existing FileNodes + // Collect all existing generated files QList existingFileNodes; foreach (FileNode *file, fileNodes()) { if (file->isGenerated()) existingFileNodes << file; } - // Convert uiFile to uiHeaderFilePath, find all headers that correspond - // and try to find them in uicDirs + // and try to find them in uiDir QStringList newFilePaths; - foreach (const QString &uicDir, m_varValues[UiDirVar]) { - foreach (FileNode *uiFile, uiFiles) { - const QString uiHeaderFilePath - = QString("%1/ui_%2.h").arg(uicDir, QFileInfo(uiFile->path()).baseName()); - if (QFileInfo(uiHeaderFilePath).exists()) - newFilePaths << uiHeaderFilePath; - } + foreach (FileNode *uiFile, uiFiles) { + const QString uiHeaderFilePath + = QString("%1/ui_%2.h").arg(uiDir, QFileInfo(uiFile->path()).baseName()); + if (QFileInfo(uiHeaderFilePath).exists()) + newFilePaths << uiHeaderFilePath; } + // Create a diff between those lists QList toRemove; QList toAdd; + // The list of files for which we call updateSourceFile + QStringList toUpdate; qSort(newFilePaths); qSort(existingFileNodes.begin(), existingFileNodes.end(), ProjectNode::sortNodesByPath); @@ -788,6 +788,13 @@ void Qt4ProFileNode::updateGeneratedFiles() toAdd << new FileNode(*newPathIter, ProjectExplorer::HeaderType, true); ++newPathIter; } else { // *existingNodeIter->path() == *newPathIter + QString fileName = (*existingNodeIter)->path(); + QMap::const_iterator it = m_uitimestamps.find(fileName); + QDateTime lastModified = QFileInfo(fileName).lastModified(); + if (it == m_uitimestamps.constEnd() || it.value() < lastModified) { + toUpdate << fileName; + m_uitimestamps[fileName] = lastModified; + } ++existingNodeIter; ++newPathIter; } @@ -801,16 +808,33 @@ void Qt4ProFileNode::updateGeneratedFiles() ++newPathIter; } + // Update project tree if (!toRemove.isEmpty()) { foreach (FileNode *file, toRemove) - m_dirWatcher->removeFile(file->path()); + m_uitimestamps.remove(file->path()); removeFileNodes(toRemove, this); } + + CppTools::CppModelManagerInterface *modelManager = + ExtensionSystem::PluginManager::instance()->getObject(); + if (!toAdd.isEmpty()) { - foreach (FileNode *file, toAdd) - m_dirWatcher->addFile(file->path()); + foreach (FileNode *file, toAdd) { + m_uitimestamps.insert(file->path(), QFileInfo(file->path()).lastModified()); + toUpdate << file->path(); + + // Also adding files depending on that. + QString fileName = QFileInfo(file->path()).fileName(); + foreach (CPlusPlus::Document::Ptr doc, modelManager->snapshot()) { + if (doc->includedFiles().contains(fileName)) { + if (!toUpdate.contains(doc->fileName())) + toUpdate << doc->fileName(); + } + } + } addFileNodes(toAdd, this); } + modelManager->updateSourceFiles(toUpdate); } ProFileReader *Qt4PriFileNode::createProFileReader() const @@ -824,9 +848,7 @@ ProFileReader *Qt4PriFileNode::createProFileReader() const reader->setQtVersion(version); } - QHash variables; - variables.insert(QLatin1String("OUT_PWD"), QStringList(m_qt4ProFileNode->buildDir())); - reader->addVariables(variables); + reader->setOutputDir(m_qt4ProFileNode->buildDir()); return reader; } @@ -957,13 +979,6 @@ void Qt4ProFileNode::invalidate() clear(); - // remove monitored files/directories - foreach (const QString &file, m_dirWatcher->files()) - m_dirWatcher->removeFile(file); - foreach (const QString &dir, m_dirWatcher->directories()) - m_dirWatcher->removeDirectory(dir); - - // change project type Qt4ProjectType oldType = m_projectType; m_projectType = InvalidProject; diff --git a/src/plugins/qt4projectmanager/qt4nodes.h b/src/plugins/qt4projectmanager/qt4nodes.h index 487177c84ae..5d428cc6720 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) ** @@ -35,10 +35,13 @@ #define QT4NODES_H #include +#include #include #include #include +#include +#include // defined in proitems.h QT_BEGIN_NAMESPACE @@ -184,8 +187,8 @@ public slots: void scheduleUpdate(); void update(); private slots: - void fileChanged(const QString &filePath); - void updateGeneratedFiles(); + void updateUiFiles(); + void buildStateChanged(ProjectExplorer::Project*); private: Qt4ProFileNode *createSubProFileNode(const QString &path); @@ -205,7 +208,7 @@ private: bool m_isQBuildProject; QTimer m_updateTimer; - DirectoryWatcher *m_dirWatcher; + QMap m_uitimestamps; friend class Qt4NodeHierarchy; }; diff --git a/src/plugins/qt4projectmanager/qt4project.cpp b/src/plugins/qt4projectmanager/qt4project.cpp index dd61dbde099..7af448e2331 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 a70669f49f0..24b7e45d6e8 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 7e83418eaae..792ae2aed45 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) ** @@ -48,7 +48,9 @@ #include #include #include +#include #include +#include #include #include diff --git a/src/plugins/qt4projectmanager/qt4projectmanager.h b/src/plugins/qt4projectmanager/qt4projectmanager.h index c6eb4127d75..4bb4d6eaf18 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 e76b4ef5f8c..1ef68a68f5f 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 debb89dae44..a8dfb4cb89d 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) ** @@ -48,11 +48,14 @@ #include "profilereader.h" #include "gdbmacrosbuildstep.h" +#include #include +#include +#include #include #include #include -#include +#include #include #include @@ -82,7 +85,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 &context) @@ -100,7 +103,7 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList & /*arguments*/, QStr m_projectExplorer = m_core->pluginManager()->getObject(); - 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 +142,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 context = QList() << 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 ee46f1f6aa0..584a9bfca47 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 606e0be1239..64961844996 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) ** @@ -306,14 +306,10 @@ QString Qt4RunConfiguration::qmakeBuildConfigFromBuildConfiguration(const QStrin QVariant qmakeBuildConfiguration = qs->value(buildConfigurationName, "buildConfiguration"); if (qmakeBuildConfiguration.isValid()) { QtVersion::QmakeBuildConfig projectBuildConfiguration = QtVersion::QmakeBuildConfig(qmakeBuildConfiguration.toInt()); - if (projectBuildConfiguration & QtVersion::BuildAll) { - if (projectBuildConfiguration & QtVersion::DebugBuild) - return "debug"; - else - return "release"; - } else { - return ""; - } + if (projectBuildConfiguration & QtVersion::DebugBuild) + return "debug"; + else + return "release"; } else { // Old sytle always CONFIG+=debug_and_release if (qobject_cast(project())->qtVersion(buildConfigurationName)->defaultBuildConfig() & QtVersion::DebugBuild) diff --git a/src/plugins/qt4projectmanager/qt4runconfiguration.h b/src/plugins/qt4projectmanager/qt4runconfiguration.h index 9e289791438..c51ac521fe5 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 e39240118d1..2becf546550 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 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 a76a62ada04..872b44b2178 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) ** @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include @@ -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 fefce92e557..04df918bb51 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 46ac60372a0..2d9db283ea4 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 2be52a0a8d1..73884791fe8 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 ffb398d1e7b..36fff218dde 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 7a1bf47a4c4..8ab95fa7429 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 e8ba72a5575..975548eb6ea 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 73d5438ffee..610781613af 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 f84812425b2..f5d3bb86f41 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 1df3a0ba1a3..14df3821ccd 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 f3098e17506..dd7d7e7d02d 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 1c525704675..0bc379ecbea 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 4092fee5dab..080cf802c26 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 16887d10304..713268736c6 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 e02eaa32bb9..680022c8085 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 ff6639ad484..e79cd1b6588 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 6e2eb725888..203179d4c91 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 6b435b5e415..814164457e2 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 8472df61fe8..30f55bc84f3 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 fb362732d55..7ba0980c2d9 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 fdb63202f8d..d8cb661735c 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 cab7b56b46a..910b0e5d07d 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 e8146557f21..854045bd6ed 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 831e0e908dd..15f334cf202 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 1b4f1a6074a..9858251a9df 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 a1889ef20d7..5b38e05b33a 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 d2f3ad850df..2c804a16c3a 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 39ba4f0d942..4062b69e507 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 #include -#include +#include #include #include #include @@ -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 73e34fc527d..1dda5a95e92 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 f51d8a8329e..bb306f1a3f2 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 -#include +#include +#include #include #include @@ -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 3e21889bdff..d18ee2d25ff 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 da6b6948641..0e2e52c3661 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 e63c9d16c44..392b627363a 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 b2bfee27e20..08654aa0350 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) ** @@ -34,7 +34,6 @@ #ifndef RQTSCRIPTEDITORFACTORY_H #define RQTSCRIPTEDITORFACTORY_H -#include #include #include diff --git a/src/plugins/qtscripteditor/qtscripteditorplugin.cpp b/src/plugins/qtscripteditor/qtscripteditorplugin.cpp index d03692b9d6d..1bf230155b6 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 #include #include -#include +#include #include #include #include @@ -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 d1ab725b645..5bd1d5ba17e 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 66bb3c88fac..3c1a640cf3c 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 e1b60194860..586671c2a7e 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 1909f4af031..65aea6d2552 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 883fc078e1f..ee9d302be5c 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 2948d990df1..84c60dfa8c7 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 7df79ae700b..abe167d61d3 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 dbafa92f63a..bca0cdbed75 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 4a566e041dd..1765a3b4e82 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 77c66cd0d78..f30f65aaa30 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 fbf8c57ed67..c935b9fb2c3 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 adca7a71a40..5cca4fa7d92 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 b06e2bb9768..fa5664d18fe 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 d8039de8744..7b09fdcede9 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 4462810ff25..2f2d6b2ff94 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 d887df38299..3c77f68a76d 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 9a0d2be319a..8b89503df4b 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 6bff7a73ed9..05554dea8d0 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 QuickOpenFiltersFilter::matchesFor(const QString &entry) { QList 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 3c68d815c24..d4ef1520d98 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 b6e5cb9ccb1..c8175b8f160 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 52277d0e545..e9f9a5ed3ae 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 d38502815de..fe599b215a0 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 #include #include -#include +#include #include #include @@ -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() << Core::Constants::C_GLOBAL_ID); + Core::Command *cmd = core->actionManager()->registerAction(action, actionId, QList() << 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(); - qSort(m_filter.begin(), m_filter.end(), filterLessThan); + m_filters = ExtensionSystem::PluginManager::instance()->getObjects(); + 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 QuickOpenPlugin::filter() +QList QuickOpenPlugin::filters() { - return m_filter; + return m_filters; } /*! @@ -208,20 +207,20 @@ QList 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 QuickOpenPlugin::customFilter() +QList QuickOpenPlugin::customFilters() { - return m_customFilter; + return m_customFilters; } -void QuickOpenPlugin::setFilter(QList f) +void QuickOpenPlugin::setFilters(QList f) { - m_filter = f; + m_filters = f; m_quickOpenToolWindow->updateFilterList(); } -void QuickOpenPlugin::setCustomFilter(QList filter) +void QuickOpenPlugin::setCustomFilters(QList filters) { - m_customFilter = filter; + m_customFilters = filters; } int QuickOpenPlugin::refreshInterval() @@ -243,10 +242,10 @@ void QuickOpenPlugin::setRefreshInterval(int interval) void QuickOpenPlugin::refresh(QList filters) { if (filters.isEmpty()) - filters = m_filter; + filters = m_filters; QFuture task = QtConcurrent::run(&IQuickOpenFilter::refresh, filters); Core::FutureProgress *progress = ExtensionSystem::PluginManager::instance()->getObject() - ->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 e87e8b313d6..fdbcb03434b 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 filter(); - QList customFilter(); - void setFilter(QList f); - void setCustomFilter(QList f); + QList filters(); + QList customFilters(); + void setFilters(QList f); + void setCustomFilters(QList f); int refreshInterval(); void setRefreshInterval(int interval); @@ -83,8 +83,8 @@ private: QuickOpenToolWindow *m_quickOpenToolWindow; SettingsPage *m_settingsPage; - QList m_filter; - QList m_customFilter; + QList m_filters; + QList 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 c3f390f54b7..40cbeb7edcf 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 QuickOpenToolWindow::filtersFor(const QString &text, QString &searchText) { - QList filters = m_quickOpenPlugin->filter(); + QList 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 896c1ab1edd..ddc753d67f6 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 c5ab95477b8..17415916342 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 755763b2f67..e169bca6a0b 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 42070682f9a..86a4ca0a7ca 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 b4d8db227c3..c944d37bc17 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 418faaf4f23..060d11aee54 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 f6c87d587bf..b4216c66f0b 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 b2d9a6ceaf0..e42082d4c1e 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 80d124db548..c853732350e 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 df5d97c7569..007d537c36e 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 64c1dc9cfc7..4a623c77f4a 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 8d6ffa9df6d..4097fdecacc 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) ** @@ -34,16 +34,13 @@ #ifndef RRESOURCEEDITORFACTORY_H #define RRESOURCEEDITORFACTORY_H -#include #include #include namespace Core { class ICore; -class IEditor; -class IFile; -} +} // namespace Core namespace ResourceEditor { namespace Internal { diff --git a/src/plugins/resourceeditor/resourceeditorplugin.cpp b/src/plugins/resourceeditor/resourceeditorplugin.cpp index 2d8c3370bf0..851cf8634c1 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 #include #include -#include +#include #include #include @@ -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 const idList = QList() << pluginId; diff --git a/src/plugins/resourceeditor/resourceeditorplugin.h b/src/plugins/resourceeditor/resourceeditorplugin.h index d646be712a8..fd9576ea00d 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 652470cb870..db4ed089805 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 4aff0ae9898..4070e155cd6 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 72e801b1ef0..b2e76ed154a 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 0ddc677f2a1..e435755b2fc 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 27b89154e53..6ec1438298c 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 de8b1640594..bd1afcb2d22 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 47a8fecc5dc..129d27d63cc 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 4fb83a48819..5749bd0cbe9 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 ca108d499ac..1c9937cb184 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 f97ae89a7c1..072a9e68e47 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 d46e773b732..c014a6432a1 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::ActionManagerInterface *am = m_core->actionManager(); + Core::ActionManager *am = m_core->actionManager(); QList 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 9c4e03463f7..3647244d659 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 6a0f3a0a7dc..f6377e199af 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 8c271a14db4..f0c4e032751 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 919bb317abd..8a77b81af66 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 db9f6583950..e2c0b418aa8 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 42a00c8059e..dad23a7490c 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 9b857302c11..933860e45c2 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 e8c300c6006..fb2842602e2 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 973a2824e07..777d0901ef2 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 m_widget; diff --git a/src/plugins/subversion/subversionconstants.h b/src/plugins/subversion/subversionconstants.h index 1d385e560d6..bd06b2b0bd8 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 a600f841f37..d319dd29155 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 bcccef45487..489fb1bfda5 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 44950872c22..375e0332411 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 518c8e1b730..6966005de4a 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 f8f4740b542..e4be5a89bc2 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 130c26a781d..52a278d4cb0 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 36182eb94a0..811e4651415 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,9 +53,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include @@ -245,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) @@ -293,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); @@ -308,11 +304,11 @@ bool SubversionPlugin::initialize(const QStringList & /*arguments*/, QString *er QList 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); @@ -320,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); @@ -345,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); @@ -364,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); @@ -377,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); @@ -385,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); @@ -529,11 +525,7 @@ SubversionSubmitEditor *SubversionPlugin::openSubversionSubmitEditor(const QStri Core::IEditor *editor = m_coreInstance->editorManager()->openEditor(fileName, QLatin1String(Constants::SUBVERSIONCOMMITEDITOR_KIND)); SubversionSubmitEditor *submitEditor = qobject_cast(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; diff --git a/src/plugins/subversion/subversionplugin.h b/src/plugins/subversion/subversionplugin.h index 7909b3f2328..729bbc909fd 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) ** @@ -39,8 +39,8 @@ #include #include #include -#include #include +#include #include #include diff --git a/src/plugins/subversion/subversionsettings.cpp b/src/plugins/subversion/subversionsettings.cpp index 3460739f4f8..65e95d5857b 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 1719016c590..9b7c5a2fe52 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 c65a2530dd7..95a901f6cd5 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) ** diff --git a/src/plugins/subversion/subversionsubmiteditor.h b/src/plugins/subversion/subversionsubmiteditor.h index 6aae19c824e..3b4b331c27e 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) ** diff --git a/src/plugins/texteditor/basefilefind.cpp b/src/plugins/texteditor/basefilefind.cpp index 60072084c7b..61fc6eadc17 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 -#include +#include #include #include #include diff --git a/src/plugins/texteditor/basefilefind.h b/src/plugins/texteditor/basefilefind.h index e20a750330e..2aacf2d9650 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 de6054cfa89..eb6069df6d9 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 b54a45b888a..83f42dcee7b 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 ea4f665a7e9..9f145bc0801 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 7cdcafdf7fb..e5e79d4a4a2 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 &selections); diff --git a/src/plugins/texteditor/basetexteditor_p.h b/src/plugins/texteditor/basetexteditor_p.h index 2b586823851..3310b0665d2 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 5d4c17ac9ba..4e4adf28bdc 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 4010db3f6bf..cbe9837e5a8 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 2c4138dbc7c..4252a3ff40b 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 e221d279e6f..4631b6b49f6 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 34648b4bb00..5c863e3afe2 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 #include +#include + 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 CompletionSupport::getCompletions() const diff --git a/src/plugins/texteditor/completionsupport.h b/src/plugins/texteditor/completionsupport.h index d35a1347d77..9704f80f2a2 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 2c9f6017b7f..5f4ccfe3e10 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 b124d2e257a..b88dc7ffdc1 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 c3b3deb15f9..5a213b66705 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 86a216f24cc..4d23b2889db 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 ac2276ebed0..c8c1020563e 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 dc1ee8e53f0..e38c838f87d 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 2fcef19077f..d421a81d272 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 130719f47e5..16c2f639624 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 bdc86ca3e13..1eaccaba6e2 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 dd1711cfce2..6a518f518d3 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 149886cca52..d20763b0cab 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 645390288b0..eea75e2ccc8 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 3144427f498..c3faac470c4 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 c24692e61de..09cd9b57735 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 57b93461b6c..940f88477df 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 a084ac6c332..cb02b0f8088 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 353e7b005da..bc29b1db374 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 277d7fce0ca..b9370bca9cf 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 15dbb1b9911..83067791eb6 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 874619cce55..92a3a79ea4f 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 b1604a94f12..e0eec76f137 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 2d09e0d6b2a..b92b4973450 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 7ccf80f9811..d90b462d321 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 413e650c7bc..46d4100112f 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 2a8fbc31c3d..717ba07ea02 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 b94f0a19f5c..b5814124b49 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 d39a7af2291..0955ec8c9c6 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 5876f889a06..7540d630271 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 12475d221b1..44b6f33b17d 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 #include #include -#include +#include #include #include @@ -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 45dcca1f97f..ea30cad7413 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 f87e1df6b83..7db120f144a 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 01a6ccdf95f..d76bd716708 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 #include #include -#include -#include +#include +#include #include #include #include @@ -120,14 +120,14 @@ bool TextEditorPlugin::initialize(const QStringList & /*arguments*/, QString *er int contextId = m_core->uniqueIDManager()->uniqueIdentifier(TextEditor::Constants::C_TEXTEDITOR); QList context = QList() << 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 8eeb1e3e8e6..65c7c3e48e8 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 8ecabf2ce1f..2637b5da545 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 e64cb795b2d..fda32d20fae 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 1236a645370..e755233735d 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 788b60f21d1..2cf2a01b395 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 c55a526fc1d..f6d95a8030d 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 e32fdf077bf..c1ca81a50e6 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 4177608c271..392b9c26964 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 1bf543347b8..bc10a21180d 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 f880d780666..b662abbf409 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 20b8bd8232b..f64d45d153b 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 b4cc9af0ff0..96379976172 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 20d03c80582..63258dcf6c1 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 902b830f7d4..9c7f2cca3f5 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 fd1bbf83688..cc4129f9015 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 index f12eab38d14..2cad63e9caa 100644 --- a/src/plugins/vcsbase/submitfilemodel.cpp +++ b/src/plugins/vcsbase/submitfilemodel.cpp @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation 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,20 +48,47 @@ SubmitFileModel::SubmitFileModel(QObject *parent) : setHorizontalHeaderLabels(headerLabels); } -QList SubmitFileModel::addFile(const QString &fileName, const QString &status, bool checked) +QList 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 row; row << statusItem << fileItem; + return row; +} + +QList SubmitFileModel::addFile(const QString &fileName, const QString &status, bool checked) +{ + const QList row = createFileRow(fileName, status, checked); appendRow(row); return row; } +QList SubmitFileModel::rowAt(int row) const +{ + const int colCount = columnCount(); + QList rc; + for (int c = 0; c < colCount; c++) + rc.push_back(item(row, c)); + return rc; +} + +QList SubmitFileModel::findRow(const QString &text, int column) const +{ + // Single item + const QList 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; diff --git a/src/plugins/vcsbase/submitfilemodel.h b/src/plugins/vcsbase/submitfilemodel.h index fef89df83be..e5e28dc093b 100644 --- a/src/plugins/vcsbase/submitfilemodel.h +++ b/src/plugins/vcsbase/submitfilemodel.h @@ -2,7 +2,7 @@ ** ** This file is part of Qt Creator ** -** Copyright (c) 2008 Nokia Corporation 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,9 +49,16 @@ class VCSBASE_EXPORT SubmitFileModel : public QStandardItemModel public: explicit SubmitFileModel(QObject *parent = 0); - // Convenience to add a file plus status text. + // Convenience to create and add rows containing a file plus status text. + static QList createFileRow(const QString &fileName, const QString &status = QString(), bool checked = true); QList addFile(const QString &fileName, const QString &status = QString(), bool checked = true); + // Find convenience that returns the whole row (as opposed to QStandardItemModel::find). + QList findRow(const QString &text, int column = 0) const; + + // Convenience to obtain a row + QList 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); diff --git a/src/plugins/vcsbase/vcsbase_global.h b/src/plugins/vcsbase/vcsbase_global.h index 9196019fbd9..a4dff9426fe 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 9cdcbb8deab..583ffb0dd56 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 084109069d5..6951d39eea5 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 fcb323e6930..42c31c6c37d 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 9633f60ba14..7cbd8a9233e 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 3474c4a05f2..c97125b9108 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 d130c266459..a47a66ab064 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 #include #include -#include +#include #include #include @@ -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 m_contexts; - QPointer m_undoAction; - QPointer m_redoAction; - QPointer m_submitAction; QPointer m_diffAction; + QPointer 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,20 @@ 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(); @@ -139,6 +135,17 @@ 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() { } diff --git a/src/plugins/vcsbase/vcsbasesubmiteditor.h b/src/plugins/vcsbase/vcsbasesubmiteditor.h index 91b10d488f9..9bea506126d 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,10 +39,12 @@ #include #include +#include QT_BEGIN_NAMESPACE class QIcon; class QAbstractItemModel; +class QAction; QT_END_NAMESPACE namespace Core { @@ -60,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 @@ -85,13 +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 Context; @@ -100,11 +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); diff --git a/src/plugins/vcsbase/vcsbasetextdocument.cpp b/src/plugins/vcsbase/vcsbasetextdocument.cpp index fcd50c12f4b..75a9fdf53f5 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 e4bb7d1ce83..6517037859a 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 fe9d0d616e0..636f2d617c9 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 4d06d8437cd..b1b0eaab6cf 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 d151bb6fa28..312ed53dbda 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 7984626a788..8b881aad4bf 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 1c0d17a7bce..911e421f3f9 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 76edcd31765..81ed0393096 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 3b40172633a..35140ebd99f 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 f78e88939e5..4bc970b78ab 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 d080780f93f..715c6d2f0c2 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 7935a1cc498..5f5368fb7ae 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 bf6f53cee39..df5e3c59a2f 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/cplusplus/ast/ast.pro b/tests/auto/cplusplus/ast/ast.pro index 6974c6bbb4c..39fd14105de 100644 --- a/tests/auto/cplusplus/ast/ast.pro +++ b/tests/auto/cplusplus/ast/ast.pro @@ -1,5 +1,4 @@ load(qttest_p4) include(../shared/shared.pri) QT = core - SOURCES += tst_ast.cpp diff --git a/tests/auto/cplusplus/ast/tst_ast.cpp b/tests/auto/cplusplus/ast/tst_ast.cpp index 5756d2dd224..689da076ea1 100644 --- a/tests/auto/cplusplus/ast/tst_ast.cpp +++ b/tests/auto/cplusplus/ast/tst_ast.cpp @@ -36,6 +36,9 @@ public: { return parse(source, TranslationUnit::ParseStatement); } private slots: + // declarations + void gcc_attributes_1(); + // expressions void simple_name(); void template_id(); @@ -54,6 +57,13 @@ private slots: void objc_protocol_definition_1(); }; +void tst_AST::gcc_attributes_1() +{ + QSharedPointer unit(parseDeclaration("\n" +"static inline void *__attribute__((__always_inline__)) _mm_malloc(size_t size, size_t align);" + )); +} + void tst_AST::simple_name() { QSharedPointer unit(parseExpression("a")); diff --git a/tests/auto/extensionsystem/tst_composite.cpp b/tests/auto/extensionsystem/tst_composite.cpp index 6606f243acc..011fb508747 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 29936b2568f..539a40f335c 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 28a05dcd530..b22504b862b 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 ec5945d2b79..bb06561dd52 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 eef60ee5624..484978d662d 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 29ec0ff1052..098a3bf2f8a 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/conf.c++ b/tests/manual/cplusplus/conf.c++ index fbfad57a4bc..c179f979272 100644 --- a/tests/manual/cplusplus/conf.c++ +++ b/tests/manual/cplusplus/conf.c++ @@ -5,3 +5,4 @@ #define __asm__(a...) #define restrict #define __restrict +#define __weak diff --git a/tests/manual/cplusplus/main.cpp b/tests/manual/cplusplus/main.cpp index 4292fe929f6..533e05e1027 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 28fae357951..55343c8b998 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 3e9f8622fba..18b63be1478 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 d2d9e6dd387..1d26abfb463 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 ed3046b76c9..8624a100b37 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 8c504a62a81..c668601e78d 100644 --- a/tests/manual/fakevim/main.cpp +++ b/tests/manual/fakevim/main.cpp @@ -1,5 +1,5 @@ -#include "handler.h" +#include "fakevimhandler.h" #include @@ -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 &s) + { + if (QPlainTextEdit *ed = qobject_cast(w)) + ed->setExtraSelections(s); + else if (QTextEdit *ed = qobject_cast(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)), + &proxy, SLOT(changeSelection(QWidget*,QList))); - 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 9c0d96c859d..9058a10f877 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 15ec4a7bd8e..a20311822f8 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 90c1ffd562f..4e02c7f9f7e 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 451d93ca813..ad7416bd299 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 90c1ffd562f..4e02c7f9f7e 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) **