コード例 #1
0
ファイル: KDbConnectionData.cpp プロジェクト: KDE/kdb
KDB_EXPORT QDebug operator<<(QDebug dbg, const KDbConnectionData& data)
{
    dbg.nospace() << "CONNDATA";
    KDbDriverManager mananager;
    const KDbDriverMetaData *metaData = mananager.driverMetaData(data.driverId());
    dbg.nospace()
        << " databaseName=" << data.databaseName()
        << " caption=" << data.caption()
        << " description=" << data.description()
        << " driverId=" << data.driverId()
        << " userName="******" hostName=" << data.hostName()
        << " port=" << data.port()
        << " useLocalSocketFile=" << data.useLocalSocketFile()
        << " localSocketFileName=" << data.localSocketFileName()
        << " password="******"*").repeated(data.password().length()) /* security */
        << " savePassword="******" isPasswordNeeded=" <<
           qPrintable(metaData ? QString::number(data.isPasswordNeeded())
                     : QString::fromLatin1("[don't know, no valid driverId]"))
        << " userVisibleString=" << data.toUserVisibleString();
    return dbg.nospace();
}
コード例 #2
0
void KexiPasswordPage::setConnectionData(const KDbConnectionData &data)
{
    setPassword(data.savePassword() ? data.password() : QString());
    setUserName(data.userName());
    setServer(data.toUserVisibleString(KDbConnectionData::NoUserVisibleStringOption));
}