summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-07-19 20:26:54 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-07-19 21:16:03 +0900
commit46c95e998bdfcbd93247b5f221149921eb0351f6 (patch)
tree3ed5b957f377771a7632955d408a787b96d40e1a
parent9fdc22134b3f0ed3c0af126ca8b3a63ebbcaf4d7 (diff)
downloadadmin-46c95e998bdfcbd93247b5f221149921eb0351f6.tar.gz
admin-46c95e998bdfcbd93247b5f221149921eb0351f6.zip
Add support for moc-ing TQ_OBJECT classes
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit bf853883478c90dd4a9bc594f792e77031fcba58)
-rw-r--r--am_edit6
1 files changed, 2 insertions, 4 deletions
diff --git a/am_edit b/am_edit
index 5c48b2e..e8230e7 100644
--- a/am_edit
+++ b/am_edit
@@ -2116,10 +2116,8 @@ sub findMocCandidates ()
seek(HFIN, 0, 0);
read HFIN, $hfData, $hfsize;
close HFIN;
- # push (@list, $hf) if(index($hfData, "Q_OBJECT") >= 0); ### fast but doesn't handle //Q_OBJECT
- # handle " { friend class blah; Q_OBJECT ", but don't match antlarr_Q_OBJECT (\b).
- if ( $hfData =~ /{([^}]*)\bQ_OBJECT/s ) {
- push (@list, $hf) unless $1 =~ m://[^\n]*Q_OBJECT[^\n]*$:s; ## reject "// Q_OBJECT"
+ if ( $hfData =~ /{([^}]*)\bT?Q_OBJECT/s ) {
+ push (@list, $hf) unless $1 =~ m://[^\n]*T?Q_OBJECT[^\n]*$:s; ## reject "// (T)Q_OBJECT"
}
}
# The assoc array of root of headerfile and header filename