Changeset 809b5e5 for src/gui


Ignore:
Timestamp:
08/30/17 20:38:27 (5 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

Location:
src/gui
Files:
34 edited

Legend:

Unmodified
Added
Removed
  • 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.
Note: See TracChangeset for help on using the changeset viewer.