[developerteam getadooble] SF.net SVN: dooble:[1859] trunk/browser
Brought to you by:
textfield
From: <tex...@us...> - 2011-01-28 19:34:21
|
Revision: 1859 http://dooble.svn.sourceforge.net/dooble/?rev=1859&view=rev Author: textfield Date: 2011-01-28 19:34:14 +0000 (Fri, 28 Jan 2011) Log Message: ----------- It works! Do not provide a parent to QMainWindow as it will become a toplevel widget on some systems (OS X, XP, etc.). Modified Paths: -------------- trunk/browser/Include/dview.h trunk/browser/Source/dcookiewindow.cc trunk/browser/Source/dview.cc Modified: trunk/browser/Include/dview.h =================================================================== --- trunk/browser/Include/dview.h 2011-01-28 03:30:39 UTC (rev 1858) +++ trunk/browser/Include/dview.h 2011-01-28 19:34:14 UTC (rev 1859) @@ -62,6 +62,7 @@ #include "dftpbrowser.h" #include "dwebhistory.h" #include "dfilemanager.h" +#include "dcookiewindow.h" #include "dwebhistoryitem.h" class dwebview: public QWebView @@ -225,6 +226,7 @@ dftpbrowser *ftpBrowser; dwebhistory *m_history; dfilemanager *fileManager; + dcookiewindow *m_cookieWindow; int indexForUrl(const QUrl &url) const; void enterEvent(QEvent *event); Modified: trunk/browser/Source/dcookiewindow.cc =================================================================== --- trunk/browser/Source/dcookiewindow.cc 2011-01-28 03:30:39 UTC (rev 1858) +++ trunk/browser/Source/dcookiewindow.cc 2011-01-28 19:34:14 UTC (rev 1859) @@ -57,8 +57,9 @@ #include "dcookiewindow.h" dcookiewindow::dcookiewindow(QWidget *parent, dcookies *cookies): - QMainWindow(parent) + QMainWindow() { + Q_UNUSED(parent); m_cookies = cookies; ui.setupUi(this); #ifdef Q_WS_MAC @@ -344,7 +345,6 @@ void dcookiewindow::closeEvent(QCloseEvent *event) { Q_UNUSED(event); - deleteLater(); } void dcookiewindow::slotTextChanged(const QString &text) Modified: trunk/browser/Source/dview.cc =================================================================== --- trunk/browser/Source/dview.cc 2011-01-28 03:30:39 UTC (rev 1858) +++ trunk/browser/Source/dview.cc 2011-01-28 19:34:14 UTC (rev 1859) @@ -73,6 +73,7 @@ dview::dview(QWidget *parent):QStackedWidget(parent) { m_action = 0; + m_cookieWindow = 0; webView = new dwebview(this); ftpBrowser = new dftpbrowser(this); fileManager = new dfilemanager(this); @@ -163,6 +164,9 @@ if(m_action) m_action->deleteLater(); + + if(m_cookieWindow) + m_cookieWindow->deleteLater(); } void dview::slotLoadFinished(bool ok) @@ -839,14 +843,12 @@ void dview::slotShowCookies(void) { - dcookiewindow *dc = findChild<dcookiewindow *> (); - - if(!dc) + if(!m_cookieWindow) { - dc = new dcookiewindow(this, cookies()); + m_cookieWindow = new dcookiewindow(this, cookies()); connect(cookies(), SIGNAL(cookiesChanged(void)), - dc, + m_cookieWindow, SLOT(slotPopulate(void))); } @@ -864,7 +866,7 @@ while(true); if(parent) - dc->show(parent); + m_cookieWindow->show(parent); else - dc->show(this); + m_cookieWindow->show(this); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |