summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2009-06-11 11:32:47 +0200
committerRoberto Raggi <roberto.raggi@nokia.com>2009-06-11 11:32:47 +0200
commitd08b90b49432198f921f115e541b81d1dccb2f53 (patch)
tree4d5411fae683aca6af829c23ec22620a40966ffd
parent225c784af4949e6a1ab26eaa8b5d142a37312979 (diff)
parent8ef7ad0b62fbb8001d12f0525e2c7eb6e5047c92 (diff)
downloadqt-creator-d08b90b49432198f921f115e541b81d1dccb2f53.tar.gz
Merge branch '1.2' of git@scm.dev.nokia.troll.no:creator/mainline
-rw-r--r--doc/addressbook-sdk.qdoc10
-rw-r--r--doc/examples/addressbook-sdk/part5/finddialog.cpp22
-rw-r--r--doc/examples/addressbook-sdk/part5/finddialog.h29
-rw-r--r--doc/examples/addressbook-sdk/part5/finddialog.ui55
-rw-r--r--doc/qtcreator.qdoc9
-rw-r--r--share/qtcreator/translations/qtcreator_de.ts6
-rw-r--r--src/app/main.cpp12
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp10
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.h1
-rw-r--r--src/plugins/coreplugin/editormanager/editorview.cpp17
-rw-r--r--src/plugins/coreplugin/editormanager/editorview.h2
-rw-r--r--src/plugins/coreplugin/welcomemode.cpp3
-rw-r--r--src/plugins/coreplugin/welcomemode.ui2
-rw-r--r--src/plugins/cpptools/cppcodecompletion.cpp7
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp4
-rw-r--r--src/plugins/designer/formeditorplugin.cpp9
-rw-r--r--src/plugins/git/gitclient.cpp12
-rw-r--r--src/plugins/git/gitclient.h3
-rw-r--r--src/plugins/git/gitplugin.cpp4
-rw-r--r--src/plugins/git/gitplugin.h1
-rw-r--r--src/plugins/git/gitsubmiteditor.cpp3
-rw-r--r--src/plugins/help/helpplugin.cpp30
22 files changed, 182 insertions, 69 deletions
diff --git a/doc/addressbook-sdk.qdoc b/doc/addressbook-sdk.qdoc
index cfb72d4ea1..1ad252a846 100644
--- a/doc/addressbook-sdk.qdoc
+++ b/doc/addressbook-sdk.qdoc
@@ -427,7 +427,7 @@
\contentspage {Address Book Tutorial}{Contents}
\nextpage {examples/addressbook-sdk/part4}{Chapter 4}
\example examples/addressbook-sdk/part3
- \title Address Book 3 - Navigating between Entries}
+ \title Address Book 3 - Navigating between Entries
The address book application is now half complete. We need to add some
functions to navigate between contacts. But first, we have to decide what
@@ -549,7 +549,7 @@
\contentspage {Address Book Tutorial}{Contents}
\nextpage {examples/addressbook-sdk/part5}{Chapter 5}
\example examples/addressbook-sdk/part4
- \title Address Book 4 - Editing and Removing Addresses}
+ \title Address Book 4 - Editing and Removing Addresses
In this chapter, we look at ways to modify the contents of contacts stored
in the address book application.
@@ -710,7 +710,7 @@
\contentspage {Address Book Tutorial}{Contents}
\nextpage {examples/addressbook-sdk/part6}{Chapter 6}
\example examples/addressbook-sdk/part5
- \title Address Book 5 - Adding a Find Function}
+ \title Address Book 5 - Adding a Find Function
In this chapter, we look at ways to locate contacts and addresses in the
address book application.
@@ -751,7 +751,7 @@
\contentspage {Address Book Tutorial}{Contents}
\nextpage {examples/addressbook-sdk/part7}{Chapter 7}
\example examples/addressbook-sdk/part6
- \title Address Book 6 - Loading and Saving}
+ \title Address Book 6 - Loading and Saving
*/
@@ -760,6 +760,6 @@
\previouspage Address Book 6 - Loading and Saving
\contentspage {Address Book Tutorial}{Contents}
\example examples/addressbook-sdk/part7
- \title Address Book 7 - Additional Features}
+ \title Address Book 7 - Additional Features
*/
diff --git a/doc/examples/addressbook-sdk/part5/finddialog.cpp b/doc/examples/addressbook-sdk/part5/finddialog.cpp
new file mode 100644
index 0000000000..15002d62f3
--- /dev/null
+++ b/doc/examples/addressbook-sdk/part5/finddialog.cpp
@@ -0,0 +1,22 @@
+#include "finddialog.h"
+#include "ui_finddialog.h"
+
+FindDialog::FindDialog(QWidget *parent) :
+ QDialog(parent),
+ m_ui(new Ui::FindDialog)
+{
+ m_ui->setupUi(this);
+}
+
+FindDialog::~FindDialog()
+{
+ delete m_ui;
+}
+
+void FindDialog::findClicked()
+{
+}
+
+QString FindDialog::getFindText()
+{
+}
diff --git a/doc/examples/addressbook-sdk/part5/finddialog.h b/doc/examples/addressbook-sdk/part5/finddialog.h
new file mode 100644
index 0000000000..8a1b3d47d5
--- /dev/null
+++ b/doc/examples/addressbook-sdk/part5/finddialog.h
@@ -0,0 +1,29 @@
+#ifndef FINDDIALOG_H
+#define FINDDIALOG_H
+
+#include <QtGui/QDialog>
+#include <QLineEdit>
+#include <QPushButton>
+
+namespace Ui {
+ class FindDialog;
+}
+
+class FindDialog : public QDialog {
+ Q_OBJECT
+public:
+ FindDialog(QWidget *parent = 0);
+ ~FindDialog();
+ QString getFindText();
+
+public slots:
+ void findClicked();
+
+private:
+ Ui::FindDialog *m_ui;
+ QPushButton *findButton;
+ QLineEdit *lineEdit;
+ QString findText;
+};
+
+#endif // FINDDIALOG_H
diff --git a/doc/examples/addressbook-sdk/part5/finddialog.ui b/doc/examples/addressbook-sdk/part5/finddialog.ui
index 500b70b7c3..3f39d27d59 100644
--- a/doc/examples/addressbook-sdk/part5/finddialog.ui
+++ b/doc/examples/addressbook-sdk/part5/finddialog.ui
@@ -1,18 +1,59 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>FindDialog</class>
- <widget class="QDialog" name="FindDialog" >
- <property name="geometry" >
+ <widget class="QDialog" name="FindDialog">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>400</width>
- <height>300</height>
+ <width>486</width>
+ <height>65</height>
</rect>
</property>
- <property name="windowTitle" >
+ <property name="windowTitle">
<string>Dialog</string>
</property>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Enter the name of a contact:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="lineEdit"/>
+ </item>
+ <item>
+ <widget class="QPushButton" name="findButton">
+ <property name="text">
+ <string>Find</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
</widget>
<resources/>
- <connections/>
+ <connections>
+ <connection>
+ <sender>findButton</sender>
+ <signal>clicked()</signal>
+ <receiver>FindDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>415</x>
+ <y>42</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>385</x>
+ <y>50</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
</ui>
diff --git a/doc/qtcreator.qdoc b/doc/qtcreator.qdoc
index a299fb5e90..8287fafde8 100644
--- a/doc/qtcreator.qdoc
+++ b/doc/qtcreator.qdoc
@@ -1536,8 +1536,9 @@
\bold{Display Low Level Data}
If special debugging of Qt objects fails due to data corruption within the
- debugged objects, you can switch the special debugging off in the
- \gui{Debug} menu. This will make the low-level structures visible again.
+ debugged objects, you can switch the debugging helpers off in the
+ \gui{Debugger -> Debugging Helper} options dialog.
+ This will make the low-level structures visible again.
*/
@@ -1640,7 +1641,7 @@
\row
\o
\raw HTML
- System&nbsp;Qt
+ Auto-detected&nbsp;Qt
\endraw
\target glossary-system-qt
\o The version of Qt installed on your system. This is the Qt
@@ -1654,7 +1655,7 @@
\target glossary-default-qt
\o The version of Qt configured in \gui{Tools -> Options -> Qt 4
-> Default Qt Version}. This is the Qt version used by your
- new projects. It defaults to System Qt.
+ new projects. It defaults to the Auto-detected&nbsp;Qt.
\row
\o
diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts
index 59a6fc8a7e..726fe10f24 100644
--- a/share/qtcreator/translations/qtcreator_de.ts
+++ b/share/qtcreator/translations/qtcreator_de.ts
@@ -1359,7 +1359,7 @@ Sollen sie überschrieben werden?</translation>
<message>
<location line="+11"/>
<source>&amp;Tools</source>
- <translation>&amp;Werkzeuge</translation>
+ <translation>E&amp;xtras</translation>
</message>
<message>
<location line="+5"/>
@@ -10283,7 +10283,7 @@ p, li { white-space: pre-wrap; }
&lt;font color=&quot;#ff0000&quot;&gt;&lt;b&gt;No valid Qt version set. Set one in Tools/Options &lt;/b&gt;&lt;/font&gt;
</source>
<translation>
-&lt;font color=&quot;#ff0000&quot;&gt;&lt;b&gt;Es ist keine gültige Qt-Version gesetzt. Setzen Sie sie unter Werkzeuge/Einstellungen&lt;/b&gt;&lt;/font&gt;
+&lt;font color=&quot;#ff0000&quot;&gt;&lt;b&gt;Es ist keine gültige Qt-Version gesetzt. Setzen Sie sie unter Extras/Einstellungen&lt;/b&gt;&lt;/font&gt;
</translation>
</message>
<message>
@@ -11709,7 +11709,7 @@ Um es abzurufen, tippen Sie das Kürzel im Locator, gefolgt von einem Leerzeich
<message>
<location/>
<source>Never</source>
- <translation>NiemalsZahl</translation>
+ <translation>Niemals</translation>
</message>
<message>
<location/>
diff --git a/src/app/main.cpp b/src/app/main.cpp
index 5199c7c7e6..1cb2b8e8e9 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -217,11 +217,13 @@ int main(int argc, char **argv)
QTranslator translator;
QTranslator qtTranslator;
const QString &locale = QLocale::system().name();
- if (translator.load(QLatin1String("qtcreator_") + locale,
- QCoreApplication::applicationDirPath()
- + QLatin1String(SHARE_PATH "/translations"))) {
- if (qtTranslator.load(QLatin1String("qt_") + locale,
- QLibraryInfo::location(QLibraryInfo::TranslationsPath))) {
+ const QString &creatorTrPath = QCoreApplication::applicationDirPath()
+ + QLatin1String(SHARE_PATH "/translations");
+ if (translator.load(QLatin1String("qtcreator_") + locale, creatorTrPath)) {
+ const QString &qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
+ const QString &qtTrFile = QLatin1String("qt_") + locale;
+ // Binary installer puts Qt tr files into creatorTrPath
+ if (qtTranslator.load(qtTrFile, qtTrPath) || qtTranslator.load(qtTrFile, creatorTrPath)) {
app.installTranslator(&translator);
app.installTranslator(&qtTranslator);
app.setProperty("qtc_locale", locale);
diff --git a/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp b/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp
index 307da2ecf1..5627cde23d 100644
--- a/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp
@@ -77,7 +77,7 @@ CMakeOpenProjectWizard::CMakeOpenProjectWizard(CMakeManager *cmakeManager, const
setStartId(startid);
setOption(QWizard::NoCancelButton);
- setOption(QWizard::NoBackButtonOnStartPage);
+ init();
}
CMakeOpenProjectWizard::CMakeOpenProjectWizard(CMakeManager *cmakeManager, const QString &sourceDirectory,
@@ -93,7 +93,7 @@ CMakeOpenProjectWizard::CMakeOpenProjectWizard(CMakeManager *cmakeManager, const
else
addPage(new CMakeRunPage(this, CMakeRunPage::Update, buildDirectory));
setOption(QWizard::NoCancelButton);
- setOption(QWizard::NoBackButtonOnStartPage);
+ init();
}
CMakeOpenProjectWizard::CMakeOpenProjectWizard(CMakeManager *cmakeManager, const QString &sourceDirectory,
@@ -107,7 +107,13 @@ CMakeOpenProjectWizard::CMakeOpenProjectWizard(CMakeManager *cmakeManager, const
m_buildDirectory = oldBuildDirectory;
addPage(new ShadowBuildPage(this, true));
addPage(new CMakeRunPage(this, CMakeRunPage::Change));
+ init();
+}
+
+void CMakeOpenProjectWizard::init()
+{
setOption(QWizard::NoBackButtonOnStartPage);
+ setWindowTitle(tr("CMake Wizard"));
}
CMakeManager *CMakeOpenProjectWizard::cmakeManager() const
diff --git a/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.h b/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.h
index 487037801e..485edde663 100644
--- a/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.h
+++ b/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.h
@@ -83,6 +83,7 @@ public:
void setArguments(const QStringList &args);
ProjectExplorer::Environment environment() const;
private:
+ void init();
bool existsUpToDateXmlFile() const;
bool hasInSourceBuild() const;
CMakeManager *m_cmakeManager;
diff --git a/src/plugins/coreplugin/editormanager/editorview.cpp b/src/plugins/coreplugin/editormanager/editorview.cpp
index 4b84abe8da..38377e169f 100644
--- a/src/plugins/coreplugin/editormanager/editorview.cpp
+++ b/src/plugins/coreplugin/editormanager/editorview.cpp
@@ -162,6 +162,8 @@ int EditorModel::findEditor(IEditor *editor) const
int EditorModel::findFileName(const QString &filename) const
{
+ if (filename.isEmpty())
+ return -1;
for (int i = 0; i < m_editors.count(); ++i) {
if (m_editors.at(i).fileName() == filename)
return i;
@@ -300,21 +302,10 @@ QVariant EditorModel::data(const QModelIndex &index, int role) const
QModelIndex EditorModel::indexOf(IEditor *editor) const
{
- int idx = findEditor(editor);
- if (idx < 0)
- return indexOf(editor->file()->fileName());
+ int idx = findEditor(originalForDuplicate(editor));
return createIndex(idx, 0);
}
-QModelIndex EditorModel::indexOf(const QString &fileName) const
-{
- int idx = findFileName(fileName);
- if (idx >= 0)
- return createIndex(idx, 0);
- return QModelIndex();
-}
-
-
void EditorModel::itemChanged()
{
emitDataChanged(qobject_cast<IEditor*>(sender()));
@@ -588,7 +579,7 @@ void EditorView::setCurrentEditor(IEditor *editor)
const int idx = m_container->indexOf(editor->widget());
QTC_ASSERT(idx >= 0, return);
m_container->setCurrentIndex(idx);
- m_editorList->setCurrentIndex(m_model->indexOf(editor->file()->fileName()).row());
+ m_editorList->setCurrentIndex(m_model->indexOf(editor).row());
updateEditorStatus(editor);
updateToolBar(editor);
diff --git a/src/plugins/coreplugin/editormanager/editorview.h b/src/plugins/coreplugin/editormanager/editorview.h
index 32026d0f41..2986d807ec 100644
--- a/src/plugins/coreplugin/editormanager/editorview.h
+++ b/src/plugins/coreplugin/editormanager/editorview.h
@@ -100,8 +100,6 @@ public:
IEditor *originalForDuplicate(IEditor *duplicate) const;
void makeOriginal(IEditor *duplicate);
QModelIndex indexOf(IEditor *editor) const;
- QModelIndex indexOf(const QString &filename) const;
-
private slots:
void itemChanged();
diff --git a/src/plugins/coreplugin/welcomemode.cpp b/src/plugins/coreplugin/welcomemode.cpp
index c0506a222a..64cf613300 100644
--- a/src/plugins/coreplugin/welcomemode.cpp
+++ b/src/plugins/coreplugin/welcomemode.cpp
@@ -427,6 +427,9 @@ QStringList WelcomeMode::tipsOfTheDay()
tips.append(tr("If you add <a href=\"qthelp://com.nokia.qtcreator/doc/creator-external-library-handling.html\""
">external libraries</a>, Qt Creator will automatically offer syntax highlighting "
"and code completion."));
+ tips.append(tr("The code completion is CamelCase-aware. For example, to complete <tt>namespaceUri</tt> "
+ "you can just type <tt>nU</tt> and hit <tt>Ctrl+Space</tt>."));
+ tips.append(tr("You can force code completion at any time using <tt>Ctrl+Space</tt>."));
}
return tips;
}
diff --git a/src/plugins/coreplugin/welcomemode.ui b/src/plugins/coreplugin/welcomemode.ui
index 29a7f94e44..c1471f65d7 100644
--- a/src/plugins/coreplugin/welcomemode.ui
+++ b/src/plugins/coreplugin/welcomemode.ui
@@ -976,7 +976,7 @@ QToolButton:pressed {
</property>
<property name="minimumSize">
<size>
- <width>360</width>
+ <width>340</width>
<height>0</height>
</size>
</property>
diff --git a/src/plugins/cpptools/cppcodecompletion.cpp b/src/plugins/cpptools/cppcodecompletion.cpp
index ffa09ae1c8..329a8a19bd 100644
--- a/src/plugins/cpptools/cppcodecompletion.cpp
+++ b/src/plugins/cpptools/cppcodecompletion.cpp
@@ -1264,17 +1264,12 @@ void CppCodeCompletion::completions(QList<TextEditor::CompletionItem> *completio
if (c.isUpper() && !first) {
keyRegExp += QLatin1String("[a-z0-9_]*");
keyRegExp += c;
- } else if (m_caseSensitivity == Qt::CaseInsensitive && c.isLower()) {
- keyRegExp += QLatin1Char('[');
- keyRegExp += c;
- keyRegExp += c.toUpper();
- keyRegExp += QLatin1Char(']');
} else {
keyRegExp += QRegExp::escape(c);
}
first = false;
}
- const QRegExp regExp(keyRegExp, Qt::CaseSensitive);
+ const QRegExp regExp(keyRegExp, m_caseSensitivity);
foreach (TextEditor::CompletionItem item, m_completions) {
if (regExp.indexIn(item.m_text) == 0) {
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index aa4820bc21..48b5dcaa23 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -928,8 +928,8 @@ void GdbEngine::handleAqcuiredInferior()
reloadSourceFiles();
// Reverse debugging. FIXME: Should only be used when available.
- if (theDebuggerBoolSetting(EnableReverseDebugging))
- postCommand(_("target record"));
+ //if (theDebuggerBoolSetting(EnableReverseDebugging))
+ // postCommand(_("target record"));
tryLoadDebuggingHelpers();
diff --git a/src/plugins/designer/formeditorplugin.cpp b/src/plugins/designer/formeditorplugin.cpp
index 8962f2f714..6227c0ff28 100644
--- a/src/plugins/designer/formeditorplugin.cpp
+++ b/src/plugins/designer/formeditorplugin.cpp
@@ -121,9 +121,12 @@ bool FormEditorPlugin::initialize(const QStringList &arguments, QString *error)
QString locale = qApp->property("qtc_locale").toString();
if (!locale.isEmpty()) {
QTranslator *qtr = new QTranslator(this);
- qtr->load(QLatin1String("designer_") + locale,
- QLibraryInfo::location(QLibraryInfo::TranslationsPath));
- qApp->installTranslator(qtr);
+ const QString &creatorTrPath =
+ Core::ICore::instance()->resourcePath() + QLatin1String("/translations");
+ const QString &qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
+ const QString &trFile = QLatin1String("designer_") + locale;
+ if (qtr->load(trFile, qtTrPath) || qtr->load(trFile, creatorTrPath))
+ qApp->installTranslator(qtr);
}
error->clear();
diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp
index da61f23b1c..7eabc65001 100644
--- a/src/plugins/git/gitclient.cpp
+++ b/src/plugins/git/gitclient.cpp
@@ -783,7 +783,8 @@ bool GitClient::addAndCommit(const QString &repositoryDirectory,
const GitSubmitEditorPanelData &data,
const QString &messageFile,
const QStringList &checkedFiles,
- const QStringList &origCommitFiles)
+ const QStringList &origCommitFiles,
+ const QStringList &origDeletedFiles)
{
if (Git::Constants::debug)
qDebug() << "GitClient::addAndCommit:" << repositoryDirectory << checkedFiles << origCommitFiles;
@@ -795,9 +796,12 @@ bool GitClient::addAndCommit(const QString &repositoryDirectory,
if (!synchronousReset(repositoryDirectory, resetFiles.toList()))
return false;
- // Re-add all to make sure we have the latest changes
- if (!synchronousAdd(repositoryDirectory, checkedFiles))
- return false;
+ // Re-add all to make sure we have the latest changes, but only add those that aren't marked
+ // for deletion
+ QStringList addFiles = checkedFiles.toSet().subtract(origDeletedFiles.toSet()).toList();
+ if (!addFiles.isEmpty())
+ if (!synchronousAdd(repositoryDirectory, addFiles))
+ return false;
// Do the final commit
QStringList args;
diff --git a/src/plugins/git/gitclient.h b/src/plugins/git/gitclient.h
index 8807218da3..5ac85f41dc 100644
--- a/src/plugins/git/gitclient.h
+++ b/src/plugins/git/gitclient.h
@@ -123,7 +123,8 @@ public:
const GitSubmitEditorPanelData &data,
const QString &messageFile,
const QStringList &checkedFiles,
- const QStringList &origCommitFiles);
+ const QStringList &origCommitFiles,
+ const QStringList &origDeletedFiles);
enum StatusResult { StatusChanged, StatusUnchanged, StatusFailed };
StatusResult gitStatus(const QString &workingDirectory,
diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp
index ac3cfb2d2d..ef327da7c3 100644
--- a/src/plugins/git/gitplugin.cpp
+++ b/src/plugins/git/gitplugin.cpp
@@ -614,6 +614,7 @@ void GitPlugin::startCommit()
// files to be able to unstage files the user unchecks
m_submitRepository = data.panelInfo.repository;
m_submitOrigCommitFiles = data.stagedFileNames();
+ m_submitOrigDeleteFiles = data.stagedFileNames("deleted");
if (Git::Constants::debug)
qDebug() << Q_FUNC_INFO << data << commitTemplate;
@@ -709,7 +710,8 @@ bool GitPlugin::editorAboutToClose(Core::IEditor *iEditor)
editor->panelData(),
m_changeTmpFile->fileName(),
fileList,
- m_submitOrigCommitFiles);
+ m_submitOrigCommitFiles,
+ m_submitOrigDeleteFiles);
}
if (closeEditor)
cleanChangeTmpFile();
diff --git a/src/plugins/git/gitplugin.h b/src/plugins/git/gitplugin.h
index da5af49bb7..a218052c37 100644
--- a/src/plugins/git/gitplugin.h
+++ b/src/plugins/git/gitplugin.h
@@ -173,6 +173,7 @@ private:
Core::IVersionControl *m_versionControl;
QString m_submitRepository;
QStringList m_submitOrigCommitFiles;
+ QStringList m_submitOrigDeleteFiles;
QTemporaryFile *m_changeTmpFile;
bool m_submitActionTriggered;
};
diff --git a/src/plugins/git/gitsubmiteditor.cpp b/src/plugins/git/gitsubmiteditor.cpp
index 4de97513fd..272222cd4e 100644
--- a/src/plugins/git/gitsubmiteditor.cpp
+++ b/src/plugins/git/gitsubmiteditor.cpp
@@ -63,11 +63,10 @@ GitSubmitEditorWidget *GitSubmitEditor::submitEditorWidget()
// Utility to add a list of state/file pairs to the model
// setting a file type.
-static void addStateFileListToModel(const QList<CommitData::StateFilePair> &l,
+static void addStateFileListToModel(const QList<CommitData::StateFilePair> &l,
bool checked, FileType ft,
VCSBase::SubmitFileModel *model)
{
-
typedef QList<CommitData::StateFilePair>::const_iterator ConstIterator;
if (!l.empty()) {
const ConstIterator cend = l.constEnd();
diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp
index 726d3d47d1..d318641e42 100644
--- a/src/plugins/help/helpplugin.cpp
+++ b/src/plugins/help/helpplugin.cpp
@@ -141,9 +141,16 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
QString locale = qApp->property("qtc_locale").toString();
if (!locale.isEmpty()) {
QTranslator *qtr = new QTranslator(this);
- qtr->load(QLatin1String("assistant_") + locale,
- QLibraryInfo::location(QLibraryInfo::TranslationsPath));
- qApp->installTranslator(qtr);
+ QTranslator *qhelptr = new QTranslator(this);
+ const QString &creatorTrPath =
+ Core::ICore::instance()->resourcePath() + QLatin1String("/translations");
+ const QString &qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
+ const QString &trFile = QLatin1String("assistant_") + locale;
+ const QString &helpTrFile = QLatin1String("qt_help_") + locale;
+ if (qtr->load(trFile, qtTrPath) || qtr->load(trFile, creatorTrPath))
+ qApp->installTranslator(qtr);
+ if (qhelptr->load(helpTrFile, qtTrPath) || qhelptr->load(helpTrFile, creatorTrPath))
+ qApp->installTranslator(qhelptr);
}
#ifndef QT_NO_WEBKIT
@@ -762,12 +769,19 @@ void HelpPlugin::openHelpPage(const QUrl& url)
void HelpPlugin::openHelpPage(const QString& url)
{
- activateHelpMode();
- if (m_helpEngine->findFile(url).isValid())
+ if (m_helpEngine->findFile(url).isValid()) {
+ activateHelpMode();
m_centralWidget->setSource(url);
- else {
- QDesktopServices::openUrl(QLatin1String("http://doc.trolltech.com/latest/")
- + url.mid(url.lastIndexOf('/') + 1));
+ } else {
+ // local help not installed, resort to external web help
+ QString urlPrefix;
+ if (url.startsWith("qthelp://com.nokia.qtcreator")) {
+ urlPrefix = QString::fromLatin1("http://doc.trolltech.com/qtcreator-%1.%2/")
+ .arg(IDE_VERSION_MAJOR).arg(IDE_VERSION_MINOR);
+ } else {
+ urlPrefix = QLatin1String("http://doc.trolltech.com/latest/");
+ }
+ QDesktopServices::openUrl(urlPrefix + url.mid(url.lastIndexOf('/') + 1));
}
}