本文整理汇总了C++中IAccount::GetLastUploadDateTime方法的典型用法代码示例。如果您正苦于以下问题:C++ IAccount::GetLastUploadDateTime方法的具体用法?C++ IAccount::GetLastUploadDateTime怎么用?C++ IAccount::GetLastUploadDateTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IAccount
的用法示例。
在下文中一共展示了IAccount::GetLastUploadDateTime方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addAccount
void AccountsSettings::addAccount (QObjectList accObjects)
{
IBookmarksService *ibs = qobject_cast<IBookmarksService*> (sender ());
if (!ibs)
{
qWarning () << Q_FUNC_INFO
<< sender ()
<< "ins't IBookmarksService";
return;
}
QObjectList accounts;
Q_FOREACH (QObject *accObj, accObjects)
{
IAccount *account = qobject_cast<IAccount*> (accObj);
if (Id2Account_.contains (account->GetAccountID ()))
continue;
if (!account->GetPassword ().isEmpty ())
Core::Instance ().SavePassword (accObj);
else
account->SetPassword (Core::Instance ().GetPassword (accObj));
Id2Account_ [account->GetAccountID ()] = accObj;
accounts << accObj;
const QModelIndex& index = GetServiceIndex (ibs->GetObject ());
QStandardItem *parentItem = 0;
if (!index.isValid ())
{
parentItem = new QStandardItem (ibs->GetServiceIcon (), ibs->GetServiceName ());
parentItem->setEditable (false);
Item2Service_ [parentItem] = ibs;
AccountsModel_->appendRow (parentItem);
}
else
parentItem = AccountsModel_->itemFromIndex (index);
QList<QStandardItem*> record;
QStandardItem *item = new QStandardItem (account->GetLogin ());
item->setEditable (false);
item->setCheckable (true);
item->setCheckState (account->IsSyncing () ? Qt::Checked : Qt::Unchecked);
if (account->IsSyncing ())
{
Core::Instance ().AddActiveAccount (accObj);
IBookmarksService *ibs = qobject_cast<IBookmarksService*> (account->GetParentService ());
ibs->DownloadBookmarks (account->GetObject (), account->GetLastDownloadDateTime ());
ibs->UploadBookmarks (account->GetObject (), Core::Instance ().GetAllBookmarks ());
}
Item2Account_ [item] = account;
QStandardItem *uploaditem = new QStandardItem (account->GetLastUploadDateTime ()
.toString (Qt::DefaultLocaleShortDate));
uploaditem->setEditable (false);
QStandardItem *downloaditem = new QStandardItem (account->GetLastDownloadDateTime ()
.toString (Qt::DefaultLocaleShortDate));
uploaditem->setEditable (false);
record << item
<< uploaditem
<< downloaditem;
parentItem->appendRow (record);
if (account->IsSyncing ())
Core::Instance ().AddActiveAccount (accObj);
Ui_.AccountsView_->expandAll ();
Scheduled_ = false;
ScheduleResize ();
}