Removed useless warning suppressions

This commit is contained in:
Filippo Cucchetto 2015-11-22 23:11:06 +01:00
parent 2d84cca167
commit 33b6fc60c7
1 changed files with 0 additions and 24 deletions

View File

@ -27,46 +27,22 @@ type QMetaType* {.pure.} = enum ## \
var qobjectRegistry = initTable[ptr QObjectObj, bool]() var qobjectRegistry = initTable[ptr QObjectObj, bool]()
template debugMsg(message: string) = template debugMsg(message: string) =
{.push warning[user]: off.} # workaround to remove warnings; this won't be needed soon
when defined(debug): when defined(debug):
{.pop.}
echo "NimQml: ", message echo "NimQml: ", message
else:
{.pop.}
template debugMsg(typeName: string, procName: string) = template debugMsg(typeName: string, procName: string) =
{.push warning[user]: off.} # workaround to remove warnings; this won't be needed soon
when defined(debug): when defined(debug):
{.pop.}
var message = typeName var message = typeName
message &= ": " message &= ": "
message &= procName message &= procName
debugMsg(message) debugMsg(message)
else:
{.pop.}
template debugMsg(typeName: string, procName: string, userMessage: string) =
{.push warning[user]: off.} # workaround to remove warnings; this won't be needed soon
when defined(debug):
{.pop.}
var message = typeName
message &= ": "
message &= procName
message &= " "
message &= userMessage
debugMsg(message)
else:
{.pop.}
template newWithCondFinalizer(variable: expr, finalizer: expr) = template newWithCondFinalizer(variable: expr, finalizer: expr) =
## calls ``new`` but only setting a finalizer when ``nimqml_use_finalizers`` ## calls ``new`` but only setting a finalizer when ``nimqml_use_finalizers``
## is defined ## is defined
{.push warning[user]: off.} # workaround to remove warnings; this won't be needed soon
when defined(nimqml_use_finalizers): when defined(nimqml_use_finalizers):
{.pop.}
new(variable, finalizer) new(variable, finalizer)
else: else:
{.pop.}
new(variable) new(variable)
# QVariant # QVariant