m_context |= TrashContext;
}
- if (!m_fileInfo.isNull() && (m_selectedItems.count() > 0)) {
+ if (!m_fileInfo.isNull() && !m_selectedItems.isEmpty()) {
m_context |= ItemContext;
// TODO: handle other use cases like devices + desktop files
}
{
const DolphinView* view = m_mainWindow->activeViewContainer()->view();
const QList<QAction*> revControlActions = view->revisionControlActions(m_selectedItems);
- if (revControlActions.count() > 0) {
+ if (!revControlActions.isEmpty()) {
foreach (QAction* action, revControlActions) {
menu->addAction(action);
}
const bool trigger = currentIndex.isValid()
&& ((event->key() == Qt::Key_Return)
|| (event->key() == Qt::Key_Enter))
- && (selModel->selectedIndexes().count() > 0);
+ && !selModel->selectedIndexes().isEmpty();
if (trigger) {
const QModelIndexList indexList = selModel->selectedIndexes();
foreach (const QModelIndex& index, indexList) {
isDragging = true;
QModelIndexList indexes = itemView->selectionModel()->selectedIndexes();
- if (indexes.count() > 0) {
+ if (!indexes.isEmpty()) {
QMimeData *data = itemView->model()->mimeData(indexes);
if (data == 0) {
return;
++it;
}
- if (actions.count() > 0) {
+ if (!actions.isEmpty()) {
popup.addSeparator();
// add all items alphabetically sorted to the popup
void UpdateItemStatesThread::run()
{
- Q_ASSERT(m_itemStates.count() > 0);
+ Q_ASSERT(!m_itemStates.isEmpty());
Q_ASSERT(m_plugin != 0);
// it is assumed that all items have the same parent directory