...
 
Commits (153)
......@@ -27,9 +27,8 @@ qch_docs.depends += html_docs
qch_docs.files = $$QCH_FILE
unix:!macx {
system("mkdir -p `dirname $$QCH_FILE` && touch $$QCH_FILE")
qch_docs.path = /share/doc/qtcreator
qch_docs.CONFIG += no_check_exist
INSTALLS += qch_docs
}
......
......@@ -843,7 +843,7 @@ DOCSET_FEEDNAME = "Qt Creator API"
# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
# will append .docset to the name.
DOCSET_BUNDLE_ID = com.qtsoftware.qt-creator
DOCSET_BUNDLE_ID = com.nokia.qt-creator
# If the GENERATE_HTMLHELP tag is set to YES, additional index files
# will be generated that can be used as input for tools like the
......
doc/images/qtcreator-qt4-s60sdks.png

39.4 KB | W: | H:

doc/images/qtcreator-qt4-s60sdks.png

51.5 KB | W: | H:

doc/images/qtcreator-qt4-s60sdks.png
doc/images/qtcreator-qt4-s60sdks.png
doc/images/qtcreator-qt4-s60sdks.png
doc/images/qtcreator-qt4-s60sdks.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
......@@ -19,16 +19,16 @@ sources.fileextensions = "qtcreator.qdoc addressbook-sdk.qdoc"
qhp.projects = QtCreator
qhp.QtCreator.file = qtcreator.qhp
qhp.QtCreator.namespace = com.nokia.qtcreator.1293
qhp.QtCreator.namespace = com.nokia.qtcreator.130
qhp.QtCreator.virtualFolder = doc
qhp.QtCreator.indexTitle = Qt Creator
qhp.QtCreator.indexRoot =
qhp.QtCreator.extraFiles = classic.css \
images/qt-logo.png \
images/qtcreator-screenshots.png
qhp.QtCreator.filterAttributes = qtcreator 1.2.93
qhp.QtCreator.customFilters.QtCreator.name = Qt Creator 1.2.93
qhp.QtCreator.customFilters.QtCreator.filterAttributes = qtcreator 1.2.93
qhp.QtCreator.filterAttributes = qtcreator 1.3.0
qhp.QtCreator.customFilters.QtCreator.name = Qt Creator 1.3.0
qhp.QtCreator.customFilters.QtCreator.filterAttributes = qtcreator 1.3.0
# macros.qdocconf
......@@ -211,5 +211,5 @@ HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \
"<table width=\"100%\" cellspacing=\"0\" border=\"0\"><tr class=\"address\">\n" \
"<td width=\"40%\" align=\"left\">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>\n" \
"<td width=\"20%\" align=\"center\"><a href=\"trademarks.html\">Trademarks</a></td>\n" \
"<td width=\"40%\" align=\"right\"><div align=\"right\">Qt Creator 1.2.93</div></td>\n" \
"<td width=\"40%\" align=\"right\"><div align=\"right\">Qt Creator 1.3.0</div></td>\n" \
"</tr></table></div></address>"
......@@ -633,7 +633,7 @@ QDumper &QDumper::put(const void *p)
if (p) {
// Pointer is 'long long' on WIN_64, only
static const char *printFormat = sizeof(quintptr) == sizeof(long) ? "0x%lx" : "0x%llx";
pos += sprintf(outBuffer + pos, printFormat, reinterpret_cast<uintptr_t>(p));
pos += sprintf(outBuffer + pos, printFormat, reinterpret_cast<quintptr>(p));
} else {
pos += sprintf(outBuffer + pos, "<null>");
}
......@@ -1069,7 +1069,7 @@ static void qDumpQAbstractItem(QDumper &d)
static const char *printFormat = sizeof(quintptr) == sizeof(long) ?
"%d,%d,0x%lx,0x%lx" : "%d,%d,0x%llx,0x%llx";
sscanf(d.templateParameters[0], printFormat, &mm->r, &mm->c,
reinterpret_cast<uintptr_t*>(&mm->p), reinterpret_cast<uintptr_t*>(&mm->m));
reinterpret_cast<quintptr*>(&mm->p), reinterpret_cast<quintptr*>(&mm->m));
}
const QAbstractItemModel *m = mi.model();
const int rowCount = m->rowCount(mi);
......@@ -1640,7 +1640,7 @@ static void qDumpQList(QDumper &d)
}
qCheckAccess(pdata);
d.putItemCount("value", n);
d.putItemCount("value", nn);
d.putItem("valueeditable", "false");
d.putItem("numchild", n);
if (d.dumpChildren) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -11067,8 +11067,8 @@ al control de versiones (%2)?</translation>
</message>
<message>
<location/>
<source>MinGw Directory:</source>
<translation>Directorio de MinGw:</translation>
<source>MinGW Directory:</source>
<translation>Directorio de MinGW:</translation>
</message>
<message>
<location/>
......@@ -13301,7 +13301,7 @@ The following encodings are likely to fit:</source>
</message>
<message>
<location line="+92"/>
<source> &lt;line number&gt;</source>
<source>&lt;line number&gt;</source>
<translation>&lt;número de línea&gt;</translation>
</message>
</context>
......
......@@ -11037,8 +11037,8 @@ al VCS (%2)?</translation>
</message>
<message>
<location/>
<source>MinGw Directory:</source>
<translation>Cartella MinGw:</translation>
<source>MinGW Directory:</source>
<translation>Cartella MinGW:</translation>
</message>
<message>
<location/>
......@@ -13272,7 +13272,7 @@ Queste codifiche dovrebbero andare bene:</translation>
</message>
<message>
<location line="+92"/>
<source> &lt;line number&gt;</source>
<source>&lt;line number&gt;</source>
<translation>&lt;numero di riga&gt;</translation>
</message>
</context>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
include(../../../qtcreator.pri)
LANGUAGES = de es fr it ja pl ru
LANGUAGES = de es fr it ja pl ru sl
# var, prepend, append
defineReplace(prependAll) {
......
......@@ -184,8 +184,8 @@
<key>CFBundleIdentifier</key>
<string>com.nokia.qtcreator</string>
<key>CFBundleVersion</key>
<string>1.2.93</string>
<string>1.3.0</string>
<key>CFBundleShortVersionString</key>
<string>1.2.93</string>
<string>1.3.0</string>
</dict>
</plist>
......@@ -131,6 +131,11 @@ int BackwardsScanner::previousBlockState(const QTextBlock &block) const
return 0;
}
int BackwardsScanner::size() const
{
return _tokens.size();
}
int BackwardsScanner::startOfMatchingBrace(int index) const
{
const BackwardsScanner &tk = *this;
......
......@@ -69,6 +69,8 @@ public:
int previousBlockState(const QTextBlock &block) const;
int size() const;
private:
const SimpleToken &fetchToken(int i);
......
......@@ -152,6 +152,25 @@ ClassBinding *NamespaceBinding::findClassBinding(Name *name, QSet<Binding *> *pr
if (processed->contains(this))
return 0;
if (const QualifiedNameId *q = name->asQualifiedNameId()) {
Binding *current = this;
for (unsigned i = 0; i < q->nameCount(); ++i) {
Identifier *nameId = q->nameAt(i)->identifier();
if (! nameId)
return 0;
QSet<Binding *> visited;
Binding *binding = current->findClassOrNamespaceBinding(nameId, &visited); // ### TODO: check recursion.
if (! binding)
return 0;
current = binding;
}
return current->asClassBinding();
}
processed->insert(this);
Identifier *id = name->identifier();
......
......@@ -42,6 +42,7 @@
#include <QtCore/QByteArray>
#include <QtCore/QBitArray>
#include <QtCore/QDir>
#include <QtCore/QtDebug>
/*!
......@@ -108,7 +109,7 @@ private:
Document::Document(const QString &fileName)
: _fileName(fileName),
: _fileName(QDir::cleanPath(fileName)),
_globalNamespace(0),
_revision(0)
{
......@@ -147,6 +148,16 @@ void Document::setRevision(unsigned revision)
_revision = revision;
}
QDateTime Document::lastModified() const
{
return _lastModified;
}
void Document::setLastModified(const QDateTime &lastModified)
{
_lastModified = lastModified;
}
QString Document::fileName() const
{
return _fileName;
......@@ -163,7 +174,7 @@ QStringList Document::includedFiles() const
void Document::addIncludeFile(const QString &fileName, unsigned line)
{
_includes.append(Include(fileName, line));
_includes.append(Include(QDir::cleanPath(fileName), line));
}
void Document::appendMacro(const Macro &macro)
......@@ -447,6 +458,8 @@ Document::Ptr Snapshot::documentFromSource(const QByteArray &preprocessedCode,
Document::Ptr newDoc = Document::create(fileName);
if (Document::Ptr thisDocument = value(fileName)) {
newDoc->_revision = thisDocument->_revision;
newDoc->_lastModified = thisDocument->_lastModified;
newDoc->_includes = thisDocument->_includes;
newDoc->_definedMacros = thisDocument->_definedMacros;
newDoc->_macroUses = thisDocument->_macroUses;
......@@ -557,3 +570,8 @@ QStringList Snapshot::dependsOn(const QString &fileName) const
return deps;
}
Document::Ptr Snapshot::value(const QString &fileName) const
{
return QMap<QString, Document::Ptr>::value(QDir::cleanPath(fileName));
}
......@@ -40,6 +40,7 @@
#include <QSharedPointer>
#include <QString>
#include <QStringList>
#include <QDateTime>
namespace CPlusPlus {
......@@ -63,6 +64,9 @@ public:
unsigned revision() const;
void setRevision(unsigned revision);
QDateTime lastModified() const;
void setLastModified(const QDateTime &lastModified);
QString fileName() const;
QStringList includedFiles() const;
......@@ -310,6 +314,7 @@ private:
QList<MacroUse> _macroUses;
QList<UndefinedMacroUse> _undefinedMacroUses;
QByteArray _source;
QDateTime _lastModified;
unsigned _revision;
friend class Snapshot;
......@@ -336,6 +341,7 @@ public:
QStringList dependsOn(const QString &fileName) const;
void insert(Document::Ptr doc);
Document::Ptr value(const QString &fileName) const;
using _Base::insert;
......
......@@ -59,6 +59,7 @@ void FindUsages::setGlobalNamespaceBinding(NamespaceBindingPtr globalNamespaceBi
QList<int> FindUsages::operator()(Symbol *symbol, Identifier *id, AST *ast)
{
_processed.clear();
_references.clear();
_declSymbol = symbol;
_id = id;
......@@ -92,6 +93,9 @@ QString FindUsages::matchingLine(const Token &tk) const
void FindUsages::reportResult(unsigned tokenIndex, const QList<Symbol *> &candidates)
{
if (_processed.contains(tokenIndex))
return;
const bool isStrongResult = checkCandidates(candidates);
if (isStrongResult)
......@@ -100,6 +104,11 @@ void FindUsages::reportResult(unsigned tokenIndex, const QList<Symbol *> &candid
void FindUsages::reportResult(unsigned tokenIndex)
{
if (_processed.contains(tokenIndex))
return;
_processed.insert(tokenIndex);
const Token &tk = tokenAt(tokenIndex);
const QString lineText = matchingLine(tk);
......@@ -112,8 +121,7 @@ void FindUsages::reportResult(unsigned tokenIndex)
const int len = tk.f.length;
if (_future) {
const QString path = QDir::toNativeSeparators(_doc->fileName());
_future->reportResult(Usage(path, line, lineText, col, len));
_future->reportResult(Usage(_doc->fileName(), line, lineText, col, len));
}
_references.append(tokenIndex);
......
......@@ -114,6 +114,7 @@ private:
QList<int> _references;
LookupContext _previousContext;
int _inSimpleDeclaration;
QSet<unsigned> _processed;
};
} // end of namespace CPlusPlus
......
......@@ -513,8 +513,8 @@ void LookupContext::expandFunction(Function *function,
q->isGlobal());
const QList<Symbol *> candidates = resolveClassOrNamespace(nestedNameSpec, visibleScopes);
for (int j = 0; j < candidates.size(); ++j) {
expand(candidates.at(j)->asScopedSymbol()->members(),
visibleScopes, expandedScopes);
if (ScopedSymbol *scopedSymbol = candidates.at(j)->asScopedSymbol())
expand(scopedSymbol->members(), visibleScopes, expandedScopes);
}
}
}
......
......@@ -35,7 +35,7 @@
namespace Utils {
static QString toAlphaNum(const QString &s)
QTCREATOR_UTILS_EXPORT QString fileNameToCppIdentifier(const QString &s)
{
QString rc;
const int len = s.size();
......@@ -55,9 +55,9 @@ static QString toAlphaNum(const QString &s)
QTCREATOR_UTILS_EXPORT QString headerGuard(const QString &file)
{
const QFileInfo fi(file);
QString rc = toAlphaNum(fi.completeBaseName()).toUpper();
QString rc = fileNameToCppIdentifier(fi.completeBaseName()).toUpper();
rc += QLatin1Char('_');
rc += toAlphaNum(fi.suffix()).toUpper();
rc += fileNameToCppIdentifier(fi.suffix()).toUpper();
return rc;
}
......
......@@ -40,6 +40,10 @@ QT_END_NAMESPACE
namespace Utils {
// Convert a file name to a Cpp identifier (stripping invalid characters
// or replacing them by an underscore).
QTCREATOR_UTILS_EXPORT QString fileNameToCppIdentifier(const QString &s);
QTCREATOR_UTILS_EXPORT QString headerGuard(const QString &file);
QTCREATOR_UTILS_EXPORT
......
......@@ -122,6 +122,7 @@ NewClassWidget::NewClassWidget(QWidget *parent) :
m_d->m_ui.generateFormCheckBox->setChecked(true);
setFormInputCheckable(false, true);
setClassType(NoClassType);
}
NewClassWidget::~NewClassWidget()
......@@ -172,17 +173,6 @@ void NewClassWidget::setBaseClassInputVisible(bool visible)
m_d->m_ui.baseClassComboBox->setVisible(visible);
}
void NewClassWidget::setQObjectCheckBoxVisible(bool visible)
{
m_d->m_qobjectCheckBoxVisible = visible;
m_d->m_ui.qobjectCheckBox->setVisible(visible);
}
bool NewClassWidget::isQObjectCheckBoxVisible() const
{
return m_d->m_qobjectCheckBoxVisible;
}
void NewClassWidget::setBaseClassEditable(bool editable)
{
m_d->m_ui.baseClassComboBox->setEditable(editable);
......@@ -370,24 +360,35 @@ void NewClassWidget::setAllowDirectories(bool v)
}
}
bool NewClassWidget::inheritsQObject() const
bool NewClassWidget::lowerCaseFiles() const
{
return m_d->m_ui.classLineEdit->lowerCaseFileName();
}
void NewClassWidget::setLowerCaseFiles(bool v)
{
return m_d->m_ui.qobjectCheckBox->isChecked();
m_d->m_ui.classLineEdit->setLowerCaseFileName(v);
}
void NewClassWidget::setInheritsQObject(bool v)
NewClassWidget::ClassType NewClassWidget::classType() const
{
m_d->m_ui.qobjectCheckBox->setChecked(v);
return static_cast<ClassType>(m_d->m_ui.classTypeComboBox->currentIndex());
}
bool NewClassWidget::lowerCaseFiles() const
void NewClassWidget::setClassType(ClassType ct)
{
return m_d->m_ui.classLineEdit->lowerCaseFileName();
m_d->m_ui.classTypeComboBox->setCurrentIndex(ct);
}
void NewClassWidget::setLowerCaseFiles(bool v)
bool NewClassWidget::isClassTypeComboVisible() const
{
m_d->m_ui.classLineEdit->setLowerCaseFileName(v);
return m_d->m_ui.classTypeLabel->isVisible();
}
void NewClassWidget::setClassTypeComboVisible(bool v)
{
m_d->m_ui.classTypeLabel->setVisible(v);
m_d->m_ui.classTypeComboBox->setVisible(v);
}
void NewClassWidget::slotValidChanged()
......
......@@ -57,7 +57,7 @@ class QTCREATOR_UTILS_EXPORT NewClassWidget : public QWidget
Q_PROPERTY(bool baseClassEditable READ isBaseClassEditable WRITE setBaseClassEditable DESIGNABLE false)
Q_PROPERTY(bool formInputVisible READ isFormInputVisible WRITE setFormInputVisible DESIGNABLE true)
Q_PROPERTY(bool pathInputVisible READ isPathInputVisible WRITE setPathInputVisible DESIGNABLE true)
Q_PROPERTY(bool qobjectCheckBoxVisible READ isQObjectCheckBoxVisible WRITE setQObjectCheckBoxVisible DESIGNABLE true)
Q_PROPERTY(bool classTypeComboVisible READ isClassTypeComboVisible WRITE setClassTypeComboVisible DESIGNABLE true)
Q_PROPERTY(QString className READ className WRITE setClassName DESIGNABLE true)
Q_PROPERTY(QString baseClassName READ baseClassName WRITE setBaseClassName DESIGNABLE true)
Q_PROPERTY(QString sourceFileName READ sourceFileName DESIGNABLE false)
......@@ -71,11 +71,14 @@ class QTCREATOR_UTILS_EXPORT NewClassWidget : public QWidget
Q_PROPERTY(bool formInputCheckable READ formInputCheckable WRITE setFormInputCheckable DESIGNABLE true)
Q_PROPERTY(bool formInputChecked READ formInputChecked WRITE setFormInputChecked DESIGNABLE true)
Q_PROPERTY(bool allowDirectories READ allowDirectories WRITE setAllowDirectories)
Q_PROPERTY(bool inheritsQObject READ inheritsQObject WRITE setInheritsQObject)
Q_PROPERTY(bool lowerCaseFiles READ lowerCaseFiles WRITE setLowerCaseFiles)
Q_PROPERTY(ClassType classType READ classType WRITE setClassType)
// Utility "USER" property for wizards containing file names.
Q_PROPERTY(QStringList files READ files DESIGNABLE false USER true)
Q_ENUMS(ClassType)
public:
enum ClassType { NoClassType, ClassInheritsQObject, ClassInheritsQWidget };
explicit NewClassWidget(QWidget *parent = 0);
~NewClassWidget();
......@@ -84,7 +87,6 @@ public:
bool isBaseClassEditable() const;
bool isFormInputVisible() const;
bool isPathInputVisible() const;
bool isQObjectCheckBoxVisible() const;
bool formInputCheckable() const;
bool formInputChecked() const;
......@@ -98,9 +100,10 @@ public:
QString sourceExtension() const;
QString headerExtension() const;
QString formExtension() const;
bool inheritsQObject() const;
bool allowDirectories() const;
bool lowerCaseFiles() const;
ClassType classType() const;
bool isClassTypeComboVisible() const;
bool isValid(QString *error = 0) const;
......@@ -118,7 +121,6 @@ public slots:
void setPathInputVisible(bool visible);
void setFormInputCheckable(bool v);
void setFormInputChecked(bool v);
void setQObjectCheckBoxVisible(bool v);
/**
* The name passed into the new class widget will be reformatted to be a
......@@ -131,9 +133,10 @@ public slots:
void setSourceExtension(const QString &e);
void setHeaderExtension(const QString &e);
void setFormExtension(const QString &e);
void setInheritsQObject(bool v);
void setAllowDirectories(bool v);
void setLowerCaseFiles(bool v);
void setClassType(ClassType ct);
void setClassTypeComboVisible(bool v);
/**
* Suggest a class name from the base class by stripping the leading 'Q'
......@@ -153,7 +156,6 @@ private slots:
void classNameEdited();
void slotFormInputChecked();
private:
void setFormInputCheckable(bool checkable, bool force);
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>213</width>
<height>190</height>
<width>418</width>
<height>291</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
......@@ -44,6 +44,32 @@
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="classTypeLabel">
<property name="text">
<string>Type information:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="classTypeComboBox">
<item>
<property name="text">
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string>Inherits QObject</string>
</property>
</item>
<item>
<property name="text">
<string>Inherits QWidget</string>
</property>
</item>
</widget>
</item>
<item row="3" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
......@@ -54,8 +80,8 @@
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
......@@ -70,8 +96,8 @@
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
......@@ -103,6 +129,13 @@
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QCheckBox" name="generateFormCheckBox">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="formLabel">
<property name="text">
......@@ -121,41 +154,27 @@
</widget>
</item>
<item row="8" column="1">
<widget class="Utils::PathChooser" name="pathChooser" native="true"/>
</item>
<item row="6" column="1">
<widget class="QCheckBox" name="generateFormCheckBox">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="qobjectCheckBox">
<property name="text">
<string>Inherits QObject</string>
</property>
</widget>
<widget class="Utils::PathChooser" name="pathChooser"/>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">pathchooser.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>Utils::ClassNameValidatingLineEdit</class>
<extends>QLineEdit</extends>
<header>classnamevalidatinglineedit.h</header>
<header location="global">utils/classnamevalidatinglineedit.h</header>
</customwidget>
<customwidget>
<class>Utils::FileNameValidatingLineEdit</class>
<extends>QLineEdit</extends>
<header location="global">utils/filenamevalidatinglineedit.h</header>
</customwidget>
<customwidget>
<class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
......
<plugin name="BinEditor" version="1.2.93" compatVersion="1.2.93">
<plugin name="BinEditor" version="1.3.0" compatVersion="1.3.0">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2008-2009 Nokia Corporation</copyright>
<license>
......@@ -19,7 +19,7 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
<description>Binary editor component.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="Core" version="1.2.93"/>
<dependency name="TextEditor" version="1.2.93"/>
<dependency name="Core" version="1.3.0"/>
<dependency name="TextEditor" version="1.3.0"/>
</dependencyList>
</plugin>
<plugin name="Bookmarks" version="1.2.93" compatVersion="1.2.93">
<plugin name="Bookmarks" version="1.3.0" compatVersion="1.3.0">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2008-2009 Nokia Corporation</copyright>
<license>
......@@ -19,8 +19,8 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
<description>Bookmarks in text editors.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="TextEditor" version="1.2.93"/>
<dependency name="ProjectExplorer" version="1.2.93"/>
<dependency name="Core" version="1.2.93"/>
<dependency name="TextEditor" version="1.3.0"/>
<dependency name="ProjectExplorer" version="1.3.0"/>
<dependency name="Core" version="1.3.0"/>
</dependencyList>
</plugin>
<plugin name="CMakeProjectManager" version="1.2.93" compatVersion="1.2.93">
<plugin name="CMakeProjectManager" version="1.3.0" compatVersion="1.3.0">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2008-2009 Nokia Corporation</copyright>
<license>
......@@ -19,9 +19,9 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
<description>CMake support</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="TextEditor" version="1.2.93"/>
<dependency name="ProjectExplorer" version="1.2.93"/>
<dependency name="CppTools" version="1.2.93"/>
<dependency name="CppEditor" version="1.2.93"/>
<dependency name="TextEditor" version="1.3.0"/>
<dependency name="ProjectExplorer" version="1.3.0"/>
<dependency name="CppTools" version="1.3.0"/>
<dependency name="CppEditor" version="1.3.0"/>
</dependencyList>
</plugin>
......@@ -85,7 +85,6 @@ CMakeOpenProjectWizard::CMakeOpenProjectWizard(CMakeManager *cmakeManager, const
setPage(CMakeRunPageId, new CMakeRunPage(this));
setStartId(startid);
setOption(QWizard::NoCancelButton);
init();
}
......@@ -101,7 +100,6 @@ CMakeOpenProjectWizard::CMakeOpenProjectWizard(CMakeManager *cmakeManager, const
addPage(new CMakeRunPage(this, CMakeRunPage::Recreate, buildDirectory));
else
addPage(new CMakeRunPage(this, CMakeRunPage::Update, buildDirectory));
setOption(QWizard::NoCancelButton);
init();
}
......
......@@ -648,7 +648,8 @@ bool CMakeProject::restoreSettingsImpl(ProjectExplorer::PersistentSettingsReader
// and the cmake command line
CMakeOpenProjectWizard copw(m_manager, sourceDirectory(), ProjectExplorer::Environment::systemEnvironment());
copw.exec();
if (copw.exec() != QDialog::Accepted)
return false;
qDebug()<<"ccd.buildDirectory()"<<copw.buildDirectory();
......@@ -690,7 +691,8 @@ bool CMakeProject::restoreSettingsImpl(ProjectExplorer::PersistentSettingsReader
buildDirectory(activeBC),
mode,
environment(activeBC));
copw.exec();
if (copw.exec() != QDialog::Accepted)
return false;
activeBC->setValue("msvcVersion", copw.msvcVersion());
}
}
......
<plugin name="Core" version="1.2.93" compatVersion="1.2.93">
<plugin name="Core" version="1.3.0" compatVersion="1.3.0">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2008-2009 Nokia Corporation</copyright>
<license>
......
......@@ -34,8 +34,8 @@ namespace Core {
namespace Constants {
#define IDE_VERSION_MAJOR 1
#define IDE_VERSION_MINOR 2
#define IDE_VERSION_RELEASE 93
#define IDE_VERSION_MINOR 3
#define IDE_VERSION_RELEASE 0
#define STRINGIFY_INTERNAL(x) #x
#define STRINGIFY(x) STRINGIFY_INTERNAL(x)
......
......@@ -1201,10 +1201,12 @@ IEditor *EditorManager::openEditorWithContents(const QString &editorKind,
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
IEditor *edt = createEditor(editorKind);
if (!edt)
if (!edt) {
QApplication::restoreOverrideCursor();
return 0;
}
if (!edt || !edt->createNew(contents)) {
if (!edt->createNew(contents)) {
QApplication::restoreOverrideCursor();
delete edt;
edt = 0;
......
......@@ -343,6 +343,7 @@ void EditorView::setCurrentEditor(IEditor *editor)
{
if (!editor || m_container->count() <= 0
|| m_container->indexOf(editor->widget()) == -1) {
updateEditorStatus(0);
// ### TODO the combo box m_editorList should show an empty item
return;
}
......@@ -377,6 +378,13 @@ void EditorView::updateEditorStatus(IEditor *editor)
static const QIcon lockedIcon(QLatin1String(":/core/images/locked.png"));
static const QIcon unlockedIcon(QLatin1String(":/core/images/unlocked.png"));
m_lockButton->setVisible(editor != 0);
if (!editor) {
m_editorList->setToolTip(QString());
return;
}
if (editor->file()->isReadOnly()) {
m_lockButton->setIcon(lockedIcon);
m_lockButton->setEnabled(!editor->file()->fileName().isEmpty());
......
......@@ -106,6 +106,10 @@ public:
*/
virtual bool vcsDelete(const QString &filename) = 0;
signals:
void repositoryChanged(const QString &repository);
void filesChanged(const QStringList &files);
// TODO: ADD A WAY TO DETECT WHETHER A FILE IS MANAGED, e.g
// virtual bool sccManaged(const QString &filename) = 0;
};
......
......@@ -126,7 +126,7 @@ MainWindow::MainWindow() :
m_progressManager(new ProgressManagerPrivate()),
m_scriptManager(new ScriptManagerPrivate(this)),
m_variableManager(new VariableManager(this)),
m_vcsManager(new VCSManager()),
m_vcsManager(new VCSManager),
m_viewManager(0),
m_modeManager(0),
m_mimeDatabase(new MimeDatabase),
......@@ -346,6 +346,7 @@ void MainWindow::extensionsInitialized()
OutputPaneManager::instance()->init();
m_actionManager->initialize();
m_vcsManager->extensionsInitialized();
readSettings();
updateContext();
......
......@@ -57,17 +57,22 @@ void ProgressManagerPrivate::init()
void ProgressManagerPrivate::cancelTasks(const QString &type)
{
bool found = false;
QMap<QFutureWatcher<void> *, QString>::iterator task = m_runningTasks.begin();
while (task != m_runningTasks.end()) {
if (task.value() != type) {
++task;
continue;
}
found = true;
disconnect(task.key(), SIGNAL(finished()), this, SLOT(taskFinished()));
task.key()->cancel();
delete task.key();
task = m_runningTasks.erase(task);
}
if (found) {
emit allTasksFinished(type);
}
}
void ProgressManagerPrivate::cancelAllRunningTasks()
......@@ -88,6 +93,7 @@ FutureProgress *ProgressManagerPrivate::addTask(const QFuture<void> &future, con
m_runningTasks.insert(watcher, type);
connect(watcher, SIGNAL(finished()), this, SLOT(taskFinished()));
watcher->setFuture(future);
emit taskStarted(type);
return m_progressView->addTask(future, title, type, persistency);
}
......@@ -101,6 +107,11 @@ void ProgressManagerPrivate::taskFinished()
QObject *taskObject = sender();
QTC_ASSERT(taskObject, return);
QFutureWatcher<void> *task = static_cast<QFutureWatcher<void> *>(taskObject);
QString type = m_runningTasks.value(task);
m_runningTasks.remove(task);
delete task;
if (!m_runningTasks.values().contains(type)) {
emit allTasksFinished(type);
}
}
......@@ -51,6 +51,10 @@ public:
public slots:
virtual void cancelTasks(const QString &type) = 0;
signals:
void taskStarted(const QString &type);
void allTasksFinished(const QString &type);
};
} // namespace Core
......
......@@ -57,7 +57,8 @@ struct VCSManagerPrivate {
QMap<QString, IVersionControl *> m_cachedMatches;
};
VCSManager::VCSManager() :
VCSManager::VCSManager(QObject *parent) :
QObject(parent),
m_d(new VCSManagerPrivate)
{
}
......@@ -67,6 +68,17 @@ VCSManager::~VCSManager()
delete m_d;
}
void VCSManager::extensionsInitialized()
{
// Change signal connections
foreach (IVersionControl *versionControl, allVersionControls()) {
connect(versionControl, SIGNAL(filesChanged(QStringList)),
this, SIGNAL(filesChanged(QStringList)));
connect(versionControl, SIGNAL(repositoryChanged(QString)),
this, SIGNAL(repositoryChanged(QString)));
}
}
void VCSManager::setVCSEnabled(const QString &directory)
{
if (debug)
......
......@@ -33,6 +33,7 @@
#include "core_global.h"
#include <QtCore/QString>
#include <QtCore/QObject>
namespace Core {
......@@ -49,13 +50,16 @@ class IVersionControl;
// for the topmost directory it manages. This information is cached and
// VCSManager thus knows pretty fast which IVersionControl * is responsible.
class CORE_EXPORT VCSManager
class CORE_EXPORT VCSManager : public QObject
{
Q_OBJECT
Q_DISABLE_COPY(VCSManager)
public:
VCSManager();
explicit VCSManager(QObject *parent = 0);
virtual ~VCSManager();
void extensionsInitialized();
IVersionControl *findVersionControlForDirectory(const QString &directory);
// Enable the VCS managing a certain directory only. This should
......@@ -69,6 +73,10 @@ public:
// if a failure occurs
bool showDeleteDialog(const QString &fileName);
signals:
void repositoryChanged(const QString &repository);
void filesChanged(const QStringList &files);
private:
VCSManagerPrivate *m_d;
};
......
<plugin name="CodePaster" version="1.2.93" compatVersion="1.2.93">
<plugin name="CodePaster" version="1.3.0" compatVersion="1.3.0">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2008-2009 Nokia Corporation</copyright>
<license>
......@@ -19,8 +19,8 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
<description>Codepaster plugin for pushing/fetching diff from server</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="TextEditor" version="1.2.93"/>
<dependency name="ProjectExplorer" version="1.2.93"/>
<dependency name="Core" version="1.2.93"/>
<dependency name="TextEditor" version="1.3.0"/>
<dependency name="ProjectExplorer" version="1.3.0"/>
<dependency name="Core" version="1.3.0"/>
</dependencyList>
</plugin>
......@@ -68,6 +68,7 @@ CodepasterPlugin::CodepasterPlugin()
CodepasterPlugin::~CodepasterPlugin()
{
qDeleteAll(m_protocols);
}
bool CodepasterPlugin::initialize(const QStringList &arguments, QString *error_message)
......
<plugin name="CppEditor" version="1.2.93" compatVersion="1.2.93">
<plugin name="CppEditor" version="1.3.0" compatVersion="1.3.0">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2008-2009 Nokia Corporation</copyright>
<license>
......@@ -19,8 +19,8 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
<description>C/C++ editor component.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="Core" version="1.2.93"/>
<dependency name="TextEditor" version="1.2.93"/>
<dependency name="CppTools" version="1.2.93"/>
<dependency name="Core" version="1.3.0"/>
<dependency name="TextEditor" version="1.3.0"/>
<dependency name="CppTools" version="1.3.0"/>
</dependencyList>
</plugin>
......@@ -155,7 +155,7 @@ CppClassWizardParameters CppClassWizardDialog::parameters() const
rc.sourceFile = ncw->sourceFileName();
rc.baseClass = ncw->baseClassName();
rc.path = ncw->path();
rc.inheritsQObject = ncw->inheritsQObject();
rc.classType = ncw->classType();
return rc;
}
......@@ -217,7 +217,8 @@ bool CppClassWizard::generateHeaderAndSource(const CppClassWizardParameters &par
QString *header, QString *source)
{
// TODO:
// Quite a bit of this code has been copied from FormClassWizardParameters::generateCpp.
// Quite a bit of this code has been copied from FormClassWizardParameters::generateCpp
// and is duplicated in the library wizard.
// Maybe more of it could be merged into Utils.
const QString indent = QString(4, QLatin1Char(' '));
......@@ -239,10 +240,27 @@ bool CppClassWizard::generateHeaderAndSource(const CppClassWizardParameters &par
const QRegExp qtClassExpr(QLatin1String("^Q[A-Z3].+"));
QTC_ASSERT(qtClassExpr.isValid(), /**/);
const bool superIsQtClass = qtClassExpr.exactMatch(params.baseClass);
// Determine parent QObject type for Qt types. Provide base
// class in case the user did not specify one.
QString parentQObjectClass;
bool defineQObjectMacro = false;
switch(params.classType) {
case Utils::NewClassWidget::ClassInheritsQObject:
parentQObjectClass = QLatin1String("QObject");
defineQObjectMacro = true;
break;
case Utils::NewClassWidget::ClassInheritsQWidget:
parentQObjectClass = QLatin1String("QWidget");
defineQObjectMacro = true;
break;
}
const QString baseClass = params.baseClass.isEmpty()
&& params.classType != Utils::NewClassWidget::NoClassType ?
parentQObjectClass : params.baseClass;
const bool superIsQtClass = qtClassExpr.exactMatch(baseClass);
if (superIsQtClass) {
headerStr << '\n';
Utils::writeIncludeFileDirective(params.baseClass, true, headerStr);
Utils::writeIncludeFileDirective(baseClass, true, headerStr);
}
const QString namespaceIndent = Utils::writeOpeningNameSpaces(namespaceList, QString(), headerStr);
......@@ -250,15 +268,24 @@ bool CppClassWizard::generateHeaderAndSource(const CppClassWizardParameters &par
// Class declaration
hea