Skip to content

Commit

Permalink
[ssu] Drop old compat wrappers for bits in SsuDeviceinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernd Wachter committed Oct 6, 2013
1 parent 17278c6 commit da8c1e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
3 changes: 3 additions & 0 deletions libssu/ssu.cpp
Expand Up @@ -20,6 +20,7 @@
#include "ssuvariables.h"
#include "ssucoreconfig.h"
#include "ssurepomanager.h"
#include "ssudeviceinfo.h"

#include "../constants.h"

Expand Down Expand Up @@ -291,6 +292,7 @@ void Ssu::sendRegistration(QString usernameDomain, QString password){

SsuLog *ssuLog = SsuLog::instance();
SsuCoreConfig *settings = SsuCoreConfig::instance();
SsuDeviceInfo deviceInfo;

// Username can include also domain, (user@domain), separate those
if (usernameDomain.contains('@')) {
Expand Down Expand Up @@ -503,6 +505,7 @@ void Ssu::storeAuthorizedKeys(QByteArray data){

void Ssu::updateCredentials(bool force){
SsuCoreConfig *settings = SsuCoreConfig::instance();
SsuDeviceInfo deviceInfo;
errorFlag = false;

SsuLog *ssuLog = SsuLog::instance();
Expand Down
12 changes: 0 additions & 12 deletions libssu/ssu.h
Expand Up @@ -14,8 +14,6 @@

#include <QtXml/QDomDocument>

#include "ssudeviceinfo.h"

class QNetworkAccessManager;
class QNetworkReply;

Expand Down Expand Up @@ -123,21 +121,11 @@ class Ssu: public QObject {
Remove = 0x4 ///< Make sure the given value is not set in the bitmask
};


// compat stuff, might go away when refactoring is finished
/// See SsuDeviceInfo::deviceFamily
Q_INVOKABLE QString deviceFamily(){ return deviceInfo.deviceFamily(); };
/// See SsuDeviceInfo::deviceModel
Q_INVOKABLE QString deviceModel(){ return deviceInfo.deviceModel(); };
/// See SsuDeviceInfo::deviceUid
Q_INVOKABLE QString deviceUid(){ return deviceInfo.deviceUid(); };

private:
QString errorString;
bool errorFlag;
QNetworkAccessManager *manager;
int pendingRequests;
SsuDeviceInfo deviceInfo;
bool registerDevice(QDomDocument *response);
bool setCredentials(QDomDocument *response);
bool verifyResponse(QDomDocument *response);
Expand Down

0 comments on commit da8c1e3

Please sign in to comment.