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:
@@ -201,7 +201,7 @@ void GraphicsScene::cut()
|
||||
void GraphicsScene::removeSelectedItems()
|
||||
{
|
||||
QVector<ScxmlTag*> tags = SceneUtils::findRemovedTags(m_baseItems);
|
||||
if (tags.count() > 0) {
|
||||
if (!tags.isEmpty()) {
|
||||
m_document->undoStack()->beginMacro(tr("Remove items"));
|
||||
|
||||
// Then remove found tags
|
||||
@@ -235,7 +235,7 @@ void GraphicsScene::copy()
|
||||
if (tags.isEmpty() && m_document->currentTag())
|
||||
tags << m_document->currentTag();
|
||||
|
||||
if (tags.count() > 0) {
|
||||
if (!tags.isEmpty()) {
|
||||
auto mime = new QMimeData;
|
||||
QByteArray result = m_document->content(tags);
|
||||
mime->setText(QLatin1String(result));
|
||||
|
||||
Reference in New Issue
Block a user