mirror of
https://github.com/altlinux/admc.git
synced 2025-03-12 00:58:22 +03:00
run clang-format
This commit is contained in:
parent
9fec6f444a
commit
efbef92f20
@ -72,7 +72,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
if (!open_wiki_success) {
|
||||
qCritical() << "Failed to open wiki file:" << wiki_file_path;
|
||||
|
||||
|
||||
return QList<QString>();
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@ int main(int argc, char **argv) {
|
||||
wiki_file.close();
|
||||
|
||||
const QList<QString> out = file_string.split("\n");
|
||||
|
||||
|
||||
return out;
|
||||
}();
|
||||
|
||||
@ -113,7 +113,7 @@ int main(int argc, char **argv) {
|
||||
if (section_start_i == -1) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
int section_end_i = find_next_section(section_start_i + 1);
|
||||
if (section_end_i == -1) {
|
||||
// Last section case
|
||||
@ -126,7 +126,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
out.append(section);
|
||||
|
||||
current_i = section_end_i;
|
||||
current_i = section_end_i;
|
||||
}
|
||||
|
||||
return out;
|
||||
@ -171,11 +171,11 @@ int main(int argc, char **argv) {
|
||||
|
||||
if (!open_section_success) {
|
||||
qCritical() << "Failed to open section file:" << section_file_path;
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
section_file.write(section_file_contents.join("\n").toUtf8());
|
||||
section_file.write(section_file_contents.join("\n").toUtf8());
|
||||
section_file.close();
|
||||
}
|
||||
|
||||
@ -231,7 +231,7 @@ int main(int argc, char **argv) {
|
||||
out.append("</toc>");
|
||||
|
||||
out.append("<keywords></keywords>");
|
||||
|
||||
|
||||
out.append("<files>");
|
||||
for (const QList<QString> §ion : section_list) {
|
||||
const QString path = get_section_path(section);
|
||||
@ -251,7 +251,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
if (!open_qhp_success) {
|
||||
qCritical() << "Failed to open qhp file:" << qhp_file_path;
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -311,7 +311,7 @@ LineType get_line_type(const QList<QString> &line_list) {
|
||||
// it
|
||||
QList<QString> generate_body(const QList<QString> &line_list_const) {
|
||||
QList<QString> out;
|
||||
|
||||
|
||||
QList<QString> line_list = line_list_const;
|
||||
|
||||
// Remove all file links
|
||||
@ -346,7 +346,7 @@ QList<QString> generate_body(const QList<QString> &line_list_const) {
|
||||
|
||||
for (int i = 0; i < out.size(); i++) {
|
||||
QString line = out[i];
|
||||
|
||||
|
||||
// Change quotations into bold text
|
||||
line.replace("«", "<b>");
|
||||
line.replace("»", "</b>");
|
||||
@ -432,7 +432,6 @@ QList<QString> generate_UL(QList<QString> &line_list) {
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
QList<QString> generate_UL_2(QList<QString> &line_list) {
|
||||
QList<QString> out;
|
||||
|
||||
|
@ -38,16 +38,16 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <dirent.h>
|
||||
#include <krb5.h>
|
||||
#include <lber.h>
|
||||
#include <ldap.h>
|
||||
#include <libsmbclient.h>
|
||||
#include <resolv.h>
|
||||
#include <sasl/sasl.h>
|
||||
#include <uuid/uuid.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <uuid/uuid.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QTextCodec>
|
||||
@ -62,7 +62,7 @@
|
||||
#define UNUSED(x) x
|
||||
#endif
|
||||
|
||||
#define UNUSED_ARG(x) (void)(x)
|
||||
#define UNUSED_ARG(x) (void) (x)
|
||||
|
||||
#define MAX_DN_LENGTH 1024
|
||||
#define MAX_PASSWORD_LENGTH 255
|
||||
@ -224,7 +224,7 @@ AdInterface::AdInterface() {
|
||||
|
||||
return (void *) LDAP_OPT_X_TLS_NEVER;
|
||||
}();
|
||||
|
||||
|
||||
ldap_set_option(d->ld, LDAP_OPT_X_TLS_REQUIRE_CERT, cert_strategy);
|
||||
if (result != LDAP_SUCCESS) {
|
||||
option_error("LDAP_OPT_X_TLS_REQUIRE_CERT");
|
||||
@ -269,7 +269,7 @@ AdInterface::AdInterface() {
|
||||
}();
|
||||
|
||||
// Initialize SMB context
|
||||
|
||||
|
||||
// NOTE: initialize only once, because otherwise
|
||||
// wouldn't be able to have multiple active
|
||||
// AdInterface's instances at the same time
|
||||
@ -829,7 +829,7 @@ bool AdInterface::object_add(const QString &dn, const QString &object_class) {
|
||||
const QString error = [this, dn]() {
|
||||
const bool wrong_ou_parent = [&]() {
|
||||
const int ldap_result = d->get_ldap_result();
|
||||
|
||||
|
||||
const bool is_ou = dn.startsWith("OU=");
|
||||
const QString parent = dn_get_parent(dn);
|
||||
const bool bad_parent = parent.startsWith("CN=");
|
||||
@ -1553,7 +1553,7 @@ bool AdInterface::gpo_delete(const QString &dn, bool *deleted_object) {
|
||||
|
||||
attribute_replace_string(linked_object.get_dn(), ATTRIBUTE_GPLINK, gplink.to_string());
|
||||
}
|
||||
|
||||
|
||||
const bool total_success = (delete_gpc_success && delete_gpt_success);
|
||||
|
||||
if (total_success) {
|
||||
@ -1578,7 +1578,7 @@ QString AdInterface::filesys_path_to_smb_path(const QString &filesys_path) const
|
||||
// NOTE: sysvol paths created by windows have this weird
|
||||
// capitalization and smbclient does NOT like it
|
||||
out.replace("\\SysVol\\", "\\sysvol\\");
|
||||
|
||||
|
||||
out.replace("\\", "/");
|
||||
|
||||
const int sysvol_i = out.indexOf("/sysvol/");
|
||||
@ -1612,7 +1612,7 @@ bool AdInterface::gpo_check_perms(const QString &gpo, bool *ok) {
|
||||
|
||||
if (out.isEmpty()) {
|
||||
d->error_message(error_context, tr("Failed to get GPT security descriptor."));
|
||||
|
||||
|
||||
return QString();
|
||||
}
|
||||
|
||||
@ -1642,7 +1642,7 @@ bool AdInterface::gpo_check_perms(const QString &gpo, bool *ok) {
|
||||
break;
|
||||
} else {
|
||||
const bool buffer_is_too_small = (errno == ERANGE);
|
||||
|
||||
|
||||
if (buffer_is_too_small) {
|
||||
// Error occured, but it is due to
|
||||
// insufficient buffer size, so try
|
||||
@ -1787,7 +1787,7 @@ bool AdInterface::gpo_get_sysvol_version(const AdObject &gpc_object, int *versio
|
||||
return -1;
|
||||
}
|
||||
|
||||
return out;
|
||||
return out;
|
||||
}();
|
||||
|
||||
if (version >= 0) {
|
||||
@ -1912,7 +1912,7 @@ bool AdInterfacePrivate::smb_path_is_dir(const QString &path, bool *ok) {
|
||||
*ok = true;
|
||||
|
||||
const bool is_dir = S_ISDIR(filestat.st_mode);
|
||||
|
||||
|
||||
return is_dir;
|
||||
}
|
||||
}
|
||||
@ -1945,13 +1945,13 @@ bool AdInterface::logged_in_as_admin() {
|
||||
if (user_dn.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
const bool user_is_admin = [&]() {
|
||||
const QString domain_admins_dn = QString("CN=Domain Admins,CN=Users,%1").arg(d->domain_head);
|
||||
|
||||
const AdObject domain_admins_object = search_object(domain_admins_dn);
|
||||
const QList<QString> member_list = domain_admins_object.get_strings(ATTRIBUTE_MEMBER);
|
||||
|
||||
|
||||
const bool out = member_list.contains(user_dn);
|
||||
|
||||
return out;
|
||||
@ -2108,25 +2108,25 @@ int sasl_interact_gssapi(LDAP *ld, unsigned flags, void *indefaults, void *in) {
|
||||
|
||||
switch (interact->id) {
|
||||
case SASL_CB_GETREALM:
|
||||
if (defaults)
|
||||
dflt = defaults->realm;
|
||||
break;
|
||||
if (defaults)
|
||||
dflt = defaults->realm;
|
||||
break;
|
||||
case SASL_CB_AUTHNAME:
|
||||
if (defaults)
|
||||
dflt = defaults->authcid;
|
||||
break;
|
||||
if (defaults)
|
||||
dflt = defaults->authcid;
|
||||
break;
|
||||
case SASL_CB_PASS:
|
||||
if (defaults)
|
||||
dflt = defaults->passwd;
|
||||
break;
|
||||
if (defaults)
|
||||
dflt = defaults->passwd;
|
||||
break;
|
||||
case SASL_CB_USER:
|
||||
if (defaults)
|
||||
dflt = defaults->authzid;
|
||||
break;
|
||||
if (defaults)
|
||||
dflt = defaults->authzid;
|
||||
break;
|
||||
case SASL_CB_NOECHOPROMPT:
|
||||
break;
|
||||
break;
|
||||
case SASL_CB_ECHOPROMPT:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
if (dflt && !*dflt) {
|
||||
@ -2155,7 +2155,7 @@ QString get_gpt_sd_string(const AdObject &gpc_object, const AceMaskFormat format
|
||||
|
||||
struct security_descriptor *gpt_sd;
|
||||
const NTSTATUS create_sd_status = gp_create_gpt_security_descriptor(mem_ctx, gpc_sd, &gpt_sd);
|
||||
|
||||
|
||||
if (!NT_STATUS_IS_OK(create_sd_status)) {
|
||||
qDebug() << "Failed to create gpt sd";
|
||||
talloc_free(mem_ctx);
|
||||
@ -2164,7 +2164,7 @@ QString get_gpt_sd_string(const AdObject &gpc_object, const AceMaskFormat format
|
||||
}
|
||||
|
||||
ad_security_sort_dacl(gpt_sd);
|
||||
|
||||
|
||||
QList<QString> all_elements;
|
||||
|
||||
all_elements.append(QString("REVISION:%1").arg(gpt_sd->revision));
|
||||
|
@ -27,8 +27,8 @@
|
||||
#include "ad_filter.h"
|
||||
#include "ad_interface.h"
|
||||
#include "ad_object.h"
|
||||
#include "ad_utils.h"
|
||||
#include "ad_security.h"
|
||||
#include "ad_utils.h"
|
||||
#include "gplink.h"
|
||||
|
||||
#endif /* ADLDAP_H */
|
||||
|
@ -68,7 +68,7 @@ QString Gplink::to_string() const {
|
||||
for (auto gpo : gpo_list) {
|
||||
// Convert gpo dn from lower case to gplink case
|
||||
// format
|
||||
const QString gpo_case = [&]() {
|
||||
const QString gpo_case = [&]() {
|
||||
const QList<QString> rdn_list = gpo.split(",");
|
||||
|
||||
QList<QString> rdn_list_case;
|
||||
@ -76,7 +76,7 @@ QString Gplink::to_string() const {
|
||||
for (const QString &rdn : rdn_list) {
|
||||
const QString rdn_case = [&]() {
|
||||
const QList<QString> attribute_value = rdn.split("=");
|
||||
|
||||
|
||||
// Do no processing if data is malformed
|
||||
if (attribute_value.size() != 2) {
|
||||
return rdn;
|
||||
@ -199,7 +199,7 @@ void Gplink::move_down(const QString &gpo_case) {
|
||||
|
||||
bool Gplink::get_option(const QString &gpo_case, const GplinkOption option) const {
|
||||
const QString gpo = gpo_case.toLower();
|
||||
|
||||
|
||||
if (!contains(gpo)) {
|
||||
return false;
|
||||
}
|
||||
@ -212,7 +212,7 @@ bool Gplink::get_option(const QString &gpo_case, const GplinkOption option) cons
|
||||
|
||||
void Gplink::set_option(const QString &gpo_case, const GplinkOption option, const bool value) {
|
||||
const QString gpo = gpo_case.toLower();
|
||||
|
||||
|
||||
if (!contains(gpo)) {
|
||||
return;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class AboutDialog;
|
||||
class AboutDialog;
|
||||
}
|
||||
|
||||
class AboutDialog : public QDialog {
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "widget_state.h"
|
||||
|
||||
namespace Ui {
|
||||
class ChangeDCDialog;
|
||||
class ChangeDCDialog;
|
||||
}
|
||||
|
||||
class ChangeDCDialog : public QDialog {
|
||||
|
@ -21,8 +21,8 @@
|
||||
#include "changelog_dialog.h"
|
||||
#include "ui_changelog_dialog.h"
|
||||
|
||||
#include "settings.h"
|
||||
#include "config.h"
|
||||
#include "settings.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class ChangelogDialog;
|
||||
class ChangelogDialog;
|
||||
}
|
||||
|
||||
class ChangelogDialog : public QDialog {
|
||||
|
@ -84,7 +84,7 @@ void ConnectionOptionsDialog::reject() {
|
||||
void ConnectionOptionsDialog::reset() {
|
||||
const int port = settings_get_variant(SETTING_port).toInt();
|
||||
ui->port_spinbox->setValue(port);
|
||||
|
||||
|
||||
const bool sasl_nocanon = settings_get_bool(SETTING_sasl_nocanon);
|
||||
ui->canonize_check->setChecked(sasl_nocanon);
|
||||
|
||||
|
@ -34,7 +34,7 @@ extern const QString CERT_STRATEGY_ALLOW;
|
||||
extern const QString CERT_STRATEGY_TRY;
|
||||
|
||||
namespace Ui {
|
||||
class ConnectionOptionsDialog;
|
||||
class ConnectionOptionsDialog;
|
||||
}
|
||||
|
||||
class ConnectionOptionsDialog : public QDialog {
|
||||
@ -49,7 +49,7 @@ public:
|
||||
void accept() override;
|
||||
void reject() override;
|
||||
|
||||
private:
|
||||
private:
|
||||
void reset();
|
||||
void restore_defaults();
|
||||
};
|
||||
|
@ -101,7 +101,7 @@ QVariant ConsoleFilterDialog::save_state() const {
|
||||
|
||||
for (const QString &state_name : button_state_name_map.keys()) {
|
||||
QRadioButton *button = button_state_name_map[state_name];
|
||||
|
||||
|
||||
state[state_name] = button->isChecked();
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ class AdConfig;
|
||||
class QRadioButton;
|
||||
|
||||
namespace Ui {
|
||||
class ConsoleFilterDialog;
|
||||
class ConsoleFilterDialog;
|
||||
};
|
||||
|
||||
class ConsoleFilterDialog final : public QDialog {
|
||||
@ -60,7 +60,7 @@ private:
|
||||
FilterDialog *custom_dialog;
|
||||
QHash<QString, QRadioButton *> button_state_name_map;
|
||||
QVariant original_state;
|
||||
|
||||
|
||||
void on_custom_button();
|
||||
void on_classes_button();
|
||||
};
|
||||
|
@ -21,34 +21,32 @@
|
||||
#include "console_impls/object_impl.h"
|
||||
|
||||
#include "adldap.h"
|
||||
#include "change_dc_dialog.h"
|
||||
#include "console_impls/item_type.h"
|
||||
#include "console_impls/policy_impl.h"
|
||||
#include "console_impls/policy_impl.h"
|
||||
#include "console_impls/query_item_impl.h"
|
||||
#include "console_impls/query_folder_impl.h"
|
||||
#include "console_impls/query_item_impl.h"
|
||||
#include "console_widget/results_view.h"
|
||||
#include "create_computer_dialog.h"
|
||||
#include "create_group_dialog.h"
|
||||
#include "create_ou_dialog.h"
|
||||
#include "create_user_dialog.h"
|
||||
#include "editors/multi_editor.h"
|
||||
#include "find_object_dialog.h"
|
||||
#include "globals.h"
|
||||
#include "password_dialog.h"
|
||||
#include "properties_dialog.h"
|
||||
#include "properties_multi_dialog.h"
|
||||
#include "rename_group_dialog.h"
|
||||
#include "rename_object_dialog.h"
|
||||
#include "rename_other_dialog.h"
|
||||
#include "rename_user_dialog.h"
|
||||
#include "search_thread.h"
|
||||
#include "select_container_dialog.h"
|
||||
#include "select_object_dialog.h"
|
||||
#include "settings.h"
|
||||
#include "status.h"
|
||||
#include "utils.h"
|
||||
#include "create_user_dialog.h"
|
||||
#include "create_group_dialog.h"
|
||||
#include "create_ou_dialog.h"
|
||||
#include "create_computer_dialog.h"
|
||||
#include "rename_object_dialog.h"
|
||||
#include "rename_other_dialog.h"
|
||||
#include "rename_user_dialog.h"
|
||||
#include "rename_group_dialog.h"
|
||||
#include "select_container_dialog.h"
|
||||
#include "change_dc_dialog.h"
|
||||
#include "find_object_dialog.h"
|
||||
#include "select_object_dialog.h"
|
||||
#include "properties_dialog.h"
|
||||
#include "properties_multi_dialog.h"
|
||||
#include "password_dialog.h"
|
||||
#include "editors/multi_editor.h"
|
||||
#include "console_impls/item_type.h"
|
||||
#include "console_widget/results_view.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QMenu>
|
||||
@ -203,7 +201,6 @@ void ObjectImpl::disable_filtering() {
|
||||
filtering_is_ON = false;
|
||||
}
|
||||
|
||||
|
||||
// Load children of this item in scope tree
|
||||
// and load results linked to this scope item
|
||||
void ObjectImpl::fetch(const QModelIndex &index) {
|
||||
@ -1238,7 +1235,7 @@ QList<QString> console_object_search_attributes() {
|
||||
// delete/move/rename for objects that can't do those
|
||||
// actions
|
||||
attributes += ATTRIBUTE_SYSTEM_FLAGS;
|
||||
|
||||
|
||||
attributes += ATTRIBUTE_USER_ACCOUNT_CONTROL;
|
||||
|
||||
return attributes;
|
||||
|
@ -22,9 +22,9 @@
|
||||
#define OBJECT_IMPL_H
|
||||
|
||||
#include "adldap.h"
|
||||
#include "console_widget/console_widget.h"
|
||||
#include "console_widget/console_impl.h"
|
||||
#include "console_impls/my_console_role.h"
|
||||
#include "console_widget/console_impl.h"
|
||||
#include "console_widget/console_widget.h"
|
||||
|
||||
class QStandardItem;
|
||||
class AdObject;
|
||||
@ -73,10 +73,10 @@ public:
|
||||
// this console, they will also get removed from the
|
||||
// buddy console.
|
||||
void set_buddy_console(ConsoleWidget *buddy_console);
|
||||
|
||||
|
||||
void enable_filtering(const QString &filter);
|
||||
void disable_filtering();
|
||||
|
||||
|
||||
void fetch(const QModelIndex &index) override;
|
||||
bool can_drop(const QList<QPersistentModelIndex> &dropped_list, const QSet<int> &dropped_type_list, const QPersistentModelIndex &target, const int target_type) override;
|
||||
void drop(const QList<QPersistentModelIndex> &dropped_list, const QSet<int> &dropped_type_list, const QPersistentModelIndex &target, const int target_type) override;
|
||||
|
@ -21,24 +21,24 @@
|
||||
#include "console_impls/policy_impl.h"
|
||||
|
||||
#include "adldap.h"
|
||||
#include "console_impls/item_type.h"
|
||||
#include "console_impls/object_impl.h"
|
||||
#include "create_policy_dialog.h"
|
||||
#include "globals.h"
|
||||
#include "gplink.h"
|
||||
#include "policy_results_widget.h"
|
||||
#include "properties_dialog.h"
|
||||
#include "rename_policy_dialog.h"
|
||||
#include "select_object_dialog.h"
|
||||
#include "settings.h"
|
||||
#include "status.h"
|
||||
#include "utils.h"
|
||||
#include "rename_policy_dialog.h"
|
||||
#include "select_object_dialog.h"
|
||||
#include "create_policy_dialog.h"
|
||||
#include "console_impls/item_type.h"
|
||||
#include "properties_dialog.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QDebug>
|
||||
#include <QList>
|
||||
#include <QStandardItem>
|
||||
#include <QProcess>
|
||||
#include <QAction>
|
||||
#include <QStandardItem>
|
||||
|
||||
PolicyImpl::PolicyImpl(ConsoleWidget *console_arg)
|
||||
: ConsoleImpl(console_arg) {
|
||||
@ -325,7 +325,7 @@ void PolicyImpl::on_rename_accepted() {
|
||||
if (ad_failed(ad)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
const QModelIndex index = console->get_selected_item(ItemType_Policy);
|
||||
const QString dn = index.data(PolicyRole_DN).toString();
|
||||
const AdObject object = ad.search_object(dn);
|
||||
@ -342,7 +342,7 @@ void console_policy_load(const QList<QStandardItem *> &row, const AdObject &obje
|
||||
void console_policy_load_item(QStandardItem *main_item, const AdObject &object) {
|
||||
main_item->setIcon(QIcon::fromTheme("folder-templates"));
|
||||
main_item->setData(object.get_dn(), PolicyRole_DN);
|
||||
|
||||
|
||||
const QString display_name = object.get_string(ATTRIBUTE_DISPLAY_NAME);
|
||||
main_item->setText(display_name);
|
||||
}
|
||||
|
@ -21,8 +21,8 @@
|
||||
#ifndef POLICY_IMPL_H
|
||||
#define POLICY_IMPL_H
|
||||
|
||||
#include "console_widget/console_widget.h"
|
||||
#include "console_widget/console_impl.h"
|
||||
#include "console_widget/console_widget.h"
|
||||
|
||||
class QStandardItem;
|
||||
class AdObject;
|
||||
@ -75,7 +75,7 @@ private:
|
||||
};
|
||||
|
||||
void console_policy_load(const QList<QStandardItem *> &row, const AdObject &object);
|
||||
void console_policy_load_item(QStandardItem * item, const AdObject &object);
|
||||
void console_policy_load_item(QStandardItem *item, const AdObject &object);
|
||||
QList<QString> console_policy_search_attributes();
|
||||
|
||||
#endif /* POLICY_IMPL_H */
|
||||
|
@ -21,26 +21,26 @@
|
||||
#include "console_impls/policy_root_impl.h"
|
||||
|
||||
#include "adldap.h"
|
||||
#include "console_impls/item_type.h"
|
||||
#include "console_impls/object_impl.h"
|
||||
#include "console_impls/policy_impl.h"
|
||||
#include "console_widget/results_view.h"
|
||||
#include "create_policy_dialog.h"
|
||||
#include "globals.h"
|
||||
#include "gplink.h"
|
||||
#include "policy_results_widget.h"
|
||||
#include "rename_policy_dialog.h"
|
||||
#include "select_object_dialog.h"
|
||||
#include "settings.h"
|
||||
#include "status.h"
|
||||
#include "utils.h"
|
||||
#include "rename_policy_dialog.h"
|
||||
#include "select_object_dialog.h"
|
||||
#include "create_policy_dialog.h"
|
||||
#include "console_impls/item_type.h"
|
||||
#include "console_widget/results_view.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
#include <QList>
|
||||
#include <QMenu>
|
||||
#include <QStandardItem>
|
||||
#include <QProcess>
|
||||
#include <QStandardItem>
|
||||
|
||||
PolicyRootImpl::PolicyRootImpl(ConsoleWidget *console_arg)
|
||||
: ConsoleImpl(console_arg) {
|
||||
|
@ -21,8 +21,8 @@
|
||||
#ifndef POLICY_ROOT_IMPL_H
|
||||
#define POLICY_ROOT_IMPL_H
|
||||
|
||||
#include "console_widget/console_widget.h"
|
||||
#include "console_widget/console_impl.h"
|
||||
#include "console_widget/console_widget.h"
|
||||
|
||||
class QStandardItem;
|
||||
class AdObject;
|
||||
@ -45,7 +45,7 @@ public:
|
||||
QList<QAction *> get_all_custom_actions() const override;
|
||||
QSet<QAction *> get_custom_actions(const QModelIndex &index, const bool single_selection) const override;
|
||||
QSet<StandardAction> get_standard_actions(const QModelIndex &index, const bool single_selection) const override;
|
||||
|
||||
|
||||
QList<QString> column_labels() const override;
|
||||
QList<int> default_columns() const override;
|
||||
|
||||
|
@ -21,17 +21,17 @@
|
||||
#include "console_impls/query_folder_impl.h"
|
||||
|
||||
#include "adldap.h"
|
||||
#include "console_impls/item_type.h"
|
||||
#include "console_impls/object_impl.h"
|
||||
#include "console_impls/query_item_impl.h"
|
||||
#include "globals.h"
|
||||
#include "settings.h"
|
||||
#include "utils.h"
|
||||
#include "console_widget/results_view.h"
|
||||
#include "create_query_folder_dialog.h"
|
||||
#include "create_query_item_dialog.h"
|
||||
#include "edit_query_folder_dialog.h"
|
||||
#include "console_impls/item_type.h"
|
||||
#include "console_widget/results_view.h"
|
||||
#include "edit_query_item_widget.h"
|
||||
#include "globals.h"
|
||||
#include "settings.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QJsonDocument>
|
||||
@ -49,7 +49,7 @@ QueryFolderImpl::QueryFolderImpl(ConsoleWidget *console_arg)
|
||||
copied_is_cut = false;
|
||||
|
||||
set_results_view(new ResultsView(console_arg));
|
||||
|
||||
|
||||
auto create_query_folder_action = new QAction(tr("Query folder"), this);
|
||||
auto create_query_item_action = new QAction(tr("Query item"), this);
|
||||
|
||||
@ -170,7 +170,6 @@ void QueryFolderImpl::drop(const QList<QPersistentModelIndex> &dropped_list, con
|
||||
console_query_move(console, dropped_list, target);
|
||||
}
|
||||
|
||||
|
||||
QList<QAction *> QueryFolderImpl::get_all_custom_actions() const {
|
||||
QList<QAction *> out;
|
||||
|
||||
@ -207,7 +206,7 @@ QSet<StandardAction> QueryFolderImpl::get_standard_actions(const QModelIndex &in
|
||||
out.insert(StandardAction_Copy);
|
||||
out.insert(StandardAction_Paste);
|
||||
}
|
||||
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
|
||||
QList<QString> column_labels() const override;
|
||||
QList<int> default_columns() const override;
|
||||
|
||||
|
||||
private:
|
||||
QAction *new_action;
|
||||
QAction *edit_action;
|
||||
|
@ -21,16 +21,16 @@
|
||||
#include "console_impls/query_item_impl.h"
|
||||
|
||||
#include "adldap.h"
|
||||
#include "console_impls/item_type.h"
|
||||
#include "console_impls/object_impl.h"
|
||||
#include "console_impls/query_folder_impl.h"
|
||||
#include "console_widget/results_view.h"
|
||||
#include "create_query_item_dialog.h"
|
||||
#include "edit_query_item_dialog.h"
|
||||
#include "edit_query_item_widget.h"
|
||||
#include "globals.h"
|
||||
#include "settings.h"
|
||||
#include "utils.h"
|
||||
#include "create_query_item_dialog.h"
|
||||
#include "edit_query_item_dialog.h"
|
||||
#include "console_impls/item_type.h"
|
||||
#include "console_widget/results_view.h"
|
||||
#include "edit_query_item_widget.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QFileDialog>
|
||||
@ -134,7 +134,7 @@ QSet<StandardAction> QueryItemImpl::get_standard_actions(const QModelIndex &inde
|
||||
if (can_refresh && single_selection) {
|
||||
out.insert(StandardAction_Refresh);
|
||||
}
|
||||
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
@ -259,7 +259,7 @@ void QueryItemImpl::on_edit_query_item() {
|
||||
const QModelIndex parent_index = index.parent();
|
||||
const QList<QString> sibling_name_list = get_sibling_name_list(parent_index, index);
|
||||
edit_query_item_dialog->set_sibling_name_list(sibling_name_list);
|
||||
|
||||
|
||||
EditQueryItemWidget *edit_widget = edit_query_item_dialog->edit_widget();
|
||||
|
||||
QString name;
|
||||
|
@ -21,8 +21,8 @@
|
||||
#ifndef CONSOLE_QUERY_H
|
||||
#define CONSOLE_QUERY_H
|
||||
|
||||
#include "console_widget/console_impl.h"
|
||||
#include "console_impls/my_console_role.h"
|
||||
#include "console_widget/console_impl.h"
|
||||
|
||||
enum QueryItemRole {
|
||||
QueryItemRole_Description = MyConsoleRole_LAST + 1,
|
||||
@ -68,7 +68,7 @@ public:
|
||||
|
||||
QList<QString> column_labels() const override;
|
||||
QList<int> default_columns() const override;
|
||||
|
||||
|
||||
private slots:
|
||||
void on_export();
|
||||
|
||||
|
@ -42,7 +42,7 @@ bool ConsoleImpl::can_drop(const QList<QPersistentModelIndex> &dropped_list, con
|
||||
UNUSED_ARG(dropped_type_list);
|
||||
UNUSED_ARG(target);
|
||||
UNUSED_ARG(target_type);
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ void ConsoleImpl::drop(const QList<QPersistentModelIndex> &dropped_list, const Q
|
||||
|
||||
QString ConsoleImpl::get_description(const QModelIndex &index) const {
|
||||
UNUSED_ARG(index);
|
||||
|
||||
|
||||
return QString();
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ QSet<StandardAction> ConsoleImpl::get_standard_actions(const QModelIndex &index,
|
||||
QSet<StandardAction> ConsoleImpl::get_disabled_standard_actions(const QModelIndex &index, const bool single_selection) const {
|
||||
UNUSED_ARG(index);
|
||||
UNUSED_ARG(single_selection);
|
||||
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
@ -106,27 +106,27 @@ void ConsoleImpl::copy(const QList<QModelIndex> &index_list) {
|
||||
void ConsoleImpl::cut(const QList<QModelIndex> &index_list) {
|
||||
UNUSED_ARG(index_list);
|
||||
}
|
||||
|
||||
|
||||
void ConsoleImpl::rename(const QList<QModelIndex> &index_list) {
|
||||
UNUSED_ARG(index_list);
|
||||
}
|
||||
|
||||
|
||||
void ConsoleImpl::delete_action(const QList<QModelIndex> &index_list) {
|
||||
UNUSED_ARG(index_list);
|
||||
}
|
||||
|
||||
|
||||
void ConsoleImpl::paste(const QList<QModelIndex> &index_list) {
|
||||
UNUSED_ARG(index_list);
|
||||
}
|
||||
|
||||
|
||||
void ConsoleImpl::print(const QList<QModelIndex> &index_list) {
|
||||
UNUSED_ARG(index_list);
|
||||
}
|
||||
|
||||
|
||||
void ConsoleImpl::refresh(const QList<QModelIndex> &index_list) {
|
||||
UNUSED_ARG(index_list);
|
||||
}
|
||||
|
||||
|
||||
void ConsoleImpl::properties(const QList<QModelIndex> &index_list) {
|
||||
UNUSED_ARG(index_list);
|
||||
}
|
||||
|
@ -22,10 +22,10 @@
|
||||
#include "console_widget/console_widget_p.h"
|
||||
|
||||
#include "console_widget/console_drag_model.h"
|
||||
#include "console_widget/console_impl.h"
|
||||
#include "console_widget/customize_columns_dialog.h"
|
||||
#include "console_widget/results_view.h"
|
||||
#include "console_widget/scope_proxy_model.h"
|
||||
#include "console_widget/console_impl.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QApplication>
|
||||
@ -36,9 +36,9 @@
|
||||
#include <QSplitter>
|
||||
#include <QStack>
|
||||
#include <QStackedWidget>
|
||||
#include <QToolBar>
|
||||
#include <QTreeView>
|
||||
#include <QVBoxLayout>
|
||||
#include <QToolBar>
|
||||
|
||||
#define SPLITTER_STATE "SPLITTER_STATE"
|
||||
const QString CONSOLE_TREE_STATE = "CONSOLE_TREE_STATE";
|
||||
@ -230,7 +230,7 @@ QList<QStandardItem *> ConsoleWidget::add_results_item(const int type, const QMo
|
||||
// Make item row
|
||||
const QList<QStandardItem *> row = [&]() {
|
||||
QList<QStandardItem *> out;
|
||||
|
||||
|
||||
const int column_count = [&]() {
|
||||
if (parent_item == d->model->invisibleRootItem()) {
|
||||
return 1;
|
||||
@ -319,7 +319,7 @@ QList<QModelIndex> ConsoleWidget::search_items(const QModelIndex &parent, int ro
|
||||
// children
|
||||
const QModelIndex start_index = d->model->index(0, 0, parent);
|
||||
if (start_index.isValid()) {
|
||||
const QList<QModelIndex> descendant_matches= d->model->match(start_index, role, value, -1, Qt::MatchFlags(Qt::MatchExactly | Qt::MatchRecursive));
|
||||
const QList<QModelIndex> descendant_matches = d->model->match(start_index, role, value, -1, Qt::MatchFlags(Qt::MatchExactly | Qt::MatchRecursive));
|
||||
out.append(descendant_matches);
|
||||
}
|
||||
|
||||
@ -701,7 +701,7 @@ bool ConsoleWidgetPrivate::can_drop(const QModelIndex &target) {
|
||||
|
||||
void ConsoleWidgetPrivate::drop(const QModelIndex &target) {
|
||||
const int target_type = target.data(ConsoleRole_Type).toInt();
|
||||
|
||||
|
||||
ConsoleImpl *impl = get_impl(target);
|
||||
impl->drop(dropped_list, dropped_type_list, target, target_type);
|
||||
}
|
||||
@ -719,7 +719,7 @@ void ConsoleWidgetPrivate::fetch_scope(const QModelIndex &index) {
|
||||
|
||||
if (!was_fetched) {
|
||||
model->setData(index, true, ConsoleRole_WasFetched);
|
||||
|
||||
|
||||
ConsoleImpl *impl = get_impl(index);
|
||||
impl->fetch(index);
|
||||
}
|
||||
@ -794,7 +794,7 @@ QSet<int> ConsoleWidgetPrivate::get_selected_types() const {
|
||||
for (const QModelIndex &index : index_list) {
|
||||
const int type = index.data(ConsoleRole_Type).toInt();
|
||||
out.insert(type);
|
||||
}
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ class QMenu;
|
||||
class ConsoleImpl;
|
||||
class ConsoleDragModel;
|
||||
|
||||
#define UNUSED_ARG(x) (void)(x)
|
||||
#define UNUSED_ARG(x) (void) (x)
|
||||
|
||||
enum ConsoleRolePublic {
|
||||
ConsoleRole_Type = Qt::UserRole + 19,
|
||||
|
@ -25,8 +25,8 @@
|
||||
* Private header for ConsoleWidget.
|
||||
*/
|
||||
|
||||
#include "console_widget/results_view.h"
|
||||
#include "console_widget/console_widget.h"
|
||||
#include "console_widget/results_view.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QSet>
|
||||
@ -43,9 +43,9 @@ class ConsoleImpl;
|
||||
enum ConsoleRole {
|
||||
// Determines whether scope item was fetched
|
||||
ConsoleRole_WasFetched = Qt::UserRole + 1,
|
||||
|
||||
|
||||
ConsoleRole_IsScope = Qt::UserRole + 3,
|
||||
|
||||
|
||||
// NOTE: don't go above ConsoleRole_Type and
|
||||
// ConsoleRole_LAST (defined in public header)
|
||||
|
||||
|
@ -47,7 +47,7 @@ ResultsView::ResultsView(QWidget *parent)
|
||||
views[ResultsViewType_Icons] = icons_view;
|
||||
views[ResultsViewType_List] = list_view;
|
||||
views[ResultsViewType_Detail] = m_detail_view;
|
||||
|
||||
|
||||
proxy_model = new QSortFilterProxyModel(this);
|
||||
proxy_model->setSortCaseSensitivity(Qt::CaseInsensitive);
|
||||
|
||||
@ -157,7 +157,6 @@ QList<QModelIndex> ResultsView::get_selected_indexes() const {
|
||||
return source_indexes;
|
||||
}
|
||||
|
||||
|
||||
QVariant ResultsView::save_state() const {
|
||||
QHash<QString, QVariant> state;
|
||||
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
QList<QModelIndex> get_selected_indexes() const;
|
||||
|
||||
QVariant save_state() const;
|
||||
|
||||
|
||||
// NOTE: if state is empty, default columns are shown
|
||||
// and others are hidden
|
||||
void restore_state(const QVariant &state, const QList<int> &default_columns);
|
||||
|
@ -42,5 +42,5 @@ bool ScopeProxyModel::filterAcceptsRow(int source_row, const QModelIndex &source
|
||||
|
||||
const bool is_scope = source_index.data(ConsoleRole_IsScope).toBool();
|
||||
|
||||
return is_scope;
|
||||
return is_scope;
|
||||
}
|
||||
|
@ -22,9 +22,9 @@
|
||||
#include "ui_create_computer_dialog.h"
|
||||
|
||||
#include "adldap.h"
|
||||
#include "utils.h"
|
||||
#include "edits/sam_name_edit.h"
|
||||
#include "edits/upn_edit.h"
|
||||
#include "utils.h"
|
||||
|
||||
CreateComputerDialog::CreateComputerDialog(QWidget *parent)
|
||||
: CreateObjectDialog(parent) {
|
||||
|
@ -26,7 +26,7 @@
|
||||
class SamNameEdit;
|
||||
|
||||
namespace Ui {
|
||||
class CreateComputerDialog;
|
||||
class CreateComputerDialog;
|
||||
}
|
||||
|
||||
class CreateComputerDialog final : public CreateObjectDialog {
|
||||
|
@ -22,12 +22,12 @@
|
||||
#include "ui_create_group_dialog.h"
|
||||
|
||||
#include "adldap.h"
|
||||
#include "utils.h"
|
||||
#include "edits/string_edit.h"
|
||||
#include "edits/sam_name_edit.h"
|
||||
#include "edits/upn_edit.h"
|
||||
#include "edits/group_scope_edit.h"
|
||||
#include "edits/group_type_edit.h"
|
||||
#include "edits/sam_name_edit.h"
|
||||
#include "edits/string_edit.h"
|
||||
#include "edits/upn_edit.h"
|
||||
#include "utils.h"
|
||||
|
||||
CreateGroupDialog::CreateGroupDialog(QWidget *parent)
|
||||
: CreateObjectDialog(parent) {
|
||||
|
@ -26,7 +26,7 @@
|
||||
class SamNameEdit;
|
||||
|
||||
namespace Ui {
|
||||
class CreateGroupDialog;
|
||||
class CreateGroupDialog;
|
||||
}
|
||||
|
||||
class CreateGroupDialog final : public CreateObjectDialog {
|
||||
|
@ -26,9 +26,9 @@
|
||||
#include "status.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QLineEdit>
|
||||
#include <QPushButton>
|
||||
|
||||
void CreateObjectDialog::init(QLineEdit *name_edit_arg, QDialogButtonBox *button_box, const QList<AttributeEdit *> &edits_list, const QList<QLineEdit *> &required_list, const QList<QWidget *> &widget_list, const QString &object_class) {
|
||||
name_edit = name_edit_arg;
|
||||
|
@ -22,10 +22,10 @@
|
||||
#include "ui_create_ou_dialog.h"
|
||||
|
||||
#include "adldap.h"
|
||||
#include "utils.h"
|
||||
#include "edits/protect_deletion_edit.h"
|
||||
#include "edits/string_edit.h"
|
||||
#include "edits/upn_edit.h"
|
||||
#include "edits/protect_deletion_edit.h"
|
||||
#include "utils.h"
|
||||
|
||||
CreateOUDialog::CreateOUDialog(QWidget *parent)
|
||||
: CreateObjectDialog(parent) {
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "create_object_dialog.h"
|
||||
|
||||
namespace Ui {
|
||||
class CreateOUDialog;
|
||||
class CreateOUDialog;
|
||||
}
|
||||
|
||||
class CreateOUDialog final : public CreateObjectDialog {
|
||||
|
@ -73,7 +73,7 @@ void CreatePolicyDialog::open() {
|
||||
return QString("New Group Policy Object (%1)").arg(n);
|
||||
};
|
||||
|
||||
while(existing_name_list.contains(get_name())) {
|
||||
while (existing_name_list.contains(get_name())) {
|
||||
n++;
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
class QLineEdit;
|
||||
|
||||
namespace Ui {
|
||||
class CreatePolicyDialog;
|
||||
class CreatePolicyDialog;
|
||||
}
|
||||
|
||||
class CreatePolicyDialog : public QDialog {
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class CreateQueryFolderDialog;
|
||||
class CreateQueryFolderDialog;
|
||||
}
|
||||
|
||||
class CreateQueryFolderDialog : public QDialog {
|
||||
@ -38,7 +38,7 @@ public:
|
||||
|
||||
QString name() const;
|
||||
QString description() const;
|
||||
|
||||
|
||||
void set_sibling_name_list(const QList<QString> &list);
|
||||
|
||||
void open() override;
|
||||
|
@ -26,7 +26,7 @@
|
||||
class EditQueryItemWidget;
|
||||
|
||||
namespace Ui {
|
||||
class CreateQueryItemDialog;
|
||||
class CreateQueryItemDialog;
|
||||
}
|
||||
|
||||
class CreateQueryItemDialog : public QDialog {
|
||||
|
@ -22,13 +22,13 @@
|
||||
#include "ui_create_user_dialog.h"
|
||||
|
||||
#include "adldap.h"
|
||||
#include "utils.h"
|
||||
#include "settings.h"
|
||||
#include "edits/string_edit.h"
|
||||
#include "edits/sam_name_edit.h"
|
||||
#include "edits/upn_edit.h"
|
||||
#include "edits/password_edit.h"
|
||||
#include "edits/account_option_edit.h"
|
||||
#include "edits/password_edit.h"
|
||||
#include "edits/sam_name_edit.h"
|
||||
#include "edits/string_edit.h"
|
||||
#include "edits/upn_edit.h"
|
||||
#include "settings.h"
|
||||
#include "utils.h"
|
||||
|
||||
CreateUserDialog::CreateUserDialog(QWidget *parent)
|
||||
: CreateObjectDialog(parent) {
|
||||
@ -124,7 +124,7 @@ CreateUserDialog::CreateUserDialog(QWidget *parent)
|
||||
ui->disabled_check,
|
||||
};
|
||||
|
||||
init(ui->name_edit, ui->button_box, edit_list, required_list, widget_list, CLASS_USER);
|
||||
init(ui->name_edit, ui->button_box, edit_list, required_list, widget_list, CLASS_USER);
|
||||
}
|
||||
|
||||
CreateUserDialog::~CreateUserDialog() {
|
||||
|
@ -27,7 +27,7 @@ class SamNameEdit;
|
||||
class UpnEdit;
|
||||
|
||||
namespace Ui {
|
||||
class CreateUserDialog;
|
||||
class CreateUserDialog;
|
||||
}
|
||||
|
||||
class CreateUserDialog final : public CreateObjectDialog {
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class EditQueryFolderDialog;
|
||||
class EditQueryFolderDialog;
|
||||
}
|
||||
|
||||
class EditQueryFolderDialog : public QDialog {
|
||||
|
@ -26,7 +26,7 @@
|
||||
class EditQueryItemWidget;
|
||||
|
||||
namespace Ui {
|
||||
class EditQueryItemDialog;
|
||||
class EditQueryItemDialog;
|
||||
}
|
||||
|
||||
class EditQueryItemDialog : public QDialog {
|
||||
|
@ -22,8 +22,8 @@
|
||||
#include "ui_edit_query_item_widget.h"
|
||||
|
||||
#include "ad_filter.h"
|
||||
#include "globals.h"
|
||||
#include "filter_widget/filter_dialog.h"
|
||||
#include "globals.h"
|
||||
|
||||
EditQueryItemWidget::EditQueryItemWidget(QWidget *parent)
|
||||
: QWidget(parent) {
|
||||
|
@ -31,7 +31,7 @@
|
||||
class FilterDialog;
|
||||
|
||||
namespace Ui {
|
||||
class EditQueryItemWidget;
|
||||
class EditQueryItemWidget;
|
||||
}
|
||||
|
||||
class EditQueryItemWidget : public QWidget {
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
// Store attribute and also configure widget settings so
|
||||
// that they are appropriate for given attribute.
|
||||
virtual void set_attribute(const QString &attribute);
|
||||
|
||||
|
||||
// This is for cases where you need to make the editor
|
||||
// read only even if attribute can be edited. Normally,
|
||||
// this is automatically called in set_attribute().
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "editors/attribute_editor.h"
|
||||
|
||||
namespace Ui {
|
||||
class BoolEditor;
|
||||
class BoolEditor;
|
||||
}
|
||||
|
||||
class BoolEditor final : public AttributeEditor {
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "editors/attribute_editor.h"
|
||||
|
||||
namespace Ui {
|
||||
class DateTimeEditor;
|
||||
class DateTimeEditor;
|
||||
}
|
||||
|
||||
class DateTimeEditor final : public AttributeEditor {
|
||||
|
@ -32,7 +32,7 @@ enum MultiEditorType {
|
||||
};
|
||||
|
||||
namespace Ui {
|
||||
class MultiEditor;
|
||||
class MultiEditor;
|
||||
}
|
||||
|
||||
class MultiEditor final : public AttributeEditor {
|
||||
|
@ -31,7 +31,7 @@ enum OctetDisplayFormat {
|
||||
};
|
||||
|
||||
namespace Ui {
|
||||
class OctetEditor;
|
||||
class OctetEditor;
|
||||
}
|
||||
|
||||
class OctetEditor final : public AttributeEditor {
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "editors/attribute_editor.h"
|
||||
|
||||
namespace Ui {
|
||||
class StringEditor;
|
||||
class StringEditor;
|
||||
}
|
||||
|
||||
class StringEditor final : public AttributeEditor {
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QFormLayout>
|
||||
#include <QMap>
|
||||
#include <QGroupBox>
|
||||
#include <QMap>
|
||||
|
||||
AccountOptionEdit::AccountOptionEdit(QCheckBox *check_arg, const AccountOption option_arg, QList<AttributeEdit *> *edits_out, QObject *parent)
|
||||
: AttributeEdit(edits_out, parent) {
|
||||
|
@ -27,7 +27,7 @@ class AdInterface;
|
||||
class AdObject;
|
||||
|
||||
namespace Ui {
|
||||
class ExpiryWidget;
|
||||
class ExpiryWidget;
|
||||
}
|
||||
|
||||
class ExpiryWidget final : public QWidget {
|
||||
|
@ -42,10 +42,9 @@ GroupScopeEdit::GroupScopeEdit(QComboBox *combo_arg, QList<AttributeEdit *> *edi
|
||||
this, &AttributeEdit::edited);
|
||||
}
|
||||
|
||||
|
||||
void GroupScopeEdit::load_internal(AdInterface &ad, const AdObject &object) {
|
||||
UNUSED_ARG(ad);
|
||||
|
||||
|
||||
const GroupScope scope = object.get_group_scope();
|
||||
|
||||
combo->setCurrentIndex((int) scope);
|
||||
|
@ -43,7 +43,7 @@ GroupTypeEdit::GroupTypeEdit(QComboBox *combo_arg, QList<AttributeEdit *> *edits
|
||||
|
||||
void GroupTypeEdit::load_internal(AdInterface &ad, const AdObject &object) {
|
||||
UNUSED_ARG(ad);
|
||||
|
||||
|
||||
const GroupType type = object.get_group_type();
|
||||
|
||||
combo->setCurrentIndex((int) type);
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class LogonComputersDialog;
|
||||
class LogonComputersDialog;
|
||||
}
|
||||
|
||||
class LogonComputersDialog final : public QDialog {
|
||||
@ -40,8 +40,8 @@ public:
|
||||
QString get() const;
|
||||
|
||||
private:
|
||||
void on_add_button();
|
||||
void on_remove_button();
|
||||
void on_add_button();
|
||||
void on_remove_button();
|
||||
};
|
||||
|
||||
#endif /* LOGON_COMPUTERS_DIALOG_H */
|
||||
|
@ -30,7 +30,7 @@
|
||||
LogonComputersEdit::LogonComputersEdit(QPushButton *button_arg, QList<AttributeEdit *> *edits_out, QObject *parent)
|
||||
: AttributeEdit(edits_out, parent) {
|
||||
button = button_arg;
|
||||
|
||||
|
||||
dialog = new LogonComputersDialog(button);
|
||||
|
||||
connect(
|
||||
|
@ -23,8 +23,8 @@
|
||||
|
||||
#include "ad_utils.h"
|
||||
|
||||
#include <QStandardItemModel>
|
||||
#include <QDateTime>
|
||||
#include <QStandardItemModel>
|
||||
#include <QTimeZone>
|
||||
|
||||
QList<bool> shift_list(const QList<bool> &list, const int shift_amount);
|
||||
@ -114,7 +114,6 @@ QByteArray LogonHoursDialog::get() const {
|
||||
|
||||
void LogonHoursDialog::accept() {
|
||||
|
||||
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
@ -178,7 +177,7 @@ QList<QList<bool>> logon_hours_to_bools(const QByteArray &byte_list, const int t
|
||||
out_the.append(day_list);
|
||||
}
|
||||
|
||||
return out_the;
|
||||
return out_the;
|
||||
}();
|
||||
|
||||
return out;
|
||||
|
@ -47,7 +47,7 @@ enum Weekday {
|
||||
#define LOGON_HOURS_SIZE (7 * 3)
|
||||
|
||||
namespace Ui {
|
||||
class LogonHoursDialog;
|
||||
class LogonHoursDialog;
|
||||
}
|
||||
|
||||
class LogonHoursDialog : public QDialog {
|
||||
|
@ -20,8 +20,8 @@
|
||||
|
||||
#include "edits/logon_hours_edit.h"
|
||||
|
||||
#include "edits/logon_hours_dialog.h"
|
||||
#include "adldap.h"
|
||||
#include "edits/logon_hours_dialog.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <QPushButton>
|
||||
|
@ -27,7 +27,7 @@ class AdObject;
|
||||
class AdInterface;
|
||||
|
||||
namespace Ui {
|
||||
class ManagerWidget;
|
||||
class ManagerWidget;
|
||||
}
|
||||
|
||||
class ManagerWidget final : public QWidget {
|
||||
|
@ -21,8 +21,8 @@
|
||||
#include "edits/protect_deletion_edit.h"
|
||||
|
||||
#include "adldap.h"
|
||||
#include "utils.h"
|
||||
#include "globals.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
|
||||
|
@ -30,7 +30,7 @@ StringEdit::StringEdit(QLineEdit *edit_arg, const QString &attribute_arg, QList<
|
||||
: AttributeEdit(edits_out, parent) {
|
||||
attribute = attribute_arg;
|
||||
edit = edit_arg;
|
||||
|
||||
|
||||
if (g_adconfig->get_attribute_is_number(attribute)) {
|
||||
set_line_edit_to_numbers_only(edit);
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ StringOtherEdit::StringOtherEdit(QLineEdit *line_edit_arg, QPushButton *other_bu
|
||||
: AttributeEdit(edits_out, parent)
|
||||
, other_attribute(other_attribute_arg) {
|
||||
main_edit = new StringEdit(line_edit_arg, main_attribute, nullptr, parent);
|
||||
|
||||
|
||||
connect(
|
||||
main_edit, &AttributeEdit::edited,
|
||||
this, &AttributeEdit::edited);
|
||||
|
@ -25,8 +25,8 @@
|
||||
#include "globals.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <QLineEdit>
|
||||
#include <QComboBox>
|
||||
#include <QLineEdit>
|
||||
|
||||
UpnEdit::UpnEdit(QLineEdit *prefix_edit_arg, QComboBox *upn_suffix_combo_arg, QList<AttributeEdit *> *edits_out, QObject *parent)
|
||||
: AttributeEdit(edits_out, parent) {
|
||||
|
@ -50,8 +50,7 @@ void upn_suffix_combo_init(QComboBox *combo, AdInterface &ad) {
|
||||
combo->setCurrentIndex(0);
|
||||
}
|
||||
|
||||
void upn_suffix_combo_load(QComboBox *combo, const AdObject &object
|
||||
) {
|
||||
void upn_suffix_combo_load(QComboBox *combo, const AdObject &object) {
|
||||
const QString suffix = object.get_upn_suffix();
|
||||
|
||||
// Select current suffix in suffix combo. Add current
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class ErrorLogDialog;
|
||||
class ErrorLogDialog;
|
||||
}
|
||||
|
||||
class ErrorLogDialog final : public QDialog {
|
||||
|
@ -33,7 +33,7 @@ class QCheckBox;
|
||||
class AdConfig;
|
||||
|
||||
namespace Ui {
|
||||
class FilterClassesWidget;
|
||||
class FilterClassesWidget;
|
||||
}
|
||||
|
||||
class FilterClassesWidget final : public QWidget {
|
||||
|
@ -32,7 +32,7 @@
|
||||
class AdConfig;
|
||||
|
||||
namespace Ui {
|
||||
class FilterDialog;
|
||||
class FilterDialog;
|
||||
}
|
||||
|
||||
class FilterDialog final : public QDialog {
|
||||
|
@ -55,7 +55,7 @@ QString FilterWidget::get_filter() const {
|
||||
|
||||
QVariant FilterWidget::save_state() const {
|
||||
QHash<QString, QVariant> state;
|
||||
|
||||
|
||||
state["current_tab_index"] = ui->tab_widget->currentIndex();
|
||||
state["simple_state"] = ui->simple_tab->save_state();
|
||||
state["normal_state"] = ui->normal_tab->save_state();
|
||||
@ -66,7 +66,7 @@ QVariant FilterWidget::save_state() const {
|
||||
|
||||
void FilterWidget::restore_state(const QVariant &state_variant) {
|
||||
const QHash<QString, QVariant> state = state_variant.toHash();
|
||||
|
||||
|
||||
ui->tab_widget->setCurrentIndex(state["current_tab_index"].toInt());
|
||||
ui->simple_tab->restore_state(state["simple_state"]);
|
||||
ui->normal_tab->restore_state(state["normal_state"]);
|
||||
|
@ -33,7 +33,7 @@ class FilterWidgetTab;
|
||||
class AdConfig;
|
||||
|
||||
namespace Ui {
|
||||
class FilterWidget;
|
||||
class FilterWidget;
|
||||
}
|
||||
|
||||
class FilterWidget final : public QWidget {
|
||||
@ -41,7 +41,7 @@ class FilterWidget final : public QWidget {
|
||||
|
||||
public:
|
||||
Ui::FilterWidget *ui;
|
||||
|
||||
|
||||
FilterWidget(QWidget *parent = nullptr);
|
||||
~FilterWidget();
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "filter_widget/filter_widget.h"
|
||||
|
||||
namespace Ui {
|
||||
class FilterWidgetAdvancedTab;
|
||||
class FilterWidgetAdvancedTab;
|
||||
}
|
||||
|
||||
class FilterWidgetAdvancedTab final : public FilterWidgetTab {
|
||||
|
@ -35,7 +35,7 @@
|
||||
class AdConfig;
|
||||
|
||||
namespace Ui {
|
||||
class FilterWidgetNormalTab;
|
||||
class FilterWidgetNormalTab;
|
||||
}
|
||||
|
||||
class FilterWidgetNormalTab final : public FilterWidgetTab {
|
||||
|
@ -30,7 +30,7 @@
|
||||
class AdConfig;
|
||||
|
||||
namespace Ui {
|
||||
class FilterWidgetSimpleTab;
|
||||
class FilterWidgetSimpleTab;
|
||||
}
|
||||
|
||||
class FilterWidgetSimpleTab final : public FilterWidgetTab {
|
||||
|
@ -31,7 +31,7 @@ class AdConfig;
|
||||
class SelectContainerDialog;
|
||||
|
||||
namespace Ui {
|
||||
class SelectBaseWidget;
|
||||
class SelectBaseWidget;
|
||||
}
|
||||
|
||||
class SelectBaseWidget final : public QWidget {
|
||||
|
@ -32,7 +32,7 @@
|
||||
class FilterClassesWidget;
|
||||
|
||||
namespace Ui {
|
||||
class SelectClassesDialog;
|
||||
class SelectClassesDialog;
|
||||
}
|
||||
|
||||
class SelectClassesDialog final : public QDialog {
|
||||
|
@ -31,7 +31,7 @@ SelectClassesWidget::SelectClassesWidget(QWidget *parent)
|
||||
ui->setupUi(this);
|
||||
|
||||
dialog = new SelectClassesDialog(this);
|
||||
|
||||
|
||||
connect(
|
||||
ui->select_button, &QAbstractButton::clicked,
|
||||
dialog, &QDialog::open);
|
||||
|
@ -34,7 +34,7 @@ class SelectClassesDialog;
|
||||
class AdConfig;
|
||||
|
||||
namespace Ui {
|
||||
class SelectClassesWidget;
|
||||
class SelectClassesWidget;
|
||||
}
|
||||
|
||||
class SelectClassesWidget final : public QWidget {
|
||||
|
@ -30,7 +30,7 @@
|
||||
class ConsoleWidget;
|
||||
|
||||
namespace Ui {
|
||||
class FindObjectDialog;
|
||||
class FindObjectDialog;
|
||||
}
|
||||
|
||||
class FindObjectDialog final : public QDialog {
|
||||
|
@ -22,18 +22,18 @@
|
||||
#include "ui_find_widget.h"
|
||||
|
||||
#include "adldap.h"
|
||||
#include "console_impls/object_impl.h"
|
||||
#include "console_impls/item_type.h"
|
||||
#include "console_impls/query_item_impl.h"
|
||||
#include "console_impls/object_impl.h"
|
||||
#include "console_impls/query_folder_impl.h"
|
||||
#include "console_impls/query_item_impl.h"
|
||||
#include "console_widget/results_view.h"
|
||||
#include "globals.h"
|
||||
#include "search_thread.h"
|
||||
#include "settings.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <QStandardItem>
|
||||
#include <QMenu>
|
||||
#include <QStandardItem>
|
||||
|
||||
FindWidget::FindWidget(QWidget *parent)
|
||||
: QWidget(parent) {
|
||||
@ -97,14 +97,14 @@ FindWidget::FindWidget(QWidget *parent)
|
||||
head_item->setText(tr("Find results"));
|
||||
|
||||
ui->console->set_scope_view_visible(false);
|
||||
|
||||
|
||||
const QModelIndex head_index = head_item->index();
|
||||
ui->console->set_current_scope(head_index);
|
||||
|
||||
connect(
|
||||
ui->find_button, &QPushButton::clicked,
|
||||
this, &FindWidget::find);
|
||||
connect(
|
||||
connect(
|
||||
ui->clear_button, &QPushButton::clicked,
|
||||
this, &FindWidget::on_clear_button);
|
||||
|
||||
|
@ -36,7 +36,7 @@ class ObjectImpl;
|
||||
class ConsoleWidget;
|
||||
|
||||
namespace Ui {
|
||||
class FindWidget;
|
||||
class FindWidget;
|
||||
}
|
||||
|
||||
class FindWidget final : public QWidget {
|
||||
@ -49,7 +49,7 @@ public:
|
||||
~FindWidget();
|
||||
|
||||
void init(const QList<QString> &class_list, const QList<QString> &selected_list, const QString &default_base);
|
||||
|
||||
|
||||
// NOTE: this is only for the console state, filter
|
||||
// widget is untouched
|
||||
QVariant save_console_state() const;
|
||||
|
@ -22,14 +22,13 @@
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
#include <QHelpContentModel>
|
||||
#include <QHelpContentWidget>
|
||||
#include <QHelpEngine>
|
||||
#include <QHelpIndexWidget>
|
||||
#include <QHelpContentModel>
|
||||
|
||||
HelpBrowser::HelpBrowser(QWidget *parent)
|
||||
: QTextBrowser(parent) {
|
||||
|
||||
}
|
||||
|
||||
void HelpBrowser::init(QHelpEngine *help_engine_arg) {
|
||||
@ -44,7 +43,7 @@ void HelpBrowser::init(QHelpEngine *help_engine_arg) {
|
||||
connect(
|
||||
selection_model, &QItemSelectionModel::currentChanged,
|
||||
this, &HelpBrowser::on_content_clicked);
|
||||
|
||||
|
||||
connect(
|
||||
help_engine->indexWidget(), &QHelpIndexWidget::linkActivated,
|
||||
this, QOverload<const QUrl &>::of(&HelpBrowser::setSource));
|
||||
@ -67,7 +66,7 @@ void HelpBrowser::on_content_clicked(const QModelIndex &index) {
|
||||
return;
|
||||
}
|
||||
|
||||
const QHelpContentModel *contentModel = qobject_cast<QHelpContentModel*>(content_widget->model());
|
||||
const QHelpContentModel *contentModel = qobject_cast<QHelpContentModel *>(content_widget->model());
|
||||
if (contentModel == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
@ -23,27 +23,27 @@
|
||||
|
||||
#include "about_dialog.h"
|
||||
#include "adldap.h"
|
||||
#include "globals.h"
|
||||
#include "manual_dialog.h"
|
||||
#include "changelog_dialog.h"
|
||||
#include "connection_options_dialog.h"
|
||||
#include "settings.h"
|
||||
#include "status.h"
|
||||
#include "utils.h"
|
||||
#include "config.h"
|
||||
#include "connection_options_dialog.h"
|
||||
#include "console_filter_dialog.h"
|
||||
#include "console_impls/item_type.h"
|
||||
#include "console_impls/object_impl.h"
|
||||
#include "console_impls/policy_impl.h"
|
||||
#include "console_impls/policy_root_impl.h"
|
||||
#include "console_impls/query_item_impl.h"
|
||||
#include "console_impls/query_folder_impl.h"
|
||||
#include "console_impls/query_item_impl.h"
|
||||
#include "console_widget/console_widget.h"
|
||||
#include "console_filter_dialog.h"
|
||||
#include "console_impls/item_type.h"
|
||||
#include "edits/country_combo.h"
|
||||
#include "globals.h"
|
||||
#include "manual_dialog.h"
|
||||
#include "settings.h"
|
||||
#include "status.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QModelIndex>
|
||||
#include <QLabel>
|
||||
#include <QModelIndex>
|
||||
|
||||
MainWindow::MainWindow()
|
||||
: QMainWindow() {
|
||||
@ -156,9 +156,9 @@ MainWindow::MainWindow()
|
||||
// console
|
||||
ui->console->add_actions(ui->menu_action);
|
||||
|
||||
#ifndef QT_DEBUG
|
||||
ui->action_dev_mode->setVisible(false);
|
||||
#endif
|
||||
#ifndef QT_DEBUG
|
||||
ui->action_dev_mode->setVisible(false);
|
||||
#endif
|
||||
|
||||
// NOTE: toolbar and message log(dock widget) have built
|
||||
// in toggle actions, but there's no way to add them
|
||||
@ -319,7 +319,7 @@ void MainWindow::on_filter_dialog_accepted() {
|
||||
} else {
|
||||
object_impl->disable_filtering();
|
||||
}
|
||||
|
||||
|
||||
refresh_object_tree();
|
||||
}
|
||||
|
||||
@ -404,7 +404,7 @@ void MainWindow::connect_to_server() {
|
||||
filter_dialog, &QDialog::accepted,
|
||||
this, &MainWindow::on_filter_dialog_accepted);
|
||||
on_filter_dialog_accepted();
|
||||
|
||||
|
||||
// Disable connect action once connected because
|
||||
// it's not needed at that point
|
||||
ui->action_connect->setEnabled(false);
|
||||
|
@ -28,7 +28,7 @@ class ConsoleFilterDialog;
|
||||
class QLabel;
|
||||
|
||||
namespace Ui {
|
||||
class MainWindow;
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
class MainWindow final : public QMainWindow {
|
||||
@ -47,7 +47,7 @@ private:
|
||||
ObjectImpl *object_impl;
|
||||
ConsoleFilterDialog *filter_dialog;
|
||||
QLabel *client_user_label;
|
||||
|
||||
|
||||
void connect_to_server();
|
||||
void refresh_object_tree();
|
||||
void on_show_non_containers(bool checked);
|
||||
|
@ -26,6 +26,8 @@
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QFileInfo>
|
||||
#include <QHelpContentWidget>
|
||||
#include <QHelpEngine>
|
||||
#include <QHelpIndexWidget>
|
||||
@ -33,8 +35,6 @@
|
||||
#include <QStandardPaths>
|
||||
#include <QTabWidget>
|
||||
#include <QVBoxLayout>
|
||||
#include <QFileInfo>
|
||||
#include <QDir>
|
||||
|
||||
ManualDialog::ManualDialog(QWidget *parent)
|
||||
: QDialog(parent) {
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class ManualDialog;
|
||||
class ManualDialog;
|
||||
}
|
||||
|
||||
class ManualDialog : public QDialog {
|
||||
@ -36,7 +36,7 @@ class ManualDialog : public QDialog {
|
||||
|
||||
public:
|
||||
Ui::ManualDialog *ui;
|
||||
|
||||
|
||||
ManualDialog(QWidget *parent);
|
||||
~ManualDialog();
|
||||
};
|
||||
|
@ -20,8 +20,8 @@
|
||||
|
||||
#include "multi_edits/account_option_multi_edit.h"
|
||||
|
||||
#include "edits/account_option_edit.h"
|
||||
#include "adldap.h"
|
||||
#include "edits/account_option_edit.h"
|
||||
#include "globals.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
|
@ -47,7 +47,7 @@ signals:
|
||||
|
||||
protected:
|
||||
QCheckBox *apply_check;
|
||||
|
||||
|
||||
virtual bool apply_internal(AdInterface &ad, const QString &target) = 0;
|
||||
virtual void set_enabled(const bool enabled) = 0;
|
||||
};
|
||||
|
@ -24,8 +24,8 @@
|
||||
#include "edits/expiry_widget.h"
|
||||
#include "globals.h"
|
||||
|
||||
#include <QFormLayout>
|
||||
#include <QCheckBox>
|
||||
#include <QFormLayout>
|
||||
|
||||
ExpiryMultiEdit::ExpiryMultiEdit(ExpiryWidget *edit_widget_arg, QCheckBox *check, QList<AttributeMultiEdit *> &edits_out, QObject *parent)
|
||||
: AttributeMultiEdit(check, edits_out, parent) {
|
||||
|
@ -24,8 +24,8 @@
|
||||
#include "edits/manager_widget.h"
|
||||
#include "globals.h"
|
||||
|
||||
#include <QFormLayout>
|
||||
#include <QCheckBox>
|
||||
#include <QFormLayout>
|
||||
|
||||
ManagerMultiEdit::ManagerMultiEdit(ManagerWidget *widget_arg, QCheckBox *check, QList<AttributeMultiEdit *> &edits_out, QObject *parent)
|
||||
: AttributeMultiEdit(check, edits_out, parent) {
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "multi_tabs/properties_multi_tab.h"
|
||||
|
||||
namespace Ui {
|
||||
class AccountMultiTab;
|
||||
class AccountMultiTab;
|
||||
}
|
||||
|
||||
class AccountMultiTab final : public PropertiesMultiTab {
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "multi_tabs/properties_multi_tab.h"
|
||||
|
||||
namespace Ui {
|
||||
class AddressMultiTab;
|
||||
class AddressMultiTab;
|
||||
}
|
||||
|
||||
class AddressMultiTab final : public PropertiesMultiTab {
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "multi_tabs/properties_multi_tab.h"
|
||||
|
||||
namespace Ui {
|
||||
class GeneralOtherMultiTab;
|
||||
class GeneralOtherMultiTab;
|
||||
}
|
||||
|
||||
class GeneralOtherMultiTab final : public PropertiesMultiTab {
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "multi_tabs/properties_multi_tab.h"
|
||||
|
||||
namespace Ui {
|
||||
class GeneralUserMultiTab;
|
||||
class GeneralUserMultiTab;
|
||||
}
|
||||
|
||||
class GeneralUserMultiTab final : public PropertiesMultiTab {
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "multi_tabs/properties_multi_tab.h"
|
||||
|
||||
namespace Ui {
|
||||
class OrganizationMultiTab;
|
||||
class OrganizationMultiTab;
|
||||
}
|
||||
|
||||
class OrganizationMultiTab final : public PropertiesMultiTab {
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "multi_tabs/properties_multi_tab.h"
|
||||
|
||||
namespace Ui {
|
||||
class ProfileMultiTab;
|
||||
class ProfileMultiTab;
|
||||
}
|
||||
|
||||
class ProfileMultiTab final : public PropertiesMultiTab {
|
||||
|
@ -64,7 +64,7 @@ void PasswordDialog::set_target(const QString &target_arg) {
|
||||
|
||||
return out;
|
||||
}();
|
||||
|
||||
|
||||
if (expired_check_enabled) {
|
||||
ui->expired_check->setChecked(true);
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
class AttributeEdit;
|
||||
|
||||
namespace Ui {
|
||||
class PasswordDialog;
|
||||
class PasswordDialog;
|
||||
}
|
||||
|
||||
// Accepts input of new password and changes password when done
|
||||
|
@ -22,24 +22,24 @@
|
||||
#include "ui_policy_results_widget.h"
|
||||
|
||||
#include "adldap.h"
|
||||
#include "console_impls/item_type.h"
|
||||
#include "console_impls/policy_impl.h"
|
||||
#include "console_widget/console_widget.h"
|
||||
#include "console_widget/results_view.h"
|
||||
#include "globals.h"
|
||||
#include "gplink.h"
|
||||
#include "settings.h"
|
||||
#include "status.h"
|
||||
#include "utils.h"
|
||||
#include "settings.h"
|
||||
#include "console_impls/item_type.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QHeaderView>
|
||||
#include <QMenu>
|
||||
#include <QMessageBox>
|
||||
#include <QModelIndex>
|
||||
#include <QStandardItemModel>
|
||||
#include <QTreeView>
|
||||
#include <QVBoxLayout>
|
||||
#include <QMessageBox>
|
||||
|
||||
enum PolicyResultsColumn {
|
||||
PolicyResultsColumn_Name,
|
||||
@ -82,12 +82,12 @@ PolicyResultsWidget::PolicyResultsWidget(QWidget *parent)
|
||||
|
||||
model = new QStandardItemModel(0, PolicyResultsColumn_COUNT, this);
|
||||
set_horizontal_header_labels_from_map(model,
|
||||
{
|
||||
{PolicyResultsColumn_Name, tr("Location")},
|
||||
{PolicyResultsColumn_Enforced, tr("Enforced")},
|
||||
{PolicyResultsColumn_Disabled, tr("Disabled")},
|
||||
{PolicyResultsColumn_Path, tr("Path")},
|
||||
});
|
||||
{
|
||||
{PolicyResultsColumn_Name, tr("Location")},
|
||||
{PolicyResultsColumn_Enforced, tr("Enforced")},
|
||||
{PolicyResultsColumn_Disabled, tr("Disabled")},
|
||||
{PolicyResultsColumn_Path, tr("Path")},
|
||||
});
|
||||
|
||||
ui->view->set_model(model);
|
||||
|
||||
@ -98,12 +98,12 @@ PolicyResultsWidget::PolicyResultsWidget(QWidget *parent)
|
||||
|
||||
const QVariant state = settings_get_variant(SETTING_policy_results_state);
|
||||
ui->view->restore_state(state,
|
||||
{
|
||||
PolicyResultsColumn_Name,
|
||||
PolicyResultsColumn_Enforced,
|
||||
PolicyResultsColumn_Disabled,
|
||||
PolicyResultsColumn_Path,
|
||||
});
|
||||
{
|
||||
PolicyResultsColumn_Name,
|
||||
PolicyResultsColumn_Enforced,
|
||||
PolicyResultsColumn_Disabled,
|
||||
PolicyResultsColumn_Path,
|
||||
});
|
||||
|
||||
connect(
|
||||
model, &QStandardItemModel::itemChanged,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user