Set Qt::WindowCloseButtonHint
The lack of Qt::WindowCloseButtonHint had not been obvious until we
switched to Qt 5, where the close icon on the dialog frame does not work
because of that.
Fix #400.
BUG=#400
TEST=Manually on Qt 4.8.7 (Win), Qt 5.6.2 (Win), Qt 5.2.1 (Ubuntu 14.04)
REF_BUG=33255809
REF_CL=140697910
REF_TIME=2016-11-30T23:53:06-08:00
REF_TIME_RAW=1480578786 -0800
Yohei Yukawa
7 years ago
29 | 29 |
|
30 | 30 |
MAJOR=2
|
31 | 31 |
MINOR=19
|
32 | |
BUILD=2665
|
|
32 |
BUILD=2666
|
33 | 33 |
REVISION=102
|
34 | 34 |
# This version represents the version of Mozc IME engine (converter, predictor,
|
35 | 35 |
# etc.). This version info is included both in the Mozc server and in the Mozc
|
78 | 78 |
: QDialog(parent),
|
79 | 79 |
callback_(NULL) {
|
80 | 80 |
setupUi(this);
|
81 | |
setWindowFlags(Qt::WindowSystemMenuHint);
|
|
81 |
setWindowFlags(Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint);
|
82 | 82 |
setWindowModality(Qt::NonModal);
|
83 | 83 |
QPalette window_palette;
|
84 | 84 |
window_palette.setColor(QPalette::Window, QColor(255, 255, 255));
|
45 | 45 |
AdministrationDialog::AdministrationDialog() {
|
46 | 46 |
setupUi(this);
|
47 | 47 |
setWindowFlags(Qt::WindowSystemMenuHint |
|
|
48 |
Qt::WindowCloseButtonHint |
|
48 | 49 |
Qt::MSWindowsFixedSizeDialogHint |
|
49 | 50 |
Qt::WindowStaysOnTopHint);
|
50 | 51 |
setWindowModality(Qt::NonModal);
|
82 | 82 |
mozc::gui::WindowsSelectionHandler callback;
|
83 | 83 |
mozc::gui::SelectionHandler::SetSelectionCallback(&callback);
|
84 | 84 |
|
85 | |
window->setWindowFlags(Qt::WindowSystemMenuHint);
|
|
85 |
window->setWindowFlags(Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint);
|
86 | 86 |
|
87 | 87 |
// Set Top-Most bit:
|
88 | 88 |
// Use SWP_NOACTIVATE so that the GUI window will not get focus from the
|
94 | 94 |
initial_use_keyboard_to_change_preedit_method_(false),
|
95 | 95 |
initial_use_mode_indicator_(true) {
|
96 | 96 |
setupUi(this);
|
97 | |
setWindowFlags(Qt::WindowSystemMenuHint);
|
|
97 |
setWindowFlags(Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint);
|
98 | 98 |
setWindowModality(Qt::NonModal);
|
99 | 99 |
|
100 | 100 |
#ifdef OS_WIN
|
79 | 79 |
column_size_(column_size) {
|
80 | 80 |
setupUi(this);
|
81 | 81 |
editorTableWidget->setAlternatingRowColors(true);
|
82 | |
setWindowFlags(Qt::WindowSystemMenuHint | Qt::Tool);
|
|
82 |
setWindowFlags(Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint |
|
|
83 |
Qt::Tool);
|
83 | 84 |
editorTableWidget->setColumnCount(column_size_);
|
84 | 85 |
|
85 | 86 |
CHECK_GT(column_size_, 0);
|
515 | 515 |
KeyBindingEditor::KeyBindingEditor(QWidget *parent, QWidget *trigger_parent)
|
516 | 516 |
: QDialog(parent), trigger_parent_(trigger_parent) {
|
517 | 517 |
setupUi(this);
|
518 | |
#ifdef OS_LINUX
|
|
518 |
#if defined(OS_LINUX)
|
519 | 519 |
// Workaround for the issue https://github.com/google/mozc/issues/9
|
520 | 520 |
// Seems that even after clicking the button for the keybinding dialog,
|
521 | 521 |
// the edit is not raised. This might be a bug of setFocusProxy.
|
522 | |
setWindowFlags(Qt::WindowSystemMenuHint | Qt::Tool |
|
523 | |
Qt::WindowStaysOnTopHint);
|
|
522 |
setWindowFlags(Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint |
|
|
523 |
Qt::Tool | Qt::WindowStaysOnTopHint);
|
524 | 524 |
#else
|
525 | |
setWindowFlags(Qt::WindowSystemMenuHint | Qt::Tool);
|
|
525 |
setWindowFlags(Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint |
|
|
526 |
Qt::Tool);
|
526 | 527 |
#endif
|
527 | 528 |
|
528 | 529 |
QPushButton *ok_button =
|
103 | 103 |
QProgressDialog *progress =
|
104 | 104 |
new QProgressDialog(message, "", 0, size, parent);
|
105 | 105 |
CHECK(progress);
|
106 | |
progress->setWindowFlags(Qt::Window | Qt::CustomizeWindowHint);
|
|
106 |
progress->setWindowFlags(Qt::Window |
|
|
107 |
Qt::CustomizeWindowHint |
|
|
108 |
Qt::WindowCloseButtonHint);
|
107 | 109 |
progress->setWindowModality(Qt::WindowModal);
|
108 | 110 |
// This cancel button is invisible to users.
|
109 | 111 |
// We don't accept any cancel operation
|
51 | 51 |
: setuputil_(new SetupUtil()) {
|
52 | 52 |
setupUi(this);
|
53 | 53 |
setWindowFlags(Qt::WindowSystemMenuHint |
|
|
54 |
Qt::WindowCloseButtonHint |
|
54 | 55 |
Qt::MSWindowsFixedSizeDialogHint |
|
55 | 56 |
Qt::WindowStaysOnTopHint);
|
56 | 57 |
setWindowModality(Qt::NonModal);
|
52 | 52 |
SetDefaultDialog::SetDefaultDialog() {
|
53 | 53 |
setupUi(this);
|
54 | 54 |
setWindowFlags(Qt::WindowSystemMenuHint |
|
|
55 |
Qt::WindowCloseButtonHint |
|
55 | 56 |
Qt::MSWindowsFixedSizeDialogHint |
|
56 | 57 |
Qt::WindowStaysOnTopHint);
|
57 | 58 |
setWindowModality(Qt::NonModal);
|
111 | 111 |
window_title_(tr("Mozc")),
|
112 | 112 |
pos_list_provider_(new POSListProvider()) {
|
113 | 113 |
setupUi(this);
|
114 | |
setWindowFlags(Qt::WindowSystemMenuHint | Qt::WindowStaysOnTopHint);
|
|
114 |
setWindowFlags(Qt::WindowSystemMenuHint |
|
|
115 |
Qt::WindowCloseButtonHint |
|
|
116 |
Qt::WindowStaysOnTopHint);
|
115 | 117 |
setWindowModality(Qt::NonModal);
|
116 | 118 |
|
117 | 119 |
ReadinglineEdit->setMaxLength(kMaxEditLength);
|