schedule.en.xml is now in resource
authorpavelpa <pavelpa@localhost>
Tue, 19 Jan 2010 12:06:09 +0000 (12:06 +0000)
committerpavelpa <pavelpa@localhost>
Tue, 19 Jan 2010 12:06:09 +0000 (12:06 +0000)
 - for testing only
 - will be removed from final application

src/app/app.pro
src/app/main.cpp
src/gui/mainwindow.cpp
src/schedule.qrc [new file with mode: 0644]

index fae9f9e..02fe6a0 100644 (file)
@@ -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
 
index f39da7a..f8ac9da 100644 (file)
@@ -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"));
index 5f7a5e3..ac971ad 100644 (file)
@@ -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 (file)
index 0000000..814136b
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+    <file>schedule.en.xml</file>
+</qresource>
+</RCC>