Qt-interest Archive, October 2007
Session management error
Message 1 in thread
Hi!
I'm using KDE on Debian GNU/Linux. I start KDE, run qt applications,
everything runs well. But when I restart KDE/KDM, I get the following
error when starting every qt app:
Qt: Session management error: Could not open network socket
It's a minor problem with qt3 apps, but qt4 apps show up with a few
seconds delay. Here is a strace output:
[...]
connect(10, {sa_family=AF_FILE, path="/tmp/.ICE-unix/2789"}, 21) = -1
ENOENT (No such file or directory)
close(10) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {0x4090f060, [], SA_NOCLDSTOP}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
nanosleep({1, 0}, {1, 0}) = 0
socket(PF_FILE, SOCK_STREAM, 0) = 10
connect(10, {sa_family=AF_FILE, path="/tmp/.ICE-unix/2789"}, 21) = -1
ENOENT (No such file or directory)
close(10) = 0
[...]
After 6 connect attempts application start normally. File
/tmp/.ICE-unix/2789 obviously doesn't exist, it is created for the
previous session and deleted after I restarted KDE. Current is
/tmp/.ICE-unix/7210. Is this a QT bug or should I look somewhere else?
I just remember something that's bugging me for a long time. This has
nothing with the previous question. I'm new to the GUI in c++. It the
tutorial, in first 3 chapters pointers to widgets are not used, but in the
4th chapter they are:
http://doc.trolltech.com/4.3/tutorial-t4-main-cpp.html
Is there a reason why I shouldn't do:
class MyWidget : public QWidget
{
public:
MyWidget(QWidget *parent = 0);
private:
QPushButton quit;
};
MyWidget::MyWidget(QWidget *parent): QWidget(parent)
{
setFixedSize(200, 120);
quit.setParent(this);
quit.setText(tr("Quit"));
quit.setGeometry(62, 40, 75, 30);
quit.setFont(QFont("Times", 18, QFont::Bold));
connect(&quit, SIGNAL(clicked()), qApp, SLOT(quit()));
}
Regards,
Vedran FuraÄ
--
[ signature omitted ]