Commit 00e3d513 authored by Volker Krause's avatar Volker Krause

Properly namespace this dialog, and don't compile it twice.

parent 51480c31
......@@ -210,7 +210,7 @@ void Ldap::edit()
KLDAP::LdapClientSearchConfig clientSearchConfig;
KConfigGroup group = clientSearchConfig.config()->group(QStringLiteral("LDAP"));
clientSearchConfig.readConfig(server, group, m_entry, true);
AddHostDialog dlg(&server, 0);
KLDAP::AddHostDialog dlg(&server, 0);
if (dlg.exec() && !server.host().isEmpty()) { //krazy:exclude=crashy
clientSearchConfig.writeConfig(server, group, m_entry, true);
......
......@@ -197,7 +197,6 @@ endif()
set( kcm_ldap_SRCS
ldap/addhostdialog.cpp
ldap/kcmldap.cpp
)
......
......@@ -32,6 +32,8 @@
#include <QPushButton>
#include <QVBoxLayout>
using namespace KLDAP;
AddHostDialog::AddHostDialog(KLDAP::LdapServer *server, QWidget *parent)
: QDialog(parent)
{
......
......@@ -25,13 +25,13 @@
#include "libkdepim/kdepim_export.h"
#include <qdialog.h>
class QPushButton;
namespace KLDAP
{
class LdapConfigWidget;
class LdapServer;
}
class QPushButton;
class KDEPIM_EXPORT AddHostDialog : public QDialog
{
Q_OBJECT
......@@ -55,4 +55,6 @@ private:
QPushButton *mOkButton;
};
}
#endif // ADDHOSTDIALOG_H
......@@ -140,7 +140,7 @@ void KCMLdap::slotItemClicked(QListWidgetItem *item)
void KCMLdap::slotAddHost()
{
KLDAP::LdapServer server;
AddHostDialog dlg(&server, dialogParent());
KLDAP::AddHostDialog dlg(&server, dialogParent());
if (dlg.exec() && !server.host().isEmpty()) { //krazy:exclude=crashy
new LDAPItem(mHostListView, server);
......@@ -157,7 +157,7 @@ void KCMLdap::slotEditHost()
}
KLDAP::LdapServer server = item->server();
AddHostDialog dlg(&server, dialogParent());
KLDAP::AddHostDialog dlg(&server, dialogParent());
dlg.setWindowTitle(i18n("Edit Host"));
if (dlg.exec() && !server.host().isEmpty()) { //krazy:exclude=crashy
......
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