summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-04-05 13:48:52 +0200
committerPali Roh├ír <[email protected]>2017-12-22 09:10:28 +0100
commit5eaca1008688566068aa723baec67434ca068118 (patch)
treed8ea5147a52d424e34813092255fe028978bc95b
parent7feebdd02eac5e6cd97737d3eb152eabae980b4c (diff)
Fix layout in account wizard + Fix virtual method argument + add
Q_DECL_OVERRIDE
-rw-r--r--kopete/addaccountwizard/addaccountwizard.cpp1
-rw-r--r--kopete/kopetedbusinterface.cpp2
-rw-r--r--protocols/bonjour/bonjoureditaccountwidget.cpp4
-rw-r--r--protocols/groupwise/ui/gweditaccountwidget.cpp4
-rw-r--r--protocols/jabber/ui/jabbereditaccountwidget.cpp3
-rw-r--r--protocols/oscar/icq/ui/icqeditaccountwidget.cpp4
-rw-r--r--protocols/oscar/oscarcontact.cpp7
-rw-r--r--protocols/oscar/oscarcontact.h2
-rw-r--r--protocols/qq/qqcontact.cpp7
-rw-r--r--protocols/qq/qqcontact.h4
-rw-r--r--protocols/qq/ui/qqeditaccountwidget.cpp3
-rw-r--r--protocols/testbed/testbededitaccountwidget.cpp3
-rw-r--r--protocols/winpopup/wpeditaccount.cpp3
-rw-r--r--protocols/yahoo/yahoocontact.cpp2
-rw-r--r--protocols/yahoo/yahoocontact.h2
-rw-r--r--protocols/yahoo/yahooeditaccount.cpp3
16 files changed, 39 insertions, 15 deletions
diff --git a/kopete/addaccountwizard/addaccountwizard.cpp b/kopete/addaccountwizard/addaccountwizard.cpp
index 3a661b7..a8a24a0 100644
--- a/kopete/addaccountwizard/addaccountwizard.cpp
+++ b/kopete/addaccountwizard/addaccountwizard.cpp
@@ -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
diff --git a/kopete/kopetedbusinterface.cpp b/kopete/kopetedbusinterface.cpp
index c0a26ad..17284fa 100644
--- a/kopete/kopetedbusinterface.cpp
+++ b/kopete/kopetedbusinterface.cpp
@@ -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));
}
}
}
diff --git a/protocols/bonjour/bonjoureditaccountwidget.cpp b/protocols/bonjour/bonjoureditaccountwidget.cpp
index d734d1c..343872f 100644
--- a/protocols/bonjour/bonjoureditaccountwidget.cpp
+++ b/protocols/bonjour/bonjoureditaccountwidget.cpp
@@ -96,6 +96,10 @@ BonjourEditAccountWidget::BonjourEditAccountWidget(QWidget *parent, Kopete::Acco
m_preferencesWidget->kcfg_emailAddress->setText(emailAddress);
}
}
+ if (parent) {
+ parent->layout()->addWidget(this);
+ }
+
}
BonjourEditAccountWidget::~BonjourEditAccountWidget()
diff --git a/protocols/groupwise/ui/gweditaccountwidget.cpp b/protocols/groupwise/ui/gweditaccountwidget.cpp
index 25b722b..c98e16d 100644
--- a/protocols/groupwise/ui/gweditaccountwidget.cpp
+++ b/protocols/groupwise/ui/gweditaccountwidget.cpp
@@ -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()
diff --git a/protocols/jabber/ui/jabbereditaccountwidget.cpp b/protocols/jabber/ui/jabbereditaccountwidget.cpp
index 580b816..1c26277 100644
--- a/protocols/jabber/ui/jabbereditaccountwidget.cpp
+++ b/protocols/jabber/ui/jabbereditaccountwidget.cpp
@@ -122,6 +122,9 @@ JabberEditAccountWidget::JabberEditAccountWidget (JabberProtocol * proto, Jabber
privacyListsButton->setEnabled (false);
}
+ if (parent) {
+ parent->layout()->addWidget(this);
+ }
}
JabberEditAccountWidget::~JabberEditAccountWidget ()
diff --git a/protocols/oscar/icq/ui/icqeditaccountwidget.cpp b/protocols/oscar/icq/ui/icqeditaccountwidget.cpp
index 3ee6457..d33335f 100644
--- a/protocols/oscar/icq/ui/icqeditaccountwidget.cpp
+++ b/protocols/oscar/icq/ui/icqeditaccountwidget.cpp
@@ -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()
diff --git a/protocols/oscar/oscarcontact.cpp b/protocols/oscar/oscarcontact.cpp
index 00dc279..f7b02f9 100644
--- a/protocols/oscar/oscarcontact.cpp
+++ b/protocols/oscar/oscarcontact.cpp
@@ -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() )
{
diff --git a/protocols/oscar/oscarcontact.h b/protocols/oscar/oscarcontact.h
index b6fd203..7d114f6 100644
--- a/protocols/oscar/oscarcontact.h
+++ b/protocols/oscar/oscarcontact.h
@@ -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 );
diff --git a/protocols/qq/qqcontact.cpp b/protocols/qq/qqcontact.cpp
index b695077..271e44b 100644
--- a/protocols/qq/qqcontact.cpp
+++ b/protocols/qq/qqcontact.cpp
@@ -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;
diff --git a/protocols/qq/qqcontact.h b/protocols/qq/qqcontact.h
index 417f63e..d94cafc 100644
--- a/protocols/qq/qqcontact.h
+++ b/protocols/qq/qqcontact.h
@@ -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
diff --git a/protocols/qq/ui/qqeditaccountwidget.cpp b/protocols/qq/ui/qqeditaccountwidget.cpp
index 241419b..9149baa 100644
--- a/protocols/qq/ui/qqeditaccountwidget.cpp
+++ b/protocols/qq/ui/qqeditaccountwidget.cpp
@@ -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()
diff --git a/protocols/testbed/testbededitaccountwidget.cpp b/protocols/testbed/testbededitaccountwidget.cpp
index dd75d6a..699a139 100644
--- a/protocols/testbed/testbededitaccountwidget.cpp
+++ b/protocols/testbed/testbededitaccountwidget.cpp
@@ -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()
diff --git a/protocols/winpopup/wpeditaccount.cpp b/protocols/winpopup/wpeditaccount.cpp
index f43705d..35dce23 100644
--- a/protocols/winpopup/wpeditaccount.cpp
+++ b/protocols/winpopup/wpeditaccount.cpp
@@ -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();
}
diff --git a/protocols/yahoo/yahoocontact.cpp b/protocols/yahoo/yahoocontact.cpp
index a5ddf74..720abbb 100644
--- a/protocols/yahoo/yahoocontact.cpp
+++ b/protocols/yahoo/yahoocontact.cpp
@@ -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)) );
diff --git a/protocols/yahoo/yahoocontact.h b/protocols/yahoo/yahoocontact.h
index ff32404..1480e5c 100644
--- a/protocols/yahoo/yahoocontact.h
+++ b/protocols/yahoo/yahoocontact.h
@@ -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();
diff --git a/protocols/yahoo/yahooeditaccount.cpp b/protocols/yahoo/yahooeditaccount.cpp
index 1994d8c..86683a4 100644
--- a/protocols/yahoo/yahooeditaccount.cpp
+++ b/protocols/yahoo/yahooeditaccount.cpp
@@ -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();
}