summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmQtAutoGenInitializer.cxx6
-rw-r--r--Tests/QtAutogen/SameName/CMakeLists.txt1
-rw-r--r--Tests/QtAutogen/SameName/main.cpp2
-rw-r--r--Tests/QtAutogen/SameName/object.hh13
4 files changed, 4 insertions, 18 deletions
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx
index a20f106..6b0fc1e 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -764,7 +764,8 @@ bool cmQtAutoGenInitializer::InitScanFiles()
// Register files that will be scanned by moc or uic
if (this->MocOrUicEnabled()) {
- if (cm->IsHeaderExtension(extLower)) {
+ // FIXME: Add a policy to include .hh files.
+ if (cm->IsHeaderExtension(extLower) && extLower != "hh") {
addMUFile(makeMUFile(sf, fullPath, true), true);
} else if (cm->IsSourceExtension(extLower)) {
addMUFile(makeMUFile(sf, fullPath, true), false);
@@ -876,7 +877,8 @@ bool cmQtAutoGenInitializer::InitScanFiles()
std::string const& extLower =
cmSystemTools::LowerCase(sf->GetExtension());
- if (cm->IsHeaderExtension(extLower)) {
+ // FIXME: Add a policy to include .hh files.
+ if (cm->IsHeaderExtension(extLower) && extLower != "hh") {
if (!cmContains(this->AutogenTarget.Headers, sf)) {
auto muf = makeMUFile(sf, fullPath, false);
if (muf->SkipMoc || muf->SkipUic) {
diff --git a/Tests/QtAutogen/SameName/CMakeLists.txt b/Tests/QtAutogen/SameName/CMakeLists.txt
index 1919cc7..cd29a2a 100644
--- a/Tests/QtAutogen/SameName/CMakeLists.txt
+++ b/Tests/QtAutogen/SameName/CMakeLists.txt
@@ -18,7 +18,6 @@ add_executable(sameName
ccc/data.qrc
item.cpp
object.h
- object.hh
object.h++
object.hpp
object.hxx
diff --git a/Tests/QtAutogen/SameName/main.cpp b/Tests/QtAutogen/SameName/main.cpp
index 725f4cd..19a6f6d 100644
--- a/Tests/QtAutogen/SameName/main.cpp
+++ b/Tests/QtAutogen/SameName/main.cpp
@@ -6,7 +6,6 @@
#include "item.hpp"
#include "object.h"
#include "object.h++"
-#include "object.hh"
#include "object.hpp"
#include "object.hxx"
#include "object_upper_ext.H"
@@ -22,7 +21,6 @@ int main(int argv, char** args)
::ccc::Item ccc_item;
// Object instances
::Object_h obj_h;
- ::Object_hh obj_hh;
::Object_hplpl obj_hplpl;
::Object_hpp obj_hpp;
::Object_hxx obj_hxx;
diff --git a/Tests/QtAutogen/SameName/object.hh b/Tests/QtAutogen/SameName/object.hh
deleted file mode 100644
index 3e16f83..0000000
--- a/Tests/QtAutogen/SameName/object.hh
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef OBJECT_HH
-#define OBJECT_HH
-
-#include <QObject>
-
-class Object_hh : public QObject
-{
- Q_OBJECT
- Q_SLOT
- void go(){};
-};
-
-#endif