Skip to content

Commit

Permalink
add guards around string constants
Browse files Browse the repository at this point in the history
Signed-off-by: tnixeu <4436784+tnixeu@users.noreply.github.com>
  • Loading branch information
tnixeu committed Oct 29, 2022
1 parent 8deb009 commit dd3f74d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/gui/folder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@
#include <QPushButton>
#include <QApplication>

#ifndef VERSION_C
#define VERSION_C
static const char versionC[] = "version";

#endif
namespace OCC {

Q_LOGGING_CATEGORY(lcFolder, "nextcloud.gui.folder", QtInfoMsg)
Expand Down
3 changes: 3 additions & 0 deletions src/gui/folderman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
#include <QDesktopServices>
#include <QtConcurrent>

#ifndef VERSION_C
#define VERSION_C
static const char versionC[] = "version";
#endif
static const int maxFoldersVersion = 1;

namespace OCC {
Expand Down
3 changes: 3 additions & 0 deletions src/gui/sharelinkwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
#include <QPropertyAnimation>

namespace {
#ifndef PASSWORD_IS_SET_PLACEHOLDER
#define PASSWORD_IS_SET_PLACEHOLDER
const char *passwordIsSetPlaceholder = "●●●●●●●●";
#endif
}

namespace OCC {
Expand Down
6 changes: 4 additions & 2 deletions src/gui/shareusergroupwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@
#include <cstring>

namespace {
const char *passwordIsSetPlaceholder = "●●●●●●●●";

#ifndef PASSWORD_IS_SET_PLACEHOLDER
#define PASSWORD_IS_SET_PLACEHOLDER
const char *passwordIsSetPlaceholder = "●●●●●●●●";
#endif
}

namespace OCC {
Expand Down

0 comments on commit dd3f74d

Please sign in to comment.