Merge commit 'origin/1.2'
Conflicts: src/plugins/debugger/breakwindow.cpp
@@ -12,9 +12,10 @@ API, so if you created your own custom plugins these need to be adapted.
|
||||
|
||||
General:
|
||||
* Reworked Welcome Screen
|
||||
* Speed improvement: Store large amounts of persistent data
|
||||
(e.g. locator cache) in an SQLite database.
|
||||
|
||||
* Speed improvement: store large amounts of persistent data
|
||||
(e.g. locator cache) in an SQLite database
|
||||
* Show current file name in the window title
|
||||
|
||||
Editing
|
||||
* Added option to allow alphabetical method combo box
|
||||
* Introduced Block highlighting
|
||||
@@ -26,6 +27,8 @@ Editing
|
||||
* 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)
|
||||
|
||||
Building and Running
|
||||
* New options: Auto-Save before Build and Run without building
|
||||
@@ -40,7 +43,7 @@ Debugging
|
||||
* Changed method of dumper loading on Windows, enabling it for MinGW 64
|
||||
* Make it possible to disable breakpoints
|
||||
* Make it possible to float the debugger views
|
||||
|
||||
|
||||
Wizards
|
||||
|
||||
Designer
|
||||
@@ -62,7 +65,7 @@ Platform Specific
|
||||
|
||||
Windows
|
||||
* Show native path separators
|
||||
* Experimental support for the Microsoft C++ compilers from Windows SDKs
|
||||
* Experimental support for the Microsoft C++ compilers from Windows SDKs
|
||||
or VS 2005/2008 (x86 and AMD64)
|
||||
|
||||
Mac
|
||||
@@ -71,11 +74,12 @@ Linux
|
||||
|
||||
Other Unixes
|
||||
* Made Qt Creator less dependant on Linux specific defines
|
||||
|
||||
|
||||
Additional credits go to:
|
||||
* axasia <axasia@gmail.com> (japanese translation)
|
||||
* axasia <axasia@gmail.com> (japanese translation, compile fixes)
|
||||
* Christian Hoenig <christian@hoenig.cc> ("Build Project Only" submenu and
|
||||
build project dependencies, various patches)
|
||||
* Enrico Ros <enrico.ros@gmail.com> (italian translation)
|
||||
* Joel Nordell <joel.nordell@chloridepower.com> (XCode-style tab behavior, various patches)
|
||||
* Serge Ratke <dev.serge.ratke@gmx.de> (copy lines up/down by Ctrl+Alt+Up/Down)
|
||||
* Joel Nordell <joel.nordell@chloridepower.com> (XCode-style tab behavior,
|
||||
various patches)
|
||||
* Serge Ratke <dev.serge.ratke@gmx.de> (copy lines up/down)
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
The next step to creating our basic address book application is to allow a
|
||||
little bit of user interaction.
|
||||
|
||||
### \image addressbook-tutorial-part2-add-contact.png
|
||||
\image addressbook-tutorial-part2-add-contact.png
|
||||
|
||||
We will provide a push button that the user can click to add a new contact.
|
||||
Also, some form of data structure is needed to store these contacts in an
|
||||
@@ -286,7 +286,7 @@
|
||||
of the widget. The figure below shows the difference between using the
|
||||
spacer and not using it.
|
||||
|
||||
## image
|
||||
\image addressbook-tutorial-part2-stretch-effects.png
|
||||
|
||||
Select all the objects on the form (use \key{Ctrl+A}) and lay them out in a
|
||||
grid. Lastly, set the top level widget's layout by right-clicking anywhere
|
||||
@@ -350,7 +350,7 @@
|
||||
We connect the push buttons' \l{QAbstractButton::}{clicked()} signal to
|
||||
their respective slots. The figure below illustrates this.
|
||||
|
||||
#image
|
||||
\image addressbook-tutorial-part2-signals-and-slots.png
|
||||
|
||||
Finally, we set the window title to "Simple Address Book" using the
|
||||
\l{QWidget::}{setWindowTitle()} function.
|
||||
@@ -397,7 +397,7 @@
|
||||
The screenshot below shows the QMessageBox object we use to display
|
||||
information messages to the user.
|
||||
|
||||
# image
|
||||
\image addressbook-tutorial-part2-add-successful.png
|
||||
|
||||
\section2 The \c{cancel()} Function
|
||||
|
||||
@@ -494,6 +494,8 @@
|
||||
The screenshot below is our expected graphical user interface. Notice that
|
||||
it is getting closer to our final application.
|
||||
|
||||
\image addressbook-tutorial-part3-screenshot.png
|
||||
|
||||
Within our \c addContact() function, we have to disable the \gui Next and
|
||||
\gui Previous buttons so that the user does not attempt to navigate while
|
||||
adding a contact.
|
||||
|
||||
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 7.9 KiB |
|
After Width: | Height: | Size: 9.7 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 44 KiB |
@@ -12,7 +12,7 @@
|
||||
the Linux, Mac OS X and Windows platforms.
|
||||
|
||||
\note Please report bugs and suggestions to the Qt Software task tracker at
|
||||
http://www.qtsoftware.com/developer/task-tracker. You can also join the
|
||||
http://qt.nokia.com/developer/task-tracker. You can also join the
|
||||
qt-creator@trolltech.com mailing list. To subscribe, send a message with
|
||||
the word \e subscribe to qt-creator-request@trolltech.com. For more
|
||||
information on Qt mailing lists, visit http://lists.trolltech.com
|
||||
@@ -1461,7 +1461,7 @@
|
||||
|
||||
Open your project file (\c{.pro}) from the \gui{Projects} pane. Then,
|
||||
follow the guidelines in the
|
||||
\l{http://doc.qtsoftware.com/latest/make-project-files.html#declaring-other-libraries}
|
||||
\l{http://doc.trolltech.com/latest/make-project-files.html#declaring-other-libraries}
|
||||
{Declaring other Libraries} section of the Qt documentation.
|
||||
|
||||
If your project successfully builds and links against the external library,
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
A plugin with given \c name, \c version and \c compatVersion matches
|
||||
the dependency if
|
||||
\list
|
||||
\o it's \c name matches \c dependencyName, and
|
||||
\o its \c name matches \c dependencyName, and
|
||||
\o \c {compatVersion <= dependencyVersion <= version}.
|
||||
\endlist
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
that depend on that plugin also fail.
|
||||
|
||||
Plugins have access to the plugin manager
|
||||
(and it's object pool) via the PluginManager::instance()
|
||||
(and its object pool) via the PluginManager::instance()
|
||||
method.
|
||||
*/
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ void PluginErrorView::update(PluginSpec *spec)
|
||||
tooltip = tr("Plugin was shut down");
|
||||
case PluginSpec::Deleted:
|
||||
text = tr("Deleted");
|
||||
tooltip = tr("Plugin ended it's life cycle and was deleted");
|
||||
tooltip = tr("Plugin ended its life cycle and was deleted");
|
||||
}
|
||||
m_ui->state->setText(text);
|
||||
m_ui->state->setToolTip(tooltip);
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
information about the plugin's current state.
|
||||
|
||||
The plugin spec is also filled with more information as the plugin
|
||||
goes through it's loading process (see PluginSpec::State).
|
||||
goes through its loading process (see PluginSpec::State).
|
||||
If an error occurs, the plugin spec is the place to look for the
|
||||
error details.
|
||||
*/
|
||||
@@ -102,7 +102,7 @@
|
||||
\value Invalid
|
||||
Starting point: Even the xml description file was not read.
|
||||
\value Read
|
||||
The xml description file has been successfully read, and it's
|
||||
The xml description file has been successfully read, and its
|
||||
information is available via the PluginSpec.
|
||||
\value Resolved
|
||||
The dependencies given in the description file have been
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
This method is executed when the wizard has been selected by the user
|
||||
for execution. Any dialogs the wizard opens should use the given \a parent.
|
||||
The \a path argument is a suggestion for the location where files should be
|
||||
created. The wizard should fill this in it's path selection elements as a
|
||||
created. The wizard should fill this in its path selection elements as a
|
||||
default path.
|
||||
Returns a list of files (absolute paths) that have been created, if any.
|
||||
*/
|
||||
|
||||
@@ -46,13 +46,10 @@ QKeySequence INavigationWidgetFactory::activationSequence()
|
||||
return QKeySequence();
|
||||
}
|
||||
|
||||
|
||||
void INavigationWidgetFactory::saveSettings(int /* position */, QWidget * /* widget */)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void INavigationWidgetFactory::restoreSettings(int /* position */, QWidget * /* widget */)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
#include "settingsdatabase.h"
|
||||
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QMap>
|
||||
#include <QtSql/QSqlDatabase>
|
||||
#include <QtSql/QSqlError>
|
||||
@@ -94,6 +95,10 @@ SettingsDatabase::SettingsDatabase(const QString &path,
|
||||
const QLatin1Char slash('/');
|
||||
|
||||
// TODO: Don't rely on a path, but determine automatically
|
||||
QDir pathDir(path);
|
||||
if (!pathDir.exists())
|
||||
pathDir.mkpath(pathDir.absolutePath());
|
||||
|
||||
QString fileName = path;
|
||||
if (!fileName.endsWith(slash))
|
||||
fileName += slash;
|
||||
|
||||
@@ -123,12 +123,12 @@ WelcomeMode::WelcomeMode() :
|
||||
m_d->rssFetcher = new RSSFetcher(7, this);
|
||||
m_d->m_welcomePage = new QWidget(m_d->m_widget);
|
||||
m_d->ui.setupUi(m_d->m_welcomePage);
|
||||
m_d->ui.projTitleLabel->setText(titleLabel(tr("Projects")));
|
||||
m_d->ui.recentSessionsTitleLabel->setText(titleLabel(tr("Sessions")));
|
||||
m_d->ui.projTitleLabel->setText(titleLabel(tr("Open Recent Project")));
|
||||
m_d->ui.recentSessionsTitleLabel->setText(titleLabel(tr("Resume Session")));
|
||||
m_d->ui.tutorialsTitleLabel->setText(titleLabel(tr("Tutorials")));
|
||||
m_d->ui.demoTitleLabel->setText(titleLabel(tr("Explore Qt Examples")));
|
||||
m_d->ui.didYouKnowTitleLabel->setText(titleLabel(tr("Did you know?")));
|
||||
m_d->ui.labsTitleLabel->setText(titleLabel(tr("News from the Qt Labs")));
|
||||
m_d->ui.didYouKnowTitleLabel->setText(titleLabel(tr("Did You Know?")));
|
||||
m_d->ui.labsTitleLabel->setText(titleLabel(tr("News From the Qt Labs")));
|
||||
m_d->ui.sitesTitleLabel->setText(titleLabel(tr("Qt Websites")));
|
||||
m_d->ui.sessTreeWidget->viewport()->setAutoFillBackground(false);
|
||||
m_d->ui.projTreeWidget->viewport()->setAutoFillBackground(false);
|
||||
@@ -160,8 +160,8 @@ WelcomeMode::WelcomeMode() :
|
||||
connect(m_d->ui.openExampleButton, SIGNAL(clicked()), SLOT(slotOpenExample()));
|
||||
connect(m_d->ui.examplesComboBox, SIGNAL(currentIndexChanged(int)), SLOT(slotEnableExampleButton(int)));
|
||||
|
||||
connect(this, SIGNAL(updatedExamples(QString, QString, QString)),
|
||||
this, SLOT(slotUpdateExamples(QString, QString, QString)));
|
||||
connect(this, SIGNAL(updatedExamples(QString, QString)),
|
||||
this, SLOT(slotUpdateExamples(QString, QString)));
|
||||
|
||||
connect(m_d->rssFetcher, SIGNAL(newsItemReady(QString, QString, QString)),
|
||||
m_d->ui.newsTreeWidget, SLOT(slotAddNewsItem(QString, QString, QString)));
|
||||
@@ -169,7 +169,7 @@ WelcomeMode::WelcomeMode() :
|
||||
//: Add localized feed here only if one exists
|
||||
m_d->rssFetcher->fetch(QUrl(tr("http://labs.trolltech.com/blogs/feed")));
|
||||
|
||||
m_d->ui.sitesTreeWidget->addItem(tr("Qt Software"), QLatin1String("http://www.trolltech.com"));
|
||||
m_d->ui.sitesTreeWidget->addItem(tr("Qt Software"), QLatin1String("http://qt.nokia.com"));
|
||||
m_d->ui.sitesTreeWidget->addItem(tr("Qt Labs"), QLatin1String("http://labs.trolltech.com"));
|
||||
m_d->ui.sitesTreeWidget->addItem(tr("Qt Git Hosting"), QLatin1String("http://qt.gitorious.org"));
|
||||
m_d->ui.sitesTreeWidget->addItem(tr("Qt Centre"), QLatin1String("http://www.qtcentre.org"));
|
||||
@@ -252,37 +252,33 @@ void WelcomeMode::updateWelcomePage(const WelcomePageData &welcomePageData)
|
||||
m_d->lastData = welcomePageData;
|
||||
|
||||
m_d->m_widget->setUpdatesEnabled(false);
|
||||
if (!welcomePageData.previousSession.isEmpty() || !welcomePageData.projectList.isEmpty()) {
|
||||
m_d->ui.sessTreeWidget->clear();
|
||||
m_d->ui.projTreeWidget->clear();
|
||||
m_d->ui.sessTreeWidget->clear();
|
||||
m_d->ui.projTreeWidget->clear();
|
||||
|
||||
if (welcomePageData.sessionList.count() > 1) {
|
||||
foreach (const QString &s, welcomePageData.sessionList) {
|
||||
QString str = s;
|
||||
if (s == welcomePageData.previousSession)
|
||||
str = tr("%1 (last session)").arg(s);
|
||||
m_d->ui.sessTreeWidget->addItem(str, s);
|
||||
}
|
||||
m_d->ui.sessTreeWidget->updateGeometry();
|
||||
m_d->ui.sessTreeWidget->show();
|
||||
} else {
|
||||
m_d->ui.sessTreeWidget->hide();
|
||||
if (welcomePageData.sessionList.count() > 0) {
|
||||
foreach (const QString &s, welcomePageData.sessionList) {
|
||||
QString str = s;
|
||||
if (s == welcomePageData.previousSession)
|
||||
str = tr("%1 (last session)").arg(s);
|
||||
m_d->ui.sessTreeWidget->addItem(str, s);
|
||||
}
|
||||
m_d->ui.sessTreeWidget->updateGeometry();
|
||||
m_d->ui.sessTreeWidget->show();
|
||||
} else {
|
||||
m_d->ui.sessTreeWidget->hide();
|
||||
}
|
||||
|
||||
typedef QPair<QString, QString> QStringPair;
|
||||
typedef QPair<QString, QString> QStringPair;
|
||||
if (welcomePageData.projectList.count() > 0) {
|
||||
foreach (const QStringPair &it, welcomePageData.projectList) {
|
||||
QTreeWidgetItem *item = m_d->ui.projTreeWidget->addItem(it.second, it.first);
|
||||
const QFileInfo fi(it.first);
|
||||
item->setToolTip(1, QDir::toNativeSeparators(fi.absolutePath()));
|
||||
}
|
||||
m_d->ui.projTreeWidget->updateGeometry();
|
||||
|
||||
m_d->ui.recentSessionsFrame->show();
|
||||
m_d->ui.recentProjectsFrame->show();
|
||||
} else {
|
||||
m_d->ui.recentSessionsFrame->hide();
|
||||
m_d->ui.recentProjectsFrame->hide();
|
||||
m_d->ui.projTreeWidget->hide();
|
||||
}
|
||||
m_d->ui.projTreeWidget->updateGeometry();
|
||||
m_d->m_widget->setUpdatesEnabled(true);
|
||||
}
|
||||
|
||||
@@ -310,7 +306,7 @@ void WelcomeMode::slotUrlClicked(const QString &data)
|
||||
QDesktopServices::openUrl(QUrl(data));
|
||||
}
|
||||
|
||||
void WelcomeMode::slotUpdateExamples(const QString& examplePath, const QString& demosPath, const QString& docPath)
|
||||
void WelcomeMode::slotUpdateExamples(const QString& examplePath, const QString& demosPath)
|
||||
{
|
||||
QString demoxml = demosPath + "/qtdemo/xml/examples.xml";
|
||||
if (!QFile::exists(demoxml))
|
||||
@@ -391,7 +387,7 @@ void WelcomeMode::slotOpenExample()
|
||||
void WelcomeMode::slotFeedback()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl(QLatin1String(
|
||||
"http://www.trolltech.com/forms/feedback-forms/qt-creator-user-feedback/view")));
|
||||
"http://qt.nokia.com/forms/feedback-forms/qt-creator-user-feedback/view")));
|
||||
}
|
||||
|
||||
void WelcomeMode::slotCreateNewProject()
|
||||
@@ -497,6 +493,11 @@ WelcomeModeTreeWidget::WelcomeModeTreeWidget(QWidget *parent) :
|
||||
SLOT(slotItemClicked(QTreeWidgetItem *)));
|
||||
}
|
||||
|
||||
QSize WelcomeModeTreeWidget::minimumSizeHint() const
|
||||
{
|
||||
return QSize();
|
||||
}
|
||||
|
||||
QSize WelcomeModeTreeWidget::sizeHint() const
|
||||
{
|
||||
return QSize(QTreeWidget::sizeHint().width(), 30 * topLevelItemCount());
|
||||
|
||||
@@ -81,14 +81,14 @@ signals:
|
||||
void openHelpPage(const QString& url);
|
||||
void openContextHelpPage(const QString& url);
|
||||
void manageSessions();
|
||||
void updatedExamples(const QString& examplePath, const QString& demosPath, const QString& docPath);
|
||||
void updatedExamples(const QString& examplePath, const QString& demosPath);
|
||||
|
||||
private slots:
|
||||
void slotFeedback();
|
||||
void slotSessionClicked(const QString &data);
|
||||
void slotProjectClicked(const QString &data);
|
||||
void slotUrlClicked(const QString &data);
|
||||
void slotUpdateExamples(const QString& examplePath, const QString& demosPath, const QString& docPath);
|
||||
void slotUpdateExamples(const QString& examplePath, const QString& demosPath);
|
||||
void slotEnableExampleButton(int);
|
||||
void slotOpenExample();
|
||||
void slotCreateNewProject();
|
||||
|
||||
@@ -75,6 +75,7 @@ signals:
|
||||
void activated(const QString &data);
|
||||
|
||||
protected:
|
||||
virtual QSize minimumSizeHint() const;
|
||||
virtual QSize sizeHint() const;
|
||||
|
||||
private slots:
|
||||
|
||||
@@ -269,7 +269,7 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in
|
||||
const Snapshot documents = m_modelManager->snapshot();
|
||||
const QString fileName = editor->file()->fileName();
|
||||
Document::Ptr doc = documents.value(fileName);
|
||||
if (! doc)
|
||||
if (!doc)
|
||||
return; // nothing to do
|
||||
|
||||
QTextCursor tc(edit->document());
|
||||
@@ -328,7 +328,7 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in
|
||||
Symbol *lookupSymbol = result.second; // lookup symbol
|
||||
|
||||
Symbol *resolvedSymbol = lookupSymbol;
|
||||
Name *resolvedName = lookupSymbol->name();
|
||||
Name *resolvedName = lookupSymbol ? lookupSymbol->name() : 0;
|
||||
firstType = resolve(firstType, typeOfExpression.lookupContext(),
|
||||
&resolvedSymbol, &resolvedName);
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#include "debuggeractions.h"
|
||||
#include "ui_breakcondition.h"
|
||||
#include "ui_breakbyfunction.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -51,6 +52,32 @@
|
||||
using Debugger::Internal::BreakWindow;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// BreakByFunctionDialog
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
class BreakByFunctionDialog : public QDialog, Ui::BreakByFunctionDialog
|
||||
{
|
||||
public:
|
||||
explicit BreakByFunctionDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
setupUi(this);
|
||||
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
|
||||
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
|
||||
}
|
||||
QString functionName() const { return functionLineEdit->text(); }
|
||||
};
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// BreakWindow
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
BreakWindow::BreakWindow(QWidget *parent)
|
||||
: QTreeView(parent), m_alwaysResizeColumnsToContents(false)
|
||||
{
|
||||
@@ -132,6 +159,11 @@ void BreakWindow::contextMenuEvent(QContextMenuEvent *ev)
|
||||
QAction *act6 = new QAction(str6, &menu);
|
||||
act6->setEnabled(si.size() > 0);
|
||||
|
||||
QAction *act7 = new QAction(this);
|
||||
act7->setText(tr("Set Breakpoint at Function..."));
|
||||
QAction *act8 = new QAction(this);
|
||||
act8->setText(tr("Set Breakpoint at Function \"main\""));
|
||||
|
||||
menu.addAction(act0);
|
||||
menu.addAction(act3);
|
||||
menu.addAction(act5);
|
||||
@@ -141,6 +173,9 @@ void BreakWindow::contextMenuEvent(QContextMenuEvent *ev)
|
||||
menu.addAction(act2);
|
||||
menu.addAction(act4);
|
||||
menu.addSeparator();
|
||||
menu.addAction(act7);
|
||||
menu.addAction(act8);
|
||||
menu.addSeparator();
|
||||
menu.addAction(theDebuggerAction(SettingsDialog));
|
||||
|
||||
QAction *act = menu.exec(ev->globalPos());
|
||||
@@ -159,6 +194,12 @@ void BreakWindow::contextMenuEvent(QContextMenuEvent *ev)
|
||||
setBreakpointsEnabled(si, !enabled);
|
||||
else if (act == act6)
|
||||
setBreakpointsFullPath(si, !enabled);
|
||||
else if (act == act7) {
|
||||
BreakByFunctionDialog dlg(this);
|
||||
if (dlg.exec())
|
||||
emit breakByFunctionRequested(dlg.functionName());
|
||||
} else if (act == act8)
|
||||
emit breakByFunctionMainRequested();
|
||||
}
|
||||
|
||||
void BreakWindow::setBreakpointsEnabled(const QModelIndexList &list, bool enabled)
|
||||
|
||||
@@ -50,6 +50,8 @@ signals:
|
||||
void breakpointDeleted(int index);
|
||||
void breakpointActivated(int index);
|
||||
void breakpointSynchronizationRequested();
|
||||
void breakByFunctionRequested(const QString &functionName);
|
||||
void breakByFunctionMainRequested();
|
||||
|
||||
private slots:
|
||||
void rowActivated(const QModelIndex &index);
|
||||
|
||||
@@ -14,6 +14,10 @@ CDB_PATH="$$(ProgramFiles)/Debugging Tools For Windows/sdk"
|
||||
CDB_PATH="$$(ProgramFiles)/Debugging Tools For Windows (x64)/sdk"
|
||||
}
|
||||
|
||||
!exists ($$CDB_PATH) {
|
||||
CDB_PATH="$$(ProgramFiles)/Debugging Tools For Windows 64-bit/sdk"
|
||||
}
|
||||
|
||||
exists ($$CDB_PATH) {
|
||||
message("Experimental: Adding support for $$CDB_PATH")
|
||||
|
||||
|
||||
@@ -86,7 +86,11 @@ bool CdbOptions::autoDetectPath(QString *outPath, QStringList *checkedDirectorie
|
||||
// Look for $ProgramFiles/"Debugging Tools For Windows <bit-idy>" and its
|
||||
// " (x86)", " (x64)" variations. Qt Creator needs 64/32 bit depending
|
||||
// on how it was built.
|
||||
static const char *postFixes[] = { " (x86)", " (x32)", " (x64)" };
|
||||
#ifdef Q_OS_WIN64
|
||||
static const char *postFixes[] = {" (x64)", " 64-bit" };
|
||||
#else
|
||||
static const char *postFixes[] = { " (x86)", " (x32)" };
|
||||
#endif
|
||||
|
||||
outPath->clear();
|
||||
const QByteArray programDirB = qgetenv("ProgramFiles");
|
||||
@@ -94,11 +98,7 @@ bool CdbOptions::autoDetectPath(QString *outPath, QStringList *checkedDirectorie
|
||||
return false;
|
||||
|
||||
const QString programDir = QString::fromLocal8Bit(programDirB) + QDir::separator();
|
||||
#ifdef Q_OS_WIN64
|
||||
const QString installDir = QLatin1String("Debugging Tools For Windows (x64)");
|
||||
#else
|
||||
const QString installDir = QLatin1String("Debugging Tools For Windows");
|
||||
#endif
|
||||
|
||||
QString path = programDir + installDir;
|
||||
if (checkedDirectories)
|
||||
|
||||
@@ -389,13 +389,13 @@ void AttachTcfDialog::updateState()
|
||||
m_ui->serverStartScript->setEnabled(enabled);
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// StartExternalDialog
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
StartExternalDialog::StartExternalDialog(QWidget *parent)
|
||||
: QDialog(parent), m_ui(new Ui::StartExternalDialog)
|
||||
{
|
||||
@@ -440,6 +440,12 @@ QString StartExternalDialog::executableArguments() const
|
||||
return m_ui->argsEdit->text();
|
||||
}
|
||||
|
||||
bool StartExternalDialog::breakAtMain() const
|
||||
{
|
||||
return m_ui->checkBoxBreakAtMain->isChecked();
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
@@ -140,6 +140,7 @@ public:
|
||||
|
||||
QString executableFile() const;
|
||||
QString executableArguments() const;
|
||||
bool breakAtMain() const;
|
||||
|
||||
private:
|
||||
Ui::StartExternalDialog *m_ui;
|
||||
|
||||
@@ -44,8 +44,6 @@
|
||||
#include "threadswindow.h"
|
||||
#include "watchwindow.h"
|
||||
|
||||
#include "ui_breakbyfunction.h"
|
||||
|
||||
#include "disassemblerhandler.h"
|
||||
#include "breakhandler.h"
|
||||
#include "moduleshandler.h"
|
||||
@@ -128,27 +126,6 @@ static const char *stateName(int s)
|
||||
return "<unknown>";
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// BreakByFunctionDialog
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
class BreakByFunctionDialog : public QDialog, Ui::BreakByFunctionDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit BreakByFunctionDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
setupUi(this);
|
||||
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
|
||||
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
|
||||
}
|
||||
QString functionName() const { return functionLineEdit->text(); }
|
||||
};
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -300,6 +277,10 @@ void DebuggerManager::init()
|
||||
this, SIGNAL(sessionValueRequested(QString,QVariant*)));
|
||||
connect(m_breakHandler, SIGNAL(setSessionValueRequested(QString,QVariant)),
|
||||
this, SIGNAL(setSessionValueRequested(QString,QVariant)));
|
||||
connect(breakView, SIGNAL(breakByFunctionRequested(QString)),
|
||||
this, SLOT(breakByFunction(QString)), Qt::QueuedConnection);
|
||||
connect(breakView, SIGNAL(breakByFunctionMainRequested()),
|
||||
this, SLOT(breakByFunctionMain()), Qt::QueuedConnection);
|
||||
|
||||
// Modules
|
||||
QAbstractItemView *modulesView =
|
||||
@@ -403,12 +384,6 @@ void DebuggerManager::init()
|
||||
m_breakAction = new QAction(this);
|
||||
m_breakAction->setText(tr("Toggle Breakpoint"));
|
||||
|
||||
m_breakByFunctionAction = new QAction(this);
|
||||
m_breakByFunctionAction->setText(tr("Set Breakpoint at Function..."));
|
||||
|
||||
m_breakAtMainAction = new QAction(this);
|
||||
m_breakAtMainAction->setText(tr("Set Breakpoint at Function \"main\""));
|
||||
|
||||
m_watchAction = new QAction(this);
|
||||
m_watchAction->setText(tr("Add to Watch Window"));
|
||||
|
||||
@@ -446,10 +421,6 @@ void DebuggerManager::init()
|
||||
this, SLOT(addToWatchWindow()));
|
||||
connect(m_breakAction, SIGNAL(triggered()),
|
||||
this, SLOT(toggleBreakpoint()));
|
||||
connect(m_breakByFunctionAction, SIGNAL(triggered()),
|
||||
this, SLOT(breakByFunction()));
|
||||
connect(m_breakAtMainAction, SIGNAL(triggered()),
|
||||
this, SLOT(breakAtMain()));
|
||||
|
||||
connect(m_statusTimer, SIGNAL(timeout()),
|
||||
this, SLOT(clearStatusMessage()));
|
||||
@@ -1137,6 +1108,16 @@ void DebuggerManager::setBreakpoint(const QString &fileName, int lineNumber)
|
||||
attemptBreakpointSynchronization();
|
||||
}
|
||||
|
||||
void DebuggerManager::breakByFunctionMain()
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
// FIXME: wrong on non-Qt based binaries
|
||||
emit breakByFunction("qMain");
|
||||
#else
|
||||
emit breakByFunction("main");
|
||||
#endif
|
||||
}
|
||||
|
||||
void DebuggerManager::breakByFunction(const QString &functionName)
|
||||
{
|
||||
QTC_ASSERT(m_breakHandler, return);
|
||||
@@ -1144,22 +1125,6 @@ void DebuggerManager::breakByFunction(const QString &functionName)
|
||||
attemptBreakpointSynchronization();
|
||||
}
|
||||
|
||||
void DebuggerManager::breakByFunction()
|
||||
{
|
||||
BreakByFunctionDialog dlg(m_mainWindow);
|
||||
if (dlg.exec())
|
||||
breakByFunction(dlg.functionName());
|
||||
}
|
||||
|
||||
void DebuggerManager::breakAtMain()
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
breakByFunction("qMain");
|
||||
#else
|
||||
breakByFunction("main");
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool isAllowedTransition(int from, int to)
|
||||
{
|
||||
return (from == -1)
|
||||
@@ -1531,5 +1496,3 @@ void DebuggerManager::runTest(const QString &fileName)
|
||||
m_startParameters->workingDir.clear();
|
||||
//startNewDebugger(StartInternal);
|
||||
}
|
||||
|
||||
#include "debuggermanager.moc"
|
||||
|
||||
@@ -127,7 +127,8 @@ enum DebuggerStartMode
|
||||
StartRemote // Start and attach to a remote process
|
||||
};
|
||||
|
||||
struct DebuggerStartParameters {
|
||||
struct DebuggerStartParameters
|
||||
{
|
||||
DebuggerStartParameters();
|
||||
void clear();
|
||||
|
||||
@@ -277,10 +278,9 @@ public slots:
|
||||
void runToLineExec();
|
||||
void runToFunctionExec();
|
||||
void toggleBreakpoint();
|
||||
void breakByFunction();
|
||||
void breakByFunction(const QString &functionName);
|
||||
void breakByFunctionMain();
|
||||
void setBreakpoint(const QString &fileName, int lineNumber);
|
||||
void breakAtMain();
|
||||
void activateFrame(int index);
|
||||
void selectThread(int index);
|
||||
|
||||
@@ -460,8 +460,6 @@ private:
|
||||
QAction *m_nextAction;
|
||||
QAction *m_watchAction;
|
||||
QAction *m_breakAction;
|
||||
QAction *m_breakByFunctionAction;
|
||||
QAction *m_breakAtMainAction;
|
||||
QAction *m_sepAction;
|
||||
QAction *m_stepIAction;
|
||||
QAction *m_nextIAction;
|
||||
|
||||
@@ -709,14 +709,6 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
|
||||
mdebug->addAction(cmd);
|
||||
//mcppcontext->addAction(cmd);
|
||||
|
||||
cmd = am->registerAction(m_manager->m_breakByFunctionAction,
|
||||
Constants::BREAK_BY_FUNCTION, globalcontext);
|
||||
mdebug->addAction(cmd);
|
||||
|
||||
cmd = am->registerAction(m_manager->m_breakAtMainAction,
|
||||
Constants::BREAK_AT_MAIN, globalcontext);
|
||||
mdebug->addAction(cmd);
|
||||
|
||||
sep = new QAction(this);
|
||||
sep->setSeparator(true);
|
||||
cmd = am->registerAction(sep, QLatin1String("Debugger.Sep2"), globalcontext);
|
||||
@@ -1210,15 +1202,17 @@ void DebuggerPlugin::startExternalApplication()
|
||||
configValue(_("LastExternalExecutableFile")).toString());
|
||||
dlg.setExecutableArguments(
|
||||
configValue(_("LastExternalExecutableArguments")).toString());
|
||||
if (dlg.exec() != QDialog::Accepted) {
|
||||
if (dlg.exec() != QDialog::Accepted)
|
||||
return;
|
||||
}
|
||||
|
||||
setConfigValue(_("LastExternalExecutableFile"),
|
||||
dlg.executableFile());
|
||||
setConfigValue(_("LastExternalExecutableArguments"),
|
||||
dlg.executableArguments());
|
||||
sp->executable = dlg.executableFile();
|
||||
sp->processArgs = dlg.executableArguments().split(QLatin1Char(' '));
|
||||
if (dlg.breakAtMain())
|
||||
m_manager->breakByFunctionMain();
|
||||
|
||||
QSharedPointer<RunConfiguration> rc = activeRunConfiguration();
|
||||
if (RunControl *runControl = m_debuggerRunner
|
||||
|
||||
@@ -1311,7 +1311,7 @@ void GdbEngine::detachDebugger()
|
||||
|
||||
void GdbEngine::exitDebugger()
|
||||
{
|
||||
debugMessage(_("GDBENGINE EXITDEBUFFER: %1").arg(m_gdbProc.state()));
|
||||
debugMessage(_("GDBENGINE EXITDEBUGGER: %1").arg(m_gdbProc.state()));
|
||||
if (m_gdbProc.state() == QProcess::Starting) {
|
||||
debugMessage(_("WAITING FOR GDB STARTUP TO SHUTDOWN: %1")
|
||||
.arg(m_gdbProc.state()));
|
||||
@@ -1340,8 +1340,11 @@ void GdbEngine::exitDebugger()
|
||||
m_gdbProc.waitForFinished(20000);
|
||||
}
|
||||
}
|
||||
if (m_gdbProc.state() != QProcess::NotRunning)
|
||||
debugMessage(_("PROBLEM STOPPING DEBUGGER"));
|
||||
if (m_gdbProc.state() != QProcess::NotRunning) {
|
||||
debugMessage(_("PROBLEM STOPPING DEBUGGER: STATE %1")
|
||||
.arg(m_gdbProc.state()));
|
||||
m_gdbProc.kill();
|
||||
}
|
||||
|
||||
m_outputCollector.shutdown();
|
||||
initializeVariables();
|
||||
@@ -1360,7 +1363,8 @@ bool GdbEngine::startDebugger(const QSharedPointer<DebuggerStartParameters> &sp)
|
||||
QStringList gdbArgs;
|
||||
|
||||
if (m_gdbProc.state() != QProcess::NotRunning) {
|
||||
debugMessage(_("GDB IS ALREADY RUNNING!"));
|
||||
debugMessage(_("GDB IS ALREADY RUNNING, STATE: %1").arg(m_gdbProc.state()));
|
||||
m_gdbProc.kill();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1433,6 +1437,7 @@ bool GdbEngine::startDebugger(const QSharedPointer<DebuggerStartParameters> &sp)
|
||||
postCommand(_("show version"), CB(handleShowVersion));
|
||||
//postCommand(_("-enable-timings");
|
||||
postCommand(_("set print static-members off")); // Seemingly doesn't work.
|
||||
//postCommand(_("set debug infrun 1"));
|
||||
//postCommand(_("define hook-stop\n-thread-list-ids\n-stack-list-frames\nend"));
|
||||
//postCommand(_("define hook-stop\nprint 4\nend"));
|
||||
//postCommand(_("define hookpost-stop\nprint 5\nend"));
|
||||
|
||||
@@ -20,6 +20,19 @@
|
||||
<property name="margin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>407</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout">
|
||||
<property name="margin">
|
||||
@@ -48,21 +61,22 @@
|
||||
<item row="0" column="1">
|
||||
<widget class="Core::Utils::PathChooser" name="execFile" native="true"/>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="checkBoxBreakAtMain">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="labelBreakAtMain">
|
||||
<property name="text">
|
||||
<string>Break at 'main':</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>407</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
|
||||
@@ -179,10 +179,17 @@ QDebug &operator<<(QDebug &ts, const QList<QTextEdit::ExtraSelection> &sels)
|
||||
return ts;
|
||||
}
|
||||
|
||||
int lineCount(const QString &text)
|
||||
QString quoteUnprintable(const QString &ba)
|
||||
{
|
||||
//return text.count(QChar(ParagraphSeparator));
|
||||
return text.count(QChar('\n'));
|
||||
QString res;
|
||||
for (int i = 0, n = ba.size(); i != n; ++i) {
|
||||
QChar c = ba.at(i);
|
||||
if (c.isPrint())
|
||||
res += c;
|
||||
else
|
||||
res += QString("\\x%1").arg(c.unicode(), 2, 16);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
enum EventResult
|
||||
@@ -1075,7 +1082,7 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
|
||||
m_passing = !m_passing;
|
||||
updateMiniBuffer();
|
||||
} else if (key == '.') {
|
||||
qDebug() << "REPEATING" << m_dotCommand;
|
||||
qDebug() << "REPEATING" << quoteUnprintable(m_dotCommand);
|
||||
QString savedCommand = m_dotCommand;
|
||||
m_dotCommand.clear();
|
||||
replay(savedCommand, count());
|
||||
@@ -1109,6 +1116,7 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
|
||||
} else if (key == 'A') {
|
||||
enterInsertMode();
|
||||
moveToEndOfLine();
|
||||
setDotCommand("A");
|
||||
m_lastInsertion.clear();
|
||||
} else if (key == control('a')) {
|
||||
// FIXME: eat it to prevent the global "select all" shortcut to trigger
|
||||
@@ -1132,6 +1140,7 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
|
||||
moveToEndOfLine();
|
||||
m_registers[m_register] = removeSelectedText();
|
||||
enterInsertMode();
|
||||
setDotCommand("C");
|
||||
finishMovement();
|
||||
} else if (key == control('c')) {
|
||||
showBlackMessage("Type Alt-v,Alt-v to quit FakeVim mode");
|
||||
@@ -1158,6 +1167,7 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
|
||||
moveDown(qMax(count() - 1, 0));
|
||||
m_moveType = MoveExclusive;
|
||||
moveToEndOfLine();
|
||||
setDotCommand("D");
|
||||
finishMovement();
|
||||
} else if (key == control('d')) {
|
||||
int sline = cursorLineOnScreen();
|
||||
@@ -1318,7 +1328,7 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
|
||||
}
|
||||
} else if (key == 'p' || key == 'P') {
|
||||
QString text = m_registers[m_register];
|
||||
int n = lineCount(text);
|
||||
int n = text.count(QChar('\n'));
|
||||
//qDebug() << "REGISTERS: " << m_registers << "MOVE: " << m_moveType;
|
||||
//qDebug() << "LINES: " << n << text << m_register;
|
||||
if (n > 0) {
|
||||
|
||||
@@ -49,7 +49,7 @@ const char *const FILES_MIMETYPE = "application/vnd.nokia.qt.generic.files";
|
||||
const char *const INCLUDES_EDITOR = ".includes Editor";
|
||||
const char *const INCLUDES_MIMETYPE = "application/vnd.nokia.qt.generic.includes";
|
||||
|
||||
const char *const CONFIG_EDITOR = ".includes Editor";
|
||||
const char *const CONFIG_EDITOR = ".config Editor";
|
||||
const char *const CONFIG_MIMETYPE = "application/vnd.nokia.qt.generic.config";
|
||||
|
||||
} // namespace Constants
|
||||
|
||||
@@ -36,14 +36,15 @@
|
||||
|
||||
namespace ProjectExplorer {
|
||||
namespace Internal {
|
||||
|
||||
class BuildConfiguration
|
||||
{
|
||||
public:
|
||||
BuildConfiguration(const QString &name);
|
||||
BuildConfiguration(const QString &name, BuildConfiguration *source);
|
||||
QString name() const;
|
||||
QVariant getValue(const QString & key) const;
|
||||
void setValue(const QString & key, QVariant value);
|
||||
QVariant getValue(const QString &key) const;
|
||||
void setValue(const QString &key, QVariant value);
|
||||
|
||||
QString displayName();
|
||||
void setDisplayName(const QString &name);
|
||||
@@ -55,6 +56,7 @@ private:
|
||||
QHash<QString, QVariant> m_values;
|
||||
QString m_name;
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ using namespace ProjectExplorer;
|
||||
/*!
|
||||
\class FindNodeForFileVisitor
|
||||
|
||||
Searches the first node that has the given file as it's path.
|
||||
Searches the first node that has the given file as its path.
|
||||
*/
|
||||
|
||||
FindNodesForFileVisitor::FindNodesForFileVisitor(const QString &fileToSearch)
|
||||
|
||||
@@ -890,7 +890,9 @@ void SessionManager::updateWindowTitle()
|
||||
}
|
||||
if (m_core->editorManager()->currentEditor()) {
|
||||
QFileInfo fi(m_core->editorManager()->currentEditor()->file()->fileName());
|
||||
windowTitle.prepend(fi.fileName() + " - ");
|
||||
QString fileName = fi.fileName();
|
||||
if (!fileName.isEmpty())
|
||||
windowTitle.prepend(fileName + " - ");
|
||||
m_core->mainWindow()->setWindowFilePath(fi.absoluteFilePath());
|
||||
} else {
|
||||
m_core->mainWindow()->setWindowFilePath(QString());
|
||||
|
||||
@@ -104,8 +104,8 @@ QtVersionManager::QtVersionManager()
|
||||
|
||||
if (Core::Internal::WelcomeMode *welcomeMode = qobject_cast<Core::Internal::WelcomeMode*>
|
||||
(Core::ICore::instance()->modeManager()->mode(Core::Constants::MODE_WELCOME))) {
|
||||
connect(this, SIGNAL(updatedExamples(QString,QString,QString)),
|
||||
welcomeMode, SIGNAL(updatedExamples(QString,QString, QString)));
|
||||
connect(this, SIGNAL(updatedExamples(QString, QString)),
|
||||
welcomeMode, SIGNAL(updatedExamples(QString, QString)));
|
||||
}
|
||||
updateDocumentation();
|
||||
updateExamples();
|
||||
@@ -156,16 +156,14 @@ void QtVersionManager::updateExamples()
|
||||
QString docPath;
|
||||
QString demosPath;
|
||||
QtVersion *version = 0;
|
||||
// try to find a version which has both, examples and docs, starting with default Qt
|
||||
// try to find a version which has both, demos and examples, starting with default Qt
|
||||
foreach (version, versions) {
|
||||
if (version->hasExamples())
|
||||
examplesPath = version->examplesPath();
|
||||
if (version->hasDemos())
|
||||
demosPath = version->demosPath();
|
||||
if (version->hasDocumentation())
|
||||
docPath = version->documentationPath();
|
||||
if (!examplesPath.isEmpty() && !demosPath.isEmpty() && !docPath.isEmpty()) {
|
||||
emit updatedExamples(examplesPath, demosPath, docPath);
|
||||
if (!examplesPath.isEmpty() && !demosPath.isEmpty()) {
|
||||
emit updatedExamples(examplesPath, demosPath);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ public:
|
||||
signals:
|
||||
void defaultQtVersionChanged();
|
||||
void qtVersionsChanged();
|
||||
void updatedExamples(const QString& examplesPath, const QString& demosPath, const QString& docPath);
|
||||
void updatedExamples(const QString& examplesPath, const QString& demosPath);
|
||||
private:
|
||||
// Used by QtOptionsPage
|
||||
void setNewQtVersions(QList<QtVersion *> newVersions, int newDefaultVersion);
|
||||
|
||||
@@ -209,7 +209,7 @@ QList<CompletionItem> CompletionSupport::getCompletions() const
|
||||
QString lastKey;
|
||||
QList<CompletionItem> uniquelist;
|
||||
|
||||
foreach (const CompletionItem item, completionItems) {
|
||||
foreach (const CompletionItem &item, completionItems) {
|
||||
if (item.m_text != lastKey) {
|
||||
uniquelist.append(item);
|
||||
lastKey = item.m_text;
|
||||
|
||||
@@ -201,6 +201,8 @@ bool FontSettings::fromSettings(const QString &category,
|
||||
if (fmt.isEmpty()) {
|
||||
m_formats[name].setForeground(desc.foreground());
|
||||
m_formats[name].setBackground(desc.background());
|
||||
m_formats[name].setBold(desc.format().bold());
|
||||
m_formats[name].setItalic(desc.format().italic());
|
||||
} else {
|
||||
m_formats[name].fromString(fmt);
|
||||
}
|
||||
|
||||
@@ -101,10 +101,16 @@ FontSettingsPagePrivate::FontSettingsPagePrivate(const TextEditor::FormatDescrip
|
||||
if (!settingsFound) { // Apply defaults
|
||||
foreach (const FormatDescription &f, m_descriptions) {
|
||||
const QString name = f.name();
|
||||
|
||||
m_lastValue.formatFor(name).setForeground(f.foreground());
|
||||
m_lastValue.formatFor(name).setBackground(f.background());
|
||||
m_lastValue.formatFor(name).setBold(f.format().bold());
|
||||
m_lastValue.formatFor(name).setItalic(f.format().italic());
|
||||
|
||||
m_value.formatFor(name).setForeground(f.foreground());
|
||||
m_value.formatFor(name).setBackground(f.background());
|
||||
m_value.formatFor(name).setBold(f.format().bold());
|
||||
m_value.formatFor(name).setItalic(f.format().italic());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,11 +150,6 @@ QColor FormatDescription::foreground() const
|
||||
return m_format.foreground();
|
||||
}
|
||||
|
||||
void FormatDescription::setForeground(const QColor &foreground)
|
||||
{
|
||||
m_format.setForeground(foreground);
|
||||
}
|
||||
|
||||
QColor FormatDescription::background() const
|
||||
{
|
||||
if (m_name == QLatin1String(Constants::C_TEXT))
|
||||
|
||||
@@ -60,14 +60,13 @@ public:
|
||||
const QColor &foreground = Qt::black);
|
||||
|
||||
QString name() const;
|
||||
|
||||
QString trName() const;
|
||||
|
||||
QColor foreground() const;
|
||||
void setForeground(const QColor &foreground);
|
||||
|
||||
QColor background() const;
|
||||
|
||||
const Format &format() const { return m_format; }
|
||||
Format &format() { return m_format; }
|
||||
|
||||
private:
|
||||
QString m_name; // Name of the category
|
||||
QString m_trName; // Displayed name of the category
|
||||
|
||||
@@ -72,7 +72,10 @@ TextEditorSettings::TextEditorSettings(QObject *parent)
|
||||
formatDescriptions.push_back(FormatDescription(QLatin1String(C_SEARCH_SCOPE), tr("Search Scope")));
|
||||
formatDescriptions.push_back(FormatDescription(QLatin1String(C_PARENTHESES), tr("Parentheses")));
|
||||
formatDescriptions.push_back(FormatDescription(QLatin1String(C_CURRENT_LINE), tr("Current Line")));
|
||||
formatDescriptions.push_back(FormatDescription(QLatin1String(C_CURRENT_LINE_NUMBER), tr("Current Line Number"), Qt::darkGray));
|
||||
|
||||
FormatDescription currentLineNumber = FormatDescription(QLatin1String(C_CURRENT_LINE_NUMBER), tr("Current Line Number"), Qt::darkGray);
|
||||
currentLineNumber.format().setBold(true);
|
||||
formatDescriptions.push_back(currentLineNumber);
|
||||
|
||||
// Standard categories
|
||||
formatDescriptions.push_back(FormatDescription(QLatin1String(C_NUMBER), tr("Number"), Qt::darkBlue));
|
||||
|
||||
@@ -1,286 +1,5 @@
|
||||
bin/assistant
|
||||
bin/assistant_adp
|
||||
bin/designer
|
||||
bin/linguist
|
||||
bin/lrelease
|
||||
bin/lupdate
|
||||
bin/moc
|
||||
bin/pixeltool
|
||||
bin/qcollectiongenerator
|
||||
bin/qdbus
|
||||
bin/qdbuscpp2xml
|
||||
bin/qdbuscpp2xml
|
||||
bin/qdbusviewer
|
||||
bin/qdbusxml2cpp
|
||||
bin/qhelpconverter
|
||||
bin/qhelpgenerator
|
||||
bin/qmake
|
||||
bin/qt3to4
|
||||
bin/qtconfig
|
||||
bin/qtdemo
|
||||
bin/rcc
|
||||
bin/uic
|
||||
bin/uic3
|
||||
bin/xmlpatterns
|
||||
demos/affine/affine
|
||||
demos/books/books
|
||||
demos/browser/browser
|
||||
demos/chip/chip
|
||||
demos/composition/composition
|
||||
demos/deform/deform
|
||||
demos/embeddeddialogs/embeddeddialogs
|
||||
demos/gradients/gradients
|
||||
demos/interview/interview
|
||||
demos/mainwindow/mainwindow
|
||||
demos/pathstroke/pathstroke
|
||||
demos/shared/libdemo_shared.a
|
||||
demos/spreadsheet/spreadsheet
|
||||
demos/sqlbrowser/sqlbrowser
|
||||
demos/textedit/textedit
|
||||
demos/undo/undo
|
||||
examples/assistant/simpletextviewer/simpletextviewer
|
||||
examples/dbus/chat/dbus-chat
|
||||
examples/dbus/complexpingpong/complexping
|
||||
examples/dbus/complexpingpong/complexpong
|
||||
examples/dbus/listnames/listnames
|
||||
examples/dbus/pingpong/ping
|
||||
examples/dbus/pingpong/pong
|
||||
examples/dbus/remotecontrolledcar/car/car
|
||||
examples/dbus/remotecontrolledcar/controller/controller
|
||||
examples/designer/calculatorbuilder/calculatorbuilder
|
||||
examples/designer/calculatorform/calculatorform
|
||||
examples/designer/worldtimeclockbuilder/worldtimeclockbuilder
|
||||
examples/desktop/screenshot/screenshot
|
||||
examples/desktop/systray/systray
|
||||
examples/dialogs/classwizard/classwizard
|
||||
examples/dialogs/configdialog/configdialog
|
||||
examples/dialogs/extension/extension
|
||||
examples/dialogs/findfiles/findfiles
|
||||
examples/dialogs/licensewizard/licensewizard
|
||||
examples/dialogs/standarddialogs/standarddialogs
|
||||
examples/dialogs/tabdialog/tabdialog
|
||||
examples/dialogs/trivialwizard/trivialwizard
|
||||
examples/draganddrop/draggableicons/draggableicons
|
||||
examples/draganddrop/draggabletext/draggabletext
|
||||
examples/draganddrop/dropsite/dropsite
|
||||
examples/draganddrop/fridgemagnets/fridgemagnets
|
||||
examples/draganddrop/puzzle/puzzle
|
||||
examples/graphicsview/collidingmice/collidingmice
|
||||
examples/graphicsview/diagramscene/diagramscene
|
||||
examples/graphicsview/dragdroprobot/dragdroprobot
|
||||
examples/graphicsview/elasticnodes/elasticnodes
|
||||
examples/graphicsview/padnavigator/padnavigator
|
||||
examples/graphicsview/portedasteroids/portedasteroids
|
||||
examples/graphicsview/portedcanvas/portedcanvas
|
||||
examples/help/contextsensitivehelp/contextsensitivehelp
|
||||
examples/help/remotecontrol/remotecontrol
|
||||
examples/help/simpletextviewer/simpletextviewer
|
||||
examples/ipc/localfortuneclient/localfortuneclient
|
||||
examples/ipc/localfortuneserver/localfortuneserver
|
||||
examples/ipc/sharedmemory/sharedmemory
|
||||
examples/itemviews/addressbook/addressbook
|
||||
examples/itemviews/basicsortfiltermodel/basicsortfiltermodel
|
||||
examples/itemviews/chart/chart
|
||||
examples/itemviews/coloreditorfactory/coloreditorfactory
|
||||
examples/itemviews/customsortfiltermodel/customsortfiltermodel
|
||||
examples/itemviews/dirview/dirview
|
||||
examples/itemviews/editabletreemodel/editabletreemodel
|
||||
examples/itemviews/pixelator/pixelator
|
||||
examples/itemviews/puzzle/puzzle
|
||||
examples/itemviews/simpledommodel/simpledommodel
|
||||
examples/itemviews/simpletreemodel/simpletreemodel
|
||||
examples/itemviews/simplewidgetmapper/simplewidgetmapper
|
||||
examples/itemviews/spinboxdelegate/spinboxdelegate
|
||||
examples/itemviews/stardelegate/stardelegate
|
||||
examples/layouts/basiclayouts/basiclayouts
|
||||
examples/layouts/borderlayout/borderlayout
|
||||
examples/layouts/dynamiclayouts/dynamiclayouts
|
||||
examples/layouts/flowlayout/flowlayout
|
||||
examples/linguist/arrowpad/arrowpad
|
||||
examples/linguist/hellotr/hellotr
|
||||
examples/linguist/trollprint/trollprint
|
||||
examples/mainwindows/application/application
|
||||
examples/mainwindows/dockwidgets/dockwidgets
|
||||
examples/mainwindows/mdi/mdi
|
||||
examples/mainwindows/menus/menus
|
||||
examples/mainwindows/recentfiles/recentfiles
|
||||
examples/mainwindows/sdi/sdi
|
||||
examples/network/blockingfortuneclient/blockingfortuneclient
|
||||
examples/network/broadcastreceiver/broadcastreceiver
|
||||
examples/network/broadcastsender/broadcastsender
|
||||
examples/network/chat/network-chat
|
||||
examples/network/download/download
|
||||
examples/network/downloadmanager/downloadmanager
|
||||
examples/network/fortuneclient/fortuneclient
|
||||
examples/network/fortuneserver/fortuneserver
|
||||
examples/network/ftp/ftp
|
||||
examples/network/http/http
|
||||
examples/network/loopback/loopback
|
||||
examples/network/securesocketclient/securesocketclient
|
||||
examples/network/threadedfortuneserver/threadedfortuneserver
|
||||
examples/network/torrent/torrent
|
||||
examples/opengl/2dpainting/2dpainting
|
||||
examples/opengl/framebufferobject/framebufferobject
|
||||
examples/opengl/framebufferobject2/framebufferobject2
|
||||
examples/opengl/grabber/grabber
|
||||
examples/opengl/hellogl/hellogl
|
||||
examples/opengl/overpainting/overpainting
|
||||
examples/opengl/pbuffers/pbuffers
|
||||
examples/opengl/pbuffers2/pbuffers2
|
||||
examples/opengl/samplebuffers/samplebuffers
|
||||
examples/opengl/textures/textures
|
||||
examples/painting/basicdrawing/basicdrawing
|
||||
examples/painting/concentriccircles/concentriccircles
|
||||
examples/painting/fontsampler/fontsampler
|
||||
examples/painting/imagecomposition/imagecomposition
|
||||
examples/painting/painterpaths/painterpaths
|
||||
examples/painting/svgviewer/svgviewer
|
||||
examples/painting/transformations/transformations
|
||||
examples/qtconcurrent/imagescaling/imagescaling
|
||||
examples/qtconcurrent/map/mapdemo
|
||||
examples/qtconcurrent/progressdialog/progressdialog
|
||||
examples/qtconcurrent/runfunction/runfunction
|
||||
examples/qtconcurrent/wordcount/wordcount
|
||||
examples/qtestlib/tutorial1/tutorial1
|
||||
examples/qtestlib/tutorial2/tutorial2
|
||||
examples/qtestlib/tutorial3/tutorial3
|
||||
examples/qtestlib/tutorial4/tutorial4
|
||||
examples/richtext/calendar/calendar
|
||||
examples/richtext/orderform/orderform
|
||||
examples/richtext/syntaxhighlighter/syntaxhighlighter
|
||||
examples/script/calculator/calculator
|
||||
examples/script/context2d/context2d
|
||||
examples/script/customclass/customclass
|
||||
examples/script/defaultprototypes/defaultprototypes
|
||||
examples/script/helloscript/helloscript
|
||||
examples/script/marshal/marshal
|
||||
examples/script/qscript/qscript
|
||||
examples/script/tetrix/tetrix
|
||||
examples/sql/cachedtable/cachedtable
|
||||
examples/sql/drilldown/drilldown
|
||||
examples/sql/masterdetail/masterdetail
|
||||
examples/sql/querymodel/querymodel
|
||||
examples/sql/relationaltablemodel/relationaltablemodel
|
||||
examples/sql/tablemodel/tablemodel
|
||||
examples/threads/mandelbrot/mandelbrot
|
||||
examples/threads/semaphores/semaphores
|
||||
examples/threads/waitconditions/waitconditions
|
||||
examples/tools/codecs/codecs
|
||||
examples/tools/completer/completer
|
||||
examples/tools/customcompleter/customcompleter
|
||||
examples/tools/echoplugin/echoplugin
|
||||
examples/tools/echoplugin/plugin/libechoplugin.so
|
||||
examples/tools/i18n/i18n
|
||||
examples/tools/plugandpaint/plugandpaint
|
||||
examples/tools/plugandpaint/plugins/libpnp_basictools.a
|
||||
examples/tools/plugandpaint/plugins/libpnp_extrafilters.so
|
||||
examples/tools/regexp/regexp
|
||||
examples/tools/settingseditor/settingseditor
|
||||
examples/tools/styleplugin/styleplugin
|
||||
examples/tools/styleplugin/styles/libsimplestyleplugin.so
|
||||
examples/tools/treemodelcompleter/treemodelcompleter
|
||||
examples/tools/undoframework/undoframework
|
||||
examples/tutorials/addressbook/part1/part1
|
||||
examples/tutorials/addressbook/part2/part2
|
||||
examples/tutorials/addressbook/part3/part3
|
||||
examples/tutorials/addressbook/part4/part4
|
||||
examples/tutorials/addressbook/part5/part5
|
||||
examples/tutorials/addressbook/part6/part6
|
||||
examples/tutorials/addressbook/part7/part7
|
||||
examples/tutorials/tutorial/t1/t1
|
||||
examples/tutorials/tutorial/t10/t10
|
||||
examples/tutorials/tutorial/t11/t11
|
||||
examples/tutorials/tutorial/t12/t12
|
||||
examples/tutorials/tutorial/t13/t13
|
||||
examples/tutorials/tutorial/t14/t14
|
||||
examples/tutorials/tutorial/t2/t2
|
||||
examples/tutorials/tutorial/t3/t3
|
||||
examples/tutorials/tutorial/t4/t4
|
||||
examples/tutorials/tutorial/t5/t5
|
||||
examples/tutorials/tutorial/t6/t6
|
||||
examples/tutorials/tutorial/t7/t7
|
||||
examples/tutorials/tutorial/t8/t8
|
||||
examples/tutorials/tutorial/t9/t9
|
||||
examples/uitools/multipleinheritance/multipleinheritance
|
||||
examples/uitools/textfinder/textfinder
|
||||
examples/webkit/formextractor/formExtractor
|
||||
examples/webkit/previewer/previewer
|
||||
examples/widgets/analogclock/analogclock
|
||||
examples/widgets/calculator/calculator
|
||||
examples/widgets/calendarwidget/calendarwidget
|
||||
examples/widgets/charactermap/charactermap
|
||||
examples/widgets/digitalclock/digitalclock
|
||||
examples/widgets/groupbox/groupbox
|
||||
examples/widgets/icons/icons
|
||||
examples/widgets/imageviewer/imageviewer
|
||||
examples/widgets/lineedits/lineedits
|
||||
examples/widgets/movie/movie
|
||||
examples/widgets/scribble/scribble
|
||||
examples/widgets/shapedclock/shapedclock
|
||||
examples/widgets/sliders/sliders
|
||||
examples/widgets/spinboxes/spinboxes
|
||||
examples/widgets/styles/styles
|
||||
examples/widgets/stylesheet/stylesheet
|
||||
examples/widgets/tablet/tablet
|
||||
examples/widgets/tetrix/tetrix
|
||||
examples/widgets/tooltips/tooltips
|
||||
examples/widgets/validators/validators
|
||||
examples/widgets/wiggly/wiggly
|
||||
examples/widgets/windowflags/windowflags
|
||||
examples/xml/dombookmarks/dombookmarks
|
||||
examples/xml/rsslisting/rsslisting
|
||||
examples/xml/saxbookmarks/saxbookmarks
|
||||
examples/xml/streambookmarks/streambookmarks
|
||||
examples/xml/xmlstreamlint/xmlstreamlint
|
||||
examples/xmlpatterns/filetree/filetree
|
||||
examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel
|
||||
examples/xmlpatterns/recipes/recipes
|
||||
lib/libQt3Support.so.4.5.2
|
||||
lib/libQtAssistantClient.so.4.5.2
|
||||
lib/libQtCLucene.so.4.5.2
|
||||
lib/libQtCore.so.4.5.2
|
||||
lib/libQtDBus.so.4.5.2
|
||||
lib/libQtDesigner.so.4.5.2
|
||||
lib/libQtDesignerComponents.so.4.5.2
|
||||
lib/libQtGui.so.4.5.2
|
||||
lib/libQtHelp.so.4.5.2
|
||||
lib/libQtNetwork.so.4.5.2
|
||||
lib/libQtOpenGL.so.4.5.2
|
||||
lib/libQtScript.so.4.5.2
|
||||
lib/libQtScriptTools.so.4.5.2
|
||||
lib/libQtSql.so.4.5.2
|
||||
lib/libQtSvg.so.4.5.2
|
||||
lib/libQtTest.so.4.5.2
|
||||
lib/libQtUiTools.a
|
||||
lib/libQtWebKit.so.4.5.2
|
||||
lib/libQtXml.so.4.5.2
|
||||
lib/libQtXmlPatterns.so.4.5.2
|
||||
plugins/accessible/libqtaccessiblecompatwidgets.so
|
||||
plugins/accessible/libqtaccessiblewidgets.so
|
||||
plugins/codecs/libqcncodecs.so
|
||||
plugins/codecs/libqjpcodecs.so
|
||||
plugins/codecs/libqkrcodecs.so
|
||||
plugins/codecs/libqtwcodecs.so
|
||||
plugins/designer/libarthurplugin.so
|
||||
plugins/designer/libcontainerextension.so
|
||||
plugins/designer/libcustomwidgetplugin.so
|
||||
plugins/designer/libqt3supportwidgets.so
|
||||
plugins/designer/libqwebview.so
|
||||
plugins/designer/libtaskmenuextension.so
|
||||
plugins/designer/libworldtimeclockplugin.so
|
||||
plugins/iconengines/libqsvgicon.so
|
||||
plugins/imageformats/libqgif.so
|
||||
plugins/imageformats/libqico.so
|
||||
plugins/imageformats/libqjpeg.so
|
||||
plugins/imageformats/libqmng.so
|
||||
plugins/imageformats/libqsvg.so
|
||||
plugins/imageformats/libqtiff.so
|
||||
plugins/inputmethods/libqimsw-multi.so
|
||||
plugins/script/libqtscriptdbus.so
|
||||
plugins/sqldrivers/libqsqlite.so
|
||||
plugins/sqldrivers/libqsqlite2.so
|
||||
plugins/sqldrivers/libqsqlmysql.so
|
||||
plugins/sqldrivers/libqsqlpsql.so
|
||||
%%
|
||||
lib/libQtCore.la
|
||||
lib/libQt3Support.la
|
||||
|
||||
@@ -12,20 +12,6 @@ bin/QtTestd4.dll
|
||||
bin/QtWebKitd4.dll
|
||||
bin/QtXmld4.dll
|
||||
bin/QtXmlPatternsd4.dll
|
||||
lib/Qt3Supportd4.dll
|
||||
lib/QtCored4.dll
|
||||
lib/QtGuid4.dll
|
||||
lib/QtHelpd4.dll
|
||||
lib/QtNetworkd4.dll
|
||||
lib/QtOpenGLd4.dll
|
||||
lib/QtScriptd4.dll
|
||||
lib/QtScriptToolsd4.dll
|
||||
lib/QtSqld4.dll
|
||||
lib/QtSvgd4.dll
|
||||
lib/QtTestd4.dll
|
||||
lib/QtWebKitd4.dll
|
||||
lib/QtXmld4.dll
|
||||
lib/QtXmlPatternsd4.dll
|
||||
plugins/accessible/qtaccessiblecompatwidgetsd4.dll
|
||||
plugins/accessible/qtaccessiblewidgetsd4.dll
|
||||
plugins/codecs/qcncodecsd4.dll
|
||||
|
||||
@@ -61,6 +61,7 @@ private slots:
|
||||
void command_dollar();
|
||||
void command_down();
|
||||
void command_dfx_down();
|
||||
void command_Cxx_down_dot();
|
||||
void command_e();
|
||||
void command_i();
|
||||
void command_left();
|
||||
@@ -309,6 +310,15 @@ return;
|
||||
check("u", l[0] + "\n#inc@lude <QtCore>\n" + lmid(2));
|
||||
}
|
||||
|
||||
void tst_FakeVim::command_Cxx_down_dot()
|
||||
{
|
||||
setup();
|
||||
check("j4l", l[0] + "\n#inc@lude <QtCore>\n" + lmid(2));
|
||||
check("Cxx" + escape, l[0] + "\n#incx@x\n" + lmid(2));
|
||||
check("j", l[0] + "\n#incxx\n#incl@ude <QtGui>\n" + lmid(3));
|
||||
check(".", l[0] + "\n#incxx\n#inclx@x\n" + lmid(3));
|
||||
}
|
||||
|
||||
void tst_FakeVim::command_e()
|
||||
{
|
||||
setup();
|
||||
|
||||
@@ -644,6 +644,9 @@ void testStdMap()
|
||||
gg[44] = 4;
|
||||
gg[55] = 5;
|
||||
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
std::map<uint, QStringList> ggl;
|
||||
ggl[11] = QStringList() << "11";
|
||||
ggl[22] = QStringList() << "22";
|
||||
|
||||