Commit 4f4f767b authored by con's avatar con
Browse files

Merge commit 'origin/1.2'

parents 7594cc5a aa2836f1
The QtCreator 1.2 release contains bug fixes and new features.
A more detailed list of changes follows below. If you want to know the exact
and complete list of changes, you can check out the QtCreator sources from the
public git repository and check the logs, e.g.
Below is a list of relevant changes. You can find a complete list of changes
within the logs of QtCreator's sources. Simply check it out from the public git
repository e.g.,
git clone git://gitorious.org/qt-creator/qt-creator.git
git log --pretty=oneline v1.1.0..v1.2.0
This release introduces source and binary incompatible changes to the plugin
API, so if you created your own custom plugins these need to be adapted.
API, so if you have created your own custom plugins, they will need to be
adapted accordingly.
General:
* Reworked Welcome Screen
* Speed improvement: store large amounts of persistent data
(e.g. locator cache) in an SQLite database
* Show current file name in the window title
* The Welcome Screen has been redesigned.
* There has been some speed improvements: large amounts of persistent data
(e.g., Qt Locator's cache) is now stored in an SQLite database.
* The window title now displays the current file's name.
Editing
* Added option to allow alphabetical method combo box
* Introduced Block highlighting
* Improved code folding markers
* Further improvements to FakeVim mode
* Make it possible to disable Ctrl+Click navigation
* Added optional XCode-style tab indentation
* Ui changes are added immediately to the code model
* Fixed possibly missing code completion with mingw toolchain
* Added option for turning antialiasing of text editor fonts off
* Added searching with regular expressions in text editors
* Added an action that deletes a line without copying it
* Added copy line up/down actions (Ctrl+Alt+Up/Down)
* There is now an option for listing methods alphabetically in the combo box
above the editor.
* A block highlighting feature has been added.
* Code folding markers have been improved on.
* FakeVim mode has received further improvements.
* It is now possible to disable Ctrl+Click navigation.
* An optional XCode-style tab indentation has been added.
* Ui changes now propagate immediately to the code model.
* Fixed possibly missing code completion with MinGW toolchain.
* Added option for turning off antialiasing of text editor fonts.
* It is now possible to search within the text editor using regular
expressions.
* Added an action to delete a line without copying it.
* Added actions to copy a line up/down (Ctrl+Alt+Up/Down).
Building and Running
* New options: Auto-Save before Build and Run without building
* Environment settings
* A new option Auto-Save before Build and Run has been added.
* Added option to set environment variables for running
* Fixed bug that prevented use of Qt 4 with version < 4.2
Debugging
......
......@@ -41,6 +41,11 @@ AddressBook::AddressBook(QWidget *parent)
removeButton = ui->removeButton;
removeButton->setEnabled(false);
findButton = new QPushButton;
findButton = ui->findButton;
dialog = new FindDialog;
connect(addButton, SIGNAL(clicked()), this,
SLOT(addContact()));
connect(submitButton, SIGNAL(clicked()), this,
......@@ -55,6 +60,8 @@ AddressBook::AddressBook(QWidget *parent)
SLOT(editContact()));
connect(removeButton, SIGNAL(clicked()), this,
SLOT(removeContact()));
connect(findButton, SIGNAL(clicked()), this,
SLOT(findContact()));
setWindowTitle(tr("Simple Address Book"));
}
......@@ -235,3 +242,23 @@ void AddressBook::updateInterface(Mode mode)
break;
}
}
void AddressBook::findContact()
{
dialog->show();
if (dialog->exec() == QDialog::Accepted) {
QString contactName = dialog->getFindText();
if (contacts.contains(contactName)) {
nameLine->setText(contactName);
addressText->setText(contacts.value(contactName));
} else {
QMessageBox::information(this, tr("Contact Not Found"),
tr("Sorry, \"%1\" is not in your address book.").arg(contactName));
return;
}
}
updateInterface(NavigationMode);
}
......@@ -6,6 +6,7 @@
#include <QtGui/QLineEdit>
#include <QtGui/QTextEdit>
#include <QtGui/QMessageBox>
#include "finddialog.h"
namespace Ui
......@@ -30,6 +31,7 @@ public slots:
void removeContact();
void next();
void previous();
void findContact();
private:
Ui::AddressBook *ui;
......@@ -42,6 +44,7 @@ private:
QPushButton *removeButton;
QPushButton *nextButton;
QPushButton *previousButton;
QPushButton *findButton;
QLineEdit *nameLine;
QTextEdit *addressText;
......@@ -49,6 +52,7 @@ private:
QString oldName;
QString oldAddress;
Mode currentMode;
FindDialog *dialog;
};
#endif // ADDRESSBOOK_H
......@@ -6,6 +6,17 @@ FindDialog::FindDialog(QWidget *parent) :
m_ui(new Ui::FindDialog)
{
m_ui->setupUi(this);
lineEdit = new QLineEdit;
lineEdit = m_ui->lineEdit;
findButton = new QPushButton;
findButton = m_ui->findButton;
findText = "";
connect(findButton, SIGNAL(clicked()), this, SLOT(findClicked()));
setWindowTItle(tr("Find a Contact"));
}
FindDialog::~FindDialog()
......@@ -15,8 +26,20 @@ FindDialog::~FindDialog()
void FindDialog::findClicked()
{
QString text = lineEdit->text();
if (text.isEmpty()) {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name."));
return;
} else {
findText = text;
lineEdit->clear();
hide();
}
}
QString FindDialog::getFindText()
{
return findText;
}
......@@ -1861,7 +1861,7 @@ Sollen sie überschrieben werden?</translation>
<message>
<location line="+1"/>
<source>Resume Session</source>
<translation>Sitzng fortführen</translation>
<translation>Sitzung fortführen</translation>
</message>
<message>
<location line="+2"/>
......@@ -1939,7 +1939,7 @@ Sollen sie überschrieben werden?</translation>
<message>
<location line="+2"/>
<source>You can force code completion at any time using &lt;tt&gt;Ctrl+Space&lt;/tt&gt;.</source>
<translation type="unfinished">Sie können die Code-Vervollständigung jederzeit mittels &lt;tt&gt;Strg+Leertaste&lt;/tt&gt; erzwingen.</translation>
<translation>Sie können die Code-Vervollständigung jederzeit mittels &lt;tt&gt;Strg+Leertaste&lt;/tt&gt; erzwingen.</translation>
</message>
<message>
<location line="+1"/>
......@@ -1980,7 +1980,7 @@ Sollen sie überschrieben werden?</translation>
<message>
<location line="+1"/>
<source>You can modify the binary that is being executed when you press the &lt;tt&gt;Run&lt;/tt&gt; button: Add a &lt;tt&gt;Custom Executable&lt;/tt&gt; by clicking the &lt;tt&gt;+&lt;/tt&gt; button in &lt;tt&gt;Projects -&gt; Run Settings -&gt; Run Configuration&lt;/tt&gt; and then select the new target in the combo box.</source>
<translation type="unfinished">Sie können die auszuführende Datei bestimmen die ausgeführt wird, wenn Sie auf die &lt;tt&gt;Ausführen&lt;/tt&gt;-Schaltlfläche klicken: Fügen Sie dazu eine &lt;tt&gt;Benutzerdefinierte ausführbare Datei&lt;/tt&gt; unter &lt;tt&gt;Projekte -&gt;Ausführung -&gt; Ausführungskonfiguration&lt;/tt&gt; hinzu, indem Sie auf die &lt;tt&gt;+&lt;/tt&gt;-Schaltfläche klicken und wählen Sie die neue Konfiguration aus der Auswahl.</translation>
<translation>Sie können die auszuführende Datei bestimmen die ausgeführt wird, wenn Sie auf die &lt;tt&gt;Ausführen&lt;/tt&gt;-Schaltlfläche klicken: Fügen Sie dazu eine &lt;tt&gt;Benutzerdefinierte ausführbare Datei&lt;/tt&gt; unter &lt;tt&gt;Projekte -&gt;Ausführung -&gt; Ausführungskonfiguration&lt;/tt&gt; hinzu, indem Sie auf die &lt;tt&gt;+&lt;/tt&gt;-Schaltfläche klicken und wählen Sie die neue Konfiguration aus der Auswahl.</translation>
</message>
<message>
<location line="+3"/>
......@@ -3064,7 +3064,7 @@ p {
<translation type="obsolete">Der Debugger konnte sich nicht an den Prozess %1 anhängen: %2</translation>
</message>
<message>
<location line="+494"/>
<location line="+500"/>
<source>Unable to assign the value &apos;%1&apos; to &apos;%2&apos;: %3</source>
<translation>Der Wert &apos;%1&apos; konnte nicht an &apos;%2&apos; zugewiesen werden: %3</translation>
</message>
......@@ -3718,23 +3718,23 @@ p {
<context>
<name>Debugger::Internal::GdbEngine</name>
<message>
<location filename="../../../src/plugins/debugger/gdb/gdbengine.cpp" line="+210"/>
<location filename="../../../src/plugins/debugger/gdb/gdbengine.cpp" line="+212"/>
<source>The Gdb process failed to start. Either the invoked program &apos;%1&apos; is missing, or you may have insufficient permissions to invoke the program.</source>
<translation>Der Start des Gdb-Prozesses schlug fehl. Entweder fehlt die ausführbare Datei &apos;%1&apos; oder die Berechtigungen sind nicht ausreichend.</translation>
</message>
<message>
<location line="+6"/>
<location line="+7"/>
<source>The Gdb process crashed some time after starting successfully.</source>
<translation>Der Gdb-Prozess ist einige Zeit nach dem Start abgestürzt.</translation>
</message>
<message>
<location line="+4"/>
<location line="+39"/>
<location line="+40"/>
<source>The last waitFor...() function timed out. The state of QProcess is unchanged, and you can try calling waitFor...() again.</source>
<translation>Zeitüberschreitung bei der letzten waitFor...()-Funktion. Der Status des QProcess ist unverändert, und waitFor...() kann nocheinmal gerufen.</translation>
</message>
<message>
<location line="-34"/>
<location line="-35"/>
<source>An error occurred when attempting to write to the Gdb process. For example, the process may not be running, or it may have closed its input channel.</source>
<translation>Ein Fehler trat beim Versuch des Schreibens zum Gdb-Prozess auf. Wahrscheinlich läuft der Prozess nicht, oder hat seinen Eingabekanal geschlossen.</translation>
</message>
......@@ -3750,15 +3750,15 @@ p {
</message>
<message>
<location line="+5"/>
<location line="+39"/>
<location line="+40"/>
<location line="+959"/>
<location line="+19"/>
<location line="+402"/>
<location line="+401"/>
<source>Error</source>
<translation>Fehler</translation>
</message>
<message>
<location line="-1256"/>
<location line="-1255"/>
<source>Library %1 loaded.</source>
<translation>Bibliothek %1 geladen.</translation>
</message>
......@@ -3920,7 +3920,7 @@ Es wird empfohlen, gdb 6.7 oder später zu benutzen.</translation>
<translation>Angehalten.</translation>
</message>
<message>
<location line="+293"/>
<location line="+292"/>
<location line="+27"/>
<source>Debugger Startup Failure</source>
<translation>Fehler beim Starten des Debuggers</translation>
......@@ -5329,7 +5329,7 @@ It also automatically sets the correct Qt version.</source>
<message>
<location line="+1"/>
<source>Plugin ended its life cycle and was deleted</source>
<translation type="unfinished"></translation>
<translation>Das Plugin wurde nach Ablauf seiner Nutzungsdauer gelöscht</translation>
</message>
<message>
<source>Plugin ended it&apos;s life cycle and was deleted</source>
......@@ -6169,7 +6169,7 @@ Grund: %3</translation>
<translation>Das Kommando &apos;show&apos; konnte nicht ausgeführt werden: %1: %2</translation>
</message>
<message>
<location line="+143"/>
<location line="+149"/>
<source>Changes</source>
<translation>Änderungen</translation>
</message>
......@@ -7227,7 +7227,7 @@ Make sure you use something like
SOURCES *= .../ide/main/bin/gdbmacros/gdbmacros.cpp
in your .pro file.</source>
<translation type="unfinished">g</translation>
<translation>g</translation>
</message>
<message>
<location filename="../../../src/tools/texteditor/mainwindow.cpp" line="+62"/>
......@@ -8086,6 +8086,10 @@ Basisname der Bibliothek: %1</translation>
</context>
<context>
<name>ProjectExplorer::EnvironmentModel</name>
<message>
<source>&lt;UNSET&gt;</source>
<translation type="obsolete">&lt;NICHT GESETZT&gt;</translation>
</message>
<message>
<location filename="../../../src/plugins/projectexplorer/environmenteditmodel.cpp" line="+169"/>
<source>Variable</source>
......@@ -8096,6 +8100,37 @@ Basisname der Bibliothek: %1</translation>
<source>Value</source>
<translation>Wert</translation>
</message>
<message>
<source>&lt;VARIABLE&gt;</source>
<translation type="obsolete">&lt;VARIABLE&gt;</translation>
</message>
<message>
<source>&lt;VALUE&gt;</source>
<translation type="obsolete">&lt;WERT&gt;</translation>
</message>
</context>
<context>
<name>ProjectExplorer::EnvironmentWidget</name>
<message>
<location line="+276"/>
<source>&amp;Edit</source>
<translation>&amp;Bearbeiten</translation>
</message>
<message>
<location line="+4"/>
<source>&amp;Add</source>
<translation>Hinzu&amp;fügen</translation>
</message>
<message>
<location line="+5"/>
<source>&amp;Reset</source>
<translation>&amp;Rücksetzen</translation>
</message>
<message>
<location line="+5"/>
<source>&amp;Unset</source>
<translation>&amp;Leeren</translation>
</message>
</context>
<context>
<name>ProjectExplorer::Internal::AllProjectsFilter</name>
......@@ -8845,7 +8880,7 @@ Basisname der Bibliothek: %1</translation>
<message>
<location line="+5"/>
<source>&amp;Start Debugging</source>
<translation type="unfinished"></translation>
<translation>&amp;Debuggen</translation>
</message>
<message>
<location line="+44"/>
......@@ -9064,32 +9099,32 @@ Basisname der Bibliothek: %1</translation>
<message>
<location line="+61"/>
<source>Build Project &quot;%1&quot;</source>
<translation type="unfinished">Projekt &apos;%1&quot; erstellen</translation>
<translation>Projekt &apos;%1&quot; erstellen</translation>
</message>
<message>
<location line="+10"/>
<source>Rebuild Project &quot;%1&quot;</source>
<translation type="unfinished"></translation>
<translation>Projekt &quot;%1&quot; neu erstellen</translation>
</message>
<message>
<location line="+9"/>
<source>Clean Project &quot;%1&quot;</source>
<translation type="unfinished"></translation>
<translation>Projekt &quot;%1&quot; bereinigen</translation>
</message>
<message>
<location line="+9"/>
<source>Build Without Dependencies</source>
<translation type="unfinished"></translation>
<translation>Erstellen unter Ausschluss der Abhängigkeiten</translation>
</message>
<message>
<location line="+4"/>
<source>Rebuild Without Dependencies</source>
<translation type="unfinished"></translation>
<translation>Neu erstellen unter Ausschluss der Abhängigkeiten</translation>
</message>
<message>
<location line="+4"/>
<source>Clean Without Dependencies</source>
<translation type="unfinished"></translation>
<translation>Bereinigen unter Ausschluss der Abhängigkeiten</translation>
</message>
<message>
<location line="+1150"/>
......@@ -9259,7 +9294,7 @@ unter Versionsverwaltung (%2) gestellt werden?</translation>
<message>
<location line="+42"/>
<source>Unknown error</source>
<translation type="unfinished">Unbekannter Fehler</translation>
<translation>Unbekannter Fehler</translation>
</message>
<message>
<location line="+171"/>
......@@ -11369,7 +11404,7 @@ Um es abzurufen, tippen Sie das Kürzel im Locator, gefolgt von einem Leerzeich
<message>
<location/>
<source>Break at &apos;main&apos;:</source>
<translation type="unfinished"></translation>
<translation>Haltepunkt bei &apos;main&apos;:</translation>
</message>
</context>
<context>
......@@ -11914,7 +11949,7 @@ Um es abzurufen, tippen Sie das Kürzel im Locator, gefolgt von einem Leerzeich
<context>
<name>TextEditor::FontSettingsPage</name>
<message>
<location filename="../../../src/plugins/texteditor/fontsettingspage.cpp" line="+199"/>
<location filename="../../../src/plugins/texteditor/fontsettingspage.cpp" line="+212"/>
<source>Font &amp; Colors</source>
<translation>Zeichensatz und Farben</translation>
</message>
......@@ -11961,7 +11996,7 @@ Die folgenden Encodings scheinen der Datei zu entsprechen:</translation>
<message>
<location filename="../../../src/plugins/texteditor/findincurrentfile.cpp" line="+57"/>
<source>Current File</source>
<translation type="unfinished"></translation>
<translation>Aktuelle Datei</translation>
</message>
</context>
<context>
......
This diff is collapsed.
include(../../../qtcreator.pri)
LANGUAGES = de it ja ru
LANGUAGES = de es it ja ru
# var, prepend, append
defineReplace(prependAll) {
......
......@@ -380,7 +380,8 @@ void CPPEditor::createToolBar(CPPEditorEditable *editable)
QToolBar *toolBar = editable->toolBar();
QList<QAction*> actions = toolBar->actions();
toolBar->insertWidget(actions.first(), m_methodCombo);
QWidget *w = toolBar->widgetForAction(actions.first());
static_cast<QHBoxLayout*>(w->layout())->insertWidget(0, m_methodCombo, 1);
}
int CPPEditor::previousBlockState(QTextBlock block) const
......
......@@ -760,6 +760,12 @@ void CdbDebugEnginePrivate::endDebugging(EndDebuggingMode em)
}
setDebuggeeHandles(0, 0);
m_engine->killWatchTimer();
// Clean up resources (open files, etc.)
hr = m_cif.debugClient->EndSession(DEBUG_END_PASSIVE);
if (FAILED(hr))
errorMessage += msgComFailed("EndSession", hr);
if (!errorMessage.isEmpty()) {
errorMessage = QString::fromLatin1("There were errors trying to end debugging: %1").arg(errorMessage);
m_debuggerManagerAccess->showDebuggerOutput(QLatin1String("error"), errorMessage);
......
......@@ -1210,7 +1210,9 @@ void DebuggerPlugin::startExternalApplication()
setConfigValue(_("LastExternalExecutableArguments"),
dlg.executableArguments());
sp->executable = dlg.executableFile();
sp->processArgs = dlg.executableArguments().split(QLatin1Char(' '));
if (!dlg.executableArguments().isEmpty())
sp->processArgs = dlg.executableArguments().split(QLatin1Char(' '));
if (dlg.breakAtMain())
m_manager->breakByFunctionMain();
......
......@@ -546,7 +546,13 @@ bool GitClient::synchronousGit(const QString &workingDirectory,
environment.set(QLatin1String("PATH"), m_settings.path);
process.setEnvironment(environment.toStringList());
process.start(m_binaryPath, arguments);
#ifdef Q_OS_WIN
QStringList args;
args << "/c" << m_binaryPath << arguments;
process.start(QLatin1String("cmd.exe"), args);
#else
process.start(m_binaryPath, arguments);
#endif
process.closeWriteChannel();
if (!process.waitForFinished()) {
......
......@@ -55,7 +55,7 @@ void EnvironmentModel::updateResultEnvironment()
m_resultEnvironment.modify(m_items);
foreach (const EnvironmentItem &item, m_items) {
if (item.unset) {
m_resultEnvironment.set(item.name, "<UNSET>");
m_resultEnvironment.set(item.name, QLatin1String("<UNSET>"));
}
}
}
......@@ -127,7 +127,7 @@ QVariant EnvironmentModel::data(const QModelIndex &index, int role) const
return m_resultEnvironment.value(m_resultEnvironment.constBegin() + index.row());
} else {
if (m_items.at(index.row()).unset)
return "<UNSET>";
return QLatin1String("<UNSET>");
else
return m_items.at(index.row()).value;
}
......@@ -285,7 +285,7 @@ bool EnvironmentModel::setData(const QModelIndex &index, const QVariant &value,
QModelIndex EnvironmentModel::addVariable()
{
const QString &name = "<VARIABLE>";
const QString &name = QLatin1String("<VARIABLE>");
if (m_mergedEnvironments) {
int i = findInResult(name);
if (i != -1)
......@@ -296,7 +296,7 @@ QModelIndex EnvironmentModel::addVariable()
return index(i, 0, QModelIndex());
}
// Don't exist, really add them
return addVariable(EnvironmentItem(name, "<VALUE>"));
return addVariable(EnvironmentItem(name, QLatin1String("<VALUE>")));
}
QModelIndex EnvironmentModel::addVariable(const EnvironmentItem &item)
......@@ -442,21 +442,21 @@ EnvironmentWidget::EnvironmentWidget(QWidget *parent)
QVBoxLayout *verticalLayout_2 = new QVBoxLayout();
m_editButton = new QPushButton(this);
m_editButton->setText("&Edit");
m_editButton->setText(tr("&Edit"));
verticalLayout_2->addWidget(m_editButton);
m_addButton = new QPushButton(this);
m_addButton->setText("&Add");
m_addButton->setText(tr("&Add"));
verticalLayout_2->addWidget(m_addButton);
m_removeButton = new QPushButton(this);
m_removeButton->setEnabled(false);
m_removeButton->setText("&Reset");
m_removeButton->setText(tr("&Reset"));
verticalLayout_2->addWidget(m_removeButton);
m_unsetButton = new QPushButton(this);
m_unsetButton->setEnabled(false);
m_unsetButton->setText("&Unset");
m_unsetButton->setText(tr("&Unset"));
verticalLayout_2->addWidget(m_unsetButton);
QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
......
......@@ -52,8 +52,9 @@
#include <QtCore/QTimer>
#include <QtCore/QtDebug>
#include <QtGui/QMenu>
#include <QtGui/QComboBox>
#include <QtGui/QHBoxLayout>
#include <QtGui/QMenu>
enum {
UPDATE_DOCUMENT_DEFAULT_INTERVAL = 100
......@@ -386,7 +387,8 @@ void ScriptEditor::createToolBar(ScriptEditorEditable *editable)
QToolBar *toolBar = editable->toolBar();
QList<QAction*> actions = toolBar->actions();
toolBar->insertWidget(actions.first(), m_methodCombo);
QWidget *w = toolBar->widgetForAction(actions.first());
static_cast<QHBoxLayout*>(w->layout())->insertWidget(0, m_methodCombo, 1);
}
void ScriptEditor::contextMenuEvent(QContextMenuEvent *e)
......
......@@ -2775,6 +2775,13 @@ void BaseTextEditor::extraAreaMouseEvent(QMouseEvent *e)
}
}
// Set whether the mouse cursor is a hand or normal arrow
if (e->type() == QEvent::MouseMove) {
bool hand = (e->pos().x() <= markWidth);
if (hand != (d->m_extraArea->cursor().shape() == Qt::PointingHandCursor))
d->m_extraArea->setCursor(hand ? Qt::PointingHandCursor : Qt::ArrowCursor);
}
if (e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick) {
if (e->button() == Qt::LeftButton) {
int boxWidth = collapseBoxWidth(fontMetrics());
......@@ -4094,6 +4101,7 @@ BaseTextEditorEditable::BaseTextEditorEditable(BaseTextEditor *editor)
QWidget *w = new QWidget;
l->setMargin(0);
l->setContentsMargins(5, 0, 5, 0);
l->addStretch(0);
l->addWidget(m_cursorPositionLabel);
w->setLayout(l);
......
......@@ -143,10 +143,23 @@ QString FormatDescription::trName() const
QColor FormatDescription::foreground() const
{
if (m_name == QLatin1String(Constants::C_LINE_NUMBER))
return QApplication::palette().dark().color();
if (m_name == QLatin1String(Constants::C_PARENTHESES))
if (m_name == QLatin1String(Constants::C_LINE_NUMBER)) {
const QColor bg = QApplication::palette().background().color();