forked from qt-creator/qt-creator
Use isEmpty() instead of count() or size()
Change-Id: I0a89d2808c6d041da0dc41ea5aea58e6e8759bb4 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -1364,7 +1364,7 @@ void QmlEnginePrivate::scripts(int types, const QList<int> ids, bool includeSour
|
||||
DebuggerCommand cmd(SCRIPTS);
|
||||
cmd.arg(TYPES, types);
|
||||
|
||||
if (ids.count())
|
||||
if (!ids.isEmpty())
|
||||
cmd.arg(IDS, ids);
|
||||
|
||||
if (includeSource)
|
||||
@@ -1727,7 +1727,7 @@ void QmlEnginePrivate::messageReceived(const QByteArray &data)
|
||||
const QVariantList actualLocations =
|
||||
breakpointData.value("actual_locations").toList();
|
||||
const int line = breakpointData.value("line").toInt() + 1;
|
||||
if (actualLocations.count()) {
|
||||
if (!actualLocations.isEmpty()) {
|
||||
//The breakpoint requested line should be same as
|
||||
//actual line
|
||||
if (bp && bp->state() != BreakpointInserted) {
|
||||
|
||||
@@ -254,7 +254,7 @@ void QmlInspectorAgent::onResult(quint32 queryId, const QVariant &value,
|
||||
} else if (queryId == m_engineQueryId) {
|
||||
m_engineQueryId = 0;
|
||||
QList<EngineReference> engines = qvariant_cast<QList<EngineReference> >(value);
|
||||
QTC_ASSERT(engines.count(), return);
|
||||
QTC_ASSERT(!engines.isEmpty(), return);
|
||||
m_engines = engines;
|
||||
queryEngineContext();
|
||||
} else {
|
||||
@@ -637,7 +637,7 @@ void QmlInspectorAgent::addWatchData(const ObjectReference &obj,
|
||||
}
|
||||
|
||||
// properties
|
||||
if (append && obj.properties().count()) {
|
||||
if (append && !obj.properties().isEmpty()) {
|
||||
QString iname = objIname + ".[properties]";
|
||||
auto propertiesWatch = new WatchItem;
|
||||
propertiesWatch->iname = iname;
|
||||
|
||||
Reference in New Issue
Block a user