THRIFT-4735: Remove Qt4 build support
diff --git a/lib/cpp/CMakeLists.txt b/lib/cpp/CMakeLists.txt
index 8e5ebcf..90a6c28 100755
--- a/lib/cpp/CMakeLists.txt
+++ b/lib/cpp/CMakeLists.txt
@@ -94,8 +94,7 @@
     )
 endif()
 
-# If OpenSSL is not found just ignore the OpenSSL stuff
-find_package(OpenSSL)
+# If OpenSSL is not found or disabled just ignore the OpenSSL stuff
 if(OPENSSL_FOUND AND WITH_OPENSSL)
     list( APPEND thriftcpp_SOURCES
        src/thrift/transport/TSSLSocket.cpp
@@ -128,7 +127,7 @@
     src/thrift/async/TEvhttpClientChannel.cpp
 )
 
-# Thrift zlib server
+# Thrift zlib transport
 set( thriftcppz_SOURCES
     src/thrift/transport/TZlibTransport.cpp
     src/thrift/protocol/THeaderProtocol.cpp
@@ -137,12 +136,6 @@
     src/thrift/transport/THeaderTransport.cpp
 )
 
-# Thrift Qt4 server
-set( thriftcppqt_SOURCES
-    src/thrift/qt/TQIODeviceTransport.cpp
-    src/thrift/qt/TQTcpServer.cpp
-)
-
 # Contains the thrift specific ADD_LIBRARY_THRIFT and TARGET_LINK_LIBRARIES_THRIFT
 include(ThriftMacros)
 
@@ -171,16 +164,7 @@
     TARGET_LINK_LIBRARIES_THRIFT_AGAINST_THRIFT_LIBRARY(thriftz thrift)
 endif()
 
-if(WITH_QT4)
-    set(CMAKE_AUTOMOC ON)
-    find_package(Qt4 REQUIRED COMPONENTS QtCore QtNetwork)
-    ADD_LIBRARY_THRIFT(thriftqt ${thriftcppqt_SOURCES})
-    TARGET_LINK_LIBRARIES_THRIFT(thriftqt ${SYSLIBS} Qt4::QtCore Qt4::QtNetwork)
-    TARGET_LINK_LIBRARIES_THRIFT_AGAINST_THRIFT_LIBRARY(thriftqt thrift)
-endif()
-
 if(WITH_QT5)
-    # Qt5 has its own directory to avoid conflict with Qt4 caused by CMAKE_AUTOMOC
     add_subdirectory(src/thrift/qt)
 endif()
 
@@ -188,8 +172,6 @@
     add_definitions("-DUNICODE -D_UNICODE")
 endif()
 
-add_definitions("-D__STDC_LIMIT_MACROS")
-
 # Install the headers
 install(DIRECTORY "src/thrift" DESTINATION "${INCLUDE_INSTALL_DIR}"
     FILES_MATCHING PATTERN "*.h" PATTERN "*.tcc")
diff --git a/lib/cpp/Makefile.am b/lib/cpp/Makefile.am
index 19bedd7..de0c058 100755
--- a/lib/cpp/Makefile.am
+++ b/lib/cpp/Makefile.am
@@ -19,9 +19,6 @@
 
 AUTOMAKE_OPTIONS = subdir-objects
 
-moc_%.cpp: %.h
-	$(QT_MOC) $(QT_CFLAGS) $< -o $@
-
 moc__%.cpp: %.h
 	$(QT5_MOC) $(QT5_CFLAGS) $< -o $@
 
@@ -52,10 +49,6 @@
 lib_LTLIBRARIES += libthriftz.la
 pkgconfig_DATA += thrift-z.pc
 endif
-if AMX_HAVE_QT
-lib_LTLIBRARIES += libthriftqt.la
-pkgconfig_DATA += thrift-qt.pc
-endif
 if AMX_HAVE_QT5
 lib_LTLIBRARIES += libthriftqt5.la
 pkgconfig_DATA += thrift-qt5.pc
@@ -120,33 +113,24 @@
                         src/thrift/protocol/THeaderProtocol.cpp
 
 
-libthriftqt_la_MOC = src/thrift/qt/moc_TQTcpServer.cpp
-nodist_libthriftqt_la_SOURCES = $(libthriftqt_la_MOC)
-libthriftqt_la_SOURCES = src/thrift/qt/TQIODeviceTransport.cpp \
-                         src/thrift/qt/TQTcpServer.cpp
-CLEANFILES = $(libthriftqt_la_MOC)
-
 libthriftqt5_la_MOC = src/thrift/qt/moc__TQTcpServer.cpp
 nodist_libthriftqt5_la_SOURCES = $(libthriftqt5_la_MOC)
 libthriftqt5_la_SOURCES = src/thrift/qt/TQIODeviceTransport.cpp \
                           src/thrift/qt/TQTcpServer.cpp
-CLEANFILES += $(libthriftqt5_la_MOC)
+CLEANFILES = $(libthriftqt5_la_MOC)
 
 # Flags for the various libraries
 libthriftnb_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBEVENT_CPPFLAGS)
 libthriftz_la_CPPFLAGS  = $(AM_CPPFLAGS) $(ZLIB_CPPFLAGS)
-libthriftqt_la_CPPFLAGS = $(AM_CPPFLAGS) $(QT_CFLAGS)
 libthriftqt5_la_CPPFLAGS = $(AM_CPPFLAGS) $(QT5_CFLAGS)
 if QT5_REDUCE_RELOCATIONS
 libthriftqt5_la_CPPFLAGS += -fPIC
 endif
 libthriftnb_la_CXXFLAGS = $(AM_CXXFLAGS)
 libthriftz_la_CXXFLAGS  = $(AM_CXXFLAGS)
-libthriftqt_la_CXXFLAGS  = $(AM_CXXFLAGS)
 libthriftqt5_la_CXXFLAGS  = $(AM_CXXFLAGS)
 libthriftnb_la_LDFLAGS  = -release $(VERSION) $(BOOST_LDFLAGS)
 libthriftz_la_LDFLAGS   = -release $(VERSION) $(BOOST_LDFLAGS) $(ZLIB_LIBS)
-libthriftqt_la_LDFLAGS   = -release $(VERSION) $(BOOST_LDFLAGS) $(QT_LIBS)
 libthriftqt5_la_LDFLAGS   = -release $(VERSION) $(BOOST_LDFLAGS) $(QT5_LIBS)
 
 include_thriftdir = $(includedir)/thrift
@@ -269,7 +253,6 @@
              thrift-nb.pc.in \
              thrift.pc.in \
              thrift-z.pc.in \
-             thrift-qt.pc.in \
              thrift-qt5.pc.in \
              src/thrift/qt/CMakeLists.txt \
              $(WINDOWS_DIST)
diff --git a/lib/cpp/README.md b/lib/cpp/README.md
index bc47d2d..ce46319 100755
--- a/lib/cpp/README.md
+++ b/lib/cpp/README.md
@@ -231,6 +231,7 @@
 
 ## 1.0.0
 
+THRIFT-4720:
 Support for C++03/C++98 has been dropped.  Use version 0.12.0 to support that
 language level.  As a consequence, boost is no longer required as a runtime
 library depenedency, but is is still required to build the runtime library
@@ -239,15 +240,20 @@
 run the tests.  This means the header thrift/stdcxx.h has been removed and
 anything that relied on it has been changed to directly use C++11 concepts.
 
+THRIFT-4730:
 The classes BoostThreadFactory, PosixThreadFactory, StdThreadFactory, and
 PlatformThreadFactory have been removed, and we will use a ThreadFactory
 based on C++11 (essentially StdThreadFactory was renamed ThreadFactory).
 
+THRIFT-4732:
 The CMake build options WITH_SHARED_LIBS and WITH_STATIC_LIBS are deprecated.
 The project no longer performs a side-by-side static and shared build; you
 tell CMake through BUILD_SHARED_LIBS whether to make shared or static
 libraries now.  This is CMake standard behavior.
 
+THRIFT-4735:
+Qt4 support was removed.
+
 ## 0.11.0
 
 Older versions of thrift depended on the <boost/smart_ptr.hpp> classes which
diff --git a/lib/cpp/test/CMakeLists.txt b/lib/cpp/test/CMakeLists.txt
index 8a8aada..ef08dbc 100644
--- a/lib/cpp/test/CMakeLists.txt
+++ b/lib/cpp/test/CMakeLists.txt
@@ -336,18 +336,6 @@
 
 endif()
 
-if(WITH_QT4)
-set(CMAKE_AUTOMOC ON)
-find_package(Qt4 REQUIRED COMPONENTS QtTest)
-set(TQTcpServerTest_SOURCES
-    qt/TQTcpServerTest.cpp
-)
-add_executable(TQTcpServerTest ${TQTcpServerTest_SOURCES})
-target_link_libraries(TQTcpServerTest testgencpp_cob thriftqt Qt4::QtTest)
-LINK_AGAINST_THRIFT_LIBRARY(TQTcpServerTest thrift)
-add_test(NAME TQTcpServerTest COMMAND TQTcpServerTest)
-endif()
-
 if(WITH_QT5)
 add_subdirectory(qt)
 endif()
diff --git a/lib/cpp/thrift-qt.pc.in b/lib/cpp/thrift-qt.pc.in
deleted file mode 100755
index 5e60d84..0000000
--- a/lib/cpp/thrift-qt.pc.in
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: Thrift
-Description: Thrift Qt API
-Version: @VERSION@
-Requires: thrift = @VERSION@
-Libs: -L${libdir} -lthriftqt
-Cflags: -I${includedir}