Skip to content

Commit

Permalink
Fixup: improve some things reported by Codacy (Mudlet#1264)
Browse files Browse the repository at this point in the history
* Fixup: improve some things reported by Codacy

Added a hash-bang entry to src/mudlet-lua/genDoc.sh

Removed "almost illegal" #define of _DEBUG_ to nothing in:
src/dlgConnectionProfiles.cpp as that is reserved for compilers' use in the
C++ standards and should not be #define-d by the end user.

Removed some lines containing just a '#' character in
3rdparty/communi/include/IrcCore/ircglobal.h as Codacy was reporting an
un-closed #if...#else - the "#  endif" was present but it is not clear that
isolated '#' characters are wise/safe to use in a C/C++ source code file.

Also added some non-source code files to main Qt project files including
one modified by this commit so that they show up in the Qt Creator IDE.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
  • Loading branch information
SlySven authored Dec 19, 2017
1 parent e83688e commit a3992d9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
12 changes: 6 additions & 6 deletions 3rdparty/communi/include/IrcCore/ircglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,31 +37,31 @@
*/
#define IRC_STATIC
#if defined(IRC_SHARED)
#

# if defined(BUILD_IRC_CORE)
# define IRC_CORE_EXPORT Q_DECL_EXPORT
# else
# define IRC_CORE_EXPORT Q_DECL_IMPORT
# endif
#

# if defined(BUILD_IRC_MODEL)
# define IRC_MODEL_EXPORT Q_DECL_EXPORT
# else
# define IRC_MODEL_EXPORT Q_DECL_IMPORT
# endif
#

# if defined(BUILD_IRC_UTIL)
# define IRC_UTIL_EXPORT Q_DECL_EXPORT
# else
# define IRC_UTIL_EXPORT Q_DECL_IMPORT
# endif
#

#elif defined(IRC_STATIC) || defined(BUILD_IRC_CORE) || defined(BUILD_IRC_MODEL) || defined(BUILD_IRC_UTIL)
#

# define IRC_CORE_EXPORT
# define IRC_MODEL_EXPORT
# define IRC_UTIL_EXPORT
#

#else
# error Installation problem: either IRC_SHARED or IRC_STATIC must be defined!
#endif
Expand Down
3 changes: 0 additions & 3 deletions src/dlgConnectionProfiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@
#include <QStringBuilder>
#include "post_guard.h"


#define _DEBUG_

dlgConnectionProfiles::dlgConnectionProfiles(QWidget * parent)
: QDialog( parent )
, mProfileList( QStringList() )
Expand Down
2 changes: 1 addition & 1 deletion src/mudlet-lua/genDoc.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#!/bin/sh
# wipe all old html files
cd mudlet-lua-doc/
find . -name "*.html" -type f
Expand Down
8 changes: 7 additions & 1 deletion src/mudlet.pro
Original file line number Diff line number Diff line change
Expand Up @@ -560,4 +560,10 @@ DISTFILES += \
../cmake/FindYAJL.cmake \
../cmake/FindZIP.cmake \
.clang-format \
CMakeLists.txt
CMakeLists.txt \
mudlet-lua/lua/ldoc.css \
mudlet-lua/genDoc.sh \
mudlet-lua/tests/README.md \
mudlet-lua/tests/DB.lua \
mudlet-lua/tests/GUIUtils.lua \
mudlet-lua/tests/Other.lua

0 comments on commit a3992d9

Please sign in to comment.