[kmobiletools] KDE/kdepim/kmobiletools/kmobiletools
Marco Gulino
marco at kmobiletools.org
Wed Jun 20 12:18:20 CEST 2007
SVN commit 677981 by gulino:
removing QObject parenthood in KMobileTools::SMS
M +1 -1 engines/at_engine/sms_jobs.h
M +7 -13 libkmobiletools/sms.cpp
M +12 -12 libkmobiletools/sms.h
M +1 -1 libkmobiletools/smslist.cpp
--- trunk/KDE/kdepim/kmobiletools/kmobiletools/engines/at_engine/sms_jobs.h #677980:677981
@@ -34,7 +34,7 @@
public:
ATSMS(const QStringList & numbers, const QString & text );
ATSMS(const QStringList & numbers, const QString & text, const QDateTime & datetime );
- ~ATSMS();
+ virtual ~ATSMS();
//! Return true if the this object is part of a multipart message.
bool isMultiPart() { return concatenated; };
//! Returns the reference number of this message.
--- trunk/KDE/kdepim/kmobiletools/kmobiletools/libkmobiletools/sms.cpp #677980:677981
@@ -59,15 +59,12 @@
}
};
-SMS::SMS(QObject *parent)
- : QObject(parent),
- d(new SMSPrivate(this) )
+SMS::SMS() : d(new SMSPrivate(this) )
{
}
-SMS::SMS(const QStringList & numbers, const QString & text, const QDateTime & datetime, QObject *parent)
- : QObject(parent),
- d(new SMSPrivate(this) )
+SMS::SMS(const QStringList & numbers, const QString & text, const QDateTime & datetime)
+ : d(new SMSPrivate(this) )
{
setNumbers(numbers);
setText(text);
@@ -79,9 +76,8 @@
return d->s_uid;
}
-SMS::SMS(const QStringList & numbers, const QString & text, QObject *parent)
- : QObject(parent),
- d(new SMSPrivate(this) )
+SMS::SMS(const QStringList & numbers, const QString & text)
+ : d(new SMSPrivate(this) )
{
setNumbers(numbers);
setText(text);
@@ -186,9 +182,7 @@
return getMultiText(d->s_text);
}
-#include "sms.moc"
-
/*!
\fn SMS::export(const QString &dir)
*/
@@ -311,9 +305,9 @@
void SMS::setFolder( int newFolder ) { d->i_folder = newFolder; }
int SMS::folder() const { return d->i_folder; }
QList<int> *SMS::idList() { return &(d->v_id); }
-void SMS::setSlot( int newSlot ) { d->i_slot=newSlot; emit updated(); }
+void SMS::setSlot( int newSlot ) { d->i_slot=newSlot; /*emit updated();*/ }
SMS::SMSType SMS::type() const { return d->i_type; }
-void SMS::setType( SMSType newType ) { d->i_type = newType; emit updated(); }
+void SMS::setType( SMSType newType ) { d->i_type = newType;/* emit updated();*/ }
int SMS::slot() const { return d->i_slot; }
bool SMS::unread() const { return d->b_unread; }
void SMS::setUnread(bool unread) { d->b_unread=unread;}
--- trunk/KDE/kdepim/kmobiletools/kmobiletools/libkmobiletools/sms.h #677980:677981
@@ -31,15 +31,14 @@
*/
class SMSPrivate;
-class KMOBILETOOLS_EXPORT SMS : public QObject
+class KMOBILETOOLS_EXPORT SMS
{
-Q_OBJECT
public:
- SMS(QObject *parent = 0);
- SMS(const QStringList & numbers, const QString & text, QObject *parent = 0);
- SMS(const QStringList & numbers, const QString & text, const QDateTime & datetime, QObject *parent = 0);
+ SMS();
+ SMS(const QStringList & numbers, const QString & text);
+ SMS(const QStringList & numbers, const QString & text, const QDateTime & datetime);
- ~SMS();
+ virtual ~SMS();
enum MemorySlot
{ SIM=0x1, Phone=0x2, Unknown=0x10 };
@@ -78,16 +77,17 @@
bool operator ==(SMS* compSMS);
bool unread() const;
void setUnread(bool unread);
-private:
- QSharedDataPointer<SMSPrivate> d;
-/// @TODO remove signals and slots, move them to smslist?
-public Q_SLOTS:
+ bool writeToSlot( const QString &slotDir);
bool exportMD(const QString &dir);
- bool writeToSlot( const QString &slotDir);
bool exportCSV(const QString &filename);
bool writeToSlotCSV( const QString &filename);
+private:
+ QSharedDataPointer<SMSPrivate> d;
+/// @TODO signals and slots removed, now find a way to do this in smslist.
+/*public Q_SLOTS:
+
Q_SIGNALS:
- void updated();
+ void updated();*/
};
#endif
--- trunk/KDE/kdepim/kmobiletools/kmobiletools/libkmobiletools/smslist.cpp #677980:677981
@@ -280,7 +280,7 @@
void SMSList::append( SMS *item )
{
QList<SMS*>::append(item);
- connect(item, SIGNAL(updated()), this, SIGNAL(updated()) );
+// connect(item, SIGNAL(updated()), this, SIGNAL(updated()) );
}
void SMSList::resetCount() const {
More information about the kmobiletools
mailing list