summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-07-21 09:08:43 -0400
committerBrad King <brad.king@kitware.com>2016-07-21 09:27:19 -0400
commit5e55d87bdc4d14507fec2bae7a41f3fb9498db1a (patch)
tree5836ad2a646a2ee22fc6a2ebd39f229f9338251b
parente31084e65745f9dd422c6aff0a2ed4ada6918805 (diff)
downloadcmake-5e55d87bdc4d14507fec2bae7a41f3fb9498db1a.tar.gz
Autogen: Revert changes to generate moc/rcc in subdirectories
Revert these commits: * v3.6.0-rc1~134^2 Tests: QtAutogen: Same source name in different directories test, 2016-04-13 * v3.6.0-rc1~134^2~1 Autogen: Generate qrc_NAME.cpp files in subdirectories, 2016-04-19 * v3.6.0-rc1~134^2~2 Autogen: Generate not included moc files in subdirectories, 2016-04-19 They regress existing builds that depend on the paths/symbols generated previously. Another approach will be needed to solve the name collision problem they were intended to solve. Leave the error diagnostics for the colliding cases that were added in the same topic as the above commits because they provide a useful early failure in relevant cases. Fixes #16209.
-rw-r--r--Source/cmQtAutoGeneratorInitializer.cxx120
-rw-r--r--Source/cmQtAutoGenerators.cxx79
-rw-r--r--Source/cmQtAutoGenerators.h5
-rw-r--r--Tests/QtAutogen/CMakeLists.txt4
-rw-r--r--Tests/QtAutogen/same_name/CMakeLists.txt20
-rw-r--r--Tests/QtAutogen/same_name/aaa/bbb/data.qrc6
-rw-r--r--Tests/QtAutogen/same_name/aaa/bbb/item.cpp10
-rw-r--r--Tests/QtAutogen/same_name/aaa/bbb/item.hpp18
-rw-r--r--Tests/QtAutogen/same_name/aaa/data.qrc6
-rw-r--r--Tests/QtAutogen/same_name/aaa/item.cpp8
-rw-r--r--Tests/QtAutogen/same_name/aaa/item.hpp16
-rw-r--r--Tests/QtAutogen/same_name/bbb/aaa/data.qrc6
-rw-r--r--Tests/QtAutogen/same_name/bbb/aaa/item.cpp10
-rw-r--r--Tests/QtAutogen/same_name/bbb/aaa/item.hpp18
-rw-r--r--Tests/QtAutogen/same_name/bbb/data.qrc6
-rw-r--r--Tests/QtAutogen/same_name/bbb/item.cpp8
-rw-r--r--Tests/QtAutogen/same_name/bbb/item.hpp16
-rw-r--r--Tests/QtAutogen/same_name/ccc/data.qrc6
-rw-r--r--Tests/QtAutogen/same_name/ccc/item.cpp23
-rw-r--r--Tests/QtAutogen/same_name/ccc/item.hpp16
-rw-r--r--Tests/QtAutogen/same_name/data.qrc5
-rw-r--r--Tests/QtAutogen/same_name/main.cpp16
22 files changed, 45 insertions, 377 deletions
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx
index dd19760f65..70c8a659d2 100644
--- a/Source/cmQtAutoGeneratorInitializer.cxx
+++ b/Source/cmQtAutoGeneratorInitializer.cxx
@@ -25,79 +25,6 @@
#include "cmGlobalVisualStudioGenerator.h"
#endif
-static std::string GetAutogenTargetName(cmGeneratorTarget const* target)
-{
- std::string autogenTargetName = target->GetName();
- autogenTargetName += "_automoc";
- return autogenTargetName;
-}
-
-static std::string GetAutogenTargetDir(cmGeneratorTarget const* target)
-{
- cmMakefile* makefile = target->Target->GetMakefile();
- std::string targetDir = makefile->GetCurrentBinaryDirectory();
- targetDir += makefile->GetCMakeInstance()->GetCMakeFilesDirectory();
- targetDir += "/";
- targetDir += GetAutogenTargetName(target);
- targetDir += ".dir/";
- return targetDir;
-}
-
-static std::string GetAutogenTargetBuildDir(cmGeneratorTarget const* target)
-{
- cmMakefile* makefile = target->Target->GetMakefile();
- std::string targetDir = makefile->GetCurrentBinaryDirectory();
- targetDir += "/";
- targetDir += GetAutogenTargetName(target);
- targetDir += ".dir/";
- return targetDir;
-}
-
-static std::string GetSourceRelativePath(cmGeneratorTarget const* target,
- const std::string& fileName)
-{
- std::string pathRel;
- // Test if the file is child to any of the known directories
- {
- const std::string fileNameReal = cmsys::SystemTools::GetRealPath(fileName);
- std::string parentDirectory;
- bool match(false);
- {
- std::string testDirs[4];
- {
- cmMakefile* makefile = target->Target->GetMakefile();
- testDirs[0] = makefile->GetCurrentSourceDirectory();
- testDirs[1] = makefile->GetCurrentBinaryDirectory();
- testDirs[2] = makefile->GetHomeDirectory();
- testDirs[3] = makefile->GetHomeOutputDirectory();
- }
- for (int ii = 0; ii != sizeof(testDirs) / sizeof(std::string); ++ii) {
- const ::std::string testDir =
- cmsys::SystemTools::GetRealPath(testDirs[ii]);
- if (!testDir.empty() &&
- cmsys::SystemTools::IsSubDirectory(fileNameReal, testDir)) {
- parentDirectory = testDir;
- match = true;
- break;
- }
- }
- }
- // Use root as fallback parent directory
- if (!match) {
- cmsys::SystemTools::SplitPathRootComponent(fileNameReal,
- &parentDirectory);
- }
- pathRel = cmsys::SystemTools::RelativePath(
- parentDirectory, cmsys::SystemTools::GetParentDirectory(fileNameReal));
- }
- // Sanitize relative path
- if (!pathRel.empty()) {
- pathRel += '/';
- cmSystemTools::ReplaceString(pathRel, "..", "__");
- }
- return pathRel;
-}
-
static void SetupSourceFiles(cmGeneratorTarget const* target,
std::vector<std::string>& skipMoc,
std::vector<std::string>& mocSources,
@@ -128,16 +55,13 @@ static void SetupSourceFiles(cmGeneratorTarget const* target,
if (target->GetPropertyAsBool("AUTORCC")) {
if (ext == "qrc" &&
!cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTORCC"))) {
-
- std::string rcc_output_dir = GetAutogenTargetBuildDir(target);
- rcc_output_dir += GetSourceRelativePath(target, absFile);
- cmSystemTools::MakeDirectory(rcc_output_dir.c_str());
-
std::string basename =
cmsys::SystemTools::GetFilenameWithoutLastExtension(absFile);
+ std::string rcc_output_dir = target->GetSupportDirectory();
+ cmSystemTools::MakeDirectory(rcc_output_dir.c_str());
std::string rcc_output_file = rcc_output_dir;
- rcc_output_file += "qrc_" + basename + ".cpp";
+ rcc_output_file += "/qrc_" + basename + ".cpp";
makefile->AppendProperty("ADDITIONAL_MAKE_CLEAN_FILES",
rcc_output_file.c_str(), false);
makefile->GetOrCreateSource(rcc_output_file, true);
@@ -441,6 +365,24 @@ static void MergeRccOptions(std::vector<std::string>& opts,
opts.insert(opts.end(), extraOpts.begin(), extraOpts.end());
}
+std::string GetAutogenTargetName(cmGeneratorTarget const* target)
+{
+ std::string autogenTargetName = target->GetName();
+ autogenTargetName += "_automoc";
+ return autogenTargetName;
+}
+
+std::string GetAutogenTargetDir(cmGeneratorTarget const* target)
+{
+ cmMakefile* makefile = target->Target->GetMakefile();
+ std::string targetDir = makefile->GetCurrentBinaryDirectory();
+ targetDir += makefile->GetCMakeInstance()->GetCMakeFilesDirectory();
+ targetDir += "/";
+ targetDir += GetAutogenTargetName(target);
+ targetDir += ".dir/";
+ return targetDir;
+}
+
static void copyTargetProperty(cmTarget* destinationTarget,
cmTarget* sourceTarget,
const std::string& propertyName)
@@ -803,18 +745,14 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget(
if (target->GetPropertyAsBool("AUTORCC")) {
if (ext == "qrc" &&
!cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTORCC"))) {
-
- {
- std::string rcc_output_dir = GetAutogenTargetBuildDir(target);
- rcc_output_dir += GetSourceRelativePath(target, absFile);
- cmSystemTools::MakeDirectory(rcc_output_dir.c_str());
-
- std::string basename =
- cmsys::SystemTools::GetFilenameWithoutLastExtension(absFile);
- std::string rcc_output_file = rcc_output_dir;
- rcc_output_file += "qrc_" + basename + ".cpp";
- rcc_output.push_back(rcc_output_file);
- }
+ std::string basename =
+ cmsys::SystemTools::GetFilenameWithoutLastExtension(absFile);
+
+ std::string rcc_output_dir = target->GetSupportDirectory();
+ cmSystemTools::MakeDirectory(rcc_output_dir.c_str());
+ std::string rcc_output_file = rcc_output_dir;
+ rcc_output_file += "/qrc_" + basename + ".cpp";
+ rcc_output.push_back(rcc_output_file);
if (!cmSystemTools::IsOn(sf->GetPropertyForUser("GENERATED"))) {
if (qtMajorVersion == "5") {
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index ac64397cd7..3677a28a01 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -358,12 +358,11 @@ void cmQtAutoGenerators::WriteOldMocDefinitionsFile(
void cmQtAutoGenerators::Init()
{
- this->TargetBuildSubDir = this->TargetName;
- this->TargetBuildSubDir += ".dir/";
-
this->OutMocCppFilenameRel = this->TargetName;
this->OutMocCppFilenameRel += ".cpp";
- this->OutMocCppFilenameAbs = this->Builddir + this->OutMocCppFilenameRel;
+
+ this->OutMocCppFilename = this->Builddir;
+ this->OutMocCppFilename += this->OutMocCppFilenameRel;
std::vector<std::string> cdefList;
cmSystemTools::ExpandListArgument(this->MocCompileDefinitionsStr, cdefList);
@@ -440,7 +439,7 @@ static std::string ReadAll(const std::string& filename)
bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile)
{
- if (!cmsys::SystemTools::FileExists(this->OutMocCppFilenameAbs.c_str()) ||
+ if (!cmsys::SystemTools::FileExists(this->OutMocCppFilename.c_str()) ||
(this->OldCompileSettingsStr != this->CurrentCompileSettingsStr)) {
this->GenerateAll = true;
}
@@ -948,13 +947,12 @@ void cmQtAutoGenerators::ParseHeaders(
this->LogInfo(err.str());
}
+ const std::string basename =
+ cmsys::SystemTools::GetFilenameWithoutLastExtension(headerName);
+
+ const std::string currentMoc = "moc_" + basename + ".cpp";
std::string macroName;
if (requiresMocing(contents, macroName)) {
- const std::string parentDir =
- this->TargetBuildSubDir + this->SourceRelativePath(headerName);
- const std::string basename =
- cmsys::SystemTools::GetFilenameWithoutLastExtension(headerName);
- const std::string currentMoc = parentDir + "moc_" + basename + ".cpp";
notIncludedMocs[headerName] = currentMoc;
}
}
@@ -1032,7 +1030,7 @@ bool cmQtAutoGenerators::GenerateMocFiles(
// check if we even need to update _automoc.cpp
if (!automocCppChanged) {
// compare contents of the _automoc.cpp file
- const std::string oldContents = ReadAll(this->OutMocCppFilenameAbs);
+ const std::string oldContents = ReadAll(this->OutMocCppFilename);
if (oldContents == automocSource) {
// nothing changed: don't touch the _automoc.cpp file
if (this->Verbose) {
@@ -1055,7 +1053,7 @@ bool cmQtAutoGenerators::GenerateMocFiles(
}
{
cmsys::ofstream outfile;
- outfile.open(this->OutMocCppFilenameAbs.c_str(), std::ios::trunc);
+ outfile.open(this->OutMocCppFilename.c_str(), std::ios::trunc);
outfile << automocSource;
outfile.close();
}
@@ -1264,10 +1262,8 @@ bool cmQtAutoGenerators::GenerateQrcFiles()
if (ext == ".qrc") {
std::string basename =
cmsys::SystemTools::GetFilenameWithoutLastExtension(*si);
- std::string qrcOutputFile = this->TargetBuildSubDir +
- this->SourceRelativePath(*si) + "qrc_" + basename + ".cpp";
- // std::string qrcOutputFile = "CMakeFiles/" + this->OriginTargetName
- // + ".dir/qrc_" + basename + ".cpp";
+ std::string qrcOutputFile = "CMakeFiles/" + this->OriginTargetName +
+ ".dir/qrc_" + basename + ".cpp";
qrcGenMap[*si] = qrcOutputFile;
}
}
@@ -1302,10 +1298,8 @@ bool cmQtAutoGenerators::GenerateQrcFiles()
bool cmQtAutoGenerators::GenerateQrc(const std::string& qrcInputFile,
const std::string& qrcOutputFile)
{
- std::string relName = this->SourceRelativePath(qrcInputFile);
- std::replace(relName.begin(), relName.end(), '/', '_');
- relName += cmsys::SystemTools::GetFilenameWithoutLastExtension(qrcInputFile);
-
+ const std::string basename =
+ cmsys::SystemTools::GetFilenameWithoutLastExtension(qrcInputFile);
const ::std::string qrcBuildFile = this->Builddir + qrcOutputFile;
int sourceNewerThanQrc = 0;
@@ -1332,7 +1326,7 @@ bool cmQtAutoGenerators::GenerateQrc(const std::string& qrcInputFile,
}
command.push_back("-name");
- command.push_back(relName);
+ command.push_back(basename);
command.push_back("-o");
command.push_back(qrcBuildFile);
command.push_back(qrcInputFile);
@@ -1357,49 +1351,6 @@ bool cmQtAutoGenerators::GenerateQrc(const std::string& qrcInputFile,
return true;
}
-std::string cmQtAutoGenerators::SourceRelativePath(const std::string& filename)
-{
- std::string pathRel;
-
- // Test if the file is child to any of the known directories
- {
- std::string fileNameReal = cmsys::SystemTools::GetRealPath(filename);
- std::string parentDirectory;
- bool match(false);
- {
- const ::std::string* testDirs[4];
- testDirs[0] = &(this->Srcdir);
- testDirs[1] = &(this->Builddir);
- testDirs[2] = &(this->ProjectSourceDir);
- testDirs[3] = &(this->ProjectBinaryDir);
- for (int ii = 0; ii != sizeof(testDirs) / sizeof(const ::std::string*);
- ++ii) {
- const ::std::string testDir =
- cmsys::SystemTools::GetRealPath(*(testDirs[ii]));
- if (cmsys::SystemTools::IsSubDirectory(fileNameReal, testDir)) {
- parentDirectory = testDir;
- match = true;
- break;
- }
- }
- }
- // Use root as fallback parent directory
- if (!match) {
- cmsys::SystemTools::SplitPathRootComponent(fileNameReal,
- &parentDirectory);
- }
- pathRel = cmsys::SystemTools::RelativePath(
- parentDirectory, cmsys::SystemTools::GetParentDirectory(fileNameReal));
- }
-
- // Sanitize relative path
- if (!pathRel.empty()) {
- pathRel += '/';
- cmSystemTools::ReplaceString(pathRel, "..", "__");
- }
- return pathRel;
-}
-
/**
* @brief Collects name collisions as output/input pairs
* @return True if there were collisions
diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h
index 5e7fab515c..86913f0781 100644
--- a/Source/cmQtAutoGenerators.h
+++ b/Source/cmQtAutoGenerators.h
@@ -83,8 +83,6 @@ private:
void Init();
- std::string SourceRelativePath(const std::string& filename);
-
bool NameCollisionTest(const std::map<std::string, std::string>& genFiles,
std::multimap<std::string, std::string>& collisions);
void NameCollisionLog(
@@ -125,9 +123,8 @@ private:
std::string CurrentCompileSettingsStr;
std::string OldCompileSettingsStr;
- std::string TargetBuildSubDir;
std::string OutMocCppFilenameRel;
- std::string OutMocCppFilenameAbs;
+ std::string OutMocCppFilename;
std::list<std::string> MocIncludes;
std::list<std::string> MocDefinitions;
std::vector<std::string> MocOptions;
diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt
index 487516564d..d5aca55c75 100644
--- a/Tests/QtAutogen/CMakeLists.txt
+++ b/Tests/QtAutogen/CMakeLists.txt
@@ -110,10 +110,6 @@ set_target_properties(
AUTOMOC TRUE
)
-# Test AUTOMOC and AUTORCC on source files with the same name
-# but in different subdirectories
-add_subdirectory(same_name)
-
include(GenerateExportHeader)
# The order is relevant here. B depends on A, and B headers depend on A
# headers both subdirectories use CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE and we
diff --git a/Tests/QtAutogen/same_name/CMakeLists.txt b/Tests/QtAutogen/same_name/CMakeLists.txt
deleted file mode 100644
index 54bf048678..0000000000
--- a/Tests/QtAutogen/same_name/CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-# Test AUTOMOC and AUTORCC on source files with the same name
-# but in different subdirectories
-
-add_executable(same_name
- aaa/bbb/item.cpp
- aaa/bbb/data.qrc
- aaa/item.cpp
- aaa/data.qrc
- bbb/aaa/item.cpp
- bbb/aaa/data.qrc
- bbb/item.cpp
- bbb/data.qrc
- ccc/item.cpp
- ccc/data.qrc
- main.cpp
- data.qrc
-)
-target_include_directories(same_name PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
-target_link_libraries(same_name ${QT_LIBRARIES})
-set_target_properties( same_name PROPERTIES AUTOMOC TRUE AUTORCC TRUE )
diff --git a/Tests/QtAutogen/same_name/aaa/bbb/data.qrc b/Tests/QtAutogen/same_name/aaa/bbb/data.qrc
deleted file mode 100644
index 0ea3537563..0000000000
--- a/Tests/QtAutogen/same_name/aaa/bbb/data.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource prefix="aaa/bbb">
- <file>item.hpp</file>
- <file>item.cpp</file>
-</qresource>
-</RCC>
diff --git a/Tests/QtAutogen/same_name/aaa/bbb/item.cpp b/Tests/QtAutogen/same_name/aaa/bbb/item.cpp
deleted file mode 100644
index 20d00445ef..0000000000
--- a/Tests/QtAutogen/same_name/aaa/bbb/item.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "item.hpp"
-
-namespace aaa {
-namespace bbb {
-
-void Item::go()
-{
-}
-}
-}
diff --git a/Tests/QtAutogen/same_name/aaa/bbb/item.hpp b/Tests/QtAutogen/same_name/aaa/bbb/item.hpp
deleted file mode 100644
index 87ac6ea7e2..0000000000
--- a/Tests/QtAutogen/same_name/aaa/bbb/item.hpp
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef SDA_SDB_ITEM_HPP
-#define SDA_SDB_ITEM_HPP
-
-#include <QObject>
-
-namespace aaa {
-namespace bbb {
-
-class Item : public QObject
-{
- Q_OBJECT
- Q_SLOT
- void go();
-};
-}
-}
-
-#endif
diff --git a/Tests/QtAutogen/same_name/aaa/data.qrc b/Tests/QtAutogen/same_name/aaa/data.qrc
deleted file mode 100644
index 379af60c86..0000000000
--- a/Tests/QtAutogen/same_name/aaa/data.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource prefix="aaa/">
- <file>item.hpp</file>
- <file>item.cpp</file>
-</qresource>
-</RCC>
diff --git a/Tests/QtAutogen/same_name/aaa/item.cpp b/Tests/QtAutogen/same_name/aaa/item.cpp
deleted file mode 100644
index 95dd3b674d..0000000000
--- a/Tests/QtAutogen/same_name/aaa/item.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "item.hpp"
-
-namespace aaa {
-
-void Item::go()
-{
-}
-}
diff --git a/Tests/QtAutogen/same_name/aaa/item.hpp b/Tests/QtAutogen/same_name/aaa/item.hpp
deleted file mode 100644
index 68476ce3ce..0000000000
--- a/Tests/QtAutogen/same_name/aaa/item.hpp
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef SDA_ITEM_HPP
-#define SDA_ITEM_HPP
-
-#include <QObject>
-
-namespace aaa {
-
-class Item : public QObject
-{
- Q_OBJECT
- Q_SLOT
- void go();
-};
-}
-
-#endif
diff --git a/Tests/QtAutogen/same_name/bbb/aaa/data.qrc b/Tests/QtAutogen/same_name/bbb/aaa/data.qrc
deleted file mode 100644
index da980091a3..0000000000
--- a/Tests/QtAutogen/same_name/bbb/aaa/data.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource prefix="bbb/aaa/">
- <file>item.hpp</file>
- <file>item.cpp</file>
-</qresource>
-</RCC>
diff --git a/Tests/QtAutogen/same_name/bbb/aaa/item.cpp b/Tests/QtAutogen/same_name/bbb/aaa/item.cpp
deleted file mode 100644
index ac4b2c27b2..0000000000
--- a/Tests/QtAutogen/same_name/bbb/aaa/item.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "item.hpp"
-
-namespace bbb {
-namespace aaa {
-
-void Item::go()
-{
-}
-}
-}
diff --git a/Tests/QtAutogen/same_name/bbb/aaa/item.hpp b/Tests/QtAutogen/same_name/bbb/aaa/item.hpp
deleted file mode 100644
index 0a8e02426e..0000000000
--- a/Tests/QtAutogen/same_name/bbb/aaa/item.hpp
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef SDB_SDA_ITEM_HPP
-#define SDB_SDA_ITEM_HPP
-
-#include <QObject>
-
-namespace bbb {
-namespace aaa {
-
-class Item : public QObject
-{
- Q_OBJECT
- Q_SLOT
- void go();
-};
-}
-}
-
-#endif
diff --git a/Tests/QtAutogen/same_name/bbb/data.qrc b/Tests/QtAutogen/same_name/bbb/data.qrc
deleted file mode 100644
index 5b080f5fa4..0000000000
--- a/Tests/QtAutogen/same_name/bbb/data.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource prefix="bbb/">
- <file>item.hpp</file>
- <file>item.cpp</file>
-</qresource>
-</RCC>
diff --git a/Tests/QtAutogen/same_name/bbb/item.cpp b/Tests/QtAutogen/same_name/bbb/item.cpp
deleted file mode 100644
index f97a1431ec..0000000000
--- a/Tests/QtAutogen/same_name/bbb/item.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "item.hpp"
-
-namespace bbb {
-
-void Item::go()
-{
-}
-}
diff --git a/Tests/QtAutogen/same_name/bbb/item.hpp b/Tests/QtAutogen/same_name/bbb/item.hpp
deleted file mode 100644
index 3da5837543..0000000000
--- a/Tests/QtAutogen/same_name/bbb/item.hpp
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef SDB_ITEM_HPP
-#define SDB_ITEM_HPP
-
-#include <QObject>
-
-namespace bbb {
-
-class Item : public QObject
-{
- Q_OBJECT
- Q_SLOT
- void go();
-};
-}
-
-#endif
diff --git a/Tests/QtAutogen/same_name/ccc/data.qrc b/Tests/QtAutogen/same_name/ccc/data.qrc
deleted file mode 100644
index f934c39b99..0000000000
--- a/Tests/QtAutogen/same_name/ccc/data.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource prefix="ccc/">
- <file>item.hpp</file>
- <file>item.cpp</file>
-</qresource>
-</RCC>
diff --git a/Tests/QtAutogen/same_name/ccc/item.cpp b/Tests/QtAutogen/same_name/ccc/item.cpp
deleted file mode 100644
index d90b2b8c71..0000000000
--- a/Tests/QtAutogen/same_name/ccc/item.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-#include "item.hpp"
-
-namespace ccc {
-
-void Item::go()
-{
-}
-
-class MocTest : public QObject
-{
- Q_OBJECT;
- Q_SLOT
- void go();
-};
-
-void MocTest::go()
-{
-}
-}
-
-// Include own moc files
-#include "item.moc"
-#include "moc_item.cpp"
diff --git a/Tests/QtAutogen/same_name/ccc/item.hpp b/Tests/QtAutogen/same_name/ccc/item.hpp
deleted file mode 100644
index c8559361dc..0000000000
--- a/Tests/QtAutogen/same_name/ccc/item.hpp
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef SDC_ITEM_HPP
-#define SDC_ITEM_HPP
-
-#include <QObject>
-
-namespace ccc {
-
-class Item : public QObject
-{
- Q_OBJECT
- Q_SLOT
- void go();
-};
-}
-
-#endif
diff --git a/Tests/QtAutogen/same_name/data.qrc b/Tests/QtAutogen/same_name/data.qrc
deleted file mode 100644
index 4ce0b4ec13..0000000000
--- a/Tests/QtAutogen/same_name/data.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>main.cpp</file>
-</qresource>
-</RCC>
diff --git a/Tests/QtAutogen/same_name/main.cpp b/Tests/QtAutogen/same_name/main.cpp
deleted file mode 100644
index a4ffcb350a..0000000000
--- a/Tests/QtAutogen/same_name/main.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-#include "aaa/bbb/item.hpp"
-#include "aaa/item.hpp"
-#include "bbb/aaa/item.hpp"
-#include "bbb/item.hpp"
-#include "ccc/item.hpp"
-
-int main(int argv, char** args)
-{
- // Object instances
- ::aaa::Item aaa_item;
- ::aaa::bbb::Item aaa_bbb_item;
- ::bbb::Item bbb_item;
- ::bbb::aaa::Item bbb_aaa_item;
- ::ccc::Item ccc_item;
- return 0;
-}