diff --git a/docs/build_mozc_in_docker.md b/docs/build_mozc_in_docker.md index 1faf0b9..d549737 100644 --- a/docs/build_mozc_in_docker.md +++ b/docs/build_mozc_in_docker.md @@ -99,13 +99,13 @@ If you don't specify this option, `--target_platform=Linux` will be used implicitly. #### --noqt (Linux desktop target only) -You can use `--noqt` option to build Mozc without depending on Qt 4 library. +You can use `--noqt` option to build Mozc without depending on Qt 5 library. #### --server_dir (Linux desktop target only) You can use `--server_dir` option to specify the directory name where `mozc_server` will be installed. ## Compile options -In `build_mozc.py build` step, you can specify build types (`Release`` or `Debug`) and one or more build targets. Please find each GYP file to see what build targets are defined. +In `build_mozc.py build` step, you can specify build types (`Release` or `Debug`) and one or more build targets. Please find each GYP file to see what build targets are defined. ``` python build_mozc.py build -c {Release, Debug} [gyp_path_1.gyp:gyp_target_name1] [gyp_path_2.gyp:gyp_target_name2] diff --git a/src/build_mozc.py b/src/build_mozc.py index 6d36606..a7a534a 100644 --- a/src/build_mozc.py +++ b/src/build_mozc.py @@ -272,7 +272,6 @@ parser.add_option('--gypdir', dest='gypdir', help='Specifies the location of GYP to be used.') parser.add_option('--noqt', action='store_true', dest='noqt', default=False) - parser.add_option('--qtver', dest='qtver', choices=('4', '5'), default='5') parser.add_option('--version_file', dest='version_file', help='use the specified version template file', default='data/version/mozc_version_template.bzl') @@ -505,7 +504,7 @@ if options.noqt or options.target_platform in ['Android', 'NaCl']: qt_version = '' else: - qt_version = options.qtver + qt_version = '5' GenerateVersionFile(template_path, version_path, options.target_platform, options.android_application_id, options.android_arch, qt_version) @@ -591,12 +590,7 @@ gyp_options.extend(['-D', 'qt_dir=']) # Check if Qt libraries are installed. - if options.qtver == '5': - system_qt_found = PkgExists('Qt5Core', 'Qt5Gui', 'Qt5Widgets') - else: - system_qt_found = PkgExists('QtCore >= 4.0', 'QtCore < 5.0', - 'QtGui >= 4.0', 'QtGui < 5.0') - if not system_qt_found: + if not PkgExists('Qt5Core', 'Qt5Gui', 'Qt5Widgets'): PrintErrorAndExit('Qt is required to build GUI Tool. ' 'Specify --noqt to skip building GUI Tool.') @@ -606,7 +600,6 @@ gyp_options.extend(['-D', 'qt_dir=%s' % os.path.abspath(options.qtdir)]) else: gyp_options.extend(['-D', 'qt_dir=']) - gyp_options.extend(['-D', 'qt_ver=%s' % options.qtver]) if target_platform == 'Windows' and options.wix_dir: gyp_options.extend(['-D', 'use_wix=YES']) @@ -773,18 +766,7 @@ copy_script = os.path.join( ABS_SCRIPT_DIR, 'build_tools', 'copy_dll_and_symbol.py') copy_params = [] - if qt_version == '4': - copy_params.append({ - 'basenames': 'QtCored4;QtGuid4', - 'dll_paths': abs_qt_bin_dir, - 'pdb_paths': abs_qt_lib_dir, - 'target_dir': os.path.join(abs_out_win_dir, 'DebugDynamic')}) - copy_params.append({ - 'basenames': 'QtCore4;QtGui4', - 'dll_paths': abs_qt_bin_dir, - 'pdb_paths': abs_qt_lib_dir, - 'target_dir': os.path.join(abs_out_win_dir, 'ReleaseDynamic')}) - elif qt_version == '5': + if qt_version == '5': copy_params.append({ 'basenames': 'Qt5Cored;Qt5Guid;Qt5Widgetsd', 'dll_paths': abs_qt_bin_dir, diff --git a/src/build_tools/change_reference_mac.py b/src/build_tools/change_reference_mac.py index 9277b25..1603397 100644 --- a/src/build_tools/change_reference_mac.py +++ b/src/build_tools/change_reference_mac.py @@ -48,7 +48,6 @@ def ParseOption(): """Parse command line options.""" parser = optparse.OptionParser() - parser.add_option('--qtver', dest='qtver', choices=('4', '5'), default='4') parser.add_option('--qtdir', dest='qtdir') parser.add_option('--target', dest='target') @@ -80,30 +79,28 @@ if not opt.target: PrintErrorAndExit('--target option is mandatory.') - qtver = opt.qtver qtdir = os.path.abspath(opt.qtdir) target = os.path.abspath(opt.target) # Changes the reference to QtCore framework from the target application - # From: /path/to/qt/lib/QtCore.framework/Versions/4/QtCore + # From: /path/to/qt/lib/QtCore.framework/Versions/5/QtCore # To: @executable_path/../../../MozcTool.app/Contents/Frameworks/... - qtcore_framework = GetFrameworkPath('QtCore', qtver) + qtcore_framework = GetFrameworkPath('QtCore', '5') InstallNameTool(target, '%s/lib/%s' % (qtdir, qtcore_framework), GetReferenceTo(qtcore_framework)) # Changes the reference to QtGui framework from the target application - qtgui_framework = GetFrameworkPath('QtGui', qtver) + qtgui_framework = GetFrameworkPath('QtGui', '5') InstallNameTool(target, '%s/lib/%s' % (qtdir, qtgui_framework), GetReferenceTo(qtgui_framework)) - if qtver == '5': - # Changes the reference to QtWidgets framework from the target application - qtwidgets_framework = GetFrameworkPath('QtWidgets', '5') - InstallNameTool(target, - '%s/lib/%s' % (qtdir, qtwidgets_framework), - GetReferenceTo(qtwidgets_framework)) + # Changes the reference to QtWidgets framework from the target application + qtwidgets_framework = GetFrameworkPath('QtWidgets', '5') + InstallNameTool(target, + '%s/lib/%s' % (qtdir, qtwidgets_framework), + GetReferenceTo(qtwidgets_framework)) # Change the reference to $(branding)Tool_lib from the target application # From: @executable_path/../Frameworks/MozcTool_lib.framework/... diff --git a/src/build_tools/copy_qt_frameworks_mac.py b/src/build_tools/copy_qt_frameworks_mac.py index 5513477..cc2ed65 100644 --- a/src/build_tools/copy_qt_frameworks_mac.py +++ b/src/build_tools/copy_qt_frameworks_mac.py @@ -49,7 +49,6 @@ def ParseOption(): """Parse command line options.""" parser = optparse.OptionParser() - parser.add_option('--qtver', dest='qtver', choices=('4', '5'), default='4') parser.add_option('--qtdir', dest='qtdir') parser.add_option('--target', dest='target') @@ -113,43 +112,34 @@ if not opt.target: PrintErrorAndExit('--target option is mandatory.') - qtver = opt.qtver qtdir = os.path.abspath(opt.qtdir) target = os.path.abspath(opt.target) ref_to = '@executable_path/../../../ConfigDialog.app/Contents/Frameworks' - if qtver == '5': - CopyQt(qtdir, 'QtCore', '5', target, copy_resources=True) - CopyQt(qtdir, 'QtGui', '5', target, copy_resources=True) - CopyQt(qtdir, 'QtWidgets', '5', target, copy_resources=True) - CopyQt(qtdir, 'QtPrintSupport', '5', target, copy_resources=True) - ChangeReferences(qtdir, GetFrameworkPath('QtCore', '5'), - '5', target, ref_to) - ChangeReferences(qtdir, GetFrameworkPath('QtGui', '5'), - '5', target, ref_to, - references=['QtCore']) - ChangeReferences(qtdir, GetFrameworkPath('QtWidgets', '5'), - '5', target, ref_to, - references=['QtCore', 'QtGui']) - ChangeReferences(qtdir, GetFrameworkPath('QtPrintSupport', '5'), - '5', target, ref_to, - references=['QtCore', 'QtGui', 'QtWidgets']) + CopyQt(qtdir, 'QtCore', '5', target, copy_resources=True) + CopyQt(qtdir, 'QtGui', '5', target, copy_resources=True) + CopyQt(qtdir, 'QtWidgets', '5', target, copy_resources=True) + CopyQt(qtdir, 'QtPrintSupport', '5', target, copy_resources=True) - libqcocoa = 'QtCore.framework/Resources/plugins/platforms/libqcocoa.dylib' - CopyFiles(['%s/plugins/platforms/libqcocoa.dylib' % qtdir], - '%s/%s' % (target, libqcocoa)) - ChangeReferences(qtdir, libqcocoa, '5', target, ref_to, - references=['QtCore', 'QtGui', - 'QtWidgets', 'QtPrintSupport']) - else: - CopyQt(qtdir, 'QtCore', '4', target) - CopyQt(qtdir, 'QtGui', '4', target, copy_resources=True) + ChangeReferences(qtdir, GetFrameworkPath('QtCore', '5'), + '5', target, ref_to) + ChangeReferences(qtdir, GetFrameworkPath('QtGui', '5'), + '5', target, ref_to, + references=['QtCore']) + ChangeReferences(qtdir, GetFrameworkPath('QtWidgets', '5'), + '5', target, ref_to, + references=['QtCore', 'QtGui']) + ChangeReferences(qtdir, GetFrameworkPath('QtPrintSupport', '5'), + '5', target, ref_to, + references=['QtCore', 'QtGui', 'QtWidgets']) - ChangeReferences(qtdir, GetFrameworkPath('QtCore', '4'), - '4', target, ref_to) - ChangeReferences(qtdir, GetFrameworkPath('QtGui', '4'), - '4', target, ref_to, references=['QtCore']) + libqcocoa = 'QtCore.framework/Resources/plugins/platforms/libqcocoa.dylib' + CopyFiles(['%s/plugins/platforms/libqcocoa.dylib' % qtdir], + '%s/%s' % (target, libqcocoa)) + ChangeReferences(qtdir, libqcocoa, '5', target, ref_to, + references=['QtCore', 'QtGui', + 'QtWidgets', 'QtPrintSupport']) if __name__ == '__main__': diff --git a/src/data/version/mozc_version_template.bzl b/src/data/version/mozc_version_template.bzl index 0b8581f..0416a81 100644 --- a/src/data/version/mozc_version_template.bzl +++ b/src/data/version/mozc_version_template.bzl @@ -30,7 +30,7 @@ MAJOR=2 MINOR=20 -BUILD=2672 +BUILD=2673 REVISION=102 # This version represents the version of Mozc IME engine (converter, predictor, # etc.). This version info is included both in the Mozc server and in the Mozc diff --git a/src/gui/about_dialog/about_dialog.h b/src/gui/about_dialog/about_dialog.h index e1623f7..28cfb89 100644 --- a/src/gui/about_dialog/about_dialog.h +++ b/src/gui/about_dialog/about_dialog.h @@ -32,11 +32,7 @@ #ifndef MOZC_GUI_ABOUT_DIALOG_ABOUT_DIALOG_H_ #define MOZC_GUI_ABOUT_DIALOG_ABOUT_DIALOG_H_ -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif #include diff --git a/src/gui/about_dialog/about_dialog_libmain.cc b/src/gui/about_dialog/about_dialog_libmain.cc index 03087e2..8992ac9 100644 --- a/src/gui/about_dialog/about_dialog_libmain.cc +++ b/src/gui/about_dialog/about_dialog_libmain.cc @@ -27,11 +27,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif #include #include "base/system_util.h" #include "gui/about_dialog/about_dialog.h" diff --git a/src/gui/administration_dialog/administration_dialog.cc b/src/gui/administration_dialog/administration_dialog.cc index 2b3550c..897c281 100644 --- a/src/gui/administration_dialog/administration_dialog.cc +++ b/src/gui/administration_dialog/administration_dialog.cc @@ -29,11 +29,8 @@ #include "gui/administration_dialog/administration_dialog.h" -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif + #include "base/run_level.h" #include "config/stats_config_util.h" #include "server/cache_service_manager.h" diff --git a/src/gui/administration_dialog/administration_dialog.h b/src/gui/administration_dialog/administration_dialog.h index affad88..03263b4 100644 --- a/src/gui/administration_dialog/administration_dialog.h +++ b/src/gui/administration_dialog/administration_dialog.h @@ -31,11 +31,8 @@ #define MOZC_GUI_ADMINISTRATION_DIALOG_H_ #include -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif + #include #include "gui/administration_dialog/ui_administration_dialog.h" diff --git a/src/gui/administration_dialog/administration_dialog_libmain.cc b/src/gui/administration_dialog/administration_dialog_libmain.cc index 6f6cf50..37a9c50 100644 --- a/src/gui/administration_dialog/administration_dialog_libmain.cc +++ b/src/gui/administration_dialog/administration_dialog_libmain.cc @@ -27,12 +27,9 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif #include + #include "base/system_util.h" #include "gui/administration_dialog/administration_dialog.h" #include "gui/base/locale_util.h" diff --git a/src/gui/base/debug_util.cc b/src/gui/base/debug_util.cc index 20343a8..76c2be8 100644 --- a/src/gui/base/debug_util.cc +++ b/src/gui/base/debug_util.cc @@ -36,7 +36,6 @@ namespace mozc { namespace gui { -#ifdef MOZC_USE_QT5 void DebugUtil::MessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &q_msg) { @@ -57,24 +56,6 @@ break; } } -#else // ! MOZC_USE_QT5 -void DebugUtil::MessageHandler(QtMsgType type, const char *msg) { - switch (type) { - case QtDebugMsg: - LOG(INFO) << msg; - break; - case QtWarningMsg: - LOG(WARNING) << msg; - break; - case QtCriticalMsg: - LOG(ERROR) << msg; - break; - case QtFatalMsg: - LOG(FATAL) << msg; - break; - } -} -#endif // ! MOZC_USE_QT5 } // namespace gui } // namespace mozc diff --git a/src/gui/base/debug_util.h b/src/gui/base/debug_util.h index dcc3b70..a45d0a5 100644 --- a/src/gui/base/debug_util.h +++ b/src/gui/base/debug_util.h @@ -33,11 +33,7 @@ #define MOZC_GUI_BASE_DEBUG_UTIL_H_ #include -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif namespace mozc { namespace gui { @@ -46,13 +42,9 @@ public: // Callback function used as a Qt message handler which is called when Qt // message functions (qDebug, qWarning, qCritical and qFatal) are called. -#ifdef MOZC_USE_QT5 static void MessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &q_msg); -#else - static void MessageHandler(QtMsgType type, const char *msg); -#endif private: DebugUtil() {} diff --git a/src/gui/base/locale_util.cc b/src/gui/base/locale_util.cc index 13ebc91..f44dc38 100644 --- a/src/gui/base/locale_util.cc +++ b/src/gui/base/locale_util.cc @@ -44,12 +44,7 @@ #include // for CCSIZEOF_STRUCT #endif -#ifdef MOZC_USE_QT5 #include -#else -#include -#include -#endif #include #include @@ -114,12 +109,6 @@ if (loaded) { qApp->installTranslator(&default_translator_); } - -#ifndef MOZC_USE_QT5 - // Set default encoding for multi-byte string to be UTF8 - QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); - QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8")); -#endif } void TranslationDataImpl::InstallTranslationMessageAndFont( diff --git a/src/gui/base/table_util.cc b/src/gui/base/table_util.cc index 072b1c9..b7f4a99 100644 --- a/src/gui/base/table_util.cc +++ b/src/gui/base/table_util.cc @@ -29,11 +29,7 @@ #include "gui/base/table_util.h" -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif namespace mozc { namespace gui { diff --git a/src/gui/base/window_title_modifier.cc b/src/gui/base/window_title_modifier.cc index bd78d18..8e2df48 100644 --- a/src/gui/base/window_title_modifier.cc +++ b/src/gui/base/window_title_modifier.cc @@ -29,14 +29,9 @@ #include #include -#ifdef MOZC_USE_QT5 #include #include #include -#else -#include -#include -#endif #include "base/version.h" #include "gui/base/window_title_modifier.h" @@ -45,11 +40,7 @@ namespace gui { bool WindowTitleModifier::eventFilter(QObject *obj, QEvent *event) { -#ifdef MOZC_USE_QT5 QWidget *w = QApplication::activeWindow(); -#else - QWidget *w = qApp->activeWindow(); -#endif if (w != NULL && obj != NULL && w == obj && QEvent::WindowActivate == event->type() && w->windowTitle().indexOf(prefix_) == -1) { diff --git a/src/gui/character_pad/character_pad_libmain.cc b/src/gui/character_pad/character_pad_libmain.cc index 4613be2..86197ce 100644 --- a/src/gui/character_pad/character_pad_libmain.cc +++ b/src/gui/character_pad/character_pad_libmain.cc @@ -31,11 +31,7 @@ #include #endif -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif #include #include diff --git a/src/gui/character_pad/character_palette.cc b/src/gui/character_pad/character_palette.cc index 3af521a..e4296ee 100644 --- a/src/gui/character_pad/character_palette.cc +++ b/src/gui/character_pad/character_palette.cc @@ -30,11 +30,7 @@ #include "gui/character_pad/character_palette.h" #include -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif #ifdef OS_WIN #include diff --git a/src/gui/character_pad/character_palette.h b/src/gui/character_pad/character_palette.h index 2c74f91..8f0e9f2 100644 --- a/src/gui/character_pad/character_palette.h +++ b/src/gui/character_pad/character_palette.h @@ -31,11 +31,7 @@ #define MOZC_GUI_CHARACTER_PAD_CHARACTER_PALETTE_H_ #include -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif #include diff --git a/src/gui/character_pad/character_palette_table_widget.cc b/src/gui/character_pad/character_palette_table_widget.cc index 55846db..c7c1917 100644 --- a/src/gui/character_pad/character_palette_table_widget.cc +++ b/src/gui/character_pad/character_palette_table_widget.cc @@ -31,9 +31,7 @@ #include #include -#ifdef MOZC_USE_QT5 #include -#endif #include "gui/character_pad/selection_handler.h" #include "gui/character_pad/unicode_util.h" diff --git a/src/gui/character_pad/character_palette_table_widget.h b/src/gui/character_pad/character_palette_table_widget.h index 2a0491c..b523c32 100644 --- a/src/gui/character_pad/character_palette_table_widget.h +++ b/src/gui/character_pad/character_palette_table_widget.h @@ -30,11 +30,7 @@ #ifndef MOZC_GUI_CHARACTER_PAD_CHARACTER_PALETTE_TABLE_WIDGET_H_ #define MOZC_GUI_CHARACTER_PAD_CHARACTER_PALETTE_TABLE_WIDGET_H_ -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif class QTextCodec; class QTableWidgetItem; diff --git a/src/gui/character_pad/hand_writing.cc b/src/gui/character_pad/hand_writing.cc index 42f88d2..b6b25dd 100644 --- a/src/gui/character_pad/hand_writing.cc +++ b/src/gui/character_pad/hand_writing.cc @@ -29,19 +29,13 @@ #include "gui/character_pad/hand_writing.h" -#ifdef MOZC_USE_QT5 #ifdef ENABLE_CLOUD_HANDWRITING #include #endif // ENABLE_CLOUD_HANDWRITING + #include #include -#else // ! MOZC_USE_QT5 -#ifdef ENABLE_CLOUD_HANDWRITING -#include -#endif // ENABLE_CLOUD_HANDWRITING -#include -#include -#endif // ! MOZC_USE_QT5 + #ifdef OS_WIN #include #include diff --git a/src/gui/character_pad/hand_writing.h b/src/gui/character_pad/hand_writing.h index 1a0fe26..6abe5c0 100644 --- a/src/gui/character_pad/hand_writing.h +++ b/src/gui/character_pad/hand_writing.h @@ -30,11 +30,7 @@ #ifndef MOZC_GUI_CHARACTER_PAD_HAND_WRITING_H_ #define MOZC_GUI_CHARACTER_PAD_HAND_WRITING_H_ -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif #include diff --git a/src/gui/character_pad/hand_writing_canvas.h b/src/gui/character_pad/hand_writing_canvas.h index e0933d4..4994f81 100644 --- a/src/gui/character_pad/hand_writing_canvas.h +++ b/src/gui/character_pad/hand_writing_canvas.h @@ -30,11 +30,7 @@ #ifndef MOZC_GUI_CHARACTER_PAD_HAND_WRITING_CANVAS_H_ #define MOZC_GUI_CHARACTER_PAD_HAND_WRITING_CANVAS_H_ -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif #include #include diff --git a/src/gui/character_pad/hand_writing_thread.cc b/src/gui/character_pad/hand_writing_thread.cc index a9d9a3b..45ac4ac 100644 --- a/src/gui/character_pad/hand_writing_thread.cc +++ b/src/gui/character_pad/hand_writing_thread.cc @@ -32,9 +32,7 @@ // MutexLocker locks in the constructor and unlocks in the destructor. #include #include -#ifdef MOZC_USE_QT5 #include -#endif #include "base/clock.h" #include "base/logging.h" diff --git a/src/gui/character_pad/result_list.cc b/src/gui/character_pad/result_list.cc index 47666f8..58a7956 100644 --- a/src/gui/character_pad/result_list.cc +++ b/src/gui/character_pad/result_list.cc @@ -31,9 +31,7 @@ #include #include -#ifdef MOZC_USE_QT5 #include -#endif #include "gui/character_pad/selection_handler.h" #include "gui/character_pad/unicode_util.h" diff --git a/src/gui/character_pad/result_list.h b/src/gui/character_pad/result_list.h index d82de29..08f3ab0 100644 --- a/src/gui/character_pad/result_list.h +++ b/src/gui/character_pad/result_list.h @@ -31,13 +31,8 @@ #define MOZC_GUI_CHARACTER_PAD_RESULT_LIST_H_ #include -#ifdef MOZC_USE_QT5 #include #include -#else -#include -#include -#endif namespace mozc { namespace gui { diff --git a/src/gui/character_pad/selection_handler.cc b/src/gui/character_pad/selection_handler.cc index e8e8407..ff5df95 100644 --- a/src/gui/character_pad/selection_handler.cc +++ b/src/gui/character_pad/selection_handler.cc @@ -29,16 +29,10 @@ #include "gui/character_pad/selection_handler.h" -#ifdef MOZC_USE_QT5 #include #include #include #include -#else -#include -#include -#include -#endif #include "base/singleton.h" diff --git a/src/gui/character_pad/unicode_util.cc b/src/gui/character_pad/unicode_util.cc index 3ceaf2d..930b472 100644 --- a/src/gui/character_pad/unicode_util.cc +++ b/src/gui/character_pad/unicode_util.cc @@ -202,11 +202,7 @@ } QString toHtmlEscaped(const QString &text) { -#ifdef MOZC_USE_QT5 return text.toHtmlEscaped(); -#else - return Qt::escape(text); -#endif } } // namespace diff --git a/src/gui/config_dialog/character_form_editor.cc b/src/gui/config_dialog/character_form_editor.cc index ae2d84e..2970dca 100644 --- a/src/gui/config_dialog/character_form_editor.cc +++ b/src/gui/config_dialog/character_form_editor.cc @@ -30,9 +30,7 @@ #include "gui/config_dialog/character_form_editor.h" #include -#ifdef MOZC_USE_QT5 #include -#endif #include diff --git a/src/gui/config_dialog/character_form_editor.h b/src/gui/config_dialog/character_form_editor.h index b0e1c7b..a748f56 100644 --- a/src/gui/config_dialog/character_form_editor.h +++ b/src/gui/config_dialog/character_form_editor.h @@ -30,11 +30,7 @@ #ifndef MOZC_GUI_CONFIG_DIALOG_CHARACTER_FORM_EDITOR_H_ #define MOZC_GUI_CONFIG_DIALOG_CHARACTER_FORM_EDITOR_H_ -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif #include diff --git a/src/gui/config_dialog/combobox_delegate.cc b/src/gui/config_dialog/combobox_delegate.cc index 1b29c50..2d24972 100644 --- a/src/gui/config_dialog/combobox_delegate.cc +++ b/src/gui/config_dialog/combobox_delegate.cc @@ -30,11 +30,7 @@ #include "gui/config_dialog/combobox_delegate.h" #include -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif namespace mozc { namespace gui { diff --git a/src/gui/config_dialog/combobox_delegate.h b/src/gui/config_dialog/combobox_delegate.h index eed3632..5d5bd3f 100644 --- a/src/gui/config_dialog/combobox_delegate.h +++ b/src/gui/config_dialog/combobox_delegate.h @@ -33,13 +33,8 @@ #include #include #include -#ifdef MOZC_USE_QT5 #include #include -#else -#include -#include -#endif class QMouseEvent; diff --git a/src/gui/config_dialog/config_dialog.cc b/src/gui/config_dialog/config_dialog.cc index 0aefb9a..a452966 100644 --- a/src/gui/config_dialog/config_dialog.cc +++ b/src/gui/config_dialog/config_dialog.cc @@ -35,19 +35,11 @@ #endif // OS_ANDROID || OS_NACL #ifdef OS_WIN -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif #include #endif -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif #include #include diff --git a/src/gui/config_dialog/config_dialog_libmain.cc b/src/gui/config_dialog/config_dialog_libmain.cc index f856178..8a73fbd 100644 --- a/src/gui/config_dialog/config_dialog_libmain.cc +++ b/src/gui/config_dialog/config_dialog_libmain.cc @@ -31,15 +31,10 @@ #include #include -#ifdef MOZC_USE_QT5 #include #include #include -#else -#include -#include -#include -#endif + #include "base/system_util.h" #include "gui/base/locale_util.h" #include "gui/base/singleton_window_helper.h" diff --git a/src/gui/config_dialog/generic_table_editor.cc b/src/gui/config_dialog/generic_table_editor.cc index ad40683..cf34cbe 100644 --- a/src/gui/config_dialog/generic_table_editor.cc +++ b/src/gui/config_dialog/generic_table_editor.cc @@ -30,15 +30,10 @@ #include "gui/config_dialog/generic_table_editor.h" #include -#ifdef MOZC_USE_QT5 #include #include #include #include -#else -#include -#include -#endif #include // for unique #include @@ -121,11 +116,7 @@ QAbstractItemView::SelectedClicked); editorTableWidget->setSortingEnabled(true); -#ifdef MOZC_USE_QT5 editorTableWidget->verticalHeader()->setSectionResizeMode(QHeaderView::Fixed); -#else - editorTableWidget->verticalHeader()->setResizeMode(QHeaderView::Fixed); -#endif editorTableWidget->verticalHeader()->setDefaultSectionSize( GetTableHeight(editorTableWidget)); diff --git a/src/gui/config_dialog/generic_table_editor.h b/src/gui/config_dialog/generic_table_editor.h index b79ddb1..77a228c 100644 --- a/src/gui/config_dialog/generic_table_editor.h +++ b/src/gui/config_dialog/generic_table_editor.h @@ -30,11 +30,7 @@ #ifndef MOZC_GUI_CONFIG_DIALOG_GENERIC_TABLE_EDITOR_H_ #define MOZC_GUI_CONFIG_DIALOG_GENERIC_TABLE_EDITOR_H_ -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif #include #include "gui/config_dialog/ui_generic_table_editor.h" diff --git a/src/gui/config_dialog/keybinding_editor.cc b/src/gui/config_dialog/keybinding_editor.cc index ae91dea..5032150 100644 --- a/src/gui/config_dialog/keybinding_editor.cc +++ b/src/gui/config_dialog/keybinding_editor.cc @@ -43,14 +43,10 @@ #endif #include -#ifdef MOZC_USE_QT5 #include #include #include #include -#else -#include -#endif #include "base/logging.h" #include "base/util.h" @@ -288,13 +284,8 @@ result_state = KeyBindingFilter::DENY_KEY; } -#ifdef MOZC_USE_QT5 const char key = modifier_required_key_.isEmpty() ? 0 : modifier_required_key_[0].toLatin1(); -#else - const char key = modifier_required_key_.isEmpty() ? - 0 : modifier_required_key_[0].toAscii(); -#endif // Alt or Ctrl or these combinations if ((alt_pressed_ || ctrl_pressed_) && diff --git a/src/gui/config_dialog/keybinding_editor.h b/src/gui/config_dialog/keybinding_editor.h index b3c6680..afcfb1c 100644 --- a/src/gui/config_dialog/keybinding_editor.h +++ b/src/gui/config_dialog/keybinding_editor.h @@ -31,11 +31,7 @@ #define MOZC_GUI_CONFIG_DIALOG_KEYBINDING_EDITOR_H_ #include -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif #include #include diff --git a/src/gui/config_dialog/keybinding_editor_delegate.cc b/src/gui/config_dialog/keybinding_editor_delegate.cc index d956bca..f6f6bf3 100644 --- a/src/gui/config_dialog/keybinding_editor_delegate.cc +++ b/src/gui/config_dialog/keybinding_editor_delegate.cc @@ -30,11 +30,7 @@ #include "gui/config_dialog/keybinding_editor_delegate.h" #include -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif #include diff --git a/src/gui/config_dialog/keybinding_editor_delegate.h b/src/gui/config_dialog/keybinding_editor_delegate.h index dedee23..9b48c22 100644 --- a/src/gui/config_dialog/keybinding_editor_delegate.h +++ b/src/gui/config_dialog/keybinding_editor_delegate.h @@ -32,11 +32,7 @@ #include #include -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif namespace mozc { namespace gui { diff --git a/src/gui/config_dialog/keymap_editor.cc b/src/gui/config_dialog/keymap_editor.cc index bfd7b08..ef2d1d3 100644 --- a/src/gui/config_dialog/keymap_editor.cc +++ b/src/gui/config_dialog/keymap_editor.cc @@ -34,15 +34,10 @@ #endif // OS_ANDROID || OS_NACL #include -#ifdef MOZC_USE_QT5 #include #include #include #include -#else -#include -#include -#endif #include // for unique #include diff --git a/src/gui/config_dialog/keymap_editor.h b/src/gui/config_dialog/keymap_editor.h index 38abe05..b470886 100644 --- a/src/gui/config_dialog/keymap_editor.h +++ b/src/gui/config_dialog/keymap_editor.h @@ -30,11 +30,7 @@ #ifndef MOZC_GUI_CONFIG_DIALOG_KEYMAP_EDITOR_H_ #define MOZC_GUI_CONFIG_DIALOG_KEYMAP_EDITOR_H_ -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif #include #include diff --git a/src/gui/config_dialog/roman_table_editor.cc b/src/gui/config_dialog/roman_table_editor.cc index 01415be..cde29fd 100644 --- a/src/gui/config_dialog/roman_table_editor.cc +++ b/src/gui/config_dialog/roman_table_editor.cc @@ -30,10 +30,8 @@ #include "gui/config_dialog/roman_table_editor.h" #include -#ifdef MOZC_USE_QT5 #include #include -#endif #include #include diff --git a/src/gui/config_dialog/roman_table_editor.h b/src/gui/config_dialog/roman_table_editor.h index 07de691..0e77525 100644 --- a/src/gui/config_dialog/roman_table_editor.h +++ b/src/gui/config_dialog/roman_table_editor.h @@ -30,11 +30,7 @@ #ifndef MOZC_GUI_CONFIG_DIALOG_ROMAN_TABLE_EDITOR_H_ #define MOZC_GUI_CONFIG_DIALOG_ROMAN_TABLE_EDITOR_H_ -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif #include #include diff --git a/src/gui/confirmation_dialog/confirmation_dialog.cc b/src/gui/confirmation_dialog/confirmation_dialog.cc index 960704f..4b5a85d 100644 --- a/src/gui/confirmation_dialog/confirmation_dialog.cc +++ b/src/gui/confirmation_dialog/confirmation_dialog.cc @@ -30,12 +30,8 @@ #include "gui/confirmation_dialog/confirmation_dialog.h" #include -#ifdef MOZC_USE_QT5 #include #include -#else -#include -#endif #include "base/flags.h" diff --git a/src/gui/confirmation_dialog/confirmation_dialog.h b/src/gui/confirmation_dialog/confirmation_dialog.h index 3da1406..0f8d09d 100644 --- a/src/gui/confirmation_dialog/confirmation_dialog.h +++ b/src/gui/confirmation_dialog/confirmation_dialog.h @@ -31,11 +31,7 @@ #define MOZC_GUI_CONFIRMATION_DIALOG_H_ #include -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif namespace mozc { namespace gui { diff --git a/src/gui/confirmation_dialog/confirmation_dialog_libmain.cc b/src/gui/confirmation_dialog/confirmation_dialog_libmain.cc index ff11626..863d2db 100644 --- a/src/gui/confirmation_dialog/confirmation_dialog_libmain.cc +++ b/src/gui/confirmation_dialog/confirmation_dialog_libmain.cc @@ -27,14 +27,9 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifdef MOZC_USE_QT5 #include #include #include -#else -#include -#include -#endif #include "base/flags.h" #include "base/logging.h" diff --git a/src/gui/dictionary_tool/dictionary_content_table_widget.h b/src/gui/dictionary_tool/dictionary_content_table_widget.h index a2184c0..b186356 100644 --- a/src/gui/dictionary_tool/dictionary_content_table_widget.h +++ b/src/gui/dictionary_tool/dictionary_content_table_widget.h @@ -30,11 +30,7 @@ #ifndef MOZC_GUI_DICTIONARY_TOOL_DICTIONARY_CONTENT_TABLE_WIDGET_H_ #define MOZC_GUI_DICTIONARY_TOOL_DICTIONARY_CONTENT_TABLE_WIDGET_H_ -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif namespace mozc { namespace gui { diff --git a/src/gui/dictionary_tool/dictionary_tool.cc b/src/gui/dictionary_tool/dictionary_tool.cc index 254b326..ad134c5 100644 --- a/src/gui/dictionary_tool/dictionary_tool.cc +++ b/src/gui/dictionary_tool/dictionary_tool.cc @@ -35,16 +35,12 @@ #include #include -#ifdef MOZC_USE_QT5 #include #include #include #include #include #include -#else -#include -#endif #ifdef OS_WIN #include @@ -394,11 +390,7 @@ // We fix the row height so that paint() is executed faster. // This changes allows DictionaryTool handle about 1M words. -#ifdef MOZC_USE_QT5 dic_content_->verticalHeader()->setSectionResizeMode(QHeaderView::Fixed); -#else - dic_content_->verticalHeader()->setResizeMode(QHeaderView::Fixed); -#endif dic_content_->verticalHeader()->setDefaultSectionSize( GetTableHeight(dic_content_)); diff --git a/src/gui/dictionary_tool/dictionary_tool.h b/src/gui/dictionary_tool/dictionary_tool.h index b72fc02..2073e6e 100644 --- a/src/gui/dictionary_tool/dictionary_tool.h +++ b/src/gui/dictionary_tool/dictionary_tool.h @@ -30,17 +30,10 @@ #ifndef MOZC_GUI_DICTIONARY_TOOL_DICTIONARY_TOOL_H_ #define MOZC_GUI_DICTIONARY_TOOL_DICTIONARY_TOOL_H_ -#ifdef MOZC_USE_QT5 #include #include #include #include -#else -#include -#include -#include -#include -#endif #include #include diff --git a/src/gui/dictionary_tool/dictionary_tool_libmain.cc b/src/gui/dictionary_tool/dictionary_tool_libmain.cc index 1d76eb1..408a353 100644 --- a/src/gui/dictionary_tool/dictionary_tool_libmain.cc +++ b/src/gui/dictionary_tool/dictionary_tool_libmain.cc @@ -29,11 +29,8 @@ #include #include -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif + #include #include "base/logging.h" #include "base/system_util.h" diff --git a/src/gui/dictionary_tool/find_dialog.cc b/src/gui/dictionary_tool/find_dialog.cc index f20e15d..40498b2 100644 --- a/src/gui/dictionary_tool/find_dialog.cc +++ b/src/gui/dictionary_tool/find_dialog.cc @@ -30,10 +30,8 @@ #include "gui/dictionary_tool/find_dialog.h" #include -#ifdef MOZC_USE_QT5 #include #include -#endif #include "base/logging.h" diff --git a/src/gui/dictionary_tool/find_dialog.h b/src/gui/dictionary_tool/find_dialog.h index b7b69a3..ce45370 100644 --- a/src/gui/dictionary_tool/find_dialog.h +++ b/src/gui/dictionary_tool/find_dialog.h @@ -30,11 +30,8 @@ #ifndef MOZC_GUI_DICTIONARY_TOOL_FIND_DIALOG_H_ #define MOZC_GUI_DICTIONARY_TOOL_FIND_DIALOG_H_ -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif + #include "gui/dictionary_tool/ui_find_dialog.h" class QTableWidget; diff --git a/src/gui/dictionary_tool/import_dialog.cc b/src/gui/dictionary_tool/import_dialog.cc index bfc4ba5..4c1e335 100644 --- a/src/gui/dictionary_tool/import_dialog.cc +++ b/src/gui/dictionary_tool/import_dialog.cc @@ -30,9 +30,7 @@ #include "gui/dictionary_tool/import_dialog.h" #include -#ifdef MOZC_USE_QT5 #include -#endif #include "base/util.h" #include "dictionary/user_dictionary_storage.h" diff --git a/src/gui/dictionary_tool/import_dialog.h b/src/gui/dictionary_tool/import_dialog.h index 8634332..3d6be8d 100644 --- a/src/gui/dictionary_tool/import_dialog.h +++ b/src/gui/dictionary_tool/import_dialog.h @@ -35,11 +35,8 @@ #ifndef MOZC_GUI_DICTIONARY_TOOL_IMPORT_DIALOG_H_ #define MOZC_GUI_DICTIONARY_TOOL_IMPORT_DIALOG_H_ -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif + #include "dictionary/user_dictionary_importer.h" #include "gui/dictionary_tool/ui_import_dialog.h" diff --git a/src/gui/dictionary_tool/zero_width_splitter.cc b/src/gui/dictionary_tool/zero_width_splitter.cc index 4a0a859..247915b 100644 --- a/src/gui/dictionary_tool/zero_width_splitter.cc +++ b/src/gui/dictionary_tool/zero_width_splitter.cc @@ -30,11 +30,7 @@ #include "gui/dictionary_tool/zero_width_splitter.h" #include -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif void ZeroWidthSplitterHandle::paintEvent(QPaintEvent *event) { #ifdef OS_MACOSX diff --git a/src/gui/dictionary_tool/zero_width_splitter.h b/src/gui/dictionary_tool/zero_width_splitter.h index bf7cedf..f622755 100644 --- a/src/gui/dictionary_tool/zero_width_splitter.h +++ b/src/gui/dictionary_tool/zero_width_splitter.h @@ -30,11 +30,7 @@ #ifndef MOZC_GUI_DICTIONARY_TOOL_ZERO_WIDTH_SPLITTER_H_ #define MOZC_GUI_DICTIONARY_TOOL_ZERO_WIDTH_SPLITTER_H_ -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif // Special QSplitter whose handle size is only 1px. // This line is drawed with a proper colour corresponding to diff --git a/src/gui/error_message_dialog/error_message_dialog.cc b/src/gui/error_message_dialog/error_message_dialog.cc index 457a51f..bf4ca8f 100644 --- a/src/gui/error_message_dialog/error_message_dialog.cc +++ b/src/gui/error_message_dialog/error_message_dialog.cc @@ -31,12 +31,8 @@ #include #include -#ifdef MOZC_USE_QT5 #include #include -#else -#include -#endif #include "base/flags.h" diff --git a/src/gui/error_message_dialog/error_message_dialog.h b/src/gui/error_message_dialog/error_message_dialog.h index 6b81485..36d8334 100644 --- a/src/gui/error_message_dialog/error_message_dialog.h +++ b/src/gui/error_message_dialog/error_message_dialog.h @@ -31,11 +31,7 @@ #define MOZC_GUI_ERROR_MESSAGE_DIALOG_H_ #include -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif namespace mozc { namespace gui { diff --git a/src/gui/error_message_dialog/error_message_dialog_libmain.cc b/src/gui/error_message_dialog/error_message_dialog_libmain.cc index 3c3aec8..c328ef8 100644 --- a/src/gui/error_message_dialog/error_message_dialog_libmain.cc +++ b/src/gui/error_message_dialog/error_message_dialog_libmain.cc @@ -27,14 +27,10 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifdef MOZC_USE_QT5 #include #include #include -#else -#include -#include -#endif + #include "base/logging.h" #include "base/process_mutex.h" #include "base/system_util.h" diff --git a/src/gui/gui.gyp b/src/gui/gui.gyp index 655d7d5..1266732 100644 --- a/src/gui/gui.gyp +++ b/src/gui/gui.gyp @@ -1031,7 +1031,6 @@ 'postbuild_name': 'Change the reference to frameworks.', 'action': [ 'python', '../build_tools/change_reference_mac.py', - '--qtver', '<(qt_ver)', '--qtdir', '<(qt_dir)', '--target', '${BUILT_PRODUCTS_DIR}/GuiTool_lib.framework/Versions/A/GuiTool_lib', @@ -1279,11 +1278,7 @@ ], 'conditions': [ ['use_qt=="YES"', { - 'conditions': [ - ['qt_ver==5', { - 'mac_bundle_resources': ['../data/mac/qt.conf'], - }], - ], + 'mac_bundle_resources': ['../data/mac/qt.conf'], 'sources': [ 'tool/mozc_tool_main.cc', ], @@ -1298,7 +1293,6 @@ 'postbuild_name': 'Change the reference to frameworks', 'action': [ 'python', '../build_tools/change_reference_mac.py', - '--qtver', '<(qt_ver)', '--qtdir', '<(qt_dir)', '--target', '${BUILT_PRODUCTS_DIR}/<(product_name).app/Contents/MacOS/<(product_name)', @@ -1308,7 +1302,6 @@ 'postbuild_name': 'Copy Qt frameworks to the frameworks directory.', 'action': [ 'python', '../build_tools/copy_qt_frameworks_mac.py', - '--qtver', '<(qt_ver)', '--qtdir', '<(qt_dir)', '--target', '${BUILT_PRODUCTS_DIR}/<(product_name).app/Contents/Frameworks/', ], diff --git a/src/gui/mac_gui.gypi b/src/gui/mac_gui.gypi index 5c96577..a3089d3 100644 --- a/src/gui/mac_gui.gypi +++ b/src/gui/mac_gui.gypi @@ -35,11 +35,7 @@ 'sources': [ 'tool/mozc_tool_main.cc', ], - 'conditions': [ - ['qt_ver==5', { - 'mac_bundle_resources': ['../data/mac/qt.conf'], - }], - ], + 'mac_bundle_resources': ['../data/mac/qt.conf'], 'dependencies': [ 'config_dialog_mac', 'gen_mozc_tool_info_plist', @@ -50,7 +46,6 @@ 'postbuild_name': 'Change the reference to frameworks', 'action': [ 'python', '../build_tools/change_reference_mac.py', - '--qtver', '<(qt_ver)', '--qtdir', '<(qt_dir)', '--target', '${BUILT_PRODUCTS_DIR}/<(product_name).app/Contents/MacOS/<(product_name)', diff --git a/src/gui/post_install_dialog/post_install_dialog_libmain.cc b/src/gui/post_install_dialog/post_install_dialog_libmain.cc index db3c7c6..211020f 100644 --- a/src/gui/post_install_dialog/post_install_dialog_libmain.cc +++ b/src/gui/post_install_dialog/post_install_dialog_libmain.cc @@ -31,12 +31,9 @@ #include #endif -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif #include + #include "base/logging.h" #include "base/process_mutex.h" #include "base/system_util.h" diff --git a/src/gui/qt_libraries.gypi b/src/gui/qt_libraries.gypi index 8dbc6d0..1754519 100644 --- a/src/gui/qt_libraries.gypi +++ b/src/gui/qt_libraries.gypi @@ -47,19 +47,10 @@ 'AdditionalLibraryDirectories': [ '<(qt_dir)/lib', ], - 'conditions': [ - ['qt_ver==5', { - 'AdditionalDependencies': [ - 'Qt5Cored.lib', - 'Qt5Guid.lib', - 'Qt5Widgetsd.lib', - ], - }, { - 'AdditionalDependencies': [ - 'QtCored4.lib', - 'QtGuid4.lib', - ], - }], + 'AdditionalDependencies': [ + 'Qt5Cored.lib', + 'Qt5Guid.lib', + 'Qt5Widgetsd.lib', ], }, }, @@ -70,19 +61,10 @@ 'AdditionalLibraryDirectories': [ '<(qt_dir)/lib', ], - 'conditions': [ - ['qt_ver==5', { - 'AdditionalDependencies': [ - 'Qt5Core.lib', - 'Qt5Gui.lib', - 'Qt5Widgets.lib', - ], - }, { - 'AdditionalDependencies': [ - 'QtCore4.lib', - 'QtGui4.lib', - ], - }], + 'AdditionalDependencies': [ + 'Qt5Core.lib', + 'Qt5Gui.lib', + 'Qt5Widgets.lib', ], }, }, @@ -104,20 +86,11 @@ 'mac_framework_dirs': [ '<(qt_dir)/lib', ], - 'conditions': [ - ['qt_ver==5', { - 'libraries': [ - '<(qt_dir)/lib/QtCore.framework', - '<(qt_dir)/lib/QtGui.framework', - '<(qt_dir)/lib/QtWidgets.framework', - ] - }, { - 'libraries': [ - '<(qt_dir)/lib/QtCore.framework', - '<(qt_dir)/lib/QtGui.framework', - ] - }], - ], + 'libraries': [ + '<(qt_dir)/lib/QtCore.framework', + '<(qt_dir)/lib/QtGui.framework', + '<(qt_dir)/lib/QtWidgets.framework', + ] }, }], ], @@ -126,15 +99,8 @@ ] }], ['target_platform=="Linux"', { - 'conditions': [ - ['qt_ver==5', { - 'cflags': [' #endif -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif #include + #include "base/logging.h" #include "base/process_mutex.h" #include "base/system_util.h" diff --git a/src/gui/tool/mozc_tool_libmain.cc b/src/gui/tool/mozc_tool_libmain.cc index 42686a6..a9ab256 100644 --- a/src/gui/tool/mozc_tool_libmain.cc +++ b/src/gui/tool/mozc_tool_libmain.cc @@ -144,11 +144,7 @@ } // install Qt debug handler -#ifdef MOZC_USE_QT5 qInstallMessageHandler(mozc::gui::DebugUtil::MessageHandler); -#else - qInstallMsgHandler(mozc::gui::DebugUtil::MessageHandler); -#endif #ifdef OS_WIN // Update JumpList if available. diff --git a/src/gui/word_register_dialog/word_register_dialog.cc b/src/gui/word_register_dialog/word_register_dialog.cc index 2c0251f..b5d0e2e 100644 --- a/src/gui/word_register_dialog/word_register_dialog.cc +++ b/src/gui/word_register_dialog/word_register_dialog.cc @@ -39,9 +39,7 @@ #endif // OS_WIN #include -#ifdef MOZC_USE_QT5 #include -#endif #include #ifdef OS_WIN #include // for std::unique_ptr @@ -88,11 +86,7 @@ const DWORD num_copied = ::GetEnvironmentVariable(wenvname.c_str(), buffer.get(), buffer_size); if (num_copied > 0) { -#ifdef MOZC_USE_QT5 return QString::fromUtf16(buffer.get()); -#else - return QString::fromWCharArray(buffer.get()); -#endif } return ""; #endif // OS_WIN diff --git a/src/gui/word_register_dialog/word_register_dialog.h b/src/gui/word_register_dialog/word_register_dialog.h index 3b0a729..851c0c9 100644 --- a/src/gui/word_register_dialog/word_register_dialog.h +++ b/src/gui/word_register_dialog/word_register_dialog.h @@ -32,11 +32,7 @@ #include #include -#ifdef MOZC_USE_QT5 #include -#else -#include -#endif #include diff --git a/src/gui/word_register_dialog/word_register_dialog_libmain.cc b/src/gui/word_register_dialog/word_register_dialog_libmain.cc index b6e07b6..bc0faa3 100644 --- a/src/gui/word_register_dialog/word_register_dialog_libmain.cc +++ b/src/gui/word_register_dialog/word_register_dialog_libmain.cc @@ -27,14 +27,10 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifdef MOZC_USE_QT5 #include #include -#else -#include -#include -#endif #include + #include "base/system_util.h" #include "gui/base/locale_util.h" #include "gui/base/singleton_window_helper.h" diff --git a/src/gyp/defines.gypi b/src/gyp/defines.gypi index 8124434..6a6c9b8 100644 --- a/src/gyp/defines.gypi +++ b/src/gyp/defines.gypi @@ -56,9 +56,6 @@ # use_qt is 'YES' only if you want to use GUI binaries. 'use_qt%': 'YES', - # Qt version. It should be either of 4 or 5. - 'qt_ver%' : '4', - # use_libprotobuf represents if protobuf library is used or not. # This option is only for Linux. # You should not set this flag if you want to use "dlopen" to @@ -93,9 +90,6 @@ ['enable_gtk_renderer==1', { 'defines': ['ENABLE_GTK_RENDERER'], }], - ['qt_ver==5', { - 'defines': ['MOZC_USE_QT5'], - }], ] } } diff --git a/src/win32/installer/installer.gyp b/src/win32/installer/installer.gyp index 6816579..fb56919 100644 --- a/src/win32/installer/installer.gyp +++ b/src/win32/installer/installer.gyp @@ -60,10 +60,6 @@ 'release_crt_merge_module_id_prefix': 'CRT140', 'debug_crt_merge_module_path': 'C:/Program Files (x86)/Common Files/Merge Modules/Microsoft_VC140_DebugCRT_x86.msm', 'release_crt_merge_module_path': 'C:/Program Files (x86)/Common Files/Merge Modules/Microsoft_VC140_CRT_x86.msm', - 'qtcore4_dll_path': '', - 'qtcored4_dll_path': '', - 'qtgui4_dll_path': '', - 'qtguid4_dll_path': '', 'qt5core_dll_path': '', 'qt5cored_dll_path': '', 'qt5gui_dll_path': '', @@ -78,14 +74,6 @@ ['use_qt=="YES"', { 'mozc_zinnia_model_data_path': '<(DEPTH)/third_party/zinnia/tomoe/handwriting-light-ja.model', 'mozc_tool_path': '<(outdir32_dynamic)/GoogleIMEJaTool.exe', - }], - ['use_qt=="YES" and qt_ver==4', { - 'qtcore4_dll_path': '<(qt_dir)/bin/QtCore4.dll', - 'qtcored4_dll_path': '<(qt_dir)/bin/QtCored4.dll', - 'qtgui4_dll_path': '<(qt_dir)/bin/QtGui4.dll', - 'qtguid4_dll_path': '<(qt_dir)/bin/QtGuid4.dll', - }], - ['use_qt=="YES" and qt_ver==5', { 'qt5core_dll_path': '<(qt_dir)/bin/Qt5Core.dll', 'qt5cored_dll_path': '<(qt_dir)/bin/Qt5Cored.dll', 'qt5gui_dll_path': '<(qt_dir)/bin/Qt5Gui.dll', @@ -101,10 +89,6 @@ 'release_crt_merge_module_id_prefix': '<(release_crt_merge_module_id_prefix)', 'debug_crt_merge_module_path': '<(debug_crt_merge_module_path)', 'release_crt_merge_module_path': '<(release_crt_merge_module_path)', - 'qtcore4_dll_path': '<(qtcore4_dll_path)', - 'qtcored4_dll_path': '<(qtcored4_dll_path)', - 'qtgui4_dll_path': '<(qtgui4_dll_path)', - 'qtguid4_dll_path': '<(qtguid4_dll_path)', 'qt5core_dll_path': '<(qt5core_dll_path)', 'qt5cored_dll_path': '<(qt5cored_dll_path)', 'qt5gui_dll_path': '<(qt5gui_dll_path)', diff --git a/src/win32/installer/installer_32bit.wxs b/src/win32/installer/installer_32bit.wxs index e7583d1..ebd8a15 100644 --- a/src/win32/installer/installer_32bit.wxs +++ b/src/win32/installer/installer_32bit.wxs @@ -55,18 +55,6 @@ - - - - - - - - - - - - @@ -387,24 +375,6 @@ - - - - - - - - - - - - - - @@ -433,24 +403,6 @@ - - - - - - - - - - - - - - @@ -695,12 +647,6 @@ - - - - - - @@ -714,12 +660,6 @@ - - - - - - diff --git a/src/win32/installer/installer_64bit.wxs b/src/win32/installer/installer_64bit.wxs index a3b576c..58b9720 100644 --- a/src/win32/installer/installer_64bit.wxs +++ b/src/win32/installer/installer_64bit.wxs @@ -55,18 +55,6 @@ - - - - - - - - - - - - @@ -404,24 +392,6 @@ - - - - - - - - - - - - - - @@ -450,24 +420,6 @@ - - - - - - - - - - - - - - @@ -767,12 +719,6 @@ - - - - - - @@ -786,12 +732,6 @@ - - - - - - diff --git a/src/win32/installer/wix.gypi b/src/win32/installer/wix.gypi index a597999..841cd03 100644 --- a/src/win32/installer/wix.gypi +++ b/src/win32/installer/wix.gypi @@ -74,26 +74,6 @@ '-dReleaseCrtMergeModulePath=<(release_crt_merge_module_path)', ], }], - ['qtcore4_dll_path!=""', { - 'additional_args': [ - '-dQtCore4DllPath=<(qtcore4_dll_path)', - ], - }], - ['qtcored4_dll_path!=""', { - 'additional_args': [ - '-dQtCored4DllPath=<(qtcored4_dll_path)', - ], - }], - ['qtgui4_dll_path!=""', { - 'additional_args': [ - '-dQtGui4DllPath=<(qtgui4_dll_path)', - ], - }], - ['qtguid4_dll_path!=""', { - 'additional_args': [ - '-dQtGuid4DllPath=<(qtguid4_dll_path)', - ], - }], ['qt5core_dll_path!=""', { 'additional_args': [ '-dQt5CoreDllPath=<(qt5core_dll_path)',