Changeset 809b5e5


Ignore:
Timestamp:
08/30/17 20:38:27 (4 years ago)
Author:
gregor herrmann <gregor@…>
Branches:
master, qt5
Children:
79a7671
Parents:
ebe26af (diff), e27a3f5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into qt5

Files:
4 added
2 deleted
76 edited

Legend:

Unmodified
Added
Removed
  • NEWS

    rebe26af r809b5e5  
    22fosdem-schedule; cf. docs/fosdem-schedule for the historic documentation.
    33
    4 version 0.6.2, $DATE
     4version 0.6.3, 20xx-xx-xx
    55* ...
     6
     7version 0.6.2, 2017-01-24
     8* Event dialog: don't unconditionally assume plain text for description and
     9  abstract, can be rich text as well (i.e. contain HTML tags).
     10* Favourites: change from boolean to tri-strate: no favourite, weak/fallback
     11  favourite, strong favourite.  Adapt buttons and conflict markers.
     12  Thanks to Elena ``of Valhalla'' for the bug report.
     13  (Fixes: #54)
     14* Handle SSL errors.
     15  Present SSL error messages during download in a warning dialog and ask
     16  user about how to proceed.
     17  (In practice seen on Maemo due to ancient certificates.)
    618
    719version 0.6.1, 2014-09-11
  • README

    rebe26af r809b5e5  
    2525
    2626  Copyright (C) 2010 Ixonos Plc.
    27   Copyright (C) 2011-2015, Philipp Spitzer, gregor herrmann, Stefan Strahl
     27  Copyright (C) 2011-2017, Philipp Spitzer, gregor herrmann, Stefan Strahl
    2828
    2929  This program is free software; you can redistribute it and/or modify
     
    6161src/icons/favourite*, src/icons/alarm*, src/icons/collapse*, src/icons/expand*:
    6262
    63   Copyright (C) 2012, Philipp Spitzer, Stefan Strahl
     63  Copyright (C) 2012-2017, Philipp Spitzer, Stefan Strahl
    6464
    6565  This program is free software; you can redistribute it and/or modify
     
    123123
    124124
    125 Tested pentabarf (or frab, or summit with patches) instances:
     125Tested pentabarf (or frab, or summit/wafer with patches) instances:
    126126
    127 - 30C3: https://events.ccc.de/congress/2013/Fahrplan/schedule.xml
     127- 33C3: https://fahrplan.events.ccc.de/congress/2016/Fahrplan/schedule.xml
    128128- DebConf (2013, pentbarf): https://penta.debconf.org/dc13_schedule/schedule.en.xml
    129129- DebConf (2014, summit): https://summit.debconf.org/debconf14.xml
     130- DebConf (2015, summit): https://summit.debconf.org/debconf15.xml
     131- DebConf (2016, wafer): https://debconf16.debconf.org/schedule/pentabarf.xml
    130132- FOSDEM: http://fosdem.org/schedule/xml
    131 - FrOSCon (2014): http://programm.froscon.org/2014/schedule.xml
    132 - Grazer Linuxtage (2014): http://glt14-programm.linuxtage.at/schedule.de.xml
     133- FrOSCon (2016): http://programm.froscon.org/2016/schedule.xml
     134- Grazer Linuxtage (2016): https://glt16-programm.linuxtage.at/schedule.xml
  • confclerk.pro

    rebe26af r809b5e5  
    2121
    2222icon.target = data/$${TARGET}.png
    23 icon.commands = convert data/$${TARGET}.svg data/$${TARGET}.png
     23icon.commands = convert -transparent white data/$${TARGET}.svg data/$${TARGET}.png
    2424icon.depends = data/$${TARGET}.svg
    2525
  • data/confclerk.pod

    rebe26af r809b5e5  
    6666
    6767    Copyright (C) 2010 Ixonos Plc.
    68     Copyright (C) 2011-2015, Philipp Spitzer <philipp@toastfreeware.priv.at>
    69     Copyright (C) 2011-2015, gregor herrmann <gregor@toastfreeware.priv.at>
    70     Copyright (C) 2011-2015, Stefan Strahl <stefan@toastfreeware.priv.at>
     68    Copyright (C) 2011-2017, Philipp Spitzer <philipp@toastfreeware.priv.at>
     69    Copyright (C) 2011-2017, gregor herrmann <gregor@toastfreeware.priv.at>
     70    Copyright (C) 2011-2017, Stefan Strahl <stefan@toastfreeware.priv.at>
    7171
    7272    This program is free software; you can redistribute it and/or modify
     
    120120=item src/icons/favourite*, src/icons/alarm*, src/icons/collapse*, src/icons/expand*:
    121121
    122     Copyright (C) 2012, Philipp Spitzer <philipp@toastfreeware.priv.at>
    123     Copyright (C) 2012, Stefan Strahl <stefan@toastfreeware.priv.at>
     122    Copyright (C) 2012-2017, Philipp Spitzer <philipp@toastfreeware.priv.at>
     123    Copyright (C) 2012-2017, Stefan Strahl <stefan@toastfreeware.priv.at>
    124124
    125125    This program is free software; you can redistribute it and/or modify
  • src/alarm/alarm.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/alarm/alarm.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/app/application.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
     
    1818 * ConfClerk.  If not, see <http://www.gnu.org/licenses/>.
    1919 */
     20#if defined(__GNUC__) || defined(__llvm__) || defined(__clang__)
     21#include <cxxabi.h>
     22#endif
     23#include <exception>
     24
    2025#include "application.h"
    2126#include "errormessage.h"
     
    3338        error_message("UNCAUGHT OrmException: " + e.text());
    3439        return false;
     40    } catch (std::exception& e) {
     41        error_message("UNCAUGHT exception: " + QString(e.what()));
     42        return false;
    3543    } catch (...) {
    36         error_message("UNCAUGHT EXCEPTION: unknown");
     44#if defined(__GNUC__) || defined(__llvm__) || defined(__clang__)
     45        int status = 0;
     46        char *buff = __cxxabiv1::__cxa_demangle(
     47                __cxxabiv1::__cxa_current_exception_type()->name(),
     48                NULL, NULL, &status);
     49        QString exception_name = QString(buff);
     50        std::free(buff);
     51#else
     52        QString exception_name = QString("unknown");
     53#endif
     54        error_message("UNCAUGHT exception: " + exception_name);
    3755        return false;
    3856    }
  • src/app/application.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/app/appsettings.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/app/appsettings.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/app/main.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/dbschema001.sql

    rebe26af r809b5e5  
    5050        abstract VARCHAR,
    5151        description VARCHAR,
    52         favourite INTEGER DEFAULT 0,
     52        favourite INTEGER DEFAULT 0, -- 0 ... no favourite, 1 ... strong favourite, 2 ... weak favourite/alternative to strong favourite
    5353        alarm INTEGER DEFAULT 0,
    5454        PRIMARY KEY (xid_conference, id)
  • src/global.pri

    rebe26af r809b5e5  
    55
    66# VERSION
    7 VERSION = 0.6.2
     7VERSION = 0.6.3
    88DEFINES += VERSION=\\\"$$VERSION\\\"
    99
  • src/gui/about.ui

    rebe26af r809b5e5  
    138138&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;ConfClerk is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.&lt;/p&gt;
    139139&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;ConfClerk is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.&lt;/p&gt;
    140 &lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Copyright (C) 2010 Ixonos Plc.&lt;br /&gt;Copyright (C) 2011-2015 Philipp Spitzer &amp;amp; gregor herrmann &amp;amp; Stefan Strahl&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
     140&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Copyright (C) 2010 Ixonos Plc.&lt;br /&gt;Copyright (C) 2011-2017 Philipp Spitzer &amp;amp; gregor herrmann &amp;amp; Stefan Strahl&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
    141141         </property>
    142142         <property name="textFormat">
  • src/gui/conferenceeditor.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/conferenceeditor.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/conflictdialogcontainer.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/conflictdialogcontainer.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/conflictsdialog.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/conflictsdialog.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/daynavigatorwidget.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/daynavigatorwidget.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/dayviewtabcontainer.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/dayviewtabcontainer.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/errormessage.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/errormessage.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/eventdialog.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
     
    4949    // abstract
    5050    info += QString("<h2>%1</h2>\n").arg(tr("Abstract"));
    51     info += Qt::convertFromPlainText(event.abstract(), Qt::WhiteSpaceNormal);
     51    if (Qt::mightBeRichText(event.abstract())) {
     52        info += event.abstract();
     53    } else {
     54        info += Qt::convertFromPlainText(event.abstract(), Qt::WhiteSpaceNormal);
     55    }
    5256
    5357    // description
    5458    info += QString("<h2>%1</h2>\n").arg(tr("Description"));
    55     info += Qt::convertFromPlainText(event.description(), Qt::WhiteSpaceNormal);
     59    if (Qt::mightBeRichText(event.description())) {
     60        info += event.description();
     61    } else {
     62        info += Qt::convertFromPlainText(event.description(), Qt::WhiteSpaceNormal);
     63    }
    5664
    5765    // links
     
    8189    connect(alarmButton, SIGNAL(clicked()), SLOT(alarmClicked()));
    8290
    83     if(event.isFavourite())
    84     {
    85         favouriteButton->setIcon(QIcon(":/icons/favourite-on.png"));
    86     }
     91    updateFavouriteButton(event);
    8792
    8893    if(event.hasAlarm())
     
    95100{
    96101    Event event = Event::getById(mEventId, mConferenceId);
     102    event.cycleFavourite();
     103    event.update("favourite");
     104    updateFavouriteButton(event);
    97105
     106    // 'conflicts' list may have changed
    98107    QList<Event> conflicts = Event::conflictEvents(event.id(), mConferenceId);
    99     if(event.isFavourite())
    100     {
    101         event.setFavourite(false);
    102         favouriteButton->setIcon(QIcon(":/icons/favourite-off.png"));
    103     }
    104     else
    105     {
    106         event.setFavourite(true);
    107         favouriteButton->setIcon(QIcon(":/icons/favourite-on.png"));
    108     }
    109     event.update("favourite");
    110 
    111     if(event.isFavourite())
    112     {
    113         // event has became 'favourite' and so 'conflicts' list may have changed
    114         conflicts = Event::conflictEvents(event.id(), mConferenceId);
    115     }
    116108
    117109    // have to emit 'eventChanged' signal on all events in conflict
     
    155147}
    156148
     149
     150void EventDialog::updateFavouriteButton(const Event& event) {
     151    switch (event.favourite()) {
     152        case Favourite_no: favouriteButton->setIcon(QIcon(":/icons/favourite-no.png")); break;
     153        case Favourite_weak: favouriteButton->setIcon(QIcon(":/icons/favourite-weak.png")); break;
     154        case Favourite_strong: favouriteButton->setIcon(QIcon(":/icons/favourite-strong.png")); break;
     155    }
     156}
     157
  • src/gui/eventdialog.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
     
    3939    int mConferenceId;
    4040    int mEventId;
     41    void updateFavouriteButton(const Event& event);
    4142};
    4243
  • src/gui/eventdialog.ui

    rebe26af r809b5e5  
    6060       <property name="icon">
    6161        <iconset resource="../icons.qrc">
    62          <normaloff>:/icons/favourite-off.png</normaloff>:/icons/favourite-off.png</iconset>
     62         <normaloff>:/icons/favourite-no.png</normaloff>:/icons/favourite-no.png</iconset>
    6363       </property>
    6464       <property name="iconSize">
  • src/gui/favtabcontainer.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/favtabcontainer.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/mainwindow.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
     
    2525#include <QNetworkAccessManager>
    2626#include <QNetworkReply>
     27#include <QSslConfiguration>
    2728
    2829#include "sqlengine.h"
     
    131132    }
    132133
     134    connect(mNetworkAccessManager, SIGNAL(sslErrors(QNetworkReply*, QList<QSslError>)), SLOT(sslErrors(QNetworkReply*, QList<QSslError>)));
    133135    connect(mNetworkAccessManager, SIGNAL(finished(QNetworkReply*)), SLOT(networkQueryFinished(QNetworkReply*)));
    134136    connect(mXmlParser, SIGNAL(parsingScheduleBegin()), conferenceModel, SLOT(newConferenceBegin()));
     
    270272    systemTrayIcon->show();
    271273    // The next two lines are to prevent a very strange position of the message box the first time at X11/aweseome (not Win32/XP)
    272     systemTrayIcon->showMessage("ConfClerk", "Your upcoming events", QSystemTrayIcon::Information);
     274    systemTrayIcon->showMessage("ConfClerk", tr("Your upcoming events"), QSystemTrayIcon::Information);
    273275    qApp->processEvents();
    274276    systemTrayIcon->showMessage(title, message, QSystemTrayIcon::Information, 60*60*24*1000);
     
    309311        // end of optimization
    310312        // initTabs();
    311     } catch (OrmException& e) {
     313    } catch (const OrmException& e) {
     314        qDebug() << "OrmException:" << e.text();
    312315        // cannon set an active conference
    313316        unsetConference();   // TODO: as no active conference is now correctly managed this should be handled as a fatal error
     
    404407    try {
    405408        initTabs();
    406     } catch (OrmException) {
     409    } catch (const OrmException& e) {
     410        qDebug() << "OrmException:" << e.text();
    407411        clearTabs();
     412    }
     413}
     414
     415void MainWindow::sslErrors(QNetworkReply *aReply, const QList<QSslError> &errors) {
     416    QString errorString;
     417    foreach (const QSslError &error, errors) {
     418        if (!errorString.isEmpty()) {
     419            errorString += ", ";
     420        }
     421        errorString += error.errorString();
     422    }
     423
     424    if (QMessageBox::warning(
     425                this,
     426                tr("SSL errors"),
     427                tr("One or more SSL errors have occurred: %1", 0, errors.size()).arg(errorString),
     428                QMessageBox::Ignore | QMessageBox::Cancel) == QMessageBox::Ignore) {
     429        aReply->ignoreSslErrors();
     430    } else {
     431        aReply->abort();
    408432    }
    409433}
     
    411435void MainWindow::networkQueryFinished(QNetworkReply *aReply) {
    412436    if (aReply->error() != QNetworkReply::NoError) {
    413         error_message(QString("Error occured during download: ") + aReply->errorString());
     437        error_message(tr("Error occurred during download: %1").arg(aReply->errorString()));
    414438    } else {
    415439        QUrl redirectUrl = aReply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl();
     
    419443                return; // don't enable controls
    420444            } else {
    421                 error_message(QString("Error: Cyclic redirection from %1 to itself.").arg(redirectUrl.toString()));
     445                error_message(tr("Error: Cyclic redirection from %1 to itself.").arg(redirectUrl.toString()));
    422446            }
    423447        } else {
     
    436460{
    437461    QNetworkRequest request;
     462    QSslConfiguration qSslConfiguration = request.sslConfiguration();
     463    qSslConfiguration.setProtocol(QSsl::AnyProtocol);
     464    qSslConfiguration.setPeerVerifyMode(QSslSocket::QueryPeer);
    438465    request.setUrl(QUrl(url));
     466    request.setSslConfiguration(qSslConfiguration);
    439467    request.setAttribute(QNetworkRequest::User, conferenceId);
    440468
  • src/gui/mainwindow.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
     
    2222
    2323#include <QtWidgets>
     24#include <QSslError>
    2425
    2526#include "ui_mainwindow.h"
     
    5253    void onSearchResultChanged();
    5354
     55    void sslErrors(QNetworkReply*,const QList<QSslError> &errors);
    5456    void networkQueryFinished(QNetworkReply*);
    5557    void importFromNetwork(const QString&, int conferenceId);
  • src/gui/roomstabcontainer.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/roomstabcontainer.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/searchhead.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/searchhead.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/searchtabcontainer.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/searchtabcontainer.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/settingsdialog.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/settingsdialog.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/tabcontainer.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/tabcontainer.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/trackstabcontainer.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/trackstabcontainer.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/urlinputdialog.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/gui/urlinputdialog.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/icons.qrc

    rebe26af r809b5e5  
    99        <file>icons/search.png</file>
    1010        <file>icons/today.png</file>
    11         <file>icons/favourite-off.png</file>
    12         <file>icons/favourite-on.png</file>
     11        <file>icons/favourite-no.png</file>
     12        <file>icons/favourite-weak.png</file>
     13        <file>icons/favourite-strong.png</file>
    1314        <file>icons/alarm-on.png</file>
    1415        <file>icons/alarm-off.png</file>
  • src/mvc/conference.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/mvc/conference.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/mvc/conferencemodel.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/mvc/conferencemodel.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/mvc/delegate.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
     
    6161    if(hasParent(index))
    6262    {
     63        Event *event = static_cast<Event*>(index.internalPointer());
     64
     65        // determine severity of conflict
     66        Favourite eventTimeConflict = event->timeConflict(); // cache value as event->timeConflict is expensive
     67        enum ConflictSeverity {csNone, csWeak, csStrong} conflictSeverity = csNone;
     68        switch (event->favourite()) {
     69            case Favourite_strong:
     70                conflictSeverity = (eventTimeConflict == Favourite_strong) ? csStrong : csNone;
     71                break;
     72            case Favourite_weak:
     73                conflictSeverity = (eventTimeConflict == Favourite_no) ? csNone : csWeak;
     74                break;
     75            case Favourite_no:
     76                conflictSeverity = csNone;
     77                break;
     78        }
     79
    6380        // entry horizontal layout:
    6481        // * spacer (aka y position of image)
    6582        // * image
    6683        // * rest is text, which is 1 line of title with big letters and 2 lines of Presenter and Track
    67         int aux = option.rect.height() - SPACER - mControls[FavouriteControlOn]->image()->height();
    68         Event *event = static_cast<Event*>(index.internalPointer());
     84        int aux = option.rect.height() - SPACER - mControls[FavouriteControlStrong]->image()->height();
    6985
    7086        // font SMALL
     
    89105
    90106        // background (in case of time conflicts)
    91         if(event->hasTimeConflict()) {
    92             painter->setBrush(Qt::yellow);
     107        if (conflictSeverity != csNone) {
     108            painter->setBrush(conflictSeverity == csStrong ? Qt::yellow : QColor("lightyellow"));
    93109            painter->setPen(Qt::NoPen);
    94110            painter->drawRect(option.rect);
     
    106122            c->setEnabled(false);
    107123        }
    108         if(event->isFavourite())
    109             mControls[FavouriteControlOn]->paint(painter, option.rect);
    110         else
    111             mControls[FavouriteControlOff]->paint(painter, option.rect);
     124        switch (event->favourite()) {
     125        case Favourite_strong:
     126            mControls[FavouriteControlStrong]->paint(painter, option.rect);
     127            break;
     128        case Favourite_weak:
     129            mControls[FavouriteControlWeak]->paint(painter, option.rect);
     130            break;
     131        case Favourite_no:
     132            mControls[FavouriteControlNo]->paint(painter, option.rect);
     133            break;
     134        }
    112135
    113136        if(event->hasAlarm())
     
    116139            mControls[AlarmControlOff]->paint(painter, option.rect);
    117140
    118         if(event->hasTimeConflict())
     141        if(eventTimeConflict != Favourite_no)
    119142            mControls[WarningControl]->paint(painter, option.rect);
    120143
     
    123146        // ("position of text" is lower-left angle of the first letter,
    124147        //  so the first line is actually at the same height as the image)
    125         painter->setPen(QPen(event->hasTimeConflict() ? Qt::black : textColor));
     148        painter->setPen(QPen(conflictSeverity != csNone ? Qt::black : textColor));
    126149        QPointF titlePointF(option.rect.x() + SPACER,
    127                             option.rect.y() + SPACER + mControls[FavouriteControlOn]->image()->height());
     150                            option.rect.y() + SPACER + mControls[FavouriteControlStrong]->image()->height());
    128151        QTime start = event->start().time();
    129152        painter->setFont(fontBig);
     
    189212        painter->setPen(QPen(textColor));
    190213        painter->setFont(fontSmall);
    191         QImage *image = mControls[numFav ? FavouriteControlOn : FavouriteControlOff]->image();
     214        QImage *image = mControls[numFav ? FavouriteControlStrong : FavouriteControlNo]->image();
    192215        QPoint drawPoint =
    193216            option.rect.topRight()
     
    307330{
    308331    // FAVOURITE ICONs
    309     // on
    310     mControls.insert(FavouriteControlOn, new Control(FavouriteControlOn, QString(":icons/favourite-on.png"), NULL));
    311     // off
    312     mControls.insert(FavouriteControlOff, new Control(FavouriteControlOff, QString(":icons/favourite-off.png"), NULL));
     332    // strong
     333    mControls.insert(FavouriteControlStrong, new Control(FavouriteControlStrong, QString(":icons/favourite-strong.png"), NULL));
     334    // weak
     335    mControls.insert(FavouriteControlWeak, new Control(FavouriteControlWeak, QString(":icons/favourite-weak.png"), NULL));
     336    // no
     337    mControls.insert(FavouriteControlNo, new Control(FavouriteControlNo, QString(":icons/favourite-no.png"), NULL));
    313338
    314339    // ALARM ICONs
    315340    // on
    316341    mControls.insert(AlarmControlOn,
    317                     new Control(AlarmControlOn, QString(":icons/alarm-on.png"), mControls[FavouriteControlOn]));
     342                    new Control(AlarmControlOn, QString(":icons/alarm-on.png"), mControls[FavouriteControlStrong]));
    318343    // off
    319344    mControls.insert(AlarmControlOff,
    320                     new Control(AlarmControlOff, QString(":icons/alarm-off.png"), mControls[FavouriteControlOff]));
     345                    new Control(AlarmControlOff, QString(":icons/alarm-off.png"), mControls[FavouriteControlNo]));
    321346    // WARNING ICON
    322347    mControls.insert(WarningControl,
     
    339364    int nrofFavs = 0;
    340365    for(int i=0; i<index.model()->rowCount(index); i++)
    341         if(static_cast<Event*>(index.child(i,0).internalPointer())->isFavourite())
     366        if(static_cast<Event*>(index.child(i,0).internalPointer())->favourite() != Favourite_no)
    342367            nrofFavs++;
    343368
  • src/mvc/delegate.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
     
    3232        {
    3333            ControlNone = 0,
    34             FavouriteControlOn,
    35             FavouriteControlOff,
     34            FavouriteControlStrong,
     35            FavouriteControlWeak,
     36            FavouriteControlNo,
    3637            AlarmControlOn,
    3738            AlarmControlOff,
  • src/mvc/event.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
     
    3232    << QSqlField("type", QVariant::String)
    3333    << QSqlField("language", QVariant::String)
    34     << QSqlField("favourite", QVariant::Bool)
     34    << QSqlField("favourite", QVariant::Int)
    3535    << QSqlField("alarm", QVariant::Bool)
    3636    << QSqlField("tag", QVariant::String)
     
    9191           ( start >= :s1 AND ( start + duration ) < :e1 ) \
    9292        OR ( ( start + duration ) > :s2 AND start < :e2 ) ) \
    93         AND favourite = 1 AND NOT id = :id ORDER BY start, duration");
     93        AND favourite >= 1 AND NOT id = :id ORDER BY start, duration");
    9494    query.bindValue(":conf", event.conferenceId());
    9595    query.bindValue(":s1", convertToDb(event.start(), QVariant::DateTime));
     
    117117    QDateTime dayStart(date, conference.dayChangeTime(), Qt::UTC);
    118118    QSqlQuery query;
    119     query.prepare(selectQuery() + QString("WHERE xid_conference = :conf AND start >= :start AND start < :end AND favourite = 1 ORDER BY start, duration"));
     119    query.prepare(selectQuery() + QString("WHERE xid_conference = :conf AND start >= :start AND start < :end AND favourite >= 1 ORDER BY start, duration"));
    120120    query.bindValue(":conf", conferenceId);
    121121    query.bindValue(":start", dayStart.toTime_t());
     
    193193}
    194194
    195 bool Event::hasTimeConflict() const
    196 {
    197     if(!isFavourite()) // if it's not favourite, it can't have time-conflict
    198         return false;
    199 
    200     return conflictEvents(id(),conferenceId()).count() > 0 ? true : false;
     195Favourite Event::timeConflict() const {
     196    if (favourite() == Favourite_no) // if it's not favourite, it can't have time-conflict
     197        return Favourite_no;
     198
     199    QList<Event> events = conflictEvents(id(),conferenceId());
     200
     201    // find "strongest" conflict
     202    Favourite f = Favourite_no;
     203    for (int i = 0; i != events.size(); ++i) {
     204        switch (events[i].favourite()) {
     205        case Favourite_strong: f = Favourite_strong; break;
     206        case Favourite_weak: if (f == Favourite_no) f = Favourite_weak; break;
     207        case Favourite_no: break;
     208        }
     209    }
     210    return f;
     211
     212}
     213
     214void Event::cycleFavourite(bool back) {
     215    switch (favourite()) {
     216        case Favourite_no: setFavourite(back ? Favourite_weak : Favourite_strong); break;
     217        case Favourite_strong: setFavourite(back ? Favourite_no : Favourite_weak); break;
     218        case Favourite_weak: setFavourite(back ? Favourite_strong : Favourite_no); break;
     219    }
    201220}
    202221
  • src/mvc/event.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
     
    3636};
    3737
     38
     39enum Favourite {Favourite_no=0, Favourite_weak=2, Favourite_strong=1};
     40
     41
    3842class Event : public OrmRecord<Event>
    3943{
     
    6064    QString type() const { return value("type").toString(); }
    6165    QString language() const { return value("language").toString(); }
    62     bool isFavourite() const { return value("favourite").toBool(); }
     66    Favourite favourite() const { return static_cast<Favourite>(value("favourite").toInt()); }
    6367    bool hasAlarm() const { return value("alarm").toBool(); }
    64     bool hasTimeConflict() const;
     68    Favourite timeConflict() const;
    6569    QString tag() const { return value("tag").toString(); }
    6670    QString title() const { return value("title").toString(); }
     
    8286    void setType(const QString & type) { setValue("type", type); }
    8387    void setLanguage(const QString & language) { setValue("language", language); }
    84     void setFavourite(bool favourite) { setValue("favourite", (int)((favourite))); }
     88    void setFavourite(Favourite favourite) { setValue("favourite", (int) favourite); }
     89    void cycleFavourite(bool back = false);
    8590    void setHasAlarm(bool alarm) { setValue("alarm", (int)((alarm))); }
    8691    void setTag(const QString& tag) { setValue("tag", tag); }
  • src/mvc/eventmodel.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/mvc/eventmodel.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/mvc/room.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/mvc/room.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/mvc/track.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
     
    3131    << QSqlField(NAME, QVariant::String));
    3232
    33 class TrackInsertException : OrmSqlException
     33class TrackInsertException : public OrmSqlException
    3434{
    3535public:
     
    4040{
    4141    QSqlQuery query;
    42     query.prepare("INSERT INTO " + sTableName + " (" + CONFERENCEID + "," + NAME + ")" + " VALUES " + "(\"" + QString::number(conferenceid()) + "\",\"" + name() + "\")");
     42    QString trackname = name();
     43    query.prepare(
     44            QString("INSERT INTO %1 (%2, %3) VALUES (:xid_conference, :name)")
     45            .arg(sTableName, CONFERENCEID, NAME));
     46    query.bindValue(":xid_conference", conferenceid());
     47    query.bindValue(":name", trackname);
    4348    if (!query.exec())
    4449    {
    45         throw TrackInsertException("Exec Error");
     50        throw TrackInsertException(
     51                "Inserting track '" + trackname + "' into database failed: " +
     52                query.lastError().text());
    4653    }
    4754    QVariant variant = query.lastInsertId();
  • src/mvc/track.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/mvc/treeview.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
     
    4545
    4646    // test whether we have handled the mouse event
    47     if(!testForControlClicked(index,point))
     47    if(!testForControlClicked(index, point, aEvent->button()))
    4848    {
    4949        // pass the event to the Base class, so item clicks/events are handled correctly
     
    5353
    5454// returns bool if some Control was clicked
    55 bool TreeView::testForControlClicked(const QModelIndex &aIndex, const QPoint &aPoint)
     55bool TreeView::testForControlClicked(const QModelIndex &aIndex, const QPoint &aPoint, Qt::MouseButton button)
    5656{
    5757    bool handled = false;
     
    6565    switch(delegate->whichControlClicked(aIndex,aPoint))
    6666    {
    67         case Delegate::FavouriteControlOn:
    68         case Delegate::FavouriteControlOff:
     67        case Delegate::FavouriteControlStrong:
     68        case Delegate::FavouriteControlWeak:
     69        case Delegate::FavouriteControlNo:
    6970            {
    7071                // handle Favourite Control clicked
     
    7273
    7374                QList<Event> conflicts = Event::conflictEvents(event.id(),Conference::activeConference());
    74                 event.setFavourite(!event.isFavourite());
     75                event.cycleFavourite(button == Qt::RightButton);
    7576                event.update("favourite");
    7677
    77                 if(event.isFavourite())
    78                 {
    79                     // event has became 'favourite' and so 'conflicts' list may have changed
    80                     conflicts = Event::conflictEvents(event.id(),Conference::activeConference());
    81                 }
     78                // event has became 'favourite' and so 'conflicts' list may have changed
     79                conflicts = Event::conflictEvents(event.id(),Conference::activeConference());
    8280
    8381                // have to emit 'eventChanged' signal on all events in conflict
  • src/mvc/treeview.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
     
    3131private:
    3232    void mouseReleaseEvent(QMouseEvent *aEvent);
    33     bool testForControlClicked(const QModelIndex &aIndex, const QPoint &aPoint);
     33    bool testForControlClicked(const QModelIndex &aIndex, const QPoint &aPoint, Qt::MouseButton button);
    3434public slots:
    3535    void setAllExpanded(bool aExpanded); // (aExpanded==true) => expanded; (aExpanded==false) => collapsed
  • src/orm/ormrecord.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
     
    2828#include <QDateTime>
    2929#include <QDebug>
    30 
    31 class OrmException
    32 {
    33 public:
    34     OrmException(const QString& text) : mText(text) {}
     30#include <stdexcept>
     31
     32class OrmException : public std::runtime_error
     33{
     34public:
     35    OrmException(const QString& text) : std::runtime_error(text.toStdString()), mText(text) {}
    3536    virtual ~OrmException(){}
    3637    virtual const QString& text() const { return mText; }
     
    4243{
    4344public:
    44     OrmNoObjectException() : OrmException("No object exception"){}
     45    OrmNoObjectException() : OrmException("SQL query expects one record but found none."){}
    4546    ~OrmNoObjectException(){}
    4647};
  • src/sql/schedulexmlparser.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/sql/schedulexmlparser.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/sql/sqlengine.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
     
    180180    int trackId;
    181181    QString trackName = aEvent["track"];
     182    if (trackName.isEmpty()) trackName = tr("No track");
    182183    try
    183184    {
  • src/sql/sqlengine.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/test/main.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/test/mvc/eventtest.cpp

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
  • src/test/mvc/eventtest.h

    rebe26af r809b5e5  
    11/*
    22 * Copyright (C) 2010 Ixonos Plc.
    3  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
     3 * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
    44 *
    55 * This file is part of ConfClerk.
Note: See TracChangeset for help on using the changeset viewer.