Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
CMake
CMake
Commits
f5ccef17
Commit
f5ccef17
authored
Jul 09, 2017
by
Sebastian Holtermann
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Autogen: Extended mocInclude tests
The extended tests cover more AUTOMOC use cases.
parent
a8d8d2fd
Changes
58
Hide whitespace changes
Inline
Side-by-side
Showing
58 changed files
with
927 additions
and
246 deletions
+927
-246
Tests/QtAutogen/CMakeLists.txt
Tests/QtAutogen/CMakeLists.txt
+6
-0
Tests/QtAutogen/mocInclude/EObjA.cpp
Tests/QtAutogen/mocInclude/EObjA.cpp
+43
-0
Tests/QtAutogen/mocInclude/EObjA.hpp
Tests/QtAutogen/mocInclude/EObjA.hpp
+19
-0
Tests/QtAutogen/mocInclude/EObjAExtra.cpp
Tests/QtAutogen/mocInclude/EObjAExtra.cpp
+20
-0
Tests/QtAutogen/mocInclude/EObjAExtra.hpp
Tests/QtAutogen/mocInclude/EObjAExtra.hpp
+18
-0
Tests/QtAutogen/mocInclude/EObjAExtra_p.hpp
Tests/QtAutogen/mocInclude/EObjAExtra_p.hpp
+12
-0
Tests/QtAutogen/mocInclude/EObjA_p.hpp
Tests/QtAutogen/mocInclude/EObjA_p.hpp
+12
-0
Tests/QtAutogen/mocInclude/EObjB.cpp
Tests/QtAutogen/mocInclude/EObjB.cpp
+44
-0
Tests/QtAutogen/mocInclude/EObjB.hpp
Tests/QtAutogen/mocInclude/EObjB.hpp
+19
-0
Tests/QtAutogen/mocInclude/EObjB_p.hpp
Tests/QtAutogen/mocInclude/EObjB_p.hpp
+12
-0
Tests/QtAutogen/mocInclude/LObjA.cpp
Tests/QtAutogen/mocInclude/LObjA.cpp
+39
-0
Tests/QtAutogen/mocInclude/LObjA.hpp
Tests/QtAutogen/mocInclude/LObjA.hpp
+19
-0
Tests/QtAutogen/mocInclude/LObjA_p.h
Tests/QtAutogen/mocInclude/LObjA_p.h
+12
-0
Tests/QtAutogen/mocInclude/LObjB.cpp
Tests/QtAutogen/mocInclude/LObjB.cpp
+40
-0
Tests/QtAutogen/mocInclude/LObjB.hpp
Tests/QtAutogen/mocInclude/LObjB.hpp
+19
-0
Tests/QtAutogen/mocInclude/LObjB_p.h
Tests/QtAutogen/mocInclude/LObjB_p.h
+12
-0
Tests/QtAutogen/mocInclude/ObjA.cpp
Tests/QtAutogen/mocInclude/ObjA.cpp
+10
-14
Tests/QtAutogen/mocInclude/ObjA.hpp
Tests/QtAutogen/mocInclude/ObjA.hpp
+8
-2
Tests/QtAutogen/mocInclude/ObjA_p.h
Tests/QtAutogen/mocInclude/ObjA_p.h
+12
-0
Tests/QtAutogen/mocInclude/ObjB.cpp
Tests/QtAutogen/mocInclude/ObjB.cpp
+10
-13
Tests/QtAutogen/mocInclude/ObjB.hpp
Tests/QtAutogen/mocInclude/ObjB.hpp
+10
-4
Tests/QtAutogen/mocInclude/ObjB_p.h
Tests/QtAutogen/mocInclude/ObjB_p.h
+12
-0
Tests/QtAutogen/mocInclude/ObjC.cpp
Tests/QtAutogen/mocInclude/ObjC.cpp
+0
-26
Tests/QtAutogen/mocInclude/ObjD.cpp
Tests/QtAutogen/mocInclude/ObjD.cpp
+0
-26
Tests/QtAutogen/mocInclude/SObjA.cpp
Tests/QtAutogen/mocInclude/SObjA.cpp
+11
-0
Tests/QtAutogen/mocInclude/SObjA.hpp
Tests/QtAutogen/mocInclude/SObjA.hpp
+15
-0
Tests/QtAutogen/mocInclude/SObjB.cpp.in
Tests/QtAutogen/mocInclude/SObjB.cpp.in
+11
-0
Tests/QtAutogen/mocInclude/SObjB.hpp.in
Tests/QtAutogen/mocInclude/SObjB.hpp.in
+15
-0
Tests/QtAutogen/mocInclude/SObjC.cpp
Tests/QtAutogen/mocInclude/SObjC.cpp
+35
-0
Tests/QtAutogen/mocInclude/SObjC.hpp
Tests/QtAutogen/mocInclude/SObjC.hpp
+15
-0
Tests/QtAutogen/mocInclude/SObjCExtra.cpp
Tests/QtAutogen/mocInclude/SObjCExtra.cpp
+31
-0
Tests/QtAutogen/mocInclude/SObjCExtra.hpp
Tests/QtAutogen/mocInclude/SObjCExtra.hpp
+15
-0
Tests/QtAutogen/mocInclude/SObjCExtra.moc.in
Tests/QtAutogen/mocInclude/SObjCExtra.moc.in
+4
-0
Tests/QtAutogen/mocInclude/shared.cmake
Tests/QtAutogen/mocInclude/shared.cmake
+69
-0
Tests/QtAutogen/mocInclude/subA/SubObjA.cpp
Tests/QtAutogen/mocInclude/subA/SubObjA.cpp
+0
-27
Tests/QtAutogen/mocInclude/subA/SubObjA.hpp
Tests/QtAutogen/mocInclude/subA/SubObjA.hpp
+0
-16
Tests/QtAutogen/mocInclude/subB/SubObjB.cpp
Tests/QtAutogen/mocInclude/subB/SubObjB.cpp
+0
-27
Tests/QtAutogen/mocInclude/subB/SubObjB.hpp
Tests/QtAutogen/mocInclude/subB/SubObjB.hpp
+0
-16
Tests/QtAutogen/mocInclude/subC/SubObjC.cpp
Tests/QtAutogen/mocInclude/subC/SubObjC.cpp
+0
-27
Tests/QtAutogen/mocInclude/subC/SubObjC.hpp
Tests/QtAutogen/mocInclude/subC/SubObjC.hpp
+0
-16
Tests/QtAutogen/mocInclude/subExtra/EObjBExtra.cpp
Tests/QtAutogen/mocInclude/subExtra/EObjBExtra.cpp
+20
-0
Tests/QtAutogen/mocInclude/subExtra/EObjBExtra.hpp
Tests/QtAutogen/mocInclude/subExtra/EObjBExtra.hpp
+18
-0
Tests/QtAutogen/mocInclude/subExtra/EObjBExtra_p.hpp
Tests/QtAutogen/mocInclude/subExtra/EObjBExtra_p.hpp
+12
-0
Tests/QtAutogen/mocInclude/subGlobal/GObj.cpp
Tests/QtAutogen/mocInclude/subGlobal/GObj.cpp
+41
-0
Tests/QtAutogen/mocInclude/subGlobal/GObj.hpp
Tests/QtAutogen/mocInclude/subGlobal/GObj.hpp
+17
-0
Tests/QtAutogen/mocInclude/subGlobal/GObj_p.hpp
Tests/QtAutogen/mocInclude/subGlobal/GObj_p.hpp
+15
-0
Tests/QtAutogen/mocIncludeRelaxed/CMakeLists.txt
Tests/QtAutogen/mocIncludeRelaxed/CMakeLists.txt
+11
-12
Tests/QtAutogen/mocIncludeRelaxed/RMain.cpp
Tests/QtAutogen/mocIncludeRelaxed/RMain.cpp
+12
-0
Tests/QtAutogen/mocIncludeRelaxed/RObjA.cpp
Tests/QtAutogen/mocIncludeRelaxed/RObjA.cpp
+12
-0
Tests/QtAutogen/mocIncludeRelaxed/RObjA.hpp
Tests/QtAutogen/mocIncludeRelaxed/RObjA.hpp
+14
-0
Tests/QtAutogen/mocIncludeRelaxed/RObjB.cpp
Tests/QtAutogen/mocIncludeRelaxed/RObjB.cpp
+22
-0
Tests/QtAutogen/mocIncludeRelaxed/RObjB.hpp
Tests/QtAutogen/mocIncludeRelaxed/RObjB.hpp
+14
-0
Tests/QtAutogen/mocIncludeRelaxed/RObjBExtra.hpp
Tests/QtAutogen/mocIncludeRelaxed/RObjBExtra.hpp
+14
-0
Tests/QtAutogen/mocIncludeRelaxed/RObjC.cpp
Tests/QtAutogen/mocIncludeRelaxed/RObjC.cpp
+30
-0
Tests/QtAutogen/mocIncludeRelaxed/RObjC.hpp
Tests/QtAutogen/mocIncludeRelaxed/RObjC.hpp
+14
-0
Tests/QtAutogen/mocIncludeRelaxed/main.cpp
Tests/QtAutogen/mocIncludeRelaxed/main.cpp
+15
-3
Tests/QtAutogen/mocIncludeStrict/CMakeLists.txt
Tests/QtAutogen/mocIncludeStrict/CMakeLists.txt
+2
-14
Tests/QtAutogen/mocIncludeStrict/main.cpp
Tests/QtAutogen/mocIncludeStrict/main.cpp
+15
-3
No files found.
Tests/QtAutogen/CMakeLists.txt
View file @
f5ccef17
...
...
@@ -22,6 +22,9 @@ if (QT_TEST_VERSION STREQUAL 4)
macro
(
qtx_wrap_cpp
)
qt4_wrap_cpp
(
${
ARGN
}
)
endmacro
()
macro
(
qtx_generate_moc
)
qt4_generate_moc
(
${
ARGN
}
)
endmacro
()
else
()
if
(
NOT QT_TEST_VERSION STREQUAL 5
)
...
...
@@ -41,6 +44,9 @@ else()
macro
(
qtx_wrap_cpp
)
qt5_wrap_cpp
(
${
ARGN
}
)
endmacro
()
macro
(
qtx_generate_moc
)
qt5_generate_moc
(
${
ARGN
}
)
endmacro
()
endif
()
...
...
Tests/QtAutogen/mocInclude/EObjA.cpp
0 → 100644
View file @
f5ccef17
#include "EObjA.hpp"
#include "EObjAExtra.hpp"
#include "EObjA_p.hpp"
class
EObjALocal
:
public
QObject
{
Q_OBJECT
public:
EObjALocal
();
~
EObjALocal
();
};
EObjALocal
::
EObjALocal
()
{
}
EObjALocal
::~
EObjALocal
()
{
}
EObjAPrivate
::
EObjAPrivate
()
{
EObjALocal
localObj
;
EObjAExtra
extraObj
;
}
EObjAPrivate
::~
EObjAPrivate
()
{
}
EObjA
::
EObjA
()
:
d
(
new
EObjAPrivate
)
{
}
EObjA
::~
EObjA
()
{
}
// For EObjALocal
#include "EObjA.moc"
// - Not the own header
#include "moc_EObjAExtra.cpp"
Tests/QtAutogen/mocInclude/EObjA.hpp
0 → 100644
View file @
f5ccef17
#ifndef EOBJA_HPP
#define EOBJA_HPP
#include <QObject>
// Sources includes a moc_ includes of an extra object
class
EObjAPrivate
;
class
EObjA
:
public
QObject
{
Q_OBJECT
public:
EObjA
();
~
EObjA
();
private:
EObjAPrivate
*
const
d
;
};
#endif
Tests/QtAutogen/mocInclude/EObjAExtra.cpp
0 → 100644
View file @
f5ccef17
#include "EObjAExtra.hpp"
#include "EObjAExtra_p.hpp"
EObjAExtraPrivate
::
EObjAExtraPrivate
()
{
}
EObjAExtraPrivate
::~
EObjAExtraPrivate
()
{
}
EObjAExtra
::
EObjAExtra
()
:
d
(
new
EObjAExtraPrivate
)
{
}
EObjAExtra
::~
EObjAExtra
()
{
delete
d
;
}
Tests/QtAutogen/mocInclude/EObjAExtra.hpp
0 → 100644
View file @
f5ccef17
#ifndef EOBJAEXTRA_HPP
#define EOBJAEXTRA_HPP
#include <QObject>
class
EObjAExtraPrivate
;
class
EObjAExtra
:
public
QObject
{
Q_OBJECT
public:
EObjAExtra
();
~
EObjAExtra
();
private:
EObjAExtraPrivate
*
const
d
;
};
#endif
Tests/QtAutogen/mocInclude/EObjAExtra_p.hpp
0 → 100644
View file @
f5ccef17
#ifndef EOBJAEXTRA_P_HPP
#define EOBJAEXTRA_P_HPP
class
EObjAExtraPrivate
:
public
QObject
{
Q_OBJECT
public:
EObjAExtraPrivate
();
~
EObjAExtraPrivate
();
};
#endif
Tests/QtAutogen/mocInclude/EObjA_p.hpp
0 → 100644
View file @
f5ccef17
#ifndef EOBJA_P_HPP
#define EOBJA_P_HPP
class
EObjAPrivate
:
public
QObject
{
Q_OBJECT
public:
EObjAPrivate
();
~
EObjAPrivate
();
};
#endif
Tests/QtAutogen/mocInclude/EObjB.cpp
0 → 100644
View file @
f5ccef17
#include "EObjB.hpp"
#include "EObjB_p.hpp"
#include "subExtra/EObjBExtra.hpp"
class
EObjBLocal
:
public
QObject
{
Q_OBJECT
public:
EObjBLocal
();
~
EObjBLocal
();
};
EObjBLocal
::
EObjBLocal
()
{
}
EObjBLocal
::~
EObjBLocal
()
{
}
EObjBPrivate
::
EObjBPrivate
()
{
EObjBLocal
localObj
;
EObjBExtra
extraObj
;
}
EObjBPrivate
::~
EObjBPrivate
()
{
}
EObjB
::
EObjB
()
:
d
(
new
EObjBPrivate
)
{
}
EObjB
::~
EObjB
()
{
}
// For EObjBLocal
#include "EObjB.moc"
// - Not the own header
// - in a subdirectory
#include "subExtra/moc_EObjBExtra.cpp"
Tests/QtAutogen/mocInclude/EObjB.hpp
0 → 100644
View file @
f5ccef17
#ifndef EOBJB_HPP
#define EOBJB_HPP
#include <QObject>
// Sources includes a moc_ includes of an extra object in a subdirectory
class
EObjBPrivate
;
class
EObjB
:
public
QObject
{
Q_OBJECT
public:
EObjB
();
~
EObjB
();
private:
EObjBPrivate
*
const
d
;
};
#endif
Tests/QtAutogen/mocInclude/EObjB_p.hpp
0 → 100644
View file @
f5ccef17
#ifndef EOBJB_P_HPP
#define EOBJB_P_HPP
class
EObjBPrivate
:
public
QObject
{
Q_OBJECT
public:
EObjBPrivate
();
~
EObjBPrivate
();
};
#endif
Tests/QtAutogen/mocInclude/LObjA.cpp
0 → 100644
View file @
f5ccef17
#include "LObjA.hpp"
#include "LObjA_p.h"
class
LObjALocal
:
public
QObject
{
Q_OBJECT
public:
LObjALocal
();
~
LObjALocal
();
};
LObjALocal
::
LObjALocal
()
{
}
LObjALocal
::~
LObjALocal
()
{
}
LObjAPrivate
::
LObjAPrivate
()
{
LObjALocal
localObj
;
}
LObjAPrivate
::~
LObjAPrivate
()
{
}
LObjA
::
LObjA
()
:
d
(
new
LObjAPrivate
)
{
}
LObjA
::~
LObjA
()
{
delete
d
;
}
#include "LObjA.moc"
Tests/QtAutogen/mocInclude/LObjA.hpp
0 → 100644
View file @
f5ccef17
#ifndef LOBJA_HPP
#define LOBJA_HPP
#include <QObject>
// Object source comes with a .moc include
class
LObjAPrivate
;
class
LObjA
:
public
QObject
{
Q_OBJECT
public:
LObjA
();
~
LObjA
();
private:
LObjAPrivate
*
const
d
;
};
#endif
Tests/QtAutogen/mocInclude/LObjA_p.h
0 → 100644
View file @
f5ccef17
#ifndef LOBJA_P_HPP
#define LOBJA_P_HPP
class
LObjAPrivate
:
public
QObject
{
Q_OBJECT
public:
LObjAPrivate
();
~
LObjAPrivate
();
};
#endif
Tests/QtAutogen/mocInclude/LObjB.cpp
0 → 100644
View file @
f5ccef17
#include "LObjB.hpp"
#include "LObjB_p.h"
class
LObjBLocal
:
public
QObject
{
Q_OBJECT
public:
LObjBLocal
();
~
LObjBLocal
();
};
LObjBLocal
::
LObjBLocal
()
{
}
LObjBLocal
::~
LObjBLocal
()
{
}
LObjBPrivate
::
LObjBPrivate
()
{
LObjBLocal
localObj
;
}
LObjBPrivate
::~
LObjBPrivate
()
{
}
LObjB
::
LObjB
()
:
d
(
new
LObjBPrivate
)
{
}
LObjB
::~
LObjB
()
{
delete
d
;
}
#include "LObjB.moc"
#include "moc_LObjB.cpp"
Tests/QtAutogen/mocInclude/LObjB.hpp
0 → 100644
View file @
f5ccef17
#ifndef LLObjB_HPP
#define LLObjB_HPP
#include <QObject>
// Object source comes with a .moc and a _moc include
class
LObjBPrivate
;
class
LObjB
:
public
QObject
{
Q_OBJECT
public:
LObjB
();
~
LObjB
();
private:
LObjBPrivate
*
const
d
;
};
#endif
Tests/QtAutogen/mocInclude/LObjB_p.h
0 → 100644
View file @
f5ccef17
#ifndef LOBJB_P_HPP
#define LOBJB_P_HPP
class
LObjBPrivate
:
public
QObject
{
Q_OBJECT
public:
LObjBPrivate
();
~
LObjBPrivate
();
};
#endif
Tests/QtAutogen/mocInclude/ObjA.cpp
View file @
f5ccef17
#include "ObjA.hpp"
#include "ObjA_p.h"
class
SubObjA
:
public
QObject
ObjAPrivate
::
ObjAPrivate
()
{
Q_OBJECT
public:
SubObjA
()
{}
~
SubObjA
()
{}
Q_SLOT
void
aSlot
();
};
}
void
SubObjA
::
aSlot
()
ObjAPrivate
::~
ObjAPrivate
()
{
}
void
ObjA
::
go
()
ObjA
::
ObjA
()
:
d
(
new
ObjAPrivate
)
{
SubObjA
subObj
;
}
#include "ObjA.moc"
ObjA
::~
ObjA
()
{
delete
d
;
}
Tests/QtAutogen/mocInclude/ObjA.hpp
View file @
f5ccef17
...
...
@@ -3,11 +3,17 @@
#include <QObject>
// Object source comes without any _moc/.moc includes
class
ObjAPrivate
;
class
ObjA
:
public
QObject
{
Q_OBJECT
Q_SLOT
void
go
();
public:
ObjA
();
~
ObjA
();
private:
ObjAPrivate
*
const
d
;
};
#endif
Tests/QtAutogen/mocInclude/ObjA_p.h
0 → 100644
View file @
f5ccef17
#ifndef OBJA_P_HPP
#define OBJA_P_HPP
class
ObjAPrivate
:
public
QObject
{
Q_OBJECT
public:
ObjAPrivate
();
~
ObjAPrivate
();
};
#endif
Tests/QtAutogen/mocInclude/ObjB.cpp
View file @
f5ccef17
#include "ObjB.hpp"
#include "ObjB_p.h"
class
SubObjB
:
public
QObject
ObjBPrivate
::
ObjBPrivate
()
{
Q_OBJECT
public:
SubObjB
()
{}
~
SubObjB
()
{}
}
Q_SLOT
void
aSlot
();
}
;
ObjBPrivate
::~
ObjBPrivate
()
{
}
void
SubObjB
::
aSlot
()
ObjB
::
ObjB
()
:
d
(
new
ObjBPrivate
)
{
}
void
ObjB
::
go
()
ObjB
::
~
ObjB
()
{
SubObjB
subObj
;
delete
d
;
}
#include "ObjB.moc"
#include "moc_ObjB.cpp"
Tests/QtAutogen/mocInclude/ObjB.hpp
View file @
f5ccef17
#ifndef O
BJ
B_HPP
#define O
BJ
B_HPP
#ifndef O
bj
B_HPP
#define O
bj
B_HPP
#include <QObject>
// Object source comes with a _moc include
class
ObjBPrivate
;
class
ObjB
:
public
QObject
{
Q_OBJECT
Q_SLOT
void
go
();
public:
ObjB
();
~
ObjB
();
private:
ObjBPrivate
*
const
d
;
};
#endif
Tests/QtAutogen/mocInclude/ObjB_p.h
0 → 100644
View file @
f5ccef17
#ifndef OBJB_P_HPP
#define OBJB_P_HPP
class
ObjBPrivate
:
public
QObject
{
Q_OBJECT
public:
ObjBPrivate
();
~
ObjBPrivate
();
};
#endif
Tests/QtAutogen/mocInclude/ObjC.cpp
deleted
100644 → 0
View file @
a8d8d2fd
#include "ObjC.hpp"
class
SubObjC
:
public
QObject
{
Q_OBJECT
public:
SubObjC
()
{}
~
SubObjC
()
{}
Q_SLOT
void
aSlot
();
};
void
SubObjC
::
aSlot
()
{
}
void
ObjC
::
go
()
{
SubObjC
subObj
;
}
#include "ObjC.moc"
// Not the own header
#include "moc_ObjD.cpp"
Tests/QtAutogen/mocInclude/ObjD.cpp
deleted
100644 → 0
View file @
a8d8d2fd
#include "ObjD.hpp"
class
SubObjD
:
public
QObject
{
Q_OBJECT
public:
SubObjD
()
{}
~
SubObjD
()
{}
Q_SLOT
void
aSlot
();
};
void
SubObjD
::
aSlot
()
{
}
void
ObjD
::
go
()
{
SubObjD
subObj
;
}
#include "ObjD.moc"
// Header in subdirectory
#include "subA/moc_SubObjA.cpp"
Tests/QtAutogen/mocInclude/SObjA.cpp
0 → 100644
View file @
f5ccef17
#include "SObjA.hpp"
SObjA
::
SObjA
()
{
}
SObjA
::~
SObjA
()
{
}
#include "SObjA.moc"
Tests/QtAutogen/mocInclude/SObjA.hpp
0 → 100644
View file @
f5ccef17
#ifndef SOBJA_HPP
#define SOBJA_HPP
#include <QObject>
// Object source includes externally generated .moc file
class
SObjA
:
public
QObject
{
Q_OBJECT
public:
SObjA
();
~
SObjA
();
};
#endif
Tests/QtAutogen/mocInclude/SObjB.cpp.in
0 → 100644
View file @
f5ccef17
#include "SObjB.hpp"