]> ToastFreeware Gitweb - toast/confclerk.git/commitdiff
Merge branch 'master' into qt5
authorgregor herrmann <gregoa@debian.org>
Wed, 11 Jan 2017 20:35:17 +0000 (21:35 +0100)
committergregor herrmann <gregoa@debian.org>
Wed, 11 Jan 2017 20:35:17 +0000 (21:35 +0100)
1  2 
src/gui/eventdialog.cpp
src/gui/mainwindow.h
src/gui/searchhead.h
src/mvc/conferencemodel.h
src/mvc/delegate.cpp
src/mvc/delegate.h
src/mvc/eventmodel.cpp
src/sql/sqlengine.cpp

diff --combined src/gui/eventdialog.cpp
index 1b2d4763e3988624110991caf01e88f6a8e3c640,d9da630712beeda1ad89ae600a7b30dee7c1b197..fe9daba4745d721002c6006e70357d64979c05a9
@@@ -1,6 -1,6 +1,6 @@@
  /*
   * Copyright (C) 2010 Ixonos Plc.
-  * Copyright (C) 2011-2014 Philipp Spitzer, gregor herrmann, Stefan Stahl
+  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
   *
   * This file is part of ConfClerk.
   *
@@@ -38,12 -38,12 +38,12 @@@ EventDialog::EventDialog(int conference
  
      QString info;
      // title
 -    info.append(QString("<h1>%1</h1>\n").arg(Qt::escape(event.title())));
 +    info.append(QString("<h1>%1</h1>\n").arg(event.title().toHtmlEscaped()));
  
      // persons
      info += QString("<h2>%1</h2>\n").arg(tr("Persons"));
      QStringList persons = event.persons();
 -    for (int i = 0; i != persons.size(); ++i) persons[i] = Qt::escape(persons[i]);
 +    for (int i = 0; i != persons.size(); ++i) persons[i] = persons[i].toHtmlEscaped();
      info += QString("<p>%1</p>\n").arg(persons.join(", "));
  
      // abstract
@@@ -63,7 -63,7 +63,7 @@@
          QString name(i.key());
          if (url.isEmpty() || url == "http://") continue;
          if (name.isEmpty()) name = url;
 -        info += QString("<li><a href=\"%1\">%2</a></li>\n").arg(Qt::escape(url), Qt::escape(name));
 +        info += QString("<li><a href=\"%1\">%2</a></li>\n").arg(url.toHtmlEscaped(), name.toHtmlEscaped());
      }
      info += QString("</ul>\n");
      eventInfoTextBrowser->setHtml(info);
diff --combined src/gui/mainwindow.h
index 9f4bf9f545b70eaed0bc62f95f707bd038e6ca1c,d957d3c004de8d1b77a9ee91ee1c42aa2848d9f9..5c657721fc23823a88bebbf3b75ff13b57d9a0e4
@@@ -1,6 -1,6 +1,6 @@@
  /*
   * Copyright (C) 2010 Ixonos Plc.
-  * Copyright (C) 2011-2014 Philipp Spitzer, gregor herrmann, Stefan Stahl
+  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
   *
   * This file is part of ConfClerk.
   *
@@@ -20,7 -20,7 +20,7 @@@
  #ifndef MAINWINDOW_H
  #define MAINWINDOW_H
  
 -#include <QtGui/QMainWindow>
 +#include <QtWidgets>
  
  #include "ui_mainwindow.h"
  
diff --combined src/gui/searchhead.h
index a53b43e5cd4dbe5d6ab5154cc3d4504916fc36bf,ac854000ade4747438ecdec9dc38006ef302a221..d7ebd29558003e9bb59280329df64f815c465350
@@@ -1,6 -1,6 +1,6 @@@
  /*
   * Copyright (C) 2010 Ixonos Plc.
-  * Copyright (C) 2011-2014 Philipp Spitzer, gregor herrmann, Stefan Stahl
+  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
   *
   * This file is part of ConfClerk.
   *
@@@ -20,7 -20,7 +20,7 @@@
  #ifndef SEARCHHEAD_H
  #define SEARCHHEAD_H
  
 -#include <QtGui/QWidget>
 +#include <QtWidgets>
  #include <QDebug>
  #include "ui_searchhead.h"
  
index 63f32176fa273aff6a9010b1e8772ee570d862b6,e90920c0c7c2fb43da0ea1fcdce107082381c838..de4d282fb41b78e05e5ee894674c61e39fc235b7
@@@ -1,6 -1,6 +1,6 @@@
  /*
   * Copyright (C) 2010 Ixonos Plc.
-  * Copyright (C) 2011-2014 Philipp Spitzer, gregor herrmann, Stefan Stahl
+  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
   *
   * This file is part of ConfClerk.
   *
@@@ -52,9 -52,8 +52,9 @@@ private
      // reinitialize list from database
      void reinit()
      {
 +        beginResetModel();
          conferences = Conference::getAll();
 -        reset();
 +        endResetModel();
      }
  
      QList<Conference> conferences;
diff --combined src/mvc/delegate.cpp
index ff873c9cf21361a33cb41a88f240c188abf16370,ef7dc7ac1e4a608f3af2174d5c75e6aecf66db85..e6136598c41dfc9e46b3e297479d89cba7a84033
@@@ -1,6 -1,6 +1,6 @@@
  /*
   * Copyright (C) 2010 Ixonos Plc.
-  * Copyright (C) 2011-2014 Philipp Spitzer, gregor herrmann, Stefan Stahl
+  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
   *
   * This file is part of ConfClerk.
   *
@@@ -214,7 -214,7 +214,7 @@@ void Delegate::paint(QPainter *painter
                  option.rect.x()+SPACER,
                  option.rect.y()+option.rect.height()-fmBig.descent());
          painter->setFont(fontBig);
 -        painter->drawText(titlePointF,qVariantValue<QString>(index.data()));
 +        painter->drawText(titlePointF,index.data().value<QString>());
      }
  
      painter->restore();
diff --combined src/mvc/delegate.h
index 3030813e06e9ebf88b8b770698c163714ea8f6bd,e2857952baf04d6696cde0a818daa4e5b462864b..75921215b0c31cb52c38277b4499bc52f05b1f42
@@@ -1,6 -1,6 +1,6 @@@
  /*
   * Copyright (C) 2010 Ixonos Plc.
-  * Copyright (C) 2011-2014 Philipp Spitzer, gregor herrmann, Stefan Stahl
+  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
   *
   * This file is part of ConfClerk.
   *
@@@ -20,7 -20,7 +20,7 @@@
  #ifndef DELEGATE_H
  #define DELEGATE_H
  
 -#include <QtGui>
 +#include <QtWidgets>
  
  class Delegate : public QItemDelegate
  {
diff --combined src/mvc/eventmodel.cpp
index 406a095644ea4087de19ac3b930b05c7d0cac4d2,4997789e788e17854ed0625576af74d4077204af..e4e236795a88997cef2be967469b28d14edf92db
@@@ -1,6 -1,6 +1,6 @@@
  /*
   * Copyright (C) 2010 Ixonos Plc.
-  * Copyright (C) 2011-2014 Philipp Spitzer, gregor herrmann, Stefan Stahl
+  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
   *
   * This file is part of ConfClerk.
   *
@@@ -44,8 -44,6 +44,8 @@@ void EventModel::Group::setTitle(const 
  // multiple of one hour.
  void EventModel::createTimeGroups()
  {
 +    beginResetModel();
 +
      mGroups.clear();
      mParents.clear();
      if (mEvents.empty()) return;
@@@ -92,7 -90,7 +92,7 @@@
      // the last group needs a title as well
      mGroups.last().setTitle(mEvents);
  
 -    reset();
 +    endResetModel();
  }
  
  void EventModel::createTrackGroups() {
@@@ -176,7 -174,7 +176,7 @@@ QModelIndex EventModel::index(int row, 
  
      if (!parent.isValid())
      {
 -        return createIndex(row, column, 0);
 +        return createIndex(row, column, (quintptr) 0);
      }
      else if (parent.internalId() == 0)
      {
@@@ -201,7 -199,7 +201,7 @@@ QModelIndex EventModel::parent(const QM
  
          Event * event = static_cast<Event*>(index.internalPointer());
  
 -        return createIndex(mParents[event->id()], 0, 0);
 +        return createIndex(mParents[event->id()], 0, (quintptr) 0);
      }
  
      return QModelIndex();
@@@ -230,11 -228,11 +230,11 @@@ int EventModel::rowCount (const QModelI
  
  void EventModel::clearModel()
  {
 +    beginResetModel();
      mGroups.clear();
      mEvents.clear();
      mParents.clear();
 -
 -    reset();
 +    endResetModel();
  }
  
  
diff --combined src/sql/sqlengine.cpp
index ef29650db2e8b6ba5ab8d3edd4721857ffc504ce,9196a3991800233fa933a51c29a2eb145cb18433..01b5144c2cb3097be82bca2dd9ebb9c9467b4968
@@@ -1,6 -1,6 +1,6 @@@
  /*
   * Copyright (C) 2010 Ixonos Plc.
-  * Copyright (C) 2011-2014 Philipp Spitzer, gregor herrmann, Stefan Stahl
+  * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
   *
   * This file is part of ConfClerk.
   *
@@@ -23,9 -23,9 +23,9 @@@
  #include <QSqlRecord>
  #include <QVariant>
  #include <QDateTime>
 +#include <QStandardPaths>
  
  #include <QDir>
 -#include <QDesktopServices>
  #include "sqlengine.h"
  #include "track.h"
  #include "conference.h"
@@@ -36,7 -36,7 +36,7 @@@ const QString DATE_FORMAT ("yyyy-MM-dd"
  const QString TIME_FORMAT ("hh:mm");
  
  SqlEngine::SqlEngine(QObject *aParent): QObject(aParent) {
 -    QDir dbPath(QDesktopServices::storageLocation(QDesktopServices::DataLocation));
 +    QDir dbPath(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
      dbFilename = dbPath.absoluteFilePath("ConfClerk.sqlite");
  }