Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • tohunger/qt-creator
1 result
Select Git revision
  • 0.9.1-beta
  • 0.9.2-rc1
  • 1.0.0
  • 1.1
  • 1.2
  • 1.2.90
  • 1.3
  • 1.3.0
  • 1.3.0-beta
  • 1.3.1
  • 2.0
  • 2.0.0
  • 2.0.0-beta
  • 2.0.1
  • 2.1
  • 2.1.0
  • 2.2
  • 2.3
  • 2.4
  • 2.5
  • 2.6
  • 2.7
  • 2.8
  • 3.0
  • 3.1
  • 3.2
  • 3.3
  • 3.4
  • 3.5
  • 3.6
  • 4.0
  • 4.1
  • 4.2
  • 4.3
  • 4.4
  • 4.5
  • at-3.4
  • at-3.5
  • at-3.6
  • at-master
  • csa-3.3
  • csa-3.4
  • csa-3.5
  • csa-3.6
  • csa-master
  • master
  • qp-2.8
  • qp-3.0
  • qp-3.1
  • qp-3.2
  • qp-3.3
  • qp-3.4
  • qp-3.5
  • qp-3.6
  • qp-master
  • wip/boostbuildprojectmanager
  • wip/clang-query
  • wip/vcproj
  • at-v3.4.0
  • at-v3.4.0-beta1
  • at-v3.4.0-rc1
  • at-v3.4.1
  • at-v3.4.2
  • at-v3.5.0
  • at-v3.5.0-beta1
  • at-v3.5.0-rc1
  • at-v3.5.1
  • at-v3.6.0
  • at-v3.6.0-beta1
  • at-v3.6.0-rc1
  • csa-v3.3.0
  • csa-v3.3.0-beta1
  • csa-v3.3.0-rc1
  • csa-v3.3.1
  • csa-v3.3.2
  • csa-v3.4.0
  • csa-v3.4.0-beta1
  • csa-v3.4.0-rc1
  • csa-v3.4.1
  • csa-v3.4.2
  • csa-v3.5.0
  • csa-v3.5.0-beta1
  • csa-v3.5.0-rc1
  • csa-v3.5.1
  • csa-v3.6.0
  • csa-v3.6.0-beta1
  • csa-v3.6.0-rc1
  • qp-v3.1.0
  • qp-v3.1.0-beta1
  • qp-v3.2.0
  • qp-v3.2.0-beta1
  • qp-v3.2.1
  • qp-v3.2.2
  • qp-v3.3.0
  • qp-v3.3.0-beta1
  • qp-v3.3.0-rc1
  • qp-v3.3.1
  • qp-v3.3.2
  • qp-v3.4.0
  • qp-v3.4.0-rc1
  • qp-v3.4.1
  • qp-v3.4.2
  • qp-v3.5.0
  • qp-v3.5.0-beta1
  • qp-v3.5.0-rc1
  • qp-v3.5.1
  • qp-v3.6.0
  • qp-v3.6.0-beta1
  • qp-v3.6.0-rc1
  • tqtc/v2.6.0
  • tqtc/v2.6.0-rc
  • tqtc/v2.6.1
  • tqtc/v2.7.0
  • tqtc/v2.7.0-rc
  • tqtc/v2.7.2
  • tqtc/v2.8.0
  • tqtc/v2.8.0-beta
  • v1.0.0
  • v1.1.0
  • v1.1.0-rc1
  • v1.1.1
  • v1.2.0
  • v1.2.1
  • v1.2.90
  • v1.3.0
  • v1.3.0-beta
  • v1.3.0-rc1
  • v1.3.1
  • v2.0.0
  • v2.0.0-alpha
  • v2.0.0-beta
  • v2.0.0-rc1
  • v2.0.1
  • v2.1.0
  • v2.1.0-beta
  • v2.1.0-beta2
  • v2.1.0-rc1
  • v2.2.0
  • v2.2.0-beta
  • v2.2.0-rc1
  • v2.2.1
  • v2.3.0
  • v2.3.0-beta
  • v2.3.0-rc
  • v2.3.1
  • v2.4.0
  • v2.4.0-beta
  • v2.4.0-rc
  • v2.4.1
  • v2.5.0
  • v2.5.0-beta
  • v2.5.0-rc
  • v2.5.1
  • v2.5.2
  • v2.6.0
  • v2.6.0-beta
  • v2.6.0-rc
  • v2.6.1
158 results
Show changes
Showing
with 144 additions and 83 deletions
......@@ -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);
}
}