summaryrefslogtreecommitdiffstats
path: root/examples/widgets/mainwindows
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/mainwindows')
-rw-r--r--examples/widgets/mainwindows/mainwindow/colorswatch.cpp2
-rw-r--r--examples/widgets/mainwindows/mainwindow/colorswatch.h2
-rw-r--r--examples/widgets/mainwindows/mdi/mdichild.cpp4
-rw-r--r--examples/widgets/mainwindows/sdi/mainwindow.cpp4
4 files changed, 6 insertions, 6 deletions
diff --git a/examples/widgets/mainwindows/mainwindow/colorswatch.cpp b/examples/widgets/mainwindows/mainwindow/colorswatch.cpp
index 00a35afa4c..b39c45118c 100644
--- a/examples/widgets/mainwindows/mainwindow/colorswatch.cpp
+++ b/examples/widgets/mainwindows/mainwindow/colorswatch.cpp
@@ -636,7 +636,7 @@ void BlueTitleBar::paintEvent(QPaintEvent*)
centerPm.height(), centerPm);
}
-void BlueTitleBar::mousePressEvent(QMouseEvent *event)
+void BlueTitleBar::mouseReleaseEvent(QMouseEvent *event)
{
QPoint pos = event->pos();
diff --git a/examples/widgets/mainwindows/mainwindow/colorswatch.h b/examples/widgets/mainwindows/mainwindow/colorswatch.h
index 11f924ddb7..b83a6ba76a 100644
--- a/examples/widgets/mainwindows/mainwindow/colorswatch.h
+++ b/examples/widgets/mainwindows/mainwindow/colorswatch.h
@@ -124,7 +124,7 @@ public:
QSize minimumSizeHint() const;
protected:
void paintEvent(QPaintEvent *event);
- void mousePressEvent(QMouseEvent *event);
+ void mouseReleaseEvent(QMouseEvent *event);
public slots:
void updateMask();
diff --git a/examples/widgets/mainwindows/mdi/mdichild.cpp b/examples/widgets/mainwindows/mdi/mdichild.cpp
index f55e08a249..95c95e45e0 100644
--- a/examples/widgets/mainwindows/mdi/mdichild.cpp
+++ b/examples/widgets/mainwindows/mdi/mdichild.cpp
@@ -145,13 +145,13 @@ void MdiChild::documentWasModified()
bool MdiChild::maybeSave()
{
if (document()->isModified()) {
- QMessageBox::StandardButton ret;
+ QMessageBox::StandardButton ret;
ret = QMessageBox::warning(this, tr("MDI"),
tr("'%1' has been modified.\n"
"Do you want to save your changes?")
.arg(userFriendlyCurrentFile()),
QMessageBox::Save | QMessageBox::Discard
- | QMessageBox::Cancel);
+ | QMessageBox::Cancel);
if (ret == QMessageBox::Save)
return save();
else if (ret == QMessageBox::Cancel)
diff --git a/examples/widgets/mainwindows/sdi/mainwindow.cpp b/examples/widgets/mainwindows/sdi/mainwindow.cpp
index b7af4ffd9d..6db9bd6261 100644
--- a/examples/widgets/mainwindows/sdi/mainwindow.cpp
+++ b/examples/widgets/mainwindows/sdi/mainwindow.cpp
@@ -282,12 +282,12 @@ void MainWindow::writeSettings()
bool MainWindow::maybeSave()
{
if (textEdit->document()->isModified()) {
- QMessageBox::StandardButton ret;
+ QMessageBox::StandardButton ret;
ret = QMessageBox::warning(this, tr("SDI"),
tr("The document has been modified.\n"
"Do you want to save your changes?"),
QMessageBox::Save | QMessageBox::Discard
- | QMessageBox::Cancel);
+ | QMessageBox::Cancel);
if (ret == QMessageBox::Save)
return save();
else if (ret == QMessageBox::Cancel)