summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-12-20 09:47:02 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-12-20 09:47:02 (GMT)
commit10c90522d6e3807baac3c4bfca4eedc51a4251f5 (patch)
tree92005b547e3b92eb9e640fae8c78fdcdc13b6dd9 /demos
parent64e1f888586f2c988b08bcc93579990e970b7206 (diff)
parent97b039438bc31bb420138d72549372adb1244dc8 (diff)
downloadQt-10c90522d6e3807baac3c4bfca4eedc51a4251f5.zip
Qt-10c90522d6e3807baac3c4bfca4eedc51a4251f5.tar.gz
Qt-10c90522d6e3807baac3c4bfca4eedc51a4251f5.tar.bz2
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts: demos/declarative/minehunt/minehunt.pro src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp src/plugins/phonon/mmf/mmf.pro src/s60installs/s60installs.pro tests/auto/qapplication/test/test.pro tests/auto/qgraphicsview/tst_qgraphicsview.cpp
Diffstat (limited to 'demos')
-rw-r--r--demos/textedit/textedit.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/demos/textedit/textedit.cpp b/demos/textedit/textedit.cpp
index 165c97c..9fa1949 100644
--- a/demos/textedit/textedit.cpp
+++ b/demos/textedit/textedit.cpp
@@ -262,7 +262,8 @@ void TextEdit::setupEditActions()
tb->addAction(a);
menu->addAction(a);
#ifndef QT_NO_CLIPBOARD
- actionPaste->setEnabled(QApplication::clipboard()->mimeData()->hasText());
+ if (const QMimeData *md = QApplication::clipboard()->mimeData())
+ actionPaste->setEnabled(md->hasText());
#endif
}
@@ -681,7 +682,8 @@ void TextEdit::cursorPositionChanged()
void TextEdit::clipboardDataChanged()
{
#ifndef QT_NO_CLIPBOARD
- actionPaste->setEnabled(QApplication::clipboard()->mimeData()->hasText());
+ if (const QMimeData *md = QApplication::clipboard()->mimeData())
+ actionPaste->setEnabled(md->hasText());
#endif
}