mirror of https://github.com/status-im/nimqml.git
Removed useless warning suppressions
This commit is contained in:
parent
2d84cca167
commit
33b6fc60c7
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue