From: Akos Polster Date: Thu, 7 Oct 2010 23:47:29 +0000 (+0200) Subject: Initial steps to keep library in a database. X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;h=93fbe8b73cf764ff513cc8931a86bb44a7439756;p=dorian Initial steps to keep library in a database. --- diff --git a/bookview.cpp b/bookview.cpp index c665865..dbc9ab9 100644 --- a/bookview.cpp +++ b/bookview.cpp @@ -16,12 +16,6 @@ #include "trace.h" #include "progress.h" -#ifdef Q_WS_MAC -# define ICON_PREFIX ":/icons/mac/" -#else -# define ICON_PREFIX ":/icons/" -#endif - BookView::BookView(QWidget *parent): QWebView(parent), contentIndex(-1), mBook(0), restorePositionAfterLoad(false), positionAfterLoad(0), loaded(false), diff --git a/dorian.pro b/dorian.pro index 72a6be6..a131804 100644 --- a/dorian.pro +++ b/dorian.pro @@ -30,7 +30,8 @@ SOURCES += \ model/bookfinder.cpp \ widgets/listwindow.cpp \ widgets/progress.cpp \ - widgets/adopterwindow.cpp + widgets/adopterwindow.cpp \ + platform.cpp HEADERS += \ mainwindow.h \ @@ -63,7 +64,8 @@ HEADERS += \ widgets/progress.h \ widgets/adopterwindow.h \ widgets/listview.h \ - model/xmlhandler.h + model/xmlhandler.h \ + platform.h RESOURCES += \ dorian.qrc diff --git a/mainwindow.cpp b/mainwindow.cpp index 6511bd9..40fa621 100755 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -39,12 +39,6 @@ # include "modeltest.h" #endif -#ifdef Q_WS_MAC -# define ICON_PREFIX ":/icons/mac/" -#else -# define ICON_PREFIX ":/icons/" -#endif - const int PROGRESS_HEIGHT = 17; static const char *DORIAN_VERSION = #include "pkg/version.txt" diff --git a/model/ncxhandler.h b/model/ncxhandler.h index 2da3633..8d5947f 100644 --- a/model/ncxhandler.h +++ b/model/ncxhandler.h @@ -20,7 +20,7 @@ public: if (name == "text") { contentTitle = currentText; } else if (name == "navPoint") { - qDebug() << "BcxHander::endElement: url" << contentUrl << "title" + qDebug() << "NcxHander::endElement: url" << contentUrl << "title" << contentTitle << "id" << contentId; Book::ContentItem item; item.href = contentUrl; diff --git a/pkg/changelog b/pkg/changelog index 7eee2bc..b0eb939 100644 --- a/pkg/changelog +++ b/pkg/changelog @@ -1,3 +1,9 @@ +dorian (0.2.3-1) unstable; urgency=low + + * Keep library data in database + + -- Akos Polster Thu, 8 Oct 2010 02:00:00 +0200 + dorian (0.2.2-1) unstable; urgency=low * Speed up book parsing diff --git a/pkg/version.txt b/pkg/version.txt index 92195dc..b5160a7 100644 --- a/pkg/version.txt +++ b/pkg/version.txt @@ -1 +1 @@ -"0.2.2" +"0.2.3" diff --git a/widgets/adopterwindow.cpp b/widgets/adopterwindow.cpp index 0c734c0..6e0eb96 100644 --- a/widgets/adopterwindow.cpp +++ b/widgets/adopterwindow.cpp @@ -7,14 +7,9 @@ #endif // Q_WS_MAEMO_5 #include "adopterwindow.h" +#include "platform.h" #include "trace.h" -#ifdef Q_WS_MAC -# define ICON_PREFIX ":/icons/mac/" -#else -# define ICON_PREFIX ":/icons/" -#endif - AdopterWindow::AdopterWindow(QWidget *parent): QMainWindow(parent), grabbingZoomKeys(false), mainChild(0) { @@ -138,8 +133,8 @@ QAction *AdopterWindow::addToolBarAction(QObject *receiver, Trace t("AdopterWindow::addToolBarAction"); qDebug() << "icon" << iconName << "text" << text; #ifndef Q_OS_SYMBIAN - return toolBar->addAction(QIcon(ICON_PREFIX + iconName + ".png"), text, - receiver, member); + return toolBar->addAction(QIcon(Platform::icon(iconName)), + text, receiver, member); #else Q_UNUSED(iconName); QAction *action = new QAction(text, this); diff --git a/widgets/translucentbutton.cpp b/widgets/translucentbutton.cpp index 73fb2d6..d643df2 100644 --- a/widgets/translucentbutton.cpp +++ b/widgets/translucentbutton.cpp @@ -1,14 +1,9 @@ #include #include "translucentbutton.h" +#include "platform.h" #include "trace.h" -#ifdef Q_WS_MAC -# define ICON_PREFIX ":/icons/mac/" -#else -# define ICON_PREFIX ":/icons/" -#endif - const int TranslucentButton::pixels = 95; TranslucentButton::TranslucentButton(const QString &name_, QWidget *parent): @@ -26,7 +21,7 @@ void TranslucentButton::paintEvent(QPaintEvent *) QPainter painter(this); if (!transparent) { painter.setRenderHint(QPainter::Antialiasing, true); - painter.drawPixmap(0, 0, QPixmap(ICON_PREFIX + name + ".png").scaled( + painter.drawPixmap(0, 0, QPixmap(Platform::icon(name)).scaled( QSize(pixels, pixels), Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); } else {