Searching without active conference doesn't give an error message anymore (resolves...
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 26 Jun 2011 18:28:57 +0000 (18:28 +0000)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 26 Jun 2011 18:28:57 +0000 (18:28 +0000)
src/gui/searchtabcontainer.cpp
src/mvc/conference.h

index 246b4ea21bc391c982be978d190eb8124f175628..fa5f22dda68120a2d63f7558ee78739057a2a129 100644 (file)
@@ -86,6 +86,8 @@ void SearchTabContainer::searchButtonClicked()
     QString keyword = searchHeader->searchEdit->text();
 
     int confId = Conference::activeConference();
+    if (confId == -1) return;
+
     SqlEngine::searchEvent( confId, columns, keyword );
 
     QDate startDate = Conference::getById(confId).start();
index 897c39680dbd4ca09e3d1c3aef65ce123a504491..1d704390a3562e75b5dc325f271b1c32253ee31b 100644 (file)
@@ -35,7 +35,7 @@ public:
 public:
     static Conference getById(int id);
     static QList<Conference> getAll();
-    static int activeConference();
+    static int activeConference(); ///< returns -1 if no conference is active
     static void deleteConference(int id);
 
 public: