forked from qt-creator/qt-creator
Remove more deprecation warnings
Change-Id: Ie50e41737a4bf7bea41f550df7cc765267e8a144 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -50,6 +50,7 @@
|
|||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#include <QElapsedTimer>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QLoggingCategory>
|
#include <QLoggingCategory>
|
||||||
#include <QSharedPointer>
|
#include <QSharedPointer>
|
||||||
@@ -302,7 +303,7 @@ WaitForUpdatedCodeWarnings::WaitForUpdatedCodeWarnings(ClangEditorDocumentProces
|
|||||||
|
|
||||||
bool WaitForUpdatedCodeWarnings::wait(int timeOutInMs) const
|
bool WaitForUpdatedCodeWarnings::wait(int timeOutInMs) const
|
||||||
{
|
{
|
||||||
QTime time;
|
QElapsedTimer time;
|
||||||
time.start();
|
time.start();
|
||||||
|
|
||||||
forever {
|
forever {
|
||||||
@@ -580,7 +581,7 @@ bool ProcessEventsCommand::run()
|
|||||||
{
|
{
|
||||||
qCDebug(debug) << "line" << context().lineNumber << "ProcessEventsCommand" << m_durationInMs;
|
qCDebug(debug) << "line" << context().lineNumber << "ProcessEventsCommand" << m_durationInMs;
|
||||||
|
|
||||||
QTime time;
|
QElapsedTimer time;
|
||||||
time.start();
|
time.start();
|
||||||
|
|
||||||
forever {
|
forever {
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
|
#include <QElapsedTimer>
|
||||||
|
|
||||||
enum { debug = false };
|
enum { debug = false };
|
||||||
|
|
||||||
@@ -267,7 +268,7 @@ void NavigationWidget::onDataUpdate(QSharedPointer<QStandardItem> result)
|
|||||||
if (result.isNull())
|
if (result.isNull())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QTime timer;
|
QElapsedTimer timer;
|
||||||
if (debug)
|
if (debug)
|
||||||
timer.start();
|
timer.start();
|
||||||
// update is received. root item must be updated - and received information
|
// update is received. root item must be updated - and received information
|
||||||
|
|||||||
@@ -53,6 +53,7 @@
|
|||||||
#include <QReadWriteLock>
|
#include <QReadWriteLock>
|
||||||
#include <QReadLocker>
|
#include <QReadLocker>
|
||||||
#include <QWriteLocker>
|
#include <QWriteLocker>
|
||||||
|
#include <QElapsedTimer>
|
||||||
|
|
||||||
enum { debug = false };
|
enum { debug = false };
|
||||||
|
|
||||||
@@ -274,7 +275,7 @@ ParserTreeItem::ConstPtr Parser::findItemByRoot(const QStandardItem *item, bool
|
|||||||
|
|
||||||
ParserTreeItem::ConstPtr Parser::parse()
|
ParserTreeItem::ConstPtr Parser::parse()
|
||||||
{
|
{
|
||||||
QTime time;
|
QElapsedTimer time;
|
||||||
if (debug)
|
if (debug)
|
||||||
time.start();
|
time.start();
|
||||||
|
|
||||||
|
|||||||
@@ -1006,7 +1006,7 @@ Breakpoints BreakHandler::findBreakpointsByIndex(const QList<QModelIndex> &list)
|
|||||||
if (Breakpoint bp = findBreakpointByIndex(index))
|
if (Breakpoint bp = findBreakpointByIndex(index))
|
||||||
items.insert(bp);
|
items.insert(bp);
|
||||||
}
|
}
|
||||||
return items.toList();
|
return Utils::toList(items);
|
||||||
}
|
}
|
||||||
|
|
||||||
SubBreakpoints BreakHandler::findSubBreakpointsByIndex(const QList<QModelIndex> &list) const
|
SubBreakpoints BreakHandler::findSubBreakpointsByIndex(const QList<QModelIndex> &list) const
|
||||||
@@ -1016,7 +1016,7 @@ SubBreakpoints BreakHandler::findSubBreakpointsByIndex(const QList<QModelIndex>
|
|||||||
if (SubBreakpoint sbp = findSubBreakpointByIndex(index))
|
if (SubBreakpoint sbp = findSubBreakpointByIndex(index))
|
||||||
items.insert(sbp);
|
items.insert(sbp);
|
||||||
}
|
}
|
||||||
return items.toList();
|
return Utils::toList(items);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -442,7 +442,7 @@ void DebuggerMainWindow::restorePersistentSettings()
|
|||||||
theMainWindow->setAutoHideTitleBars(settings->value(AUTOHIDE_TITLEBARS_KEY, true).toBool());
|
theMainWindow->setAutoHideTitleBars(settings->value(AUTOHIDE_TITLEBARS_KEY, true).toBool());
|
||||||
theMainWindow->showCentralWidget(settings->value(SHOW_CENTRALWIDGET_KEY, true).toBool());
|
theMainWindow->showCentralWidget(settings->value(SHOW_CENTRALWIDGET_KEY, true).toBool());
|
||||||
theMainWindow->d->m_persistentChangedDocks
|
theMainWindow->d->m_persistentChangedDocks
|
||||||
= QSet<QString>::fromList(settings->value(CHANGED_DOCK_KEY).toStringList());
|
= Utils::toSet(settings->value(CHANGED_DOCK_KEY).toStringList());
|
||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
|
|
||||||
qCDebug(perspectivesLog) << "LOADED DOCKS:" << theMainWindow->d->m_persistentChangedDocks;
|
qCDebug(perspectivesLog) << "LOADED DOCKS:" << theMainWindow->d->m_persistentChangedDocks;
|
||||||
|
|||||||
@@ -77,6 +77,7 @@
|
|||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QPluginLoader>
|
#include <QPluginLoader>
|
||||||
#include <QTime>
|
#include <QTime>
|
||||||
|
#include <QElapsedTimer>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
@@ -351,9 +352,9 @@ void FormEditorData::setupViewActions()
|
|||||||
void FormEditorData::fullInit()
|
void FormEditorData::fullInit()
|
||||||
{
|
{
|
||||||
QTC_ASSERT(m_initStage == FormEditorW::RegisterPlugins, return);
|
QTC_ASSERT(m_initStage == FormEditorW::RegisterPlugins, return);
|
||||||
QTime *initTime = 0;
|
QElapsedTimer *initTime = 0;
|
||||||
if (Designer::Constants::Internal::debug) {
|
if (Designer::Constants::Internal::debug) {
|
||||||
initTime = new QTime;
|
initTime = new QElapsedTimer;
|
||||||
initTime->start();
|
initTime->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,8 @@
|
|||||||
#include "qmt/model/mdependency.h"
|
#include "qmt/model/mdependency.h"
|
||||||
#include "qmt/model_controller/modelcontroller.h"
|
#include "qmt/model_controller/modelcontroller.h"
|
||||||
|
|
||||||
|
#include <utils/algorithm.h>
|
||||||
|
|
||||||
#include <QSet>
|
#include <QSet>
|
||||||
|
|
||||||
namespace ModelEditor {
|
namespace ModelEditor {
|
||||||
@@ -151,7 +153,7 @@ void PackageViewController::createAncestorDependencies(qmt::MObject *object1, qm
|
|||||||
bool PackageViewController::haveMatchingStereotypes(const qmt::MObject *object1,
|
bool PackageViewController::haveMatchingStereotypes(const qmt::MObject *object1,
|
||||||
const qmt::MObject *object2)
|
const qmt::MObject *object2)
|
||||||
{
|
{
|
||||||
return !(object1->stereotypes().toSet() & object2->stereotypes().toSet()).isEmpty();
|
return !(Utils::toSet(object1->stereotypes()) & Utils::toSet(object2->stereotypes())).isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -385,8 +385,8 @@ void QmakePriFile::watchFolders(const QSet<FilePath> &folders)
|
|||||||
QSet<QString> toWatch = folderStrings;
|
QSet<QString> toWatch = folderStrings;
|
||||||
toWatch.subtract(m_watchedFolders);
|
toWatch.subtract(m_watchedFolders);
|
||||||
|
|
||||||
m_project->unwatchFolders(toUnwatch.toList(), this);
|
m_project->unwatchFolders(Utils::toList(toUnwatch), this);
|
||||||
m_project->watchFolders(toWatch.toList(), this);
|
m_project->watchFolders(Utils::toList(toWatch), this);
|
||||||
|
|
||||||
m_watchedFolders = folderStrings;
|
m_watchedFolders = folderStrings;
|
||||||
}
|
}
|
||||||
@@ -1312,7 +1312,7 @@ QmakeEvalResult *QmakeProFile::evaluate(const QmakeEvalInput &input)
|
|||||||
result->includedFiles.children.insert(subDirName, subDir);
|
result->includedFiles.children.insert(subDirName, subDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
result->exactSubdirs = subDirs.toSet();
|
result->exactSubdirs = Utils::toSet(subDirs);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert ProFileReader::includeFiles to IncludedPriFile structure
|
// Convert ProFileReader::includeFiles to IncludedPriFile structure
|
||||||
|
|||||||
@@ -59,8 +59,8 @@ void CppTodoItemsScanner::scannerParamsChanged()
|
|||||||
|
|
||||||
QSet<QString> filesToBeUpdated;
|
QSet<QString> filesToBeUpdated;
|
||||||
foreach (const CppTools::ProjectInfo &info, modelManager->projectInfos())
|
foreach (const CppTools::ProjectInfo &info, modelManager->projectInfos())
|
||||||
filesToBeUpdated.unite(Utils::transform(info.project().data()->files(ProjectExplorer::Project::SourceFiles),
|
filesToBeUpdated.unite(Utils::transform<QSet>(info.project().data()->files(ProjectExplorer::Project::SourceFiles),
|
||||||
&Utils::FilePath::toString).toSet());
|
&Utils::FilePath::toString));
|
||||||
|
|
||||||
modelManager->updateSourceFiles(filesToBeUpdated);
|
modelManager->updateSourceFiles(filesToBeUpdated);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user