Commit 71a61899 authored by Jonathan Marten's avatar Jonathan Marten
Browse files

Port deprecated QFlags(0) -> default constructor

parent a1f83f0c
......@@ -729,7 +729,7 @@ void KopeteChatWindow::addTab(ChatView *view)
: QIcon::fromTheme(view->msgManager()->protocol()->pluginIcon());
view->setParent(m_tabBar);
view->setWindowFlags(0);
view->setWindowFlags(Qt::WindowFlags());
view->move(QPoint());
view->show();
......@@ -748,7 +748,7 @@ void KopeteChatWindow::setPrimaryChatView(ChatView *view)
//TODO figure out what else we have to save here besides the font
//reparent clears a lot of stuff out
view->setParent(mainArea);
view->setWindowFlags(0);
view->setWindowFlags(Qt::WindowFlags());
view->move(QPoint());
view->show();
......
......@@ -70,7 +70,7 @@ StatusConfig_Manager::StatusConfig_Manager(QWidget *parent)
cbStatusCategory->addItem(icon, i18n("Invisible"), Kopete::OnlineStatusManager::Invisible);
icon = Kopete::OnlineStatusManager::pixmapForCategory(Kopete::OnlineStatusManager::Offline);
cbStatusCategory->addItem(icon, i18n("Offline"), Kopete::OnlineStatusManager::Offline);
icon = Kopete::OnlineStatusManager::pixmapForCategory(0x00);
icon = Kopete::OnlineStatusManager::pixmapForCategory(Kopete::OnlineStatusManager::Category());
cbStatusCategory->addItem(icon, i18n("Do Not Change"), 0x00);
statusView->expandAll();
......
......@@ -117,7 +117,7 @@ KabcExportWizard::KabcExportWizard(QWidget *parent)
lvi->setFlags(Qt::ItemIsUserCheckable|Qt::ItemIsEnabled);
} else {
lvi->setText(lvi->text() + alreadyIn);
lvi->setFlags(0);
lvi->setFlags(Qt::ItemFlags());
}
}
}
......
......@@ -125,8 +125,8 @@ OnlineStatus::OnlineStatus(StatusType status, unsigned weight, Protocol *protoco
d->overlayIcons = overlayIcons;
d->protocol = protocol;
d->description = description;
d->categories = 0x00;
d->options = 0x00;
d->categories = OnlineStatusManager::Categories();
d->options = OnlineStatusManager::Options();
}
OnlineStatus::OnlineStatus(StatusType status, unsigned weight, Protocol *protocol, unsigned internalStatus, const QStringList &overlayIcons, const QString &description, const QString &caption,
......@@ -153,8 +153,8 @@ OnlineStatus::OnlineStatus(StatusType status)
d->internalStatus = 0;
d->weight = 0;
d->protocol = nullptr;
d->categories = 0x00;
d->options = 0x00;
d->categories = OnlineStatusManager::Categories();
d->options = OnlineStatusManager::Options();
switch (status) {
case Online:
......@@ -188,8 +188,8 @@ OnlineStatus::OnlineStatus()
d->weight = 0;
d->protocol = nullptr;
d->overlayIcons = QStringList(QLatin1String("status_unknown"));
d->categories = 0x00;
d->options = 0x00;
d->categories = OnlineStatusManager::Categories();
d->options = OnlineStatusManager::Options();
}
OnlineStatus::OnlineStatus(const OnlineStatus &other)
......
......@@ -221,8 +221,10 @@ public:
* A status may be in several categories, or in none.
* There shouldn't be more than one status per protocol per categories.
*/
OnlineStatus(StatusType status, unsigned weight, Protocol *protocol, unsigned internalStatus, const QStringList &overlayIcon, const QString &description, const QString &caption,
OnlineStatusManager::Categories categories = 0x0, OnlineStatusManager::Options options = 0x0);
OnlineStatus(StatusType status, unsigned weight, Protocol *protocol, unsigned internalStatus,
const QStringList &overlayIcon, const QString &description, const QString &caption,
OnlineStatusManager::Categories categories = OnlineStatusManager::Categories(),
OnlineStatusManager::Options options = OnlineStatusManager::Options());
/**
* Constructor.
......
......@@ -150,7 +150,7 @@ void AddressBookSelectorWidget::slotAddAddresseeClicked()
//Kopete::KABCPersistence::self()->writeAddressBook( 0 );
slotLoadAddressees();
// select the addressee we just added
QList<QTreeWidgetItem *> added = addresseeListView->findItems(addresseeName, 0, 1);
QList<QTreeWidgetItem *> added = addresseeListView->findItems(addresseeName, Qt::MatchFlag(), 1);
foreach (QTreeWidgetItem *wi, added) {
wi->setSelected(true);
addresseeListView->scrollToItem(wi, QAbstractItemView::EnsureVisible);
......
......@@ -106,7 +106,7 @@ void HistoryPlugin::convertOldHistory()
if (!contactId.isEmpty()) {
progressDlg->setLabelText(i18n("Parsing the old history in %1:\n%2", fi.fileName(), contactId));
qApp->processEvents(0); //make sure the text is updated in the progressDlg
qApp->processEvents(); //make sure the text is updated in the progressDlg
int month = 0;
int year = 0;
......
......@@ -112,7 +112,7 @@ public:
{
if ( !index.isValid() )
{
return 0;
return Qt::ItemFlags();
}
return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
}
......
......@@ -64,19 +64,19 @@ AIMStatusManager::AIMStatusManager()
QList<PresenceType> data;
data << PresenceType( Presence::Offline, OnlineStatus::Offline, OFFLINE, OFFLINE, i18n( "O&ffline" ), i18n("Offline"), QStringList(), Kopete::OnlineStatusManager::Offline, 0, PresenceType::FlagsList() << Presence::None << Presence::ICQ << Presence::Invisible );
data << PresenceType( Presence::Offline, OnlineStatus::Offline, OFFLINE, OFFLINE, i18n( "O&ffline" ), i18n("Offline"), QStringList(), Kopete::OnlineStatusManager::Offline, Kopete::OnlineStatusManager::Option(), PresenceType::FlagsList() << Presence::None << Presence::ICQ << Presence::Invisible );
data << PresenceType( Presence::DoNotDisturb, OnlineStatus::Busy, SET_DND, IS_DND, i18n( "&Do Not Disturb" ), i18n("Do Not Disturb"), QStringList(QStringLiteral("contact_busy_overlay")), Kopete::OnlineStatusManager::Busy, Kopete::OnlineStatusManager::HasStatusMessage, PresenceType::FlagsList() << Presence::ICQ << (Presence::ICQ | Presence::Invisible) );
data << PresenceType( Presence::Occupied, OnlineStatus::Busy, SET_OCC, IS_OCC, i18n( "O&ccupied" ), i18n("Occupied"), QStringList(QStringLiteral("contact_busy_overlay")), 0, Kopete::OnlineStatusManager::HasStatusMessage, PresenceType::FlagsList() << Presence::ICQ << (Presence::ICQ | Presence::Invisible) );
data << PresenceType( Presence::Occupied, OnlineStatus::Busy, SET_OCC, IS_OCC, i18n( "O&ccupied" ), i18n("Occupied"), QStringList(QStringLiteral("contact_busy_overlay")), Kopete::OnlineStatusManager::Category(), Kopete::OnlineStatusManager::HasStatusMessage, PresenceType::FlagsList() << Presence::ICQ << (Presence::ICQ | Presence::Invisible) );
data << PresenceType( Presence::NotAvailable, OnlineStatus::Away, SET_NA, IS_NA, i18n( "Not A&vailable" ), i18n("Not Available"), QStringList(QStringLiteral("contact_xa_overlay")), Kopete::OnlineStatusManager::ExtendedAway, Kopete::OnlineStatusManager::HasStatusMessage, PresenceType::FlagsList() << Presence::ICQ << (Presence::ICQ | Presence::Invisible) );
data << PresenceType( Presence::Away, OnlineStatus::Away, SET_AWAY, IS_AWAY, i18n( "&Away" ), i18n("Away"), QStringList(QStringLiteral("contact_away_overlay")), Kopete::OnlineStatusManager::Away, Kopete::OnlineStatusManager::HasStatusMessage, PresenceType::FlagsList() << Presence::None << Presence::Invisible << Presence::ICQ << (Presence::ICQ | Presence::Invisible) << Presence::Wireless << (Presence::Wireless | Presence::Invisible) );
data << PresenceType( Presence::FreeForChat, OnlineStatus::Online, SET_FFC, IS_FFC, i18n( "&Free for Chat" ), i18n("Free For Chat"), QStringList(QStringLiteral("icq_ffc")), Kopete::OnlineStatusManager::FreeForChat, 0, PresenceType::FlagsList() << Presence::ICQ << (Presence::ICQ | Presence::Invisible) );
data << PresenceType( Presence::FreeForChat, OnlineStatus::Online, SET_FFC, IS_FFC, i18n( "&Free for Chat" ), i18n("Free For Chat"), QStringList(QStringLiteral("icq_ffc")), Kopete::OnlineStatusManager::FreeForChat, Kopete::OnlineStatusManager::Option(), PresenceType::FlagsList() << Presence::ICQ << (Presence::ICQ | Presence::Invisible) );
data << PresenceType( Presence::Online, OnlineStatus::Online, ONLINE, ONLINE, i18n( "O&nline" ), i18n("Online"), QStringList(), Kopete::OnlineStatusManager::Online, 0, PresenceType::FlagsList() << Presence::None << Presence::Invisible << Presence::ICQ << (Presence::ICQ | Presence::Invisible) << Presence::Wireless << (Presence::Wireless | Presence::Invisible) );
data << PresenceType( Presence::Online, OnlineStatus::Online, ONLINE, ONLINE, i18n( "O&nline" ), i18n("Online"), QStringList(), Kopete::OnlineStatusManager::Online, Kopete::OnlineStatusManager::Option(), PresenceType::FlagsList() << Presence::None << Presence::Invisible << Presence::ICQ << (Presence::ICQ | Presence::Invisible) << Presence::Wireless << (Presence::Wireless | Presence::Invisible) );
setPresenceType( data );
......
......@@ -72,17 +72,17 @@ ICQStatusManager::ICQStatusManager()
QList<PresenceType> data;
data << PresenceType( Presence::Offline, OnlineStatus::Offline, OFFLINE, OFFLINE, i18n( "O&ffline" ), i18n("Offline"), QStringList(), Kopete::OnlineStatusManager::Offline, 0, PresenceType::FlagsList() << Presence::None << Presence::AIM << Presence::Invisible );
data << PresenceType( Presence::Offline, OnlineStatus::Offline, OFFLINE, OFFLINE, i18n( "O&ffline" ), i18n("Offline"), QStringList(), Kopete::OnlineStatusManager::Offline, Kopete::OnlineStatusManager::Option(), PresenceType::FlagsList() << Presence::None << Presence::AIM << Presence::Invisible );
data << PresenceType( Presence::DoNotDisturb, OnlineStatus::Busy, SET_DND, IS_DND, i18n( "&Do Not Disturb" ), i18n("Do Not Disturb"), QStringList(QStringLiteral("contact_busy_overlay")), Kopete::OnlineStatusManager::Busy, Kopete::OnlineStatusManager::HasStatusMessage, PresenceType::FlagsList() << Presence::None << Presence::Invisible << Presence::Wireless << (Presence::Wireless | Presence::Invisible) );
data << PresenceType( Presence::Occupied, OnlineStatus::Busy, SET_OCC, IS_OCC, i18n( "O&ccupied" ), i18n("Occupied"), QStringList(QStringLiteral("contact_busy_overlay")), 0, Kopete::OnlineStatusManager::HasStatusMessage, PresenceType::FlagsList() << Presence::None << Presence::Invisible );
data << PresenceType( Presence::Occupied, OnlineStatus::Busy, SET_OCC, IS_OCC, i18n( "O&ccupied" ), i18n("Occupied"), QStringList(QStringLiteral("contact_busy_overlay")), Kopete::OnlineStatusManager::Category(), Kopete::OnlineStatusManager::HasStatusMessage, PresenceType::FlagsList() << Presence::None << Presence::Invisible );
data << PresenceType( Presence::NotAvailable, OnlineStatus::Away, SET_NA, IS_NA, i18n( "Not A&vailable" ), i18n("Not Available"), QStringList(QStringLiteral("contact_xa_overlay")), Kopete::OnlineStatusManager::ExtendedAway, Kopete::OnlineStatusManager::HasStatusMessage, PresenceType::FlagsList() << Presence::None << Presence::Invisible );
data << PresenceType( Presence::Away, OnlineStatus::Away, SET_AWAY, IS_AWAY, i18n( "&Away" ), i18n("Away"), QStringList(QStringLiteral("contact_away_overlay")), Kopete::OnlineStatusManager::Away, Kopete::OnlineStatusManager::HasStatusMessage, PresenceType::FlagsList() << Presence::None << Presence::Invisible << Presence::AIM << (Presence::AIM | Presence::Invisible) << Presence::Wireless << (Presence::Wireless | Presence::Invisible) );
data << PresenceType( Presence::FreeForChat, OnlineStatus::Online, SET_FFC, IS_FFC, i18n( "&Free for Chat" ), i18n("Free For Chat"), QStringList(QStringLiteral("icq_ffc")), Kopete::OnlineStatusManager::FreeForChat, 0, PresenceType::FlagsList() << Presence::None << Presence::Invisible );
data << PresenceType( Presence::FreeForChat, OnlineStatus::Online, SET_FFC, IS_FFC, i18n( "&Free for Chat" ), i18n("Free For Chat"), QStringList(QStringLiteral("icq_ffc")), Kopete::OnlineStatusManager::FreeForChat, Kopete::OnlineStatusManager::Option(), PresenceType::FlagsList() << Presence::None << Presence::Invisible );
data << PresenceType( Presence::Online, OnlineStatus::Online, ONLINE, ONLINE, i18n( "O&nline" ), i18n("Online"), QStringList(), Kopete::OnlineStatusManager::Online, Kopete::OnlineStatusManager::HasStatusMessage, PresenceType::FlagsList() << Presence::None << Presence::Invisible << Presence::AIM << (Presence::AIM | Presence::Invisible) << Presence::Wireless << (Presence::Wireless | Presence::Invisible) );
......
......@@ -29,7 +29,7 @@ OContact::OContact()
m_type = 0xFFFF;
m_tlvLength = 0;
m_waitingAuth = false;
m_caps = 0;
m_caps = Oscar::Capabilities();
}
OContact::OContact( const QString &name, int gid, int bid, int type, const QList<TLV> &tlvlist, int tlvLength )
......
......@@ -35,9 +35,9 @@ OscarProtocol::OscarProtocol( QObject *parent, bool canAddMyself )
clientFeatures("clientFeatures", i18n("Client Features"), 0),
buddyIconHash("iconHash", i18n("Buddy Icon MD5 Hash"), QString(), Kopete::PropertyTmpl::PersistentProperty | Kopete::PropertyTmpl::PrivateProperty),
contactEncoding("contactEncoding", i18n("Contact Encoding"), QString(), Kopete::PropertyTmpl::PersistentProperty | Kopete::PropertyTmpl::PrivateProperty),
memberSince("memberSince", i18n("Member Since"), QString(), 0),
client("client", i18n("Client"), QString(), 0),
protocolVersion("protocolVersion", i18n("Protocol Version"), QString(), 0)
memberSince("memberSince", i18n("Member Since"), QString(), Kopete::PropertyTmpl::PropertyOption()),
client("client", i18n("Client"), QString(), Kopete::PropertyTmpl::PropertyOption()),
protocolVersion("protocolVersion", i18n("Protocol Version"), QString(), Kopete::PropertyTmpl::PropertyOption())
{
KConfigGroup config( KSharedConfig::openConfig(), "OscarProtocol" );
if ( config.hasKey( "StartFlapSequences" ) )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment