Skip to content

Commit

Permalink
Sonar cleaning.
Browse files Browse the repository at this point in the history
  • Loading branch information
herve-er committed Apr 19, 2024
1 parent badd71e commit e53c807
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/gui/debuggingdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@ void DebuggingDialog::onSaveButtonTriggered(bool checked) {

void DebuggingDialog::onSendLogButtonTriggered() {
int size;
ExitCode exitCode = GuiRequests::getAproximateLogSize(size);
if (exitCode != ExitCode::ExitCodeOk) {

if (ExitCode exitCode = GuiRequests::getAproximateLogSize(size); exitCode != ExitCode::ExitCodeOk) {
onSendLogConfirmed(true); // Send all logs by default if we can't get the aproximate size
return;
}
Expand Down
7 changes: 5 additions & 2 deletions src/libcommonserver/log/log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,11 @@ bool Log::compressLogs(const SyncPath &directoryToCompress, IoError &ioError, st
bool Log::generateUserDescriptionFile(const SyncPath &outputPath, IoError &ioError) {
SyncPath filePath = outputPath / "user_description.txt";

std::string osName, osArch, appVersion, userId;
// CommonUtility::getRunningOS(osName, osVersion, osArch);
std::string osName;
std::string osArch;
std::string appVersion;
std::string userId;

osName = CommonUtility::platformName().toStdString();
osArch = CommonUtility::platformArch().toStdString();
appVersion = CommonUtility::userAgentString();
Expand Down
4 changes: 2 additions & 2 deletions src/libcommonserver/log/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,14 @@ class COMMONSERVER_EXPORT Log {
bool generateLogsSupportArchive(bool includeOldLogs, const SyncPath &outputPath, const SyncPath &archiveName,
IoError &ioError, std::function<void(int64_t)> progressCallback = nullptr);

bool generateUserDescriptionFile(const SyncPath &outputPath, IoError &ioError); // TODO: set this method as private

private:
Log(const log4cplus::tstring &filePath);
bool copyLogsTo(const SyncPath &outputPath, bool includeOldLogs, IoError &ioError);
bool copyParmsDbTo(const SyncPath &outputPath, IoError &ioError);
bool compressLogs(const SyncPath &directoryToCompress, IoError &ioError,
std::function<void(int64_t)> progressCallback = nullptr);
bool generateUserDescriptionFile(const SyncPath &outputPath, IoError &ioError);

static std::shared_ptr<Log> _instance;
log4cplus::Logger _logger;
};
Expand Down

0 comments on commit e53c807

Please sign in to comment.