Commit 797adab2 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Warning--

parent f39777b9
......@@ -190,8 +190,8 @@ bool AccountInfo::save()
KIO::CopyJob* copyJob = KIO::copy(QUrl::fromLocalFile(path), QUrl::fromLocalFile(faceFile), KIO::HideProgressInfo);
connect(copyJob, SIGNAL(finished(KJob*)), SLOT(avatarModelChanged(KJob*)));
copyJob->setUiDelegate(0);
copyJob->setUiDelegateExtension(0);
copyJob->setUiDelegate(nullptr);
copyJob->setUiDelegateExtension(nullptr);
copyJob->start();
QString faceFile2 = QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
......@@ -414,7 +414,7 @@ void AccountInfo::openGallery()
QStringList AccountInfo::imageFormats() const
{
QStringList result;
for(const QByteArray b: QImageReader::supportedMimeTypes()) {
for(const QByteArray &b: QImageReader::supportedMimeTypes()) {
if (! b.isEmpty())
result.append(QString(b));
}
......
......@@ -35,7 +35,7 @@ class AccountInfo : public QWidget
{
Q_OBJECT
public:
explicit AccountInfo(AccountModel* model, QWidget* parent = 0, Qt::WindowFlags f = 0);
explicit AccountInfo(AccountModel* model, QWidget* parent = nullptr, Qt::WindowFlags f = 0);
virtual ~AccountInfo();
void setModelIndex(const QModelIndex &index);
......
......@@ -58,7 +58,7 @@ void CreateAvatarJob::doStart()
qCDebug(USER_MANAGER_LOG) << "From: " << m_url << "to: " << m_tmpFile;
KIO::CopyJob* job = KIO::copy(m_url, QUrl::fromLocalFile(m_tmpFile), KIO::HideProgressInfo);
connect(job, SIGNAL(finished(KJob*)), SLOT(copyDone(KJob*)));
job->setUiDelegate(0);
job->setUiDelegate(nullptr);
job->start();
}
......
......@@ -26,7 +26,7 @@ class CreateAvatarJob : public KJob
{
Q_OBJECT
public:
explicit CreateAvatarJob(QObject* parent = 0);
explicit CreateAvatarJob(QObject* parent = nullptr);
void start() Q_DECL_OVERRIDE;
void setUrl(const QUrl &url);
......
......@@ -306,7 +306,7 @@ QVariant AccountModel::newUserData(int role) const
bool AccountModel::newUserSetData(const QModelIndex &index, const QVariant& value, int roleInt)
{
AccountModel::Role role = (AccountModel::Role) roleInt;
AccountModel::Role role = static_cast<AccountModel::Role>(roleInt);
m_newUserData[role] = value;
QList<AccountModel::Role> roles = m_newUserData.keys();
if (!roles.contains(Username) || !roles.contains(RealName) || !roles.contains(Administrator)) {
......@@ -437,7 +437,7 @@ void AccountModel::UserAdded(const QDBusObjectPath& dbusPath)
//Then we add new-user again.
beginInsertRows(QModelIndex(), row, row);
addAccountToCache("new-user", 0);
addAccountToCache("new-user", nullptr);
endInsertRows();
}
......
......@@ -57,8 +57,8 @@ class AccountModel : public QAbstractListModel
Created
};
AccountModel(QObject* parent);
~AccountModel();
explicit AccountModel(QObject* parent);
~AccountModel() Q_DECL_OVERRIDE;
int rowCount(const QModelIndex& parent = QModelIndex()) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex& index, int role) const Q_DECL_OVERRIDE;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
......
......@@ -40,7 +40,7 @@ class UserSession : public QObject
{
Q_OBJECT
public:
explicit UserSession(QObject* parent = 0);
explicit UserSession(QObject* parent = nullptr);
virtual ~UserSession();
public Q_SLOTS:
......@@ -55,4 +55,4 @@ class UserSession : public QObject
OrgFreedesktopLogin1ManagerInterface* m_manager;
};
#endif //USER_SESSION_H
\ No newline at end of file
#endif //USER_SESSION_H
......@@ -30,7 +30,7 @@
PasswordDialog::PasswordDialog(QWidget* parent, Qt::WindowFlags flags)
: QDialog(parent, flags)
, m_pwSettings(0)
, m_pwSettings(nullptr)
, m_timer(new QTimer(this))
{
setWindowTitle(i18nc("Title for change password dialog", "New Password"));
......@@ -107,13 +107,13 @@ void PasswordDialog::checkPassword()
if (!m_pwSettings) {
m_pwSettings = pwquality_default_settings ();
pwquality_set_int_value (m_pwSettings, PWQ_SETTING_MAX_SEQUENCE, 4);
if (pwquality_read_config (m_pwSettings, NULL, NULL) < 0) {
if (pwquality_read_config (m_pwSettings, nullptr, nullptr) < 0) {
qCWarning(USER_MANAGER_LOG) << "failed to read pwquality configuration\n";
return;
}
}
int quality = pwquality_check (m_pwSettings, password.toUtf8(), NULL, m_username, NULL);
int quality = pwquality_check (m_pwSettings, password.toUtf8(), nullptr, m_username, nullptr);
qCDebug(USER_MANAGER_LOG) << "Quality: " << quality;
......
......@@ -33,7 +33,7 @@ class PasswordDialog : public QDialog, private Ui::PasswordDlg
Q_OBJECT
public:
explicit PasswordDialog(QWidget* parent = 0, Qt::WindowFlags flags = 0);
explicit PasswordDialog(QWidget* parent = nullptr, Qt::WindowFlags flags = 0);
virtual ~PasswordDialog();
void setUsername(const QByteArray &username);
......
......@@ -24,7 +24,7 @@ class PasswordEdit : public QLineEdit
Q_OBJECT
public:
explicit PasswordEdit(QWidget* parent = 0);
explicit PasswordEdit(QWidget* parent = nullptr);
Q_SIGNALS:
void focused();
......
......@@ -59,7 +59,7 @@ UserManager::UserManager(QWidget* parent, const QVariantList& args)
m_ui->userList->setSelectionModel(m_selectionModel);
m_ui->userList->setIconSize(QSize(IconSize(KIconLoader::Dialog), IconSize(KIconLoader::Dialog)));
ModelTest* test = new ModelTest(m_model, 0);
ModelTest* test = new ModelTest(m_model, nullptr);
Q_UNUSED(test)
connect(m_ui->addBtn, SIGNAL(clicked(bool)), SLOT(addNewUser()));
......
......@@ -39,7 +39,7 @@ class UserManager : public KCModule
Q_OBJECT
public:
explicit UserManager(QWidget *parent, const QVariantList& args);
virtual ~UserManager();
~UserManager() Q_DECL_OVERRIDE;
void load() Q_DECL_OVERRIDE;
void save() Q_DECL_OVERRIDE;
......
Supports Markdown
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