ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #00883
[Branch ~agateau/libindicate-qt/trunk] Rev 99: Ported to libindicate 0.3
------------------------------------------------------------
revno: 99
committer: Aurelien Gateau <aurelien.gateau@xxxxxxxxxxxxx>
branch nick: libindicate-qt
timestamp: Wed 2010-02-10 16:46:12 +0100
message:
Ported to libindicate 0.3
modified:
CMakeLists.txt
src/qindicateindicator.cpp
src/qindicatelistener.cpp
tests/communicationtest.cpp
--
lp:libindicate-qt
https://code.launchpad.net/~agateau/libindicate-qt/trunk
Your team ayatana-commits is subscribed to branch lp:libindicate-qt.
To unsubscribe from this branch go to https://code.launchpad.net/~agateau/libindicate-qt/trunk/+edit-subscription.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2009-09-17 13:34:58 +0000
+++ CMakeLists.txt 2010-02-10 15:46:12 +0000
@@ -1,6 +1,6 @@
project(libindicate_qt)
cmake_minimum_required(VERSION 2.6)
-set(indicate_qt_VERSION 0.2.2)
+set(indicate_qt_VERSION 0.2.3)
# Packaging
set(ARCHIVE_NAME libindicate-qt-${indicate_qt_VERSION})
@@ -16,7 +16,7 @@
add_definitions(-Wall)
-pkg_check_modules(INDICATE REQUIRED indicate>=0.2.1)
+pkg_check_modules(INDICATE REQUIRED indicate>=0.3.2)
include_directories(
${QT_INCLUDE_DIR}
=== modified file 'src/qindicateindicator.cpp'
--- src/qindicateindicator.cpp 2009-09-25 10:29:09 +0000
+++ src/qindicateindicator.cpp 2010-02-10 15:46:12 +0000
@@ -203,7 +203,8 @@
void Indicator::emitDisplay()
{
- indicate_indicator_user_display(d->mGIndicator);
+ uint timestamp = QDateTime::currentDateTime().toTime_t();
+ indicate_indicator_user_display(d->mGIndicator, timestamp);
}
} // namespace
=== modified file 'src/qindicatelistener.cpp'
--- src/qindicatelistener.cpp 2009-09-17 14:57:52 +0000
+++ src/qindicatelistener.cpp 2010-02-10 15:46:12 +0000
@@ -12,6 +12,7 @@
#include "qindicatelistener.h"
// Qt
+#include <QDateTime>
#include <QDebug>
#include <QPointer>
@@ -162,7 +163,7 @@
static void indicatorGetPropertyCB(IndicateListener* listener,
IndicateListenerServer* _server, IndicateListenerIndicator* _indicator,
- gchar* _key, gchar* _value, gpointer data)
+ gchar* _key, const gchar* _value, gpointer data)
{
GetPropertyHelper* helper = static_cast<GetPropertyHelper*>(data);
if (helper->mReceiver) {
@@ -170,7 +171,6 @@
Listener::Indicator* indicator = reinterpret_cast<Listener::Indicator*>(_indicator);
QString key = QString::fromUtf8(_key);
QByteArray value(_value);
- g_free(_value);
QMetaObject::invokeMethod(helper->mReceiver, helper->mMethod.data(),
Q_ARG(QIndicate::Listener::Server*, server),
@@ -263,9 +263,11 @@
QIndicate::Listener::Server* server,
QIndicate::Listener::Indicator* indicator)
{
+ uint timestamp = QDateTime::currentDateTime().toTime_t();
indicate_listener_display(d->mGListener,
reinterpret_cast<IndicateListenerServer*>(server),
- reinterpret_cast<IndicateListenerIndicator*>(indicator));
+ reinterpret_cast<IndicateListenerIndicator*>(indicator),
+ timestamp);
}
bool Listener::getInterest(QIndicate::Listener::Server* server, QIndicate::Interest interest)
=== modified file 'tests/communicationtest.cpp'
--- tests/communicationtest.cpp 2009-09-17 12:20:35 +0000
+++ tests/communicationtest.cpp 2010-02-10 15:46:12 +0000
@@ -82,6 +82,7 @@
// Now we should get some change
mIndicator->show();
+ QTest::qWait(500);
mIndicator->setIndicatorProperty(key, v2);
QTest::qWait(500);