Commit a678cf51 authored by dt's avatar dt
Browse files

Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline

parents 7debdc2b 251f09c9
The QtCreator 1.3 release contains bug fixes and new features.
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.2.0..master
This release introduces source and binary incompatible changes to the plugin
API, so if you have created your own custom plugins, they will need to be
adapted accordingly.
General:
Project support:
* Added support for adding and removing files from a generic Makefile-based
project (contributed by Kevin Michel)
...
......@@ -734,7 +734,7 @@
which we subclass in this chapter, to implement a FindDialog class.
\section1 Designing \c FindDialog
\section1 Designing The FindDialog
#image
......@@ -751,7 +751,7 @@
vertical.
\section1 Implementing \c FindDialog
\section1 Implementing The FindDialog Class
Let's look at \c{FindDialog}'s header file. Here, we need to provide
private members for the class so that we can access the widgets freely
......@@ -791,6 +791,34 @@
we clear the contents of \c lineEdit and hide the dialog.
\snippet examples/addressbook-sdk/part5/finddialog.cpp findClicked
The \c findText variable has a public getter function, \c getFindText(),
associated with it. Since we only ever set \c findText directly in both
the constructor and in hte \c findClicked() function, we do not create a
setter function to accompany \c getFindText(). Because \c getFindText() is
public, classes instantiating and using \c FindDialog can always access the
search string that the user has entered and accepted.
\snippet examples/addressbook-sdk/part5/finddialog.cpp getFindText
\section1 The AddressBook Class
To ensure that we can use \c FindDialog from within our \c AddressBook
class, we include \c finddialog.h in the \c addressbook.h file.
\snippet examples/addressbook-sdk/part5/addressbook.cpp include
So far, all our address book features have a QPushButton and a
corresponding slot. Similarly, for the \gui Find feature, we have
\c findButton and \c findContact().
Within the \c AddressBook class's constructor, we instantiate our private
objects, \c findButton and \c findDialog:
\snippet examples/addressbook-sdk/part5/addressbook.cpp
*/
......
......@@ -243,6 +243,7 @@ void AddressBook::updateInterface(Mode mode)
}
}
//! [findContact]
void AddressBook::findContact()
{
dialog->show();
......@@ -262,3 +263,4 @@ void AddressBook::findContact()
updateInterface(NavigationMode);
}
//! [findContact]
......@@ -6,8 +6,9 @@
#include <QtGui/QLineEdit>
#include <QtGui/QTextEdit>
#include <QtGui/QMessageBox>
//! [include]
#include "finddialog.h"
//! [include]
namespace Ui
{
......
......@@ -43,7 +43,9 @@ void FindDialog::findClicked()
}
//! [findClicked]
//! [getFindText]
QString FindDialog::getFindText()
{
return findText;
}
//! [getFindText]
......@@ -38,10 +38,22 @@ FastPreprocessor::FastPreprocessor(const Snapshot &snapshot)
QByteArray FastPreprocessor::run(QString fileName, const QString &source)
{
#ifdef QTCREATOR_WITH_MERGED_ENVIRONMENT
if (Document::Ptr doc = _snapshot.value(fileName)) {
_merged.insert(fileName);
foreach (const Document::Include &i, doc->includes())
mergeEnvironment(i.fileName());
}
#endif
const QByteArray preprocessed = _preproc(fileName, source);
return preprocessed;
}
void FastPreprocessor::sourceNeeded(QString &fileName, IncludeType, unsigned)
{ mergeEnvironment(fileName); }
void FastPreprocessor::mergeEnvironment(const QString &fileName)
{
if (! _merged.contains(fileName)) {
......
......@@ -54,8 +54,7 @@ public:
QByteArray run(QString fileName, const QString &source);
// CPlusPlus::Client
virtual void sourceNeeded(QString &fileName, IncludeType, unsigned)
{ mergeEnvironment(fileName); }
virtual void sourceNeeded(QString &fileName, IncludeType, unsigned);
virtual void macroAdded(const Macro &) {}
......
......@@ -771,7 +771,11 @@ void Preprocessor::preprocess(const QString &fileName, const QByteArray &source,
} else {
if (_dot->whitespace) {
const unsigned endOfPreviousToken = (_dot - 1)->end();
unsigned endOfPreviousToken = 0;
if (_dot != _tokens.constBegin())
endOfPreviousToken = (_dot - 1)->end();
const unsigned beginOfToken = _dot->begin();
const char *start = _source.constBegin() + endOfPreviousToken;
......
......@@ -3143,7 +3143,8 @@ void GdbEngine::handleQueryDebuggingHelper(const GdbResultRecord &record, const
m_dumperHelper.parseQueryTypes(availableSimpleDebuggingHelpers, QtDumperHelper::GdbDebugger);
if (availableSimpleDebuggingHelpers.isEmpty()) {
m_debuggingHelperState = DebuggingHelperUnavailable;
if (!m_dumperInjectionLoad) // Retry if thread has not terminated yet.
m_debuggingHelperState = DebuggingHelperUnavailable;
q->showStatusMessage(tr("Debugging helpers not found."));
//QMessageBox::warning(q->mainWindow(),
// tr("Cannot find special data dumpers"),
......
......@@ -65,6 +65,8 @@ Core::GeneratedFiles CustomWidgetWizard::generateFiles(const QWizard *w,
p.name = cw->name();
p.path = cw->path();
p.license = CppTools::AbstractEditorSupport::licenseTemplate();
p.templatePath = QtWizard::templateDir();
p.templatePath += QLatin1String("/customwidgetwizard");
return PluginGenerator::generatePlugin(p, *(cw->pluginOptions()), errorMessage);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment