From 2fc2878d29888f14017353762b3d9ce9fc1907be Mon Sep 17 00:00:00 2001 From: pavelpa Date: Tue, 19 Jan 2010 12:06:09 +0000 Subject: [PATCH] schedule.en.xml is now in resource - for testing only - will be removed from final application --- src/app/app.pro | 3 ++- src/app/main.cpp | 2 ++ src/gui/mainwindow.cpp | 2 +- src/schedule.qrc | 5 +++++ 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 src/schedule.qrc diff --git a/src/app/app.pro b/src/app/app.pro index fae9f9e..02fe6a0 100644 --- a/src/app/app.pro +++ b/src/app/app.pro @@ -12,5 +12,6 @@ TARGETDEPS += $$DESTDIR/libmvc.a $$DESTDIR/libgui.a $$DESTDIR/libsql.a SOURCES += main.cpp RESOURCES += ../icons.qrc \ - ../maps.qrc + ../maps.qrc \ + ../schedule.qrc diff --git a/src/app/main.cpp b/src/app/main.cpp index f39da7a..f8ac9da 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -5,6 +5,8 @@ int main(int argc, char *argv[]) { Q_INIT_RESOURCE(icons); + Q_INIT_RESOURCE(maps); + Q_INIT_RESOURCE(schedule); QApplication a(argc, argv); QApplication::setWindowIcon(QIcon(":/icons/fosdem.png")); diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 5f7a5e3..ac971ad 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -115,7 +115,7 @@ MainWindow::~MainWindow() void MainWindow::importSchedule() { - QFile file("../schedule.en.xml"); + QFile file(":/schedule.en.xml"); if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { qDebug() << "can't open " << file.fileName(); diff --git a/src/schedule.qrc b/src/schedule.qrc new file mode 100644 index 0000000..814136b --- /dev/null +++ b/src/schedule.qrc @@ -0,0 +1,5 @@ + + + schedule.en.xml + + -- 2.30.2