C++: Fix hexadecimals in quick fix

Task-number: QTCREATORBUG-6240
Change-Id: Id3dc48d47f88017b3bc9e026c8e5552d2e9f4d48
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
This commit is contained in:
Leandro Melo
2011-10-12 13:47:35 +02:00
committed by Leandro T. C. Melo
parent c436e63ba7
commit 87943ca61c
3 changed files with 12 additions and 1 deletions

View File

@@ -35,6 +35,8 @@
#include <QtGui/QTextDocument>
#include <QtGui/QTextCursor>
#include <cctype>
namespace CppTools {
void moveCursorToEndOfIdentifier(QTextCursor *tc) {
@@ -49,4 +51,11 @@ void moveCursorToEndOfIdentifier(QTextCursor *tc) {
}
}
bool isHexadecimal(char c)
{
return std::isdigit(c)
|| (c >= 'a' && c <= 'f')
|| (c >= 'A' && c <= 'F');
}
} // CppTools

View File

@@ -8,6 +8,7 @@ QT_FORWARD_DECLARE_CLASS(QTextCursor)
namespace CppTools {
void CPPTOOLS_EXPORT moveCursorToEndOfIdentifier(QTextCursor *tc);
bool CPPTOOLS_EXPORT isHexadecimal(char c);
} // CppTools