Changeset af9f24b for src


Ignore:
Timestamp:
07/14/21 21:28:39 (12 months ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master
Children:
ce60f42
Parents:
28acdbe
git-author:
Philipp Spitzer <philipp@…> (07/14/21 21:06:31)
git-committer:
Philipp Spitzer <philipp@…> (07/14/21 21:28:39)
Message:

Replace QHash with QMultiHash to avoid a deprecation warning.

Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/gui/searchtabcontainer.cpp

    r28acdbe raf9f24b  
    6161    if (!sqlEngine) return;
    6262
    63     QHash<QString,QString> columns;
     63    QMultiHash<QString,QString> columns;
    6464
    6565    SearchHead *searchHeader = static_cast<SearchHead*>(header);
    6666    if( searchHeader->searchTitle->isChecked() )
    67         columns.insertMulti("EVENT", "title");
     67        columns.insert("EVENT", "title");
    6868    if( searchHeader->searchAbstract->isChecked() )
    69         columns.insertMulti("EVENT", "abstract");
     69        columns.insert("EVENT", "abstract");
    7070    if( searchHeader->searchTag->isChecked() )
    71         columns.insertMulti("EVENT", "tag");
     71        columns.insert("EVENT", "tag");
    7272    if( searchHeader->searchSpeaker->isChecked() )
    73         columns["PERSON"] = "name";
     73        columns.insert("PERSON", "name");
    7474    if( searchHeader->searchRoom->isChecked() )
    75         columns["ROOM"] = "name";
     75        columns.insert("ROOM", "name");
    7676
    7777    QString keyword = searchHeader->searchEdit->text();
  • src/sql/sqlengine.cpp

    r28acdbe raf9f24b  
    327327
    328328
    329 bool SqlEngine::searchEvent(int aConferenceId, const QHash<QString,QString> &aColumns, const QString &aKeyword) {
     329bool SqlEngine::searchEvent(int aConferenceId, const QMultiHash<QString,QString> &aColumns, const QString &aKeyword) {
    330330    if (aColumns.empty()) return false;
    331331
  • src/sql/sqlengine.h

    r28acdbe raf9f24b  
    7272
    7373        /// search Events for .... returns true if success
    74         bool searchEvent(int conferenceId, const QHash<QString,QString> &columns, const QString &keyword);
     74        bool searchEvent(int conferenceId, const QMultiHash<QString,QString> &columns, const QString &keyword);
    7575    private:
    7676        static QString login(const QString &aDatabaseType, const QString &aDatabaseName);
Note: See TracChangeset for help on using the changeset viewer.