summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qnativeimage.cpp8
-rw-r--r--src/gui/kernel/qapplication_x11.cpp3
-rw-r--r--src/gui/text/qtextobject.cpp10
-rw-r--r--src/gui/text/qtextobject_p.h3
4 files changed, 10 insertions, 14 deletions
diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp
index fc5ad2a..918454d 100644
--- a/src/gui/image/qnativeimage.cpp
+++ b/src/gui/image/qnativeimage.cpp
@@ -144,11 +144,15 @@ QImage::Format QNativeImage::systemFormat()
#elif defined(Q_WS_X11) && !defined(QT_NO_MITSHM)
QNativeImage::QNativeImage(int width, int height, QImage::Format format,bool /* isTextBuffer */, QWidget *widget)
+ : xshmimg(0), xshmpm(0)
{
if (!X11->use_mitshm) {
- xshmimg = 0;
- xshmpm = 0;
image = QImage(width, height, format);
+ // follow good coding practice and set xshminfo attributes, though values not used in this case
+ xshminfo.readOnly = true;
+ xshminfo.shmaddr = 0;
+ xshminfo.shmid = 0;
+ xshminfo.shmseg = 0;
return;
}
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
index 4c42d28..f9cf8e5 100644
--- a/src/gui/kernel/qapplication_x11.cpp
+++ b/src/gui/kernel/qapplication_x11.cpp
@@ -5404,7 +5404,8 @@ class QSessionManagerPrivate : public QObjectPrivate
{
public:
QSessionManagerPrivate(QSessionManager* mgr, QString& id, QString& key)
- : QObjectPrivate(), sm(mgr), sessionId(id), sessionKey(key), eventLoop(0) {}
+ : QObjectPrivate(), sm(mgr), sessionId(id), sessionKey(key),
+ restartHint(QSessionManager::RestartIfRunning), eventLoop(0) {}
QSessionManager* sm;
QStringList restartCommand;
QStringList discardCommand;
diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp
index 98c92eb..5dc0c48 100644
--- a/src/gui/text/qtextobject.cpp
+++ b/src/gui/text/qtextobject.cpp
@@ -412,11 +412,6 @@ QTextFrameLayoutData::~QTextFrameLayoutData()
QTextFrame::QTextFrame(QTextDocument *doc)
: QTextObject(*new QTextFramePrivate(doc), doc)
{
- Q_D(QTextFrame);
- d->fragment_start = 0;
- d->fragment_end = 0;
- d->parentFrame = 0;
- d->layoutData = 0;
}
// ### DOC: What does this do to child frames?
@@ -435,11 +430,6 @@ QTextFrame::~QTextFrame()
QTextFrame::QTextFrame(QTextFramePrivate &p, QTextDocument *doc)
: QTextObject(p, doc)
{
- Q_D(QTextFrame);
- d->fragment_start = 0;
- d->fragment_end = 0;
- d->parentFrame = 0;
- d->layoutData = 0;
}
/*!
diff --git a/src/gui/text/qtextobject_p.h b/src/gui/text/qtextobject_p.h
index e862b30..0b78547 100644
--- a/src/gui/text/qtextobject_p.h
+++ b/src/gui/text/qtextobject_p.h
@@ -94,7 +94,8 @@ class QTextFramePrivate : public QTextObjectPrivate
Q_DECLARE_PUBLIC(QTextFrame)
public:
QTextFramePrivate(QTextDocument *doc)
- : QTextObjectPrivate(doc)
+ : QTextObjectPrivate(doc), fragment_start(0), fragment_end(0),
+ parentFrame(0), layoutData(0)
{
}
virtual void fragmentAdded(const QChar &type, uint fragment);