diff options
| author | 2016-04-24 02:47:20 +0200 | |
|---|---|---|
| committer | 2016-04-24 02:47:36 +0200 | |
| commit | d822b5aef80823911870a915f17324c68eeeee4b (patch) | |
| tree | 3f26dd5fd41b932e4dbdbf9475a8ab780ea6e01b /src/modules/objects | |
| parent | general: Typo fixes (diff) | |
| download | KVIrc-d822b5aef80823911870a915f17324c68eeeee4b.tar.gz KVIrc-d822b5aef80823911870a915f17324c68eeeee4b.tar.bz2 KVIrc-d822b5aef80823911870a915f17324c68eeeee4b.zip | |
Fix #1928. Disallow creation of KVS layout objects with QToolBar widgets as parent.
Diffstat (limited to 'src/modules/objects')
| -rw-r--r-- | src/modules/objects/KvsObject_layout.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/modules/objects/KvsObject_layout.cpp b/src/modules/objects/KvsObject_layout.cpp index 6105066cc..18ede6b59 100644 --- a/src/modules/objects/KvsObject_layout.cpp +++ b/src/modules/objects/KvsObject_layout.cpp @@ -140,6 +140,13 @@ bool KvsObject_layout::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *) pContext->warning(__tr2qs_ctx("The parent of a layout must be a widget!","objects")); return false; } + + if(w->inherits("QToolBar")) + { + pContext->warning(__tr2qs_ctx("Qt does not support setting layouts on toolbar objects","objects")); + return false; + } + // If there already is a layout manager installed on this widget, QWidget won't let you install another. if(w->layout()) delete w->layout(); setObject(new QGridLayout(w)); |
