Commit b4e42106 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Removed stray tokens and fixed warnings/errors when compiling with pedantic C++ compilers.

parent 63522a04
......@@ -2461,7 +2461,7 @@ static const char *qConnectionType(uint type)
#endif
};
return output;
};
}
#if QT_VERSION >= 0x040400
static const ConnectionList &qConnectionList(const QObject *ob, int signalNumber)
......
......@@ -70,9 +70,9 @@ public:
WarnUseBeforeDeclaration = 1 << 8,
WarnDuplicateDeclaration = 1 << 9,
WarnDeclarationsNotStartOfFunction = 1 << 10,
WarnCaseWithoutFlowControlEnd = 1 << 11,
WarnCaseWithoutFlowControlEnd = 1 << 11
};
Q_DECLARE_FLAGS(Options, Option);
Q_DECLARE_FLAGS(Options, Option)
protected:
virtual bool preVisit(AST::Node *ast);
......
......@@ -169,7 +169,7 @@ public: // must be public to make Q_GADGET introspection work
switch_statement, // After 'switch' token
case_start, // after a 'case' or 'default' token
case_cont, // after the colon in a case/default
case_cont // after the colon in a case/default
};
Q_ENUMS(StateType)
......@@ -233,7 +233,7 @@ protected:
Question,
PlusPlus,
MinusMinus,
MinusMinus
};
TokenKind extendedTokenKind(const QmlJS::Token &token) const;
......
......@@ -34,7 +34,7 @@
#include <QtGui/QWidget>
QT_FORWARD_DECLARE_CLASS(QResizeEvent);
QT_FORWARD_DECLARE_CLASS(QResizeEvent)
namespace Utils {
......
......@@ -5,9 +5,9 @@
#include <QtGui/QWidget>
QT_FORWARD_DECLARE_CLASS(QCheckBox);
QT_FORWARD_DECLARE_CLASS(QLabel);
QT_FORWARD_DECLARE_CLASS(QSpinBox);
QT_FORWARD_DECLARE_CLASS(QCheckBox)
QT_FORWARD_DECLARE_CLASS(QLabel)
QT_FORWARD_DECLARE_CLASS(QSpinBox)
namespace Utils {
......
......@@ -65,7 +65,7 @@ public:
HistoryCompleterPrivate(HistoryCompleter *parent);
HistoryCompleter *q_ptr;
HistoryListModel *model;
Q_DECLARE_PUBLIC(HistoryCompleter);
Q_DECLARE_PUBLIC(HistoryCompleter)
};
class HistoryLineDelegate : public QItemDelegate
......
......@@ -59,7 +59,7 @@ protected:
HistoryCompleterPrivate *d_ptr;
private:
Q_DECLARE_PRIVATE(HistoryCompleter);
Q_DECLARE_PRIVATE(HistoryCompleter)
};
} // namespace Utils
......
......@@ -51,6 +51,6 @@ public:
const QString &file);
};
};
}
#endif // UNIXUTILS_H
......@@ -277,5 +277,5 @@ private:
} // namespace Core
Q_DECLARE_OPERATORS_FOR_FLAGS(Core::EditorManager::OpenEditorFlags);
Q_DECLARE_OPERATORS_FOR_FLAGS(Core::EditorManager::OpenEditorFlags)
#endif // EDITORMANAGER_H
......@@ -113,7 +113,7 @@ namespace Internal {
// and read while checking).
class FileMatchContext {
Q_DISABLE_COPY(FileMatchContext);
Q_DISABLE_COPY(FileMatchContext)
public:
// Max data to be read from a file
enum { MaxData = 2048 };
......@@ -164,7 +164,7 @@ QByteArray FileMatchContext::data()
// The binary fallback matcher for "application/octet-stream".
class BinaryMatcher : public IMagicMatcher {
Q_DISABLE_COPY(BinaryMatcher);
Q_DISABLE_COPY(BinaryMatcher)
public:
BinaryMatcher() {}
virtual bool matches(const QByteArray & /*data*/) const { return true; }
......@@ -174,7 +174,7 @@ public:
// A heuristic text file matcher: If the data do not contain any character
// below tab (9), detect as text.
class HeuristicTextMagicMatcher : public IMagicMatcher {
Q_DISABLE_COPY(HeuristicTextMagicMatcher);
Q_DISABLE_COPY(HeuristicTextMagicMatcher)
public:
HeuristicTextMagicMatcher() {}
virtual bool matches(const QByteArray &data) const;
......@@ -646,7 +646,7 @@ namespace Internal {
// MimeDatabase helpers: Generic parser for a sequence of <mime-type>.
// Calls abstract handler function process for MimeType it finds.
class BaseMimeTypeParser {
Q_DISABLE_COPY(BaseMimeTypeParser);
Q_DISABLE_COPY(BaseMimeTypeParser)
public:
BaseMimeTypeParser();
virtual ~BaseMimeTypeParser() {}
......
......@@ -34,7 +34,7 @@
#include <QtCore/QObject>
#include <QtCore/QString>
QT_FORWARD_DECLARE_CLASS(QTimer);
QT_FORWARD_DECLARE_CLASS(QTimer)
namespace Core {
namespace Internal {
......
......@@ -75,7 +75,7 @@ enum SshPacketType {
SSH_MSG_CHANNEL_CLOSE = 97,
SSH_MSG_CHANNEL_REQUEST = 98,
SSH_MSG_CHANNEL_SUCCESS = 99,
SSH_MSG_CHANNEL_FAILURE = 100,
SSH_MSG_CHANNEL_FAILURE = 100
};
enum SshExtendedDataType { SSH_EXTENDED_DATA_STDERR = 1 };
......
......@@ -50,7 +50,7 @@ namespace TextEditor {
class TabSettings;
}
namespace CppTools {
namespace CppTools {
namespace Internal {
class CppCodeFormatterData;
}
......@@ -170,7 +170,7 @@ public: // must be public to make Q_GADGET introspection work
assign_open, // after an assignment token
expression, // after a '=' in a declaration_start once we're sure it's not '= {'
initializer, // after a '=' in a declaration start
initializer // after a '=' in a declaration start
};
Q_ENUMS(StateType)
......
......@@ -94,7 +94,7 @@ public:
PublicSlot = Public | SlotBit,
ProtectedSlot = Protected | SlotBit,
PrivateSlot = Private | SlotBit,
PrivateSlot = Private | SlotBit
};
public:
......
......@@ -1036,7 +1036,7 @@ static QString stateToString(BreakpointState state)
case BreakpointDead: return "Dead";
default: return "<invalid state>";
}
};
}
bool BreakHandler::BreakpointItem::needsChange() const
{
......
......@@ -54,7 +54,7 @@ enum BreakpointType
BreakpointAtThrow,
BreakpointAtCatch,
BreakpointAtMain,
Watchpoint,
Watchpoint
};
enum BreakpointState
......@@ -67,7 +67,7 @@ enum BreakpointState
BreakpointInserted,
BreakpointRemoveRequested,
BreakpointRemoveProceeding,
BreakpointDead,
BreakpointDead
};
class BreakpointParameters
......
......@@ -151,7 +151,7 @@ public:
History() : m_index(0) {}
void append(const QString &item) {
m_items.removeAll(item);
m_items.append(item); m_index = m_items.size() - 1;
m_items.append(item); m_index = m_items.size() - 1;
}
void down() { m_index = qMin(m_index + 1, m_items.size()); }
void up() { m_index = qMax(m_index - 1, 0); }
......@@ -289,7 +289,7 @@ ConsoleWindow::ConsoleWindow(QWidget *parent)
//connect(m_console, SIGNAL(statusMessageRequested(QString,int)),
// this, SIGNAL(statusMessageRequested(QString,int)));
};
}
void ConsoleWindow::showOutput(int channel, const QString &output)
{
......
......@@ -162,7 +162,7 @@ enum DebuggerCapabilities
CreateFullBacktraceCapability = 0x800,
AddWatcherCapability = 0x1000,
WatchpointCapability = 0x2000,
ShowModuleSymbolsCapability = 0x4000,
ShowModuleSymbolsCapability = 0x4000
};
enum LogChannel
......@@ -209,7 +209,7 @@ enum ModelRoles
LocalsIsWatchpointAtPointerValueRole,
// Snapshots
SnapshotCapabilityRole,
SnapshotCapabilityRole
};
enum DebuggerEngineType
......
......@@ -72,7 +72,7 @@ enum DebuggingHelperState
DebuggingHelperUninitialized,
DebuggingHelperLoadTried,
DebuggingHelperAvailable,
DebuggingHelperUnavailable,
DebuggingHelperUnavailable
};
......@@ -182,7 +182,7 @@ private: ////////// Gdb Command Management //////////
enum GdbCommandFlag {
NoFlags = 0,
// The command needs a stopped inferior.
NeedsStop = 1,
NeedsStop = 1,
// No need to wait for the reply before continuing inferior.
Discardable = 2,
// Trigger watch model rebuild when no such commands are pending anymore.
......@@ -201,7 +201,7 @@ private: ////////// Gdb Command Management //////////
// This command needs to be send immediately.
Immediate = 256,
// This is a command that needs to be wrapped into -interpreter-exec console
ConsoleCommand = 512,
ConsoleCommand = 512
};
Q_DECLARE_FLAGS(GdbCommandFlags, GdbCommandFlag)
private:
......@@ -524,7 +524,7 @@ private: ////////// View & Data Stuff //////////
QtDumperHelper m_dumperHelper;
QString m_gdb;
//
//
// Convenience Functions
//
QString errorMessage(QProcess::ProcessError error);
......
......@@ -386,7 +386,7 @@ QByteArray GdbResponse::stringFromResultClass(GdbResultClass resultClass)
case GdbResultExit: return "exit";
default: return "unknown";
}
};
}
QByteArray GdbResponse::toString() const
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment