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