Changeset 3329d39 for src


Ignore:
Timestamp:
04/16/10 14:14:19 (12 years ago)
Author:
kirilma <kirilma@…>
Branches:
master, qt5
Children:
a61c5f5
Parents:
2eda137
Message:

use visible notifications of errors

also early detect parsing errors

Location:
src
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • src/app/app.pro

    r2eda137 r3329d39  
    44DESTDIR = ../bin
    55QT += sql xml network dbus
     6CONFIG(maemo5) {
     7    QT += maemo5
     8}
    69
    710# module dependencies
  • src/app/application.cpp

    r2eda137 r3329d39  
    1818 */
    1919#include "application.h"
     20#include "errormessage.h"
    2021
    2122#include <ormrecord.h>
     
    2930        return QApplication::notify(receiver, event);
    3031    } catch (OrmException& e) {
    31         qWarning() << "UNCAUGHT EXCEPTION: OrmException, text= " << e.text();
     32        error_message("UNCAUGHT OrmException: " + e.text());
    3233        return false;
    3334    } catch (...) {
    34         qWarning() << "UNCAUGHT EXCEPTION: unknown";
     35        error_message("UNCAUGHT EXCEPTION: unknown");
    3536        return false;
    3637    }
  • src/gui/gui.pro

    r2eda137 r3329d39  
    8282    settingsdialog.cpp
    8383
     84HEADERS += errormessage.h
     85SOURCES += errormessage.cpp
     86CONFIG(maemo5) {
     87    QT += maemo5
     88}
     89
    8490#maemo {
    8591#    FORMS += alarmdialog.ui
  • src/gui/importschedulewidget.cpp

    r2eda137 r3329d39  
    3535
    3636#include "conference.h"
     37#include "errormessage.h"
    3738
    3839// const QString SCHEDULE_URL = "http://fosdem.org/2010/schedule/xml";
     
    114115    if ( aReply->error() != QNetworkReply::NoError )
    115116    {
    116         qDebug() << "Error occured during download: " << aReply->errorString();
     117        error_message(QString("Error occured during download: ") + aReply->errorString());
    117118    }
    118119    else
     
    209210    importScheduleLabel->setText("Schedule:");
    210211
    211     emit(scheduleImported(confId));
    212 }
    213 
     212    if (confId > 0) {
     213        emit(scheduleImported(confId));
     214    }
     215}
     216
  • src/sql/schedulexmlparser.cpp

    r2eda137 r3329d39  
    2323#include "schedulexmlparser.h"
    2424#include "sqlengine.h"
     25#include "../gui/errormessage.h"
    2526
    2627#include <QDebug>
     
    3435{
    3536    QDomDocument document;
    36     document.setContent (aData, false);
     37    QString xml_error;
     38    if (!document.setContent (aData, false, &xml_error)) {
     39        error_message("Could not parse schedule: " + xml_error);
     40        return -1;
     41    }
    3742
    3843    QDomElement scheduleElement = document.firstChildElement("schedule");
Note: See TracChangeset for help on using the changeset viewer.