Hello @all,

I'm new on kopete-devel-list.

Actually i use SIM for Instant Messaging. Now, I want change to kopete, but i 
don't want to loose my chat history. So, i want to try to write converter.


In the first step i don't want to include it to kopete. I want only use 
libkopete.


Now, i don't sure how i have to start.  I have tried following lines:
========
#include <iostream>
#include <QObject>
#include <kopete/kopeteaccountmanager.h>
#include <kopete/kopeteaccount.h>
#include <kopete/kopeteidentitymanager.h>
#include <kopete/kopetecontactlist.h>
#include <Qt>
#include <kurl.h>

using namespace Kopete;
using namespace std;

int main()
{
    IdentityManager::self()->load();

    AccountManager* myAccMng = 0;
    myAccMng = AccountManager::self();

    std::cout << "HaveAccount: ";
    if(myAccMng)
    {
        std::cout << "YES\n";
    }else{
        std::cout << "NO\n";
        return -1;
    }

    //cout << "Any Connected: "  << myAccMng->isAnyAccountConnected() << "\n";

    myAccMng->load();
    //Kopete::ContactList::self()->load();

    QList<Account*> myList = myAccMng->accounts();
   // QList<Account*>::iterator itAccList = myList.begin();
    QListIterator<Account*> itAccList( myList );



    //cout << "Begin: " << myList.begin() << " End: " << myList.end() << "\n";
    cout << "Number of Elements: " << myList.count() << "\n";

    Account* pAcc;
    int i=0;

    while( itAccList.hasNext() )
    {
        cout << i;
        pAcc = itAccList.next();
        std::cout << pAcc->accountLabel().toStdString() << "\n";
    }

    return 0;
}
========



But this  not the right way. I get no Data and after execution i get following 
message.
========
Starte 
/home/theakki/versionsverwaltung/git/Kopete_sim/ConvSimKopete/ConvSimKopete...
HaveAccount: YES
Number of Elements: 0
unnamed app(8355)/libkopete 
Kopete::PluginManagerPrivate::~PluginManagerPrivate: Destructing plugin 
manager without going through the shutdown process! Backtrace is:  
"[
0: /usr/lib/libkdecore.so.5(kRealBacktrace(int)+0x35) [0x7f8f586f2465]
1: /usr/lib/libkopete.so.4(+0xd5edf) [0x7f8f5d392edf]
2: /lib/x86_64-linux-gnu/libc.so.6(exit+0xe1) [0x7f8f5b476961]
3: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x106) [0x7f8f5b45bf06]
4: 
/home/theakki/versionsverwaltung/git/Kopete_sim/ConvSimKopete/ConvSimKopete() 
[0x400fa9]
]
" 
========

I have tried to understand the source code, but i don't now the problem. Can 
somebody help me?

Nice regards,
The_Akki

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
kopete-devel mailing list
kopete-devel@kde.org
https://mail.kde.org/mailman/listinfo/kopete-devel

Reply via email to