Commit bfd6e72f authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix in pimcommon

parent d9a74779
Pipeline #23358 passed with stage
in 12 minutes and 36 seconds
......@@ -50,7 +50,6 @@ set(kldap_LIB_widgets_SRCS
widgets/ldapclientsearch.cpp
widgets/ldapclientsearchconfig.cpp
widgets/ldapconfigurewidget.cpp
#widgets/ldapsearchdialog.cpp
)
set(kldap_LIB_SRCS
......@@ -127,7 +126,6 @@ ecm_generate_headers(KLdapWidgets_CamelCase_HEADERS
LdapClientSearchConfig
LdapClientSearch
AddHostDialog
LdapSearchDialog
LdapClient
LdapConfigureWidget
RELATIVE widgets
......
This diff is collapsed.
/*
* This file is part of libkldap.
*
* Copyright (C) 2002 Klarälvdalens Datakonsult AB
*
* Author: Steffen Hansen <hansen@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
//AK_REVIEW: move back to libkdepim, not ready yet
#ifndef KLDAP_LDAPSEARCHDIALOG_H
#define KLDAP_LDAPSEARCHDIALOG_H
#include "kldap_export.h"
#include <kcontacts/addressee.h>
#include <QDialog>
class QCloseEvent;
namespace KLDAP {
class LdapClient;
class LdapObject;
/**
* @short A dialog to search contacts in a LDAP directory.
*
* This dialog allows the user to search for contacts inside
* a LDAP directory.
*
* @author Steffen Hansen <hansen@kde.org>
* @since 4.5
*/
class KDEPIM_EXPORT LdapSearchDialog : public QDialog
{
Q_OBJECT
public:
enum FilterType {
Name = 0,
Email,
HomeNumber,
WorkNumber
};
/**
* Creates a new ldap search dialog.
*
* @param parent The parent widget.
*/
explicit LdapSearchDialog(QWidget *parent = nullptr);
/**
* Destroys the ldap search dialog.
*/
~LdapSearchDialog() override;
/**
* Sets the @p text in the search line edit.
*/
void setSearchText(const QString &text);
/**
* Returns a list of contacts that have been selected
* in the LDAP search.
*/
KContacts::Addressee::List selectedContacts() const;
Q_SIGNALS:
/**
* This signal is emitted whenever the user clicked the
* 'Add Selected' button.
*/
void contactsAdded();
protected Q_SLOTS:
void slotUser1();
void slotUser2();
void slotCustomContextMenuRequested(const QPoint &);
void slotCancelClicked();
protected:
void closeEvent(QCloseEvent *) override;
private:
//@cond PRIVATE
class Private;
Private *const d;
Q_PRIVATE_SLOT(d, void slotAddResult(const KLDAP::LdapClient &, const KLDAP::LdapObject &))
Q_PRIVATE_SLOT(d, void slotStartSearch())
Q_PRIVATE_SLOT(d, void slotStopSearch())
Q_PRIVATE_SLOT(d, void slotSearchDone())
//@endcond
};
}
Q_DECLARE_METATYPE(KLDAP::LdapSearchDialog::FilterType)
#endif
......@@ -4,10 +4,3 @@ set(testldapclient_SRCS testldapclient.cpp)
add_executable(testldapclient ${testldapclient_SRCS})
target_link_libraries(testldapclient KF5::I18n KF5::Completion KF5::Ldap KF5::CoreAddons)
########### next target ###############
#set(testldapsearchdialog_SRCS ldapsearchdialog_gui.cpp)
#add_executable(ldapsearchdialog_gui ${testldapsearchdialog_SRCS})
#target_link_libraries(ldapsearchdialog_gui KF5::Libkdepim KF5::I18n KF5::CoreAddons Qt5::Widgets KF5::Contacts)
/*
Copyright (c) 2015-2020 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#include <QApplication>
#include <QCommandLineParser>
#include <QStandardPaths>
#include "../src/libkdepim/ldap/ldapsearchdialog.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QCommandLineParser parser;
//We can't use it otherwise we need to call kbuilsyscoca in test mode too.
//QStandardPaths::setTestModeEnabled(true);
parser.addVersionOption();
parser.addHelpOption();
parser.process(app);
KLDAP::LdapSearchDialog dlg;
dlg.exec();
return app.exec();
}
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