Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove some unused methods, variables, parameters
  • Loading branch information
pvuorela committed May 23, 2017
1 parent 35dba2b commit 16541f8
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 13 deletions.
4 changes: 1 addition & 3 deletions libssu/ssu.cpp
Expand Up @@ -432,10 +432,8 @@ void Ssu::sendRegistration(QString usernameDomain, QString password)
ssuLog->print(LOG_DEBUG, QString("Sending request to %1")
.arg(request.url().url()));

QNetworkReply *reply;

pendingRequests++;
reply = manager->post(request, form.query(QUrl::FullyEncoded).toStdString().c_str());
manager->post(request, form.query(QUrl::FullyEncoded).toStdString().c_str());
// we could expose downloadProgress() from reply in case we want progress info

QString homeUrl = settings->value("home-url").toString().arg(username);
Expand Down
2 changes: 0 additions & 2 deletions libssu/ssudeviceinfo.cpp
Expand Up @@ -148,8 +148,6 @@ QString SsuDeviceInfo::deviceVariant(bool fallback)
if (!cachedVariant.isEmpty())
return cachedVariant;

cachedVariant = "";

if (boardMappings->contains("variants/" + deviceModel())) {
cachedVariant = boardMappings->value("variants/" + deviceModel()).toString();
}
Expand Down
8 changes: 2 additions & 6 deletions ssucli/ssucli.cpp
Expand Up @@ -186,7 +186,6 @@ void SsuCli::optModel(QStringList opt)
void SsuCli::optModifyRepo(enum Actions action, QStringList opt)
{
SsuRepoManager repoManager;
QTextStream qout(stdout);
QTextStream qerr(stderr);

if (opt.count() == 3) {
Expand Down Expand Up @@ -684,14 +683,11 @@ void SsuCli::run()
usage();
}

void SsuCli::uidWarning(QString message)
void SsuCli::uidWarning()
{
if (message.isEmpty())
message = "Run 'ssu ur' as root to recreate repository files";

if (geteuid() != 0) {
QTextStream qout(stderr);
qout << "You're not root. " << message << endl;
qout << "You're not root. Run 'ssu ur' as root to recreate repository files" << endl;
}
}

Expand Down
2 changes: 1 addition & 1 deletion ssucli/ssucli.h
Expand Up @@ -33,7 +33,7 @@ public slots:
QSettings settings;
int state;
void usage(QString message = "");
void uidWarning(QString message = "");
void uidWarning();
void optDomain(QStringList opt);
void optFlavour(QStringList opt);
void optMode(QStringList opt);
Expand Down
1 change: 0 additions & 1 deletion ssuurlresolver/ssuurlresolver.h
Expand Up @@ -59,7 +59,6 @@ class SsuUrlResolver: public QObject
private:
Ssu ssu;
void error(QString message);
void printJournal(int priority, QString message);
bool writeZyppCredentialsIfNeeded(QString credentialsScope);

public slots:
Expand Down

0 comments on commit 16541f8

Please sign in to comment.