summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormae <qtc-committer@nokia.com>2009-02-05 19:35:25 +0100
committermae <qtc-committer@nokia.com>2009-02-05 19:35:25 +0100
commitec4302a18ff97ac75a79a31887e4c5d76f211105 (patch)
tree5987efca4f57f2824304b160c53377663fcf3420
parent87b8a97447b5eafb926d583867029f7a0d3bc16f (diff)
parent5fcf35039fb301a22c75b59586a5719341041217 (diff)
downloadqt-creator-ec4302a18ff97ac75a79a31887e4c5d76f211105.tar.gz
Merge branch '0.9.2-rc1' of git@scm.dev.nokia.troll.no:creator/mainline into 0.9.2-rc1
-rw-r--r--doc/qtcreator-texteditor-completion.pngbin0 -> 38192 bytes
-rw-r--r--doc/qtcreator-texteditor-fonts.pngbin0 -> 52919 bytes
-rw-r--r--doc/qtcreator-texteditor-general.pngbin0 -> 69681 bytes
-rw-r--r--doc/qtcreator.qdoc40
-rw-r--r--src/plugins/coreplugin/editormanager/editormanager.cpp4
-rw-r--r--src/plugins/coreplugin/html/images/feedback-text.pngbin2968 -> 2217 bytes
-rw-r--r--src/plugins/cpaster/cpasterplugin.cpp26
-rw-r--r--src/plugins/cpaster/cpasterplugin.h1
-rw-r--r--src/plugins/fakevim/fakevimplugin.cpp9
-rw-r--r--src/plugins/qt4projectmanager/qtversionmanager.cpp17
-rw-r--r--src/plugins/qt4projectmanager/qtversionmanager.h2
-rw-r--r--src/shared/proparser/profileevaluator.cpp3
-rw-r--r--src/tools/qtlibspatcher/qtlibspatchermain.cpp21
-rw-r--r--tests/auto/cplusplus/ast/ast.pro5
-rw-r--r--tests/auto/cplusplus/semantic/semantic.pro5
-rw-r--r--tests/auto/cplusplus/shared/shared.pri2
-rw-r--r--tests/auto/cplusplus/shared/shared.pro2
17 files changed, 104 insertions, 33 deletions
diff --git a/doc/qtcreator-texteditor-completion.png b/doc/qtcreator-texteditor-completion.png
new file mode 100644
index 0000000000..b9affb2339
--- /dev/null
+++ b/doc/qtcreator-texteditor-completion.png
Binary files differ
diff --git a/doc/qtcreator-texteditor-fonts.png b/doc/qtcreator-texteditor-fonts.png
new file mode 100644
index 0000000000..ae08dfe556
--- /dev/null
+++ b/doc/qtcreator-texteditor-fonts.png
Binary files differ
diff --git a/doc/qtcreator-texteditor-general.png b/doc/qtcreator-texteditor-general.png
new file mode 100644
index 0000000000..c701efbd2d
--- /dev/null
+++ b/doc/qtcreator-texteditor-general.png
Binary files differ
diff --git a/doc/qtcreator.qdoc b/doc/qtcreator.qdoc
index adca523a81..ac88edd455 100644
--- a/doc/qtcreator.qdoc
+++ b/doc/qtcreator.qdoc
@@ -215,8 +215,20 @@
\title The Code Editor
- ### SCREENSHOT of the editor in action
+ Qt Creator's code editor is designed to aid the developer to create, edit,
+ and navigate code. It is fully equipped with syntax highlighting, code
+ completion, context sensitive help, as well as inline error indicators
+ while you are typing. The screenshots below show the various dialogs within
+ which you can configure your editor.
+ \table
+ \row
+ \i \inlineimage qtcreator-texteditor-general.png
+ \i \inlineimage qtcreator-texteditor-fonts.png
+ \i \inlineimage qtcreator-texteditor-completion.png
+ \endtable
+
+ The table below lists keyboard shortcuts supported by the code editor.
\table
\row
@@ -239,11 +251,20 @@
\row
\i Indenting Blocks
\i Use \key{Ctrl+I}
+
+ \row
+ \i Collapse
+ \i Use \key{Ctrl+\<}
+
\row
\i Commenting or uncommenting blocks
\i Use \key{Ctrl+\/}
\row
+ \i Delete a line
+ \i Use \key{Shift+Del}
+
+ \row
\i Switch between header file and source file
\i Use \key{F4}.
@@ -256,19 +277,12 @@
\i Use \key{F2} and \key{Shift+F2}. This feature works with
namespaces, classes, methods, variables, include statements,
and macros.
- \endtable
-
-
- More:
-
- Collapse
-
- Up/Down/Page Up/Page Down - hold ctrl to prevent the cursor from moving
-
-
- To switch to an external editor, select \gui{Open in external editor} from
- the \gui{Edit -> Advanced} menu.
+ \row
+ \i Switch to an external editor
+ \i Select \gui{Open in external editor} from the
+ \gui{Edit -> Advanced} menu.
+ \endtable
*/
diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp
index 26d64fc240..fc33aa5e99 100644
--- a/src/plugins/coreplugin/editormanager/editormanager.cpp
+++ b/src/plugins/coreplugin/editormanager/editormanager.cpp
@@ -462,6 +462,7 @@ bool EditorManager::unregisterEditor(IEditor *editor)
return false;
}
+
void EditorManager::updateCurrentEditorAndGroup(IContext *context)
{
if (debugEditorManager)
@@ -470,7 +471,8 @@ void EditorManager::updateCurrentEditorAndGroup(IContext *context)
IEditor *editor = context ? qobject_cast<IEditor*>(context) : 0;
if (groupContext) {
m_d->m_splitter->setCurrentGroup(groupContext->editorGroup());
- setCurrentEditor(0);
+ if (groupContext->editorGroup()->editorCount() == 0)
+ setCurrentEditor(0);
updateActions();
} else if (editor) {
setCurrentEditor(editor);
diff --git a/src/plugins/coreplugin/html/images/feedback-text.png b/src/plugins/coreplugin/html/images/feedback-text.png
index 731bdc50a3..5f6f05843f 100644
--- a/src/plugins/coreplugin/html/images/feedback-text.png
+++ b/src/plugins/coreplugin/html/images/feedback-text.png
Binary files differ
diff --git a/src/plugins/cpaster/cpasterplugin.cpp b/src/plugins/cpaster/cpasterplugin.cpp
index 4558ccaae8..f0cda5147c 100644
--- a/src/plugins/cpaster/cpasterplugin.cpp
+++ b/src/plugins/cpaster/cpasterplugin.cpp
@@ -124,10 +124,23 @@ void CodepasterPlugin::extensionsInitialized()
->getObject<ProjectExplorer::ProjectExplorerPlugin>();
}
+QString CodepasterPlugin::serverUrl() const
+{
+ QString url = m_settingsPage->serverUrl().toString();
+ if (url.startsWith("http://"))
+ url = url.mid(7);
+ if (url.endsWith('/'))
+ url.chop(1);
+ return url;
+}
+
void CodepasterPlugin::post()
{
- if (m_poster)
+ // FIXME: The whole m_poster thing is de facto a simple function call.
+ if (m_poster) {
delete m_poster;
+ m_poster = 0;
+ }
IEditor* editor = EditorManager::instance()->currentEditor();
ITextEditor* textEditor = qobject_cast<ITextEditor*>(editor);
if (!textEditor)
@@ -171,7 +184,8 @@ void CodepasterPlugin::post()
data = view.getContent();
// Submit to codepaster
- m_poster = new CustomPoster(m_settingsPage->serverUrl().toString());
+
+ m_poster = new CustomPoster(serverUrl());
// Copied from cpaster. Otherwise lineendings will screw up
if (!data.contains("\r\n")) {
@@ -185,9 +199,11 @@ void CodepasterPlugin::post()
void CodepasterPlugin::fetch()
{
- if (m_fetcher)
+ if (m_fetcher) {
delete m_fetcher;
- m_fetcher = new CustomFetcher(m_settingsPage->serverUrl().toString());
+ m_fetcher = 0;
+ }
+ m_fetcher = new CustomFetcher(serverUrl());
QDialog dialog;
Ui_PasteSelectDialog ui;
@@ -208,7 +224,7 @@ void CodepasterPlugin::fetch()
return;
delete m_fetcher;
- m_fetcher = new CustomFetcher(m_settingsPage->serverUrl().toString());
+ m_fetcher = new CustomFetcher(serverUrl());
m_fetcher->fetch(pasteID);
}
diff --git a/src/plugins/cpaster/cpasterplugin.h b/src/plugins/cpaster/cpasterplugin.h
index 56c41144a9..3658169c6c 100644
--- a/src/plugins/cpaster/cpasterplugin.h
+++ b/src/plugins/cpaster/cpasterplugin.h
@@ -70,6 +70,7 @@ public slots:
void fetch();
private:
+ QString serverUrl() const;
QAction *m_postAction;
QAction *m_fetchAction;
diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp
index 2f0a389432..50d45ff876 100644
--- a/src/plugins/fakevim/fakevimplugin.cpp
+++ b/src/plugins/fakevim/fakevimplugin.cpp
@@ -180,7 +180,16 @@ bool FakeVimPluginPrivate::initialize()
void FakeVimPluginPrivate::installHandler(Core::IEditor *editor)
{
+ if (!editor)
+ return;
+
QWidget *widget = editor->widget();
+ if (!widget)
+ return;
+
+ // we can only handle QTextEdit and QPlainTextEdit
+ if (!qobject_cast<QTextEdit *>(widget) && !qobject_cast<QPlainTextEdit *>(widget))
+ return;
FakeVimHandler *handler = new FakeVimHandler(widget, widget);
diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp
index 6e67989158..4415a73209 100644
--- a/src/plugins/qt4projectmanager/qtversionmanager.cpp
+++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp
@@ -177,7 +177,10 @@ void QtVersionManager::apply()
}
}
}
- m_versions = m_widget->versions();
+ qDeleteAll(m_versions);
+ m_versions.clear();
+ foreach(QtVersion *version, m_widget->versions())
+ m_versions.append(new QtVersion(*version));
if (versionPathsChanged)
updateDocumentation();
updateUniqueIdToIndexMap();
@@ -361,11 +364,16 @@ QtVersion *QtVersionManager::currentQtVersion() const
QtDirWidget::QtDirWidget(QWidget *parent, QList<QtVersion *> versions, int defaultVersion)
: QWidget(parent)
- , m_versions(versions)
, m_defaultVersion(defaultVersion)
, m_specifyNameString(tr("<specify a name>"))
, m_specifyPathString(tr("<specify a path>"))
{
+ // Initialize m_versions
+ foreach(QtVersion *version, versions) {
+ m_versions.append(new QtVersion(*version));
+ }
+
+
m_ui.setupUi(this);
m_ui.qtPath->setExpectedKind(Core::Utils::PathChooser::Directory);
m_ui.qtPath->setPromptDialogTitle(tr("Select QTDIR"));
@@ -417,6 +425,11 @@ QtDirWidget::QtDirWidget(QWidget *parent, QList<QtVersion *> versions, int defau
updateState();
}
+QtDirWidget::~QtDirWidget()
+{
+ qDeleteAll(m_versions);
+}
+
void QtDirWidget::addQtDir()
{
QtVersion *newVersion = new QtVersion(m_specifyNameString, m_specifyPathString);
diff --git a/src/plugins/qt4projectmanager/qtversionmanager.h b/src/plugins/qt4projectmanager/qtversionmanager.h
index f6ccd017b6..11e5ec8235 100644
--- a/src/plugins/qt4projectmanager/qtversionmanager.h
+++ b/src/plugins/qt4projectmanager/qtversionmanager.h
@@ -122,7 +122,6 @@ private:
// This is updated on first call to qmakeCommand
// That function is called from updateVersionInfo()
mutable QString m_qtVersionString;
- Q_DISABLE_COPY(QtVersion);
};
@@ -131,6 +130,7 @@ class QtDirWidget : public QWidget
Q_OBJECT
public:
QtDirWidget(QWidget *parent, QList<QtVersion *> versions, int defaultVersion);
+ ~QtDirWidget();
QList<QtVersion *> versions() const;
int defaultVersion() const;
void finish();
diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp
index c67f976e59..c54b75a1e2 100644
--- a/src/shared/proparser/profileevaluator.cpp
+++ b/src/shared/proparser/profileevaluator.cpp
@@ -719,6 +719,7 @@ bool ProFileEvaluator::Private::visitProValue(ProValue *value)
// The following two blocks fix bug 180128 by making all "interesting"
// file name absolute in each .pro file, not just the top most one
if (varName == QLatin1String("SOURCES")
+ || varName == QLatin1String("OBJECTIVE_SOURCES")
|| varName == QLatin1String("HEADERS")
|| varName == QLatin1String("INTERFACES")
|| varName == QLatin1String("FORMS")
@@ -1666,7 +1667,7 @@ bool ProFileEvaluator::Private::evaluateConditionalFunction(const QString &funct
}
const QStringList mutuals = args[1].split(QLatin1Char('|'));
const QStringList &configs = valuesDirect(QLatin1String("CONFIG"));
- for (int i = configs.size() - 1 && ok; i >= 0; i--) {
+ for (int i = configs.size() - 1; i >= 0; i--) {
for (int mut = 0; mut < mutuals.count(); mut++) {
if (configs[i] == mutuals[mut].trimmed()) {
cond = (configs[i] == args[0]);
diff --git a/src/tools/qtlibspatcher/qtlibspatchermain.cpp b/src/tools/qtlibspatcher/qtlibspatchermain.cpp
index b66a35f294..ad4e3ae715 100644
--- a/src/tools/qtlibspatcher/qtlibspatchermain.cpp
+++ b/src/tools/qtlibspatcher/qtlibspatchermain.cpp
@@ -42,7 +42,7 @@
#include <QtCore/QDebug>
#ifdef Q_OS_WIN
-# define QT_INSTALL_DIR "C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_create_more/Troll/4.4.3";
+# define QT_INSTALL_DIR "C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_create_more/Troll/4.4.3/qt";
const char * const oldInstallBase = QT_INSTALL_DIR;
const char * const oldSourceBase = QT_INSTALL_DIR;
@@ -108,7 +108,8 @@ bool patchBinariesWithQtPathes(const char *baseQtPath)
#ifdef Q_OS_WIN
"/bin/qmake.exe",
"/bin/QtCore4.dll",
- "/bin/QtCored4.dll"
+ "/bin/QtCored4.dll",
+ "/lib/QtCored4.dll"
#else
"/bin/qmake",
"/lib/libQtCore.so",
@@ -136,7 +137,6 @@ char * allocFileNameCopyAppend(const char * textToCopy,
Q_ASSERT(textToAppend != NULL);
if (textToAppend2 == NULL)
textToAppend2 = "";
- Q_ASSERT(textToAppend2 != NULL);
char * const res = new char[bytesToAllocate];
const size_t textToCopyLen = strlen(textToCopy);
@@ -153,7 +153,7 @@ char * allocFileNameCopyAppend(const char * textToCopy,
if (textToAppendLen > 0)
strncpy(res + textToCopyLen, textToAppend, bytesToAllocate - textToCopyLen - 1);
if (textToAppend2Len > 0)
- strncpy(res + textToCopyLen + textToAppend2Len, textToAppend2, bytesToAllocate - textToCopyLen - textToAppend2Len - 1);
+ strncpy(res + textToCopyLen + textToAppendLen, textToAppend2, bytesToAllocate - textToCopyLen - textToAppendLen - 1);
res[textToCopyLen + textToAppendLen + textToAppend2Len] = '\0';
res[bytesToAllocate - 1] = '\0'; // Safe is safe
return res;
@@ -183,6 +183,19 @@ bool patchDebugLibrariesWithQtPath(const char *baseQtPath)
{"/bin/QtWebKitd4.dll", "/src/3rdparty/webkit/WebCore/"},
{"/bin/QtXmld4.dll", "/src/xml/"},
{"/bin/QtXmlPatternsd4.dll", "/src/xmlpatterns/"},
+ {"/lib/Qt3Supportd4.dll", "/src/qt3support/"},
+ {"/lib/QtCored4.dll", "/src/corelib/"},
+ {"/lib/QtGuid4.dll", "/src/gui/"},
+ {"/lib/QtHelpd4.dll", "/tools/assistant/lib/"},
+ {"/lib/QtNetworkd4.dll", "/src/network/"},
+ {"/lib/QtOpenGLd4.dll", "/src/opengl/"},
+ {"/lib/QtScriptd4.dll", "/src/script/"},
+ {"/lib/QtSqld4.dll", "/src/sql/"},
+ {"/lib/QtSvgd4.dll", "/src/svg/"},
+ {"/lib/QtTestd4.dll", "/src/testlib/"},
+ {"/lib/QtWebKitd4.dll", "/src/3rdparty/webkit/WebCore/"},
+ {"/lib/QtXmld4.dll", "/src/xml/"},
+ {"/lib/QtXmlPatternsd4.dll", "/src/xmlpatterns/"},
{"/plugins/accessible/qtaccessiblecompatwidgetsd4.dll", "/src/plugins/accessible/compat/"},
{"/plugins/accessible/qtaccessiblewidgetsd4.dll", "/src/plugins/accessible/widgets/"},
{"/plugins/codecs/qcncodecsd4.dll", "/src/plugins/codecs/cn/"},
diff --git a/tests/auto/cplusplus/ast/ast.pro b/tests/auto/cplusplus/ast/ast.pro
index 39fd14105d..84733f97e6 100644
--- a/tests/auto/cplusplus/ast/ast.pro
+++ b/tests/auto/cplusplus/ast/ast.pro
@@ -1,4 +1,5 @@
-load(qttest_p4)
+TEMPLATE = app
+CONFIG += qt warn_on console depend_includepath
+QT = core testlib
include(../shared/shared.pri)
-QT = core
SOURCES += tst_ast.cpp
diff --git a/tests/auto/cplusplus/semantic/semantic.pro b/tests/auto/cplusplus/semantic/semantic.pro
index 71a8b5fab5..37c013685f 100644
--- a/tests/auto/cplusplus/semantic/semantic.pro
+++ b/tests/auto/cplusplus/semantic/semantic.pro
@@ -1,5 +1,6 @@
-load(qttest_p4)
+TEMPLATE = app
+CONFIG += qt warn_on console depend_includepath
+QT = core testlib
include(../shared/shared.pri)
-QT = core
SOURCES += tst_semantic.cpp
diff --git a/tests/auto/cplusplus/shared/shared.pri b/tests/auto/cplusplus/shared/shared.pri
index 175dba7cfe..924cda9991 100644
--- a/tests/auto/cplusplus/shared/shared.pri
+++ b/tests/auto/cplusplus/shared/shared.pri
@@ -1,5 +1,5 @@
DEFINES += HAVE_QT CPLUSPLUS_WITH_NAMESPACE
-INCLUDEPATH += $$PWD/../../../../shared/cplusplus
+INCLUDEPATH += $$PWD/../../../../src/shared/cplusplus
DEPENDPATH += $$INCLUDEPATH .
LIBS += -L$$PWD -lCPlusPlusTestSupport
diff --git a/tests/auto/cplusplus/shared/shared.pro b/tests/auto/cplusplus/shared/shared.pro
index 94003e3447..2f84af560b 100644
--- a/tests/auto/cplusplus/shared/shared.pro
+++ b/tests/auto/cplusplus/shared/shared.pro
@@ -5,4 +5,4 @@ CONFIG += static
QT = core
DEFINES += HAVE_QT CPLUSPLUS_WITH_NAMESPACE
-include($$PWD/../../../../shared/cplusplus/cplusplus.pri)
+include($$PWD/../../../../src/shared/cplusplus/cplusplus.pri)