Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 5eaca100 authored by Laurent Montel's avatar Laurent Montel 😁 Committed by Pali Rohár

Fix layout in account wizard + Fix virtual method argument + add

Q_DECL_OVERRIDE
parent 7feebdd0
......@@ -181,7 +181,6 @@ void AddAccountWizard::next()
i18n("Error While Adding Account"));
return;
}
KAssistantDialog::next();
} else if (currentPage()->widget() == d->accountPageWidget) {
// check the data of the page is valid
......
......@@ -332,7 +332,7 @@ void KopeteDBusInterface::sendFile(const QString &contactId, const QString &file
if (destMetaContact && destMetaContact->isReachable()) {
Kopete::Contact *destContact = destMetaContact->execute();
if (destContact && destContact->isFileCapable()) {
destContact->sendFile(QUrl(fileUrl));
destContact->sendFile(QUrl::fromLocalFile(fileUrl));
}
}
}
......
......@@ -96,6 +96,10 @@ BonjourEditAccountWidget::BonjourEditAccountWidget(QWidget *parent, Kopete::Acco
m_preferencesWidget->kcfg_emailAddress->setText(emailAddress);
}
}
if (parent) {
parent->layout()->addWidget(this);
}
}
BonjourEditAccountWidget::~BonjourEditAccountWidget()
......
......@@ -64,7 +64,9 @@ GroupWiseEditAccountWidget::GroupWiseEditAccountWidget( QWidget* parent, Kopete:
QWidget::setTabOrder( m_ui.userId, m_ui.password->mRemembered );
QWidget::setTabOrder( m_ui.password->mRemembered, m_ui.password->mPassword );
QWidget::setTabOrder( m_ui.password->mPassword, m_ui.autoConnect );
if (parent) {
parent->layout()->addWidget(this);
}
}
GroupWiseEditAccountWidget::~GroupWiseEditAccountWidget()
......
......@@ -122,6 +122,9 @@ JabberEditAccountWidget::JabberEditAccountWidget (JabberProtocol * proto, Jabber
privacyListsButton->setEnabled (false);
}
if (parent) {
parent->layout()->addWidget(this);
}
}
JabberEditAccountWidget::~JabberEditAccountWidget ()
......
......@@ -210,7 +210,9 @@ ICQEditAccountWidget::ICQEditAccountWidget(ICQProtocol *protocol,
QWidget::setTabOrder( mAccountSettings->edtAccountId, mAccountSettings->mPasswordWidget->mRemembered );
QWidget::setTabOrder( mAccountSettings->mPasswordWidget->mRemembered, mAccountSettings->mPasswordWidget->mPassword );
QWidget::setTabOrder( mAccountSettings->mPasswordWidget->mPassword, mAccountSettings->chkAutoLogin );
if (parent) {
parent->layout()->addWidget(this);
}
}
ICQEditAccountWidget::~ICQEditAccountWidget()
......
......@@ -353,7 +353,7 @@ void OscarContact::setEncoding( int mib )
//here's where a filetransfer usually begins
//could be called by a QAction or our dcop code or something
void OscarContact::sendFile( const KUrl &sourceURL, const QString &altFileName, uint fileSize )
void OscarContact::sendFile( const QUrl &sourceURL, const QString &altFileName, uint fileSize )
{
kDebug(OSCAR_GEN_DEBUG) << "file: '" << sourceURL
<< "' '" << altFileName << "' size " << fileSize << endl;
......@@ -362,8 +362,9 @@ void OscarContact::sendFile( const KUrl &sourceURL, const QString &altFileName,
//If the file location is null, then get it from a file open dialog
if( !sourceURL.isValid() )
files = KFileDialog::getOpenFileNames( KUrl() ,"*", 0l , i18n( "Kopete File Transfer" ));
else
files << sourceURL.path(KUrl::RemoveTrailingSlash);
else {
//FIXME KF5 files << sourceURL.path(KUrl::RemoveTrailingSlash);
}
if( files.isEmpty() )
{
......
......@@ -131,7 +131,7 @@ public Q_SLOTS:
virtual void userOffline( const QString& ) = 0;
/** send a file to this contact */
virtual void sendFile( const KUrl &sourceURL = KUrl(), const QString &fileName = QString(), uint fileSize = 0L );
void sendFile( const QUrl &sourceURL = KUrl(), const QString &fileName = QString(), uint fileSize = 0L ) Q_DECL_OVERRIDE;
/** set a away message */
virtual void setAwayMessage( const QString &message );
......
......@@ -401,7 +401,7 @@ void QQContact::slotShowProfile()
/**
* FIXME: Make this a standard KMM API call
*/
void QQContact::sendFile( const KUrl &sourceURL, const QString &altFileName, uint /*fileSize*/ )
void QQContact::sendFile( const QUrl &sourceURL, const QString &altFileName, uint /*fileSize*/ )
{
Q_UNUSED(altFileName);
......@@ -410,8 +410,9 @@ void QQContact::sendFile( const KUrl &sourceURL, const QString &altFileName, uin
//If the file location is null, then get it from a file open dialog
if( !sourceURL.isValid() )
filePath = QFileDialog::getOpenFileName(0l , i18n( "Kopete File Transfer" ), QString(), QStringLiteral("*"));
else
filePath = sourceURL.path(KUrl::RemoveTrailingSlash);
else {
//FIXME KF5 filePath = sourceURL.path(KUrl::RemoveTrailingSlash);
}
//kDebug(14140) << "QQContact::sendFile: File chosen to send:" << fileName;
......
......@@ -132,8 +132,8 @@ public:
public Q_SLOTS:
void slotUserInfo() Q_DECL_OVERRIDE;
void deleteContact() Q_DECL_OVERRIDE;
virtual void sendFile( const KUrl &sourceURL = KUrl(),
const QString &fileName = QString(), uint fileSize = 0L );
void sendFile( const QUrl &sourceURL = QUrl(),
const QString &fileName = QString(), uint fileSize = 0L ) Q_DECL_OVERRIDE;
/**
* Every time the kopete's contact list is modified, we sync the serverlist with it
......
......@@ -102,6 +102,9 @@ QQEditAccountWidget::QQEditAccountWidget( QQProtocol *proto, Kopete::Account *ac
QWidget::setTabOrder( d->ui->m_login, d->ui->m_password->mRemembered );
QWidget::setTabOrder( d->ui->m_password->mRemembered, d->ui->m_password->mPassword );
QWidget::setTabOrder( d->ui->m_password->mPassword, d->ui->m_autologin );
if (parent) {
parent->layout()->addWidget(this);
}
}
QQEditAccountWidget::~QQEditAccountWidget()
......
......@@ -35,6 +35,9 @@ TestbedEditAccountWidget::TestbedEditAccountWidget( QWidget* parent, Kopete::Acc
m_preferencesWidget = new Ui::TestbedAccountPreferences();
m_preferencesWidget->setupUi( widget );
layout->addWidget( widget );
if (parent) {
parent->layout()->addWidget(this);
}
}
TestbedEditAccountWidget::~TestbedEditAccountWidget()
......
......@@ -89,6 +89,9 @@ WPEditAccount::WPEditAccount(QWidget *parent, Kopete::Account *theAccount)
}
connect(doInstallSamba, SIGNAL(clicked()), this, SLOT(installSamba()));
if (parent) {
parent->layout()->addWidget(this);
}
show();
}
......
......@@ -373,7 +373,7 @@ void YahooContact::slotSendMessage( Kopete::Message &message )
manager(Kopete::Contact::CanCreate)->messageSucceeded();
}
void YahooContact::sendFile( const KUrl &sourceURL, const QString &fileName, uint fileSize )
void YahooContact::sendFile( const QUrl &sourceURL, const QString &fileName, uint fileSize )
{
Kopete::TransferManager::transferManager()->sendFile( sourceURL, fileName, fileSize,
false, this, SLOT(slotSendFile(KUrl)) );
......
......@@ -77,7 +77,7 @@ public Q_SLOTS:
void slotUserInfo() Q_DECL_OVERRIDE;
virtual void slotSendFile( const KUrl &file );
void deleteContact() Q_DECL_OVERRIDE;
virtual void sendFile( const KUrl &sourceURL = KUrl(), const QString &fileName = QString(), uint fileSize = 0L );
virtual void sendFile(const QUrl &sourceURL = QUrl(), const QString &fileName = QString(), uint fileSize = 0L ) Q_DECL_OVERRIDE;
void slotUserProfile();
void stealthContact();
void requestWebcam();
......
......@@ -94,6 +94,9 @@ YahooEditAccount::YahooEditAccount(YahooProtocol *protocol, Kopete::Account *the
QWidget::setTabOrder( mScreenName, mPasswordWidget->mRemembered );
QWidget::setTabOrder( mPasswordWidget->mRemembered, mPasswordWidget->mPassword );
QWidget::setTabOrder( mPasswordWidget->mPassword, mAutoConnect );
if (parent) {
parent->layout()->addWidget(this);
}
show();
}
......
Markdown is supported
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