1
/* Copyright 2010, 2011 Thomas McGuire <mcguire@kde.org>
2
Copyright 2011 Roeland Jago Douma <unix@rullzer.com>
4
This library is free software; you can redistribute it and/or modify
5
it under the terms of the GNU Library General Public License as published
6
by the Free Software Foundation; either version 2 of the License or
7
( at your option ) version 3 or, at the discretion of KDE e.V.
8
( which shall act as a proxy as in section 14 of the GPLv3 ), any later version.
10
This library is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
Library General Public License for more details.
15
You should have received a copy of the GNU Library General Public License
16
along with this library; see the file COPYING.LIB. If not, write to
17
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
Boston, MA 02110-1301, USA.
2
Copyright 2010, 2011 Thomas McGuire <mcguire@kde.org>
3
Copyright 2011 Roeland Jago Douma <unix@rullzer.com>
5
This library is free software; you can redistribute it and/or modify
6
it under the terms of the GNU Library General Public License as published
7
by the Free Software Foundation; either version 2 of the License or
8
( at your option ) version 3 or, at the discretion of KDE e.V.
9
( which shall act as a proxy as in section 14 of the GPLv3 ), any later version.
11
This library is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
Library General Public License for more details.
16
You should have received a copy of the GNU Library General Public License
17
along with this library; see the file COPYING.LIB. If not, write to
18
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
Boston, MA 02110-1301, USA.
20
22
#include "facebookresource.h"
21
23
#include "settings.h"
22
24
#include "settingsdialog.h"
48
50
setItemStreamingEnabled( true );
50
52
Item::List noteItems;
51
foreach( const KFbAPI::NoteInfo ¬eInfo, listJob->allNotes() ) {
53
foreach ( const KFbAPI::NoteInfo ¬eInfo, listJob->allNotes() ) {
53
55
note.setRemoteId( noteInfo.id() );
54
56
note.setPayload<KMime::Message::Ptr>( noteInfo.asNote() );
82
84
mCurrentJobs.removeAll( job );
84
86
if ( noteJob->error() ) {
85
abortWithError( i18n( "Unable to get information about note from server: %1", noteJob->errorText() ) );
87
abortWithError( i18n( "Unable to get information about note from server: %1",
88
noteJob->errorText() ) );
87
90
Item note = noteJob->property( "Item" ).value<Item>();
88
91
note.setPayload( noteJob->noteInfo().first().asNote() );