| 1 |
// Copyright (C) 2016 The Qt Company Ltd. |
| 2 |
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
// IMPORTANT!!!! If you want to add testdata to this file, |
| 30 |
// always add it to the end in order to not change the linenumbers of translations!!! |
| 31 |
|
| 32 |
#define QTCORE <QtCore> |
| 33 |
#include QTCORE // Hidden from lupdate, but compiles |
| 34 |
|
| 35 |
// |
| 36 |
// Test 'lacks Q_OBJECT' reporting on namespace scopes |
| 37 |
// |
| 38 |
|
| 39 |
class B : public QObject { |
| 40 |
//Q_OBJECT |
| 41 |
void foo(); |
| 42 |
}; |
| 43 |
|
| 44 |
void B::foo() { |
| 45 |
tr("Bla", "::B"); |
| 46 |
} |
| 47 |
|
| 48 |
|
| 49 |
class C : public QObject { |
| 50 |
//Q_OBJECT |
| 51 |
void foo() { |
| 52 |
tr("Bla", "::C"); |
| 53 |
} |
| 54 |
}; |
| 55 |
|
| 56 |
|
| 57 |
namespace nsB { |
| 58 |
|
| 59 |
class B : public QObject { |
| 60 |
//Q_OBJECT |
| 61 |
void foo(); |
| 62 |
}; |
| 63 |
|
| 64 |
void B::foo() { |
| 65 |
tr("Bla", "nsB::B"); |
| 66 |
} |
| 67 |
|
| 68 |
class C : public QObject { |
| 69 |
//Q_OBJECT |
| 70 |
void foo() { |
| 71 |
tr("Bla", "nsB::C"); |
| 72 |
} |
| 73 |
}; |
| 74 |
} |
| 75 |
|