Пример #1
0
QByteArray UIServer::open_RenameDlg64(int id, const QString &caption, const QString &src, const QString &dest, int mode, KIO::filesize_t sizeSrc,
                                      KIO::filesize_t sizeDest, unsigned long ctimeSrc, unsigned long ctimeDest, unsigned long mtimeSrc,
                                      unsigned long mtimeDest)
{
    // Hide existing dialog box if any
    ProgressItem *item = findItem(id);
    if(item)
        setItemVisible(item, false);
    QString newDest;
    kdDebug(7024) << "Calling KIO::open_RenameDlg" << endl;
    KIO::RenameDlg_Result result = KIO::open_RenameDlg(caption, src, dest, (KIO::RenameDlg_Mode)mode, newDest, sizeSrc, sizeDest, (time_t)ctimeSrc,
                                                       (time_t)ctimeDest, (time_t)mtimeSrc, (time_t)mtimeDest);
    kdDebug(7024) << "KIO::open_RenameDlg done" << endl;
    QByteArray data;
    QDataStream stream(data, IO_WriteOnly);
    stream << Q_UINT8(result) << newDest;
    if(item && result != KIO::R_CANCEL)
        setItemVisible(item, true);
    return data;
}
Пример #2
0
QDataStream & operator << (QDataStream & str, const Account & a)
{
  str
    << a.accname
    << a.name
    << a.server
    << a.smtp
    << a.user
    << a.s_user
    << a.password
    << a.s_password
    << a.from
    << a.reply
    << a.mbox
    << a.speed
    << a.calendarFolder
    << a.contactsFolder
    << a.notesFolder
    << a.todoFolder
    << Q_UINT8(a.leave)
    << Q_UINT8(a.sync)
    << Q_UINT8(a.sorted)
    << Q_UINT8(a.enabled)
    << Q_UINT8(a.haspassword)
    << Q_UINT8(a.s_haspassword)
    << Q_UINT8(a.ssl)
    << Q_UINT8(a.s_ssl)
    << Q_UINT8(a.tls)
    << Q_UINT8(a.s_tls)
    << Q_UINT8(a.useCertificates)
    << Q_UINT8(a.s_useCertificates)
    << Q_UINT8(a.getdisabled)
    << Q_UINT8(a.passentered)
    << Q_UINT8(a.persistence)
    << Q_UINT8(a.groupware)
    << Q_UINT8(a.groupType)
    << Q_UINT32(a.port)
    << Q_UINT32(a.s_port)
    << Q_UINT32(a.max_dl)
    << Q_UINT32(a.type)
    << Q_UINT32(a.s_type)
    << Q_UINT32(a.auth)
    << Q_UINT32(a.s_auth)
    << Q_UINT32(a.max_action)
    ;

  return str;
}