Gui: modernize C++11
* use nullptr
This commit is contained in:
@@ -81,7 +81,7 @@ MenuItem* MenuItem::findItem(const std::string& name)
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
MenuItem* MenuItem::findParentOf(const std::string& name)
|
||||
@@ -141,7 +141,7 @@ MenuItem* MenuItem::afterItem(MenuItem* item) const
|
||||
{
|
||||
int pos = _items.indexOf(item);
|
||||
if (pos < 0 || pos+1 == _items.size())
|
||||
return 0;
|
||||
return nullptr;
|
||||
return _items.at(pos+1);
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ QList<MenuItem*> MenuItem::getItems() const
|
||||
|
||||
// -----------------------------------------------------------
|
||||
|
||||
MenuManager* MenuManager::_instance=0;
|
||||
MenuManager* MenuManager::_instance=nullptr;
|
||||
|
||||
MenuManager* MenuManager::getInstance()
|
||||
{
|
||||
@@ -191,7 +191,7 @@ MenuManager* MenuManager::getInstance()
|
||||
void MenuManager::destruct()
|
||||
{
|
||||
delete _instance;
|
||||
_instance = 0;
|
||||
_instance = nullptr;
|
||||
}
|
||||
|
||||
MenuManager::MenuManager()
|
||||
@@ -384,7 +384,7 @@ QAction* MenuManager::findAction(const QList<QAction*>& acts, const QString& ite
|
||||
return *it;
|
||||
}
|
||||
|
||||
return 0; // no item with the user data found
|
||||
return nullptr; // no item with the user data found
|
||||
}
|
||||
|
||||
QList<QAction*> MenuManager::findActions(const QList<QAction*>& acts, const QString& item) const
|
||||
|
||||
Reference in New Issue
Block a user