No lonely comma when city is missing.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Wed, 28 Jul 2021 21:37:22 +0000 (23:37 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Wed, 28 Jul 2021 21:37:22 +0000 (23:37 +0200)
src/gui/conferenceeditor.cpp

index bd682a5675fb08f680bd83f9dd26860a8596cd97..a11eeaed7f578f8848d5bdfd380748d464b3e6b0 100644 (file)
@@ -89,7 +89,10 @@ void ConferenceEditor::itemSelected(const QModelIndex& current, const QModelInde
 
         conferenceTitle->setText(conf.title());
         conferenceSubtitle->setText(conf.subtitle());
-        conferenceWhere->setText(conf.city() + (!conf.venue().isEmpty() ? ", " + conf.venue() : ""));
+        QString where = conf.city();
+        if (!conf.city().isEmpty() && !conf.venue().isEmpty()) where += ", ";
+        where += conf.venue();
+        conferenceWhere->setText(where);
         conferenceWhen->setText(
                 conf.start().toString("yyyy-MM-dd")
                 + " - " +