Verified Commit 510709b4 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Run clang-format

If you want git blame to ignore formatting revisions run:
git config blame.ignoreRevsFile .git-blame-ignore-revs
parent a57e4215
......@@ -223,7 +223,7 @@ set_target_properties(KScreenLocker PROPERTIES COMPILE_FLAGS "-fPIC")
add_library(PW::KScreenLocker ALIAS KScreenLocker)
# add clang-format target for all our real source files
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h *.c)
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
generate_export_header(KScreenLocker
......
......@@ -25,16 +25,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "abstractlocker.h"
#include <QScreen>
#include <QPainter>
#include <QApplication>
#include <QPainter>
#include <QScreen>
#include <QtDBus>
#include <KLocalizedString>
namespace ScreenLocker
{
BackgroundWindow::BackgroundWindow(AbstractLocker *lock)
: QRasterWindow()
, m_lock(lock)
......@@ -45,25 +44,30 @@ BackgroundWindow::BackgroundWindow(AbstractLocker *lock)
BackgroundWindow::~BackgroundWindow() = default;
void BackgroundWindow::paintEvent(QPaintEvent* )
void BackgroundWindow::paintEvent(QPaintEvent *)
{
QPainter p(this);
p.fillRect(0, 0, width(), height(), Qt::black);
if (m_greeterFailure) {
auto text = ki18n("The screen locker is broken and unlocking is not possible anymore.\n"
"In order to unlock it either ConsoleKit or LoginD is needed, none of\n"
"which could be found on your system.");
auto text_ck = ki18n("The screen locker is broken and unlocking is not possible anymore.\n"
"In order to unlock switch to a virtual terminal (e.g. Ctrl+Alt+F2),\n"
"log in as root and execute the command:\n\n"
"# ck-unlock-session <session-name>\n\n");
auto text_ld = ki18n("The screen locker is broken and unlocking is not possible anymore.\n"
"In order to unlock switch to a virtual terminal (e.g. Ctrl+Alt+F2),\n"
"log in and execute the command:\n\n"
"loginctl unlock-session %1\n\n"
"Afterwards switch back to the running session (Ctrl+Alt+F%2).");
auto haveService = [](QString service){return QDBusConnection::systemBus().interface()->isServiceRegistered(service);};
auto text = ki18n(
"The screen locker is broken and unlocking is not possible anymore.\n"
"In order to unlock it either ConsoleKit or LoginD is needed, none of\n"
"which could be found on your system.");
auto text_ck = ki18n(
"The screen locker is broken and unlocking is not possible anymore.\n"
"In order to unlock switch to a virtual terminal (e.g. Ctrl+Alt+F2),\n"
"log in as root and execute the command:\n\n"
"# ck-unlock-session <session-name>\n\n");
auto text_ld = ki18n(
"The screen locker is broken and unlocking is not possible anymore.\n"
"In order to unlock switch to a virtual terminal (e.g. Ctrl+Alt+F2),\n"
"log in and execute the command:\n\n"
"loginctl unlock-session %1\n\n"
"Afterwards switch back to the running session (Ctrl+Alt+F%2).");
auto haveService = [](QString service) {
return QDBusConnection::systemBus().interface()->isServiceRegistered(service);
};
if (haveService(QStringLiteral("org.freedesktop.ConsoleKit"))) {
text = text_ck;
} else if (haveService(QStringLiteral("org.freedesktop.login1"))) {
......@@ -100,7 +104,7 @@ void BackgroundWindow::emergencyShow()
AbstractLocker::AbstractLocker(QObject *parent)
: QObject(parent)
{
if (qobject_cast<QGuiApplication*>(QCoreApplication::instance())) {
if (qobject_cast<QGuiApplication *>(QCoreApplication::instance())) {
m_background.reset(new BackgroundWindow(this));
}
}
......@@ -123,4 +127,3 @@ void AbstractLocker::addAllowedWindow(quint32 windows)
}
}
......@@ -33,7 +33,6 @@ class GlobalAccel;
namespace ScreenLocker
{
class AbstractLocker;
class BackgroundWindow : public QRasterWindow
......@@ -65,7 +64,8 @@ public:
virtual void addAllowedWindow(quint32 window);
void setGlobalAccel(GlobalAccel *ga) {
void setGlobalAccel(GlobalAccel *ga)
{
m_globalAccel = ga;
}
......@@ -76,10 +76,10 @@ Q_SIGNALS:
void lockWindowShown();
protected:
virtual void stayOnTop() = 0;
GlobalAccel* globalAccel() {
GlobalAccel *globalAccel()
{
return m_globalAccel;
}
QScopedPointer<BackgroundWindow> m_background;
......@@ -88,9 +88,8 @@ private:
GlobalAccel *m_globalAccel = nullptr;
friend class BackgroundWindow;
};
}
#endif //ABSTRACTLOCKER_H
#endif // ABSTRACTLOCKER_H
......@@ -33,7 +33,8 @@ public:
explicit FakeLogind(QObject *parent = nullptr);
~FakeLogind() override;
FakeLogindSession *session() const {
FakeLogindSession *session() const
{
return m_session;
}
......@@ -54,7 +55,8 @@ public:
explicit FakeLogindSession(const QString &path, QObject *parent = nullptr);
~FakeLogindSession() override;
const QString &path() {
const QString &path()
{
return m_path;
}
......
......@@ -22,9 +22,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// KDE Frameworks
#include <KIdleTime>
// Qt
#include <QtTest>
#include <QProcess>
#include <QX11Info>
#include <QtTest>
// xcb
#include <xcb/xcb.h>
#include <xcb/xtest.h>
......
......@@ -18,16 +18,16 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#include <QtTest>
#include "../ksldapp.h"
#include <KWayland/Server/clientconnection.h>
#include <KWayland/Server/compositor_interface.h>
#include <KWayland/Server/datadevicemanager_interface.h>
#include <KWayland/Server/display.h>
#include <KWayland/Server/output_interface.h>
#include <KWayland/Server/plasmashell_interface.h>
#include <KWayland/Server/seat_interface.h>
#include <KWayland/Server/shell_interface.h>
#include <KWayland/Server/plasmashell_interface.h>
#include <QtTest>
#include <sys/socket.h>
......@@ -84,46 +84,37 @@ void NoScreensTest::init()
app->setGreeterEnvironment(env);
app->initialize();
connect(app, &ScreenLocker::KSldApp::aboutToLock,
this, [this, app] {
int sx[2];
QVERIFY(socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, sx) >= 0);
m_clientConnection = m_display->createClient(sx[0]);
QVERIFY(m_clientConnection);
connect(m_clientConnection, &ClientConnection::disconnected, this, [this] {
// The API is currently ill-defined about the ownership of a client connection
// when calling createClient server-side.
m_clientConnection = nullptr;
});
app->setWaylandFd(sx[1]);
connect(m_seat, &SeatInterface::timestampChanged,
app, &ScreenLocker::KSldApp::userActivity);
connect(app, &ScreenLocker::KSldApp::aboutToLock, this, [this, app] {
int sx[2];
QVERIFY(socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, sx) >= 0);
m_clientConnection = m_display->createClient(sx[0]);
QVERIFY(m_clientConnection);
connect(m_clientConnection, &ClientConnection::disconnected, this, [this] {
// The API is currently ill-defined about the ownership of a client connection
// when calling createClient server-side.
m_clientConnection = nullptr;
});
app->setWaylandFd(sx[1]);
connect(m_seat, &SeatInterface::timestampChanged, app, &ScreenLocker::KSldApp::userActivity);
});
connect(app, &ScreenLocker::KSldApp::unlocked,
this, [this, app] {
if (m_clientConnection) {
delete m_clientConnection;
m_clientConnection = nullptr;
}
disconnect(m_seat, &SeatInterface::timestampChanged,
app, &ScreenLocker::KSldApp::userActivity);
connect(app, &ScreenLocker::KSldApp::unlocked, this, [this, app] {
if (m_clientConnection) {
delete m_clientConnection;
m_clientConnection = nullptr;
}
disconnect(m_seat, &SeatInterface::timestampChanged, app, &ScreenLocker::KSldApp::userActivity);
});
connect(m_shell, &ShellInterface::surfaceCreated, this,
[this] (ShellSurfaceInterface *surface) {
m_surface = surface->surface();
connect(surface->surface(), &SurfaceInterface::damaged, this,
[this, surface] {
emit surfaceShown();
ScreenLocker::KSldApp::self()->lockScreenShown();
surface->surface()->frameRendered(0);
surface->client()->flush();
}
);
}
);
connect(m_shell, &ShellInterface::surfaceCreated, this, [this](ShellSurfaceInterface *surface) {
m_surface = surface->surface();
connect(surface->surface(), &SurfaceInterface::damaged, this, [this, surface] {
emit surfaceShown();
ScreenLocker::KSldApp::self()->lockScreenShown();
surface->surface()->frameRendered(0);
surface->client()->flush();
});
});
}
void NoScreensTest::cleanup()
......
......@@ -21,13 +21,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// own
#include "../x11locker.h"
// Qt
#include <QtTest>
#include <QWindow>
#include <QX11Info>
#include <QtTest>
// xcb
#include <xcb/xcb.h>
template <typename T> using ScopedCPointer = QScopedPointer<T, QScopedPointerPodDeleter>;
template<typename T>
using ScopedCPointer = QScopedPointer<T, QScopedPointerPodDeleter>;
class LockWindowTest : public QObject
{
......@@ -41,9 +42,7 @@ private Q_SLOTS:
xcb_screen_t *defaultScreen()
{
int screen = QX11Info::appScreen();
for (xcb_screen_iterator_t it = xcb_setup_roots_iterator(xcb_get_setup(QX11Info::connection()));
it.rem;
--screen, xcb_screen_next(&it)) {
for (xcb_screen_iterator_t it = xcb_setup_roots_iterator(xcb_get_setup(QX11Info::connection())); it.rem; --screen, xcb_screen_next(&it)) {
if (screen == 0) {
return it.data;
}
......@@ -54,16 +53,14 @@ xcb_screen_t *defaultScreen()
bool isColored(const QColor color, const int x, const int y, const int width, const int height)
{
xcb_connection_t *c = QX11Info::connection();
const auto cookie = xcb_get_image(c, XCB_IMAGE_FORMAT_Z_PIXMAP, QX11Info::appRootWindow(),
x, y, width, height, ~0);
const auto cookie = xcb_get_image(c, XCB_IMAGE_FORMAT_Z_PIXMAP, QX11Info::appRootWindow(), x, y, width, height, ~0);
ScopedCPointer<xcb_get_image_reply_t> xImage(xcb_get_image_reply(c, cookie, nullptr));
if (xImage.isNull()) {
return false;
}
// this operates on the assumption that X server default depth matches Qt's image format
QImage image(xcb_get_image_data(xImage.data()), width, height,
xcb_get_image_data_length(xImage.data()) / height, QImage::Format_ARGB32_Premultiplied);
QImage image(xcb_get_image_data(xImage.data()), width, height, xcb_get_image_data_length(xImage.data()) / height, QImage::Format_ARGB32_Premultiplied);
for (int i = 0; i < image.width(); i++) {
for (int j = 0; j < image.height(); j++) {
......@@ -166,7 +163,7 @@ void LockWindowTest::testBlankScreen()
widgetWindow.setAutoFillBackground(true);
widgetWindow.setPalette(p1);
widgetWindow.show();
const uint32_t values[] = { XCB_STACK_MODE_ABOVE };
const uint32_t values[] = {XCB_STACK_MODE_ABOVE};
xcb_configure_window(c, widgetWindow.winId(), XCB_CONFIG_WINDOW_STACK_MODE, values);
xcb_flush(c);
QTest::qWait(1000);
......@@ -177,7 +174,6 @@ void LockWindowTest::testBlankScreen()
void LockWindowTest::testEmergencyShow()
{
QWidget dummy;
dummy.setWindowFlags(Qt::X11BypassWindowManagerHint);
QPalette p;
......@@ -228,15 +224,13 @@ void LockWindowTest::testEmergencyShow()
const int width = screen->width_in_pixels;
const int height = screen->height_in_pixels;
const auto cookie = xcb_get_image(c, XCB_IMAGE_FORMAT_Z_PIXMAP, QX11Info::appRootWindow(),
0, 0, width, height, ~0);
const auto cookie = xcb_get_image(c, XCB_IMAGE_FORMAT_Z_PIXMAP, QX11Info::appRootWindow(), 0, 0, width, height, ~0);
ScopedCPointer<xcb_get_image_reply_t> xImage(xcb_get_image_reply(c, cookie, nullptr));
QVERIFY(!xImage.isNull());
// this operates on the assumption that X server default depth matches Qt's image format
QImage image(xcb_get_image_data(xImage.data()), width, height,
xcb_get_image_data_length(xImage.data()) / height, QImage::Format_ARGB32_Premultiplied);
QImage image(xcb_get_image_data(xImage.data()), width, height, xcb_get_image_data_length(xImage.data()) / height, QImage::Format_ARGB32_Premultiplied);
bool isColored = false;
int blackPixelCount = 0;
......
......@@ -29,9 +29,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QRegularExpression>
#include <QX11Info>
#include <X11/keysym.h>
#include <xcb/xcb.h>
#include <xcb/xcb_keysyms.h>
#include <X11/keysym.h>
static const QString s_kglobalAccelService = QStringLiteral("org.kde.kglobalaccel");
static const QString s_componentInterface = QStringLiteral("org.kde.kglobalaccel.Component");
......@@ -44,21 +44,14 @@ static const QString s_componentInterface = QStringLiteral("org.kde.kglobalaccel
* E.g. plasmashell might accept media shortcuts, but not shortcuts for switching the activity.
**/
static const QMap<QString, QRegularExpression> s_shortcutWhitelist{
{QStringLiteral("/component/mediacontrol"), QRegularExpression(
QStringLiteral("stopmedia|nextmedia|previousmedia|playpausemedia")
)},
{QStringLiteral("/component/kmix"), QRegularExpression(
QStringLiteral("mute|decrease_volume|increase_volume")
)},
{QStringLiteral("/component/org_kde_powerdevil"), QRegularExpression(
QStringLiteral("Increase Screen Brightness|Decrease Screen Brightness|Increase Keyboard Brightness|Decrease Keyboard Brightness|Turn Off Screen|Sleep|Hibernate")
)},
{QStringLiteral("/component/KDE_Keyboard_Layout_Switcher"), QRegularExpression(
QStringLiteral("Switch to Next Keyboard Layout|Switch keyboard layout to .*")
)},
{QStringLiteral("/component/kcm_touchpad"), QRegularExpression(
QStringLiteral("Toggle Touchpad|Enable Touchpad|Disable Touchpad")
)},
{QStringLiteral("/component/mediacontrol"), QRegularExpression(QStringLiteral("stopmedia|nextmedia|previousmedia|playpausemedia"))},
{QStringLiteral("/component/kmix"), QRegularExpression(QStringLiteral("mute|decrease_volume|increase_volume"))},
{QStringLiteral("/component/org_kde_powerdevil"),
QRegularExpression(QStringLiteral(
"Increase Screen Brightness|Decrease Screen Brightness|Increase Keyboard Brightness|Decrease Keyboard Brightness|Turn Off Screen|Sleep|Hibernate"))},
{QStringLiteral("/component/KDE_Keyboard_Layout_Switcher"),
QRegularExpression(QStringLiteral("Switch to Next Keyboard Layout|Switch keyboard layout to .*"))},
{QStringLiteral("/component/kcm_touchpad"), QRegularExpression(QStringLiteral("Toggle Touchpad|Enable Touchpad|Disable Touchpad"))},
};
static uint g_keyModMaskXAccel = 0;
......@@ -67,11 +60,7 @@ static uint g_keyModMaskXOnOrOff = 0;
static void calculateGrabMasks()
{
g_keyModMaskXAccel = KKeyServer::accelModMaskX();
g_keyModMaskXOnOrOff =
KKeyServer::modXLock() |
KKeyServer::modXNumLock() |
KKeyServer::modXScrollLock() |
KKeyServer::modXModeSwitch();
g_keyModMaskXOnOrOff = KKeyServer::modXLock() | KKeyServer::modXNumLock() | KKeyServer::modXScrollLock() | KKeyServer::modXModeSwitch();
}
GlobalAccel::GlobalAccel(QObject *parent)
......@@ -126,57 +115,47 @@ void GlobalAccel::components(QDBusPendingCallWatcher *self)
if (!whitelisted) {
continue;
}
auto message = QDBusMessage::createMethodCall(s_kglobalAccelService,
objectPath,
s_componentInterface,
QStringLiteral("isActive"));
auto message = QDBusMessage::createMethodCall(s_kglobalAccelService, objectPath, s_componentInterface, QStringLiteral("isActive"));
QDBusPendingReply<bool> async = QDBusConnection::sessionBus().asyncCall(message);
QDBusPendingCallWatcher *callWatcher = new QDBusPendingCallWatcher(async, this);
m_updatingInformation++;
connect(callWatcher, &QDBusPendingCallWatcher::finished, this,
[this, objectPath] (QDBusPendingCallWatcher *self) {
QDBusPendingReply<bool> reply = *self;
connect(callWatcher, &QDBusPendingCallWatcher::finished, this, [this, objectPath](QDBusPendingCallWatcher *self) {
QDBusPendingReply<bool> reply = *self;
self->deleteLater();
// filter out inactive components
if (!reply.isValid() || !reply.value()) {
m_updatingInformation--;
return;
}
// active, whitelisted component: get all shortcuts
auto message = QDBusMessage::createMethodCall(s_kglobalAccelService, objectPath, s_componentInterface, QStringLiteral("allShortcutInfos"));
QDBusPendingReply<QList<KGlobalShortcutInfo>> async = QDBusConnection::sessionBus().asyncCall(message);
QDBusPendingCallWatcher *callWatcher = new QDBusPendingCallWatcher(async, this);
connect(callWatcher, &QDBusPendingCallWatcher::finished, this, [this, objectPath](QDBusPendingCallWatcher *self) {
m_updatingInformation--;
QDBusPendingReply<QList<KGlobalShortcutInfo>> reply = *self;
self->deleteLater();
// filter out inactive components
if (!reply.isValid() || !reply.value()) {
m_updatingInformation--;
if (!reply.isValid()) {
return;
}
// active, whitelisted component: get all shortcuts
auto message = QDBusMessage::createMethodCall(s_kglobalAccelService,
objectPath,
s_componentInterface,
QStringLiteral("allShortcutInfos"));
QDBusPendingReply<QList<KGlobalShortcutInfo>> async = QDBusConnection::sessionBus().asyncCall(message);
QDBusPendingCallWatcher *callWatcher = new QDBusPendingCallWatcher(async, this);
connect(callWatcher, &QDBusPendingCallWatcher::finished, this,
[this, objectPath] (QDBusPendingCallWatcher *self) {
m_updatingInformation--;
QDBusPendingReply<QList<KGlobalShortcutInfo>> reply = *self;
self->deleteLater();
if (!reply.isValid()) {
return;
}
// restrict to whitelist
QList<KGlobalShortcutInfo> infos;
auto whitelist = s_shortcutWhitelist.constFind(objectPath);
if (whitelist == s_shortcutWhitelist.constEnd()) {
// this should not happen, just for safety
return;
}
const auto s = reply.value();
for (auto it = s.begin(); it != s.end(); ++it) {
auto matches = whitelist.value().match((*it).uniqueName());
if (matches.hasMatch()) {
infos.append(*it);
}
}
m_shortcuts.insert(objectPath, infos);
// restrict to whitelist
QList<KGlobalShortcutInfo> infos;
auto whitelist = s_shortcutWhitelist.constFind(objectPath);
if (whitelist == s_shortcutWhitelist.constEnd()) {
// this should not happen, just for safety
return;
}
const auto s = reply.value();
for (auto it = s.begin(); it != s.end(); ++it) {
auto matches = whitelist.value().match((*it).uniqueName());
if (matches.hasMatch()) {
infos.append(*it);
}
);
}
);
}
m_shortcuts.insert(objectPath, infos);
});
});
}
m_updatingInformation--;
}
......
......@@ -22,8 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KGlobalShortcutInfo>
#include <QObject>
#include <QMap>
#include <QObject>
class QDBusPendingCallWatcher;
class QKeyEvent;
......
......@@ -21,8 +21,8 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#include "authenticator.h"
#include <kcheckpass-enums.h>
#include <config-kscreenlocker.h>
#include <kcheckpass-enums.h>
// Qt
#include <QCoreApplication>
......@@ -33,11 +33,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// system
#include <errno.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <signal.h>
Authenticator::Authenticator(AuthenticationMode mode, QObject *parent)
: QObject(parent)
......@@ -85,11 +84,9 @@ void Authenticator::setupCheckPass()
connect(m_checkPass, &KCheckPass::failed, this, &Authenticator::failed);
connect(m_checkPass, &KCheckPass::message, this, &Authenticator::message);
connect(m_checkPass, &KCheckPass::error, this, &Authenticator::error);
connect(m_checkPass, &KCheckPass::destroyed, this,
[this] {
m_checkPass = nullptr;
}
);
connect(m_checkPass, &KCheckPass::destroyed, this, [this] {
m_checkPass = nullptr;
});
m_checkPass->start();
}
......@@ -136,11 +133,7 @@ void KCheckPass::start()
if (!m_pid) {
::close(sfd[0]);
sprintf(fdbuf, "%d", sfd[1]);
execlp(QFile::encodeName(QStringLiteral(KCHECKPASS_BIN)).data(),
"kcheckpass",
"-m", "classic",
"-S", fdbuf,
(char *)nullptr);
execlp(QFile::encodeName(QStringLiteral(KCHECKPASS_BIN)).data(), "kcheckpass", "-m", "classic", "-S", fdbuf, (char *)nullptr);
_exit(20);
}
::close(sfd[1]);
......@@ -155,8 +148,8 @@ int KCheckPass::Reader(void *buf, int count)
{
int ret, rlen;
for (rlen = 0; rlen < count; ) {
dord:
for (rlen = 0; rlen < count;) {
dord:
ret = ::read(m_fd, (void *)((char *)buf + rlen), count - rlen);
if (ret < 0) {
if (errno == EINTR)
......@@ -189,13 +182,13 @@ bool KCheckPass::GSendInt(int val)
bool KCheckPass::GSendStr(const char *buf)
{
int len = buf ? ::strlen (buf) + 1 : 0;
return GWrite(&len, sizeof(len)) && GWrite (buf, len);
int len = buf ? ::strlen(buf) + 1 : 0;
return GWrite(&len, sizeof(len)) && GWrite(buf, len);
}
bool KCheckPass::GSendArr(int len, const char *buf)
{
return GWrite(&len, sizeof(len)) && GWrite (buf, len);
return GWrite(&len, sizeof(len)) && GWrite(buf, len);
}
bool KCheckPass::GRecvInt(int *val)
......@@ -214,10 +207,10 @@ bool KCheckPass::GRecvArr(char **ret)
*ret = nullptr;
return true;
}
if (!(buf = (char *)::malloc (len)))
if (!(buf = (char *)::malloc(len)))
return false;
*ret = buf;
if (GRead (buf, len)) {
if (GRead(buf, len)) {
return true;
} else {
::free(buf);
......@@ -232,20 +225,19 @@ void KCheckPass::handleVerify()
int ret;
char *arr;
if (GRecvInt( &ret )) {
if (GRecvInt(&ret)) {
switch (ret) {
case ConvGetBinary:
if (!GRecvArr( &arr ))
if (!GRecvArr(&arr))
break;
// FIXME: not supported
cantCheck();
if (arr)
::free( arr );
::free(arr);
return;
case ConvGetNormal:
case ConvGetHidden:
{
if (!GRecvArr( &arr ))
case ConvGetHidden: {
if (!GRecvArr(&arr))
break;
if (m_password.isNull()) {
......@@ -259,20 +251,20 @@ void KCheckPass::handleVerify()
m_password.clear();
if (arr)
::free( arr );
::free(arr);
return;
}
case ConvPutInfo: