-rw-r--r-- | libopie2/opiecore/device/odevice_htc.cpp | 3 | ||||
-rw-r--r-- | libopie2/opiepim/private/opimeventsortvector.cpp | 9 |
2 files changed, 4 insertions, 8 deletions
diff --git a/libopie2/opiecore/device/odevice_htc.cpp b/libopie2/opiecore/device/odevice_htc.cpp index c21e10d..4e5200b 100644 --- a/libopie2/opiecore/device/odevice_htc.cpp +++ b/libopie2/opiecore/device/odevice_htc.cpp | |||
@@ -420,7 +420,7 @@ bool HTC::setDisplayStatus( bool on ) | |||
420 | Transformation HTC::rotation() const | 420 | Transformation HTC::rotation() const |
421 | { | 421 | { |
422 | qDebug( "HTC::rotation()" ); | 422 | qDebug( "HTC::rotation()" ); |
423 | Transformation rot; | 423 | Transformation rot = Rot270; |
424 | 424 | ||
425 | switch ( d->m_model ) { | 425 | switch ( d->m_model ) { |
426 | case Model_HTC_Universal: | 426 | case Model_HTC_Universal: |
@@ -429,7 +429,6 @@ Transformation HTC::rotation() const | |||
429 | qDebug( "HTC::rotation() - hinge sensor = %d", (int) hs ); | 429 | qDebug( "HTC::rotation() - hinge sensor = %d", (int) hs ); |
430 | if ( hs == CASE_PORTRAIT ) rot = Rot0; | 430 | if ( hs == CASE_PORTRAIT ) rot = Rot0; |
431 | else if ( hs == CASE_UNKNOWN ) rot = Rot270; | 431 | else if ( hs == CASE_UNKNOWN ) rot = Rot270; |
432 | else rot = Rot270; | ||
433 | } | 432 | } |
434 | break; | 433 | break; |
435 | } | 434 | } |
diff --git a/libopie2/opiepim/private/opimeventsortvector.cpp b/libopie2/opiepim/private/opimeventsortvector.cpp index 4220c63..b85f848 100644 --- a/libopie2/opiepim/private/opimeventsortvector.cpp +++ b/libopie2/opiepim/private/opimeventsortvector.cpp | |||
@@ -37,9 +37,7 @@ | |||
37 | namespace Opie { | 37 | namespace Opie { |
38 | namespace Internal { | 38 | namespace Internal { |
39 | 39 | ||
40 | namespace{ | 40 | int testAlarmNotifiers( const OPimNotifyManager& leftnotifiers, const OPimNotifyManager& rightnotifiers ){ |
41 | |||
42 | inline int testAlarmNotifiers( const OPimNotifyManager& leftnotifiers, const OPimNotifyManager& rightnotifiers ){ | ||
43 | OPimNotifyManager::Alarms left_alarms = leftnotifiers.alarms(); | 41 | OPimNotifyManager::Alarms left_alarms = leftnotifiers.alarms(); |
44 | OPimNotifyManager::Alarms right_alarms = rightnotifiers.alarms(); | 42 | OPimNotifyManager::Alarms right_alarms = rightnotifiers.alarms(); |
45 | 43 | ||
@@ -60,20 +58,19 @@ inline int testAlarmNotifiers( const OPimNotifyManager& leftnotifiers, const OPi | |||
60 | } | 58 | } |
61 | } | 59 | } |
62 | 60 | ||
63 | int ret; | 61 | int ret = 0; |
64 | 62 | ||
65 | // Now compare this found alarms | 63 | // Now compare this found alarms |
66 | if ( !left_earliest .isValid() ) ret++; | 64 | if ( !left_earliest .isValid() ) ret++; |
67 | if ( !right_earliest.isValid() ) ret--; | 65 | if ( !right_earliest.isValid() ) ret--; |
68 | 66 | ||
69 | if ( left_earliest.isValid() && right_earliest.isValid() ){ | 67 | if ( left_earliest.isValid() && right_earliest.isValid() ){ |
70 | ret += left_earliest < right_earliest ? -1 : 1; | 68 | left_earliest < right_earliest ? ret-- : ret++; |
71 | } | 69 | } |
72 | 70 | ||
73 | return ret; | 71 | return ret; |
74 | 72 | ||
75 | } | 73 | } |
76 | } | ||
77 | 74 | ||
78 | OPimEventSortVector::OPimEventSortVector( uint size, bool asc, int sort ) | 75 | OPimEventSortVector::OPimEventSortVector( uint size, bool asc, int sort ) |
79 | : OPimSortVector<OPimEvent>( size, asc, sort ) {} | 76 | : OPimSortVector<OPimEvent>( size, asc, sort ) {} |