Gui: use empty

This commit is contained in:
berniev
2022-08-06 03:13:53 +10:00
committed by wwmayer
parent a00faca147
commit d88729d2c4
33 changed files with 154 additions and 154 deletions

View File

@@ -1239,7 +1239,7 @@ void MainWindow::delayedStartup()
// Create new document?
ParameterGrp::handle hGrp = WindowParameter::getDefaultParameter()->GetGroup("Document");
if (hGrp->GetBool("CreateNewDoc", false)) {
if (App::GetApplication().getDocuments().size()==0){
if (App::GetApplication().getDocuments().empty()){
App::GetApplication().newDocument();
Gui::Command::doCommand(Gui::Command::Gui,
"Gui.activeDocument().activeView().viewDefaultOrientation()");
@@ -1623,7 +1623,7 @@ QMimeData * MainWindow::createMimeDataFromSelection () const
std::vector<App::Document*> unsaved;
bool hasXLink = App::PropertyXLink::hasXLink(sel,&unsaved);
if(unsaved.size()) {
if(!unsaved.empty()) {
QMessageBox::critical(getMainWindow(), tr("Unsaved document"),
tr("The exported object contains external link. Please save the document"
"at least once before exporting."));