diff options
author | Luiz Agostini <luiz.agostini@openbossa.org> | 2009-11-16 17:08:40 -0300 |
---|---|---|
committer | Luiz Agostini <luiz.agostini@openbossa.org> | 2009-11-16 19:02:35 -0300 |
commit | bda3892ba96da3103c978fee7fa81cc7d289bfb1 (patch) | |
tree | 23b3913f7505482b6f260fb7359fda2b7eabde31 | |
parent | 84a0a088e961b9490d8969e022d8ad1f5e830f6d (diff) |
Weather: maemo constants.
Signed-off-by: Luiz Agostini <luiz.agostini@openbossa.org>
-rw-r--r-- | shoplist/src/gesturebox.cpp | 22 | ||||
-rw-r--r-- | weather/citylist.cpp | 2 | ||||
-rw-r--r-- | weather/gesturebox.cpp | 4 | ||||
-rw-r--r-- | weather/settings.cpp | 2 |
4 files changed, 16 insertions, 14 deletions
diff --git a/shoplist/src/gesturebox.cpp b/shoplist/src/gesturebox.cpp index 16ae620..cd348bf 100644 --- a/shoplist/src/gesturebox.cpp +++ b/shoplist/src/gesturebox.cpp @@ -42,8 +42,8 @@ // GestureData -#ifdef Q_OS_SYMBIAN -static const int move_threshold = 20; +#ifdef QT_ARCH_ARM +static const int move_threshold = 30; #else static const int move_threshold = 5; #endif @@ -271,16 +271,18 @@ void GestureObserver::viewDestroyed() QWidget *viewport = qobject_cast<QWidget*>(sender()); if (viewport || m_views.contains(viewport)) { ViewData *data = m_views.take(viewport); - foreach (GestureBox *box, data->m_boxes) { - QList<ViewData*> boxes = m_boxes.values(box); - m_boxes.remove(box); - - foreach(ViewData *viewData, boxes) { - if (viewData->widget() != viewport) - m_boxes.insertMulti(box, viewData); + if (data) { + foreach (GestureBox *box, data->m_boxes) { + QList<ViewData*> boxes = m_boxes.values(box); + m_boxes.remove(box); + + foreach(ViewData *viewData, boxes) { + if (viewData->widget() != viewport) + m_boxes.insertMulti(box, viewData); + } } + delete data; } - delete data; } } diff --git a/weather/citylist.cpp b/weather/citylist.cpp index faccda6..d3ac7fd 100644 --- a/weather/citylist.cpp +++ b/weather/citylist.cpp @@ -37,7 +37,7 @@ static inline qreal getCenterVerticalPos(QGraphicsItem *item) // CityListScrollBox -#ifdef Q_OS_SYMBIAN +#ifdef QT_ARCH_ARM static const int acceleration_factor = 12; #else static const int acceleration_factor = 64; diff --git a/weather/gesturebox.cpp b/weather/gesturebox.cpp index ca4a882..cd348bf 100644 --- a/weather/gesturebox.cpp +++ b/weather/gesturebox.cpp @@ -42,8 +42,8 @@ // GestureData -#ifdef Q_OS_SYMBIAN -static const int move_threshold = 20; +#ifdef QT_ARCH_ARM +static const int move_threshold = 30; #else static const int move_threshold = 5; #endif diff --git a/weather/settings.cpp b/weather/settings.cpp index 75be736..49061ba 100644 --- a/weather/settings.cpp +++ b/weather/settings.cpp @@ -58,7 +58,7 @@ Settings *Settings::instance() QSize Settings::windowSize() { -#ifdef Q_OS_SYMBIAN +#ifdef QT_ARCH_ARM static const QSize result(QApplication::desktop()->screenGeometry().size()); #else static const QSize result(instance()->m_settings.value("windowSize").toSize()); |