1 /*
2     This file is part of the KDE project
3     SPDX-FileCopyrightText: 1998, 1999 Simon Hausmann <hausmann@kde.org>
4     SPDX-FileCopyrightText: 2000-2004 David Faure <faure@kde.org>
5     SPDX-FileCopyrightText: 2007 Eduardo Robles Elvira <edulix@gmail.com>
6     SPDX-FileCopyrightText: 2007 Daniel García Moreno <danigm@gmail.com>
7 
8     SPDX-License-Identifier: GPL-2.0-or-later
9 */
10 
11 #ifndef KONQMAINWINDOW_H
12 #define KONQMAINWINDOW_H
13 
14 #include "konqprivate_export.h"
15 
16 #include <QMap>
17 #include <QPointer>
18 #include <QList>
19 #include <QUrl>
20 
21 #include <kfileitem.h>
22 #include <kparts/mainwindow.h>
23 #include <KParts/PartActivateEvent>
24 #include <kservice.h>
25 
26 #include "konqcombo.h"
27 #include "konqframe.h"
28 #include "konqframecontainer.h"
29 #include "konqopenurlrequest.h"
30 
31 class QActionGroup;
32 class KUrlCompletion;
33 class QLabel;
34 class KLocalizedString;
35 class KToggleFullScreenAction;
36 class KonqUndoManager;
37 class QAction;
38 class QAction;
39 class KActionCollection;
40 class KActionMenu;
41 class KBookmarkGroup;
42 class KBookmarkMenu;
43 class KBookmarkActionMenu;
44 class KCMultiDialog;
45 class KNewFileMenu;
46 class KToggleAction;
47 class KBookmarkBar;
48 class KonqView;
49 class KonqFrameContainerBase;
50 class KonqFrameContainer;
51 class KToolBarPopupAction;
52 class KonqAnimatedLogo;
53 class KonqViewManager;
54 class ToggleViewGUIClient;
55 class KonqRun;
56 class KConfigGroup;
57 class KonqHistoryDialog;
58 struct HistoryEntry;
59 class QLineEdit;
60 
61 namespace KParts
62 {
63 class BrowserExtension;
64 class ReadOnlyPart;
65 class OpenUrlArguments;
66 struct BrowserArguments;
67 }
68 
69 class KonqExtendedBookmarkOwner;
70 
71 class KONQ_TESTS_EXPORT KonqMainWindow : public KParts::MainWindow, public KonqFrameContainerBase
72 {
73     Q_OBJECT
74     Q_PROPERTY(int viewCount READ viewCount)
75     Q_PROPERTY(int linkableViewsCount READ linkableViewsCount)
76     Q_PROPERTY(QString locationBarURL READ locationBarURL)
77     Q_PROPERTY(bool fullScreenMode READ fullScreenMode)
78     Q_PROPERTY(QString currentTitle READ currentTitle)
79     Q_PROPERTY(QString currentURL READ currentURL)
80 public:
81     enum ComboAction { ComboClear, ComboAdd, ComboRemove };
82     enum PageSecurity { NotCrypted, Encrypted, Mixed };
83 
84     explicit KonqMainWindow(const QUrl &initialURL = QUrl());
85     ~KonqMainWindow() override;
86 
87     /**
88      * Filters the URL and calls the main openUrl method.
89      */
90     void openFilteredUrl(const QString &url, const KonqOpenURLRequest &req);
91 
92     /**
93      * Convenience overload for openFilteredUrl(url, req)
94      */
95     void openFilteredUrl(const QString &url, bool inNewTab = false, bool tempFile = false);
96 
97     /**
98      * Convenience overload for openFilteredUrl(url, req)
99      */
100     void openFilteredUrl(const QString &_url, const QString &_mimeType, bool inNewTab, bool tempFile);
101 
102     void applyMainWindowSettings(const KConfigGroup &config) override;
103 
104     /**
105      * It's not override since KMainWindow variant isn't virtual
106      */
107     void saveMainWindowSettings(KConfigGroup &config);
108 
109 public Q_SLOTS:
110     /**
111     * The main openUrl method.
112     */
113     void openUrl(KonqView *view, const QUrl &url,
114                  const QString &serviceType = QString(),
115                  const KonqOpenURLRequest &req = KonqOpenURLRequest::null,
116                  bool trustedSource = false); // trustedSource should be part of KonqOpenURLRequest, probably
117 
118 public:
119     /**
120      * Called by openUrl when it knows the mime type (either directly,
121      * or using KonqRun).
122      * \param mimeType the mimetype of the URL to open. Always set.
123      * \param url the URL to open.
124      * \param childView the view in which to open the URL. Can be 0, in which
125      * case a new tab (or the very first view) will be created.
126      */
127     bool openView(QString mimeType, const QUrl &url, KonqView *childView,
128                   const KonqOpenURLRequest &req = KonqOpenURLRequest::null);
129 
130     void abortLoading();
131 
132     void openMultiURL(const QList<QUrl> &url);
133 
134     /// Returns the view manager for this window.
viewManager()135     KonqViewManager *viewManager() const
136     {
137         return m_pViewManager;
138     }
139 
140     /// KXMLGUIBuilder methods, reimplemented for delayed bookmark-toolbar initialization
141     QWidget *createContainer(QWidget *parent, int index, const QDomElement &element, QAction *&containerAction) override;
142     void removeContainer(QWidget *container, QWidget *parent, QDomElement &element, QAction *containerAction) override;
143 
144     /// KMainWindow methods, for session management
145     void saveProperties(KConfigGroup &config) override;
146     void readProperties(const KConfigGroup &config) override;
147 
148     void setInitialFrameName(const QString &name);
149 
150     void reparseConfiguration();
151 
152     /// Called by KonqViewManager
153     void insertChildView(KonqView *childView);
154     /// Called by KonqViewManager
155     void removeChildView(KonqView *childView);
156 
157     KonqView *childView(KParts::ReadOnlyPart *view);
158     KonqView *childView(KParts::ReadOnlyPart *callingPart, const QString &name, KParts::ReadOnlyPart **part);
159 
160     // Total number of views
viewCount()161     int viewCount() const
162     {
163         return m_mapViews.count();
164     }
165 
166     // Number of views not in "passive" mode and not locked
167     int activeViewsNotLockedCount() const;
168 
169     // Number of views that can be linked, i.e. not with "follow active view" behavior
170     int linkableViewsCount() const;
171 
172     // Number of main views (non-toggle non-passive views)
173     int mainViewsCount() const;
174 
175     typedef QMap<KParts::ReadOnlyPart *, KonqView *> MapViews;
176 
viewMap()177     const MapViews &viewMap() const
178     {
179         return m_mapViews;
180     }
181 
182     KonqView *currentView() const;
183 
184     /** URL of current part, or URLs of selected items for directory views */
185     QList<QUrl> currentURLs() const;
186 
187     // Only valid if there are one or two views
188     KonqView *otherView(KonqView *view) const;
189 
190     /// Overloaded of KMainWindow
191     void setCaption(const QString &caption) override;
192     /// Overloaded of KMainWindow -- should never be called, or if it is, we ignore "modified" anyway
setCaption(const QString & caption,bool modified)193     void setCaption(const QString &caption, bool modified) override
194     {
195         Q_UNUSED(modified);
196         setCaption(caption);
197     }
198 
199     /**
200     * Change URL displayed in the location bar
201     */
202     void setLocationBarURL(const QString &url);
203     /**
204     * Overload for convenience
205     */
206     void setLocationBarURL(const QUrl &url);
207     /**
208     * Return URL displayed in the location bar - for KonqViewManager
209     */
210     QString locationBarURL() const;
211     void focusLocationBar();
212 
213     /**
214     * Set page security related to current view
215     */
216     void setPageSecurity(PageSecurity);
217 
218     void enableAllActions(bool enable);
219 
220     void disableActionsNoView();
221 
222     void updateToolBarActions(bool pendingActions = false);
223     void updateOpenWithActions();
224     void updateViewActions();
225 
226     bool sidebarVisible() const;
227 
228     bool fullScreenMode() const;
229 
230     /**
231     * @return the "link view" action, for checking/unchecking from KonqView
232     */
linkViewAction()233     KToggleAction *linkViewAction()const
234     {
235         return m_paLinkView;
236     }
237 
238     void enableAction(const char *name, bool enabled);
239     void setActionText(const char *name, const QString &text);
240 
mainWindowList()241     static QList<KonqMainWindow *> *mainWindowList()
242     {
243         return s_lstMainWindows;
244     }
245 
246     void linkableViewCountChanged();
247     void viewCountChanged();
248 
249     // operates on all combos of all mainwindows of this instance
250     // up to now adds an entry or clears all entries
251     static void comboAction(int action, const QString &url,
252                             const QString &senderId);
253 
254 #ifndef NDEBUG
255     void dumpViewList();
256 #endif
257 
258     // KonqFrameContainerBase implementation BEGIN
259 
260     bool accept(KonqFrameVisitor *visitor) override;
261 
262     /**
263      * Insert a new frame as the mainwindow's child
264      */
265     void insertChildFrame(KonqFrameBase *frame, int index = -1) override;
266     /**
267      * Call this before deleting one of our children.
268      */
269     void childFrameRemoved(KonqFrameBase *frame) override;
270 
271     void saveConfig(KConfigGroup &config, const QString &prefix, const KonqFrameBase::Options &options, KonqFrameBase *docContainer, int id = 0, int depth = 0) override;
272 
273     void copyHistory(KonqFrameBase *other) override;
274 
275     void setTitle(const QString &title, QWidget *sender) override;
276     void setTabIcon(const QUrl &url, QWidget *sender) override;
277 
278     QWidget *asQWidget() override;
279 
280     KonqFrameBase::FrameType frameType() const override;
281 
282     KonqFrameBase *childFrame()const;
283 
284     void setActiveChild(KonqFrameBase *activeChild) override;
285 
286     // KonqFrameContainerBase implementation END
287 
288     /**
289      * When using RMB on a tab, remember the tab we are showing a popup for.
290      */
291     void setWorkingTab(int index);
292 
293     static bool isMimeTypeAssociatedWithSelf(const QString &mimeType);
294     static bool isMimeTypeAssociatedWithSelf(const QString &mimeType, const KService::Ptr &offer);
295 
296     bool refuseExecutingKonqueror(const QString &mimeType);
297 
298     QString currentTitle() const;
299     // Not used by konqueror itself; only exists for the Q_PROPERTY,
300     // which I guess is used by scripts and plugins...
301     QString currentURL() const;
302 
303     void updateHistoryActions();
304 
305     bool isPreloaded() const;
306 
307     // Public for unit tests
308     void prepareForPopupMenu(const KFileItemList &items, const KParts::OpenUrlArguments &args, const KParts::BrowserArguments &browserArgs);
309 
310 Q_SIGNALS:
311     void viewAdded(KonqView *view);
312     void viewRemoved(KonqView *view);
313     void popupItemsDisturbed();
314 
315 public Q_SLOTS:
316     void updateViewModeActions();
317 
318     void slotInternalViewModeChanged();
319 
320     void slotCtrlTabPressed();
321 
322     void slotPopupMenu(const QPoint &global, const KFileItemList &items, const KParts::OpenUrlArguments &args, const KParts::BrowserArguments &browserArgs, KParts::BrowserExtension::PopupFlags flags, const KParts::BrowserExtension::ActionGroupMap &);
323     void slotPopupMenu(const QPoint &global, const QUrl &url, mode_t mode, const KParts::OpenUrlArguments &args, const KParts::BrowserArguments &browserArgs, KParts::BrowserExtension::PopupFlags f, const KParts::BrowserExtension::ActionGroupMap &);
324 
325     /**
326      * __NEEEEVER__ call this method directly. It relies on sender() (the part)
327      */
328     void slotOpenURLRequest(const QUrl &url, const KParts::OpenUrlArguments &args, const KParts::BrowserArguments &browserArgs);
329 
330     void openUrlRequestHelper(KonqView *childView, const QUrl &url, const KParts::OpenUrlArguments &args, const KParts::BrowserArguments &browserArgs);
331 
332     void slotCreateNewWindow(const QUrl &url, const KParts::OpenUrlArguments &args, const KParts::BrowserArguments &browserArgs,
333                              const KParts::WindowArgs &windowArgs = KParts::WindowArgs(),
334                              KParts::ReadOnlyPart **part = nullptr);
335 
336     void slotNewWindow();
337     void slotDuplicateWindow();
338     void slotSendURL();
339     void slotSendFile();
340     void slotCopyFiles();
341     void slotMoveFiles();
342     void slotOpenLocation();
343     void slotOpenFile();
344 
345     // View menu
346     void slotViewModeTriggered(QAction *action);
347     void slotLockView();
348     void slotLinkView();
349     void slotReload(KonqView *view = nullptr, bool softReload = true);
350     void slotForceReload();
351     void slotStop();
352 
353     // Go menu
354     void slotUp();
355     void slotBack();
356     void slotForward();
357     void slotHome();
358     void slotGoHistory();
359 
360     void slotAddClosedUrl(KonqFrameBase *tab);
361 
362     void slotConfigure(QString startingModule = QString());
363     void slotConfigureDone();
364     void slotConfigureToolbars();
365     void slotConfigureExtensions();
366     void slotConfigureSpellChecking();
367     void slotNewToolbarConfig();
368 
369     void slotUndoAvailable(bool avail);
370 
371     void slotPartChanged(KonqView *childView, KParts::ReadOnlyPart *oldPart, KParts::ReadOnlyPart *newPart);
372 
373     void slotRunFinished();
374     void slotClearLocationBar();
375 
376     // reimplement from KParts::MainWindow
377     void slotSetStatusBarText(const QString &text) override;
378 
379     // public for KonqViewManager
380     void slotPartActivated(KParts::Part *part);
381 
382     void slotGoHistoryActivated(int steps);
383 
384     void slotAddTab();
385     void slotSplitViewHorizontal();
386     void slotSplitViewVertical();
387     void slotRemoveOtherTabs();
388     void slotRemoveTabPopup();
389 
390 private Q_SLOTS:
391     void slotViewCompleted(KonqView *view);
392 
393     void slotURLEntered(const QString &text, Qt::KeyboardModifiers);
394 
395     void slotLocationLabelActivated();
396 
397     void slotDuplicateTab();
398     void slotDuplicateTabPopup();
399 
400     void slotBreakOffTab();
401     void slotBreakOffTabPopup();
402     void breakOffTab(int);
403 
404     void slotPopupNewWindow();
405     void slotPopupThisWindow();
406     void slotPopupNewTab();
407     void slotPopupPasteTo();
408     void slotRemoveView();
409 
410     void slotRemoveOtherTabsPopup();
411 
412     void slotReloadPopup();
413     void slotReloadAllTabs();
414     void slotRemoveTab();
415     void removeTab(int tabIndex);
416     void removeOtherTabs(int tabIndex);
417 
418     void slotActivateNextTab();
419     void slotActivatePrevTab();
420     void slotActivateTab();
421 
422     void slotDumpDebugInfo();
423 
424     void slotOpenEmbedded(KService::Ptr);
425 
426     // Connected to KGlobalSettings
427     void slotReconfigure();
428 
429     void slotForceSaveMainWindowSettings();
430 
431     void slotOpenWith();
432 
433     void updateProxyForWebEngine(bool updateProtocolManager = true);
434 
435 #if 0
436     void slotGoMenuAboutToShow();
437 #endif
438     void slotUpAboutToShow();
439     void slotBackAboutToShow();
440     void slotForwardAboutToShow();
441 
442     void slotClosedItemsListAboutToShow();
443     void updateClosedItemsAction();
444 
445     void slotSessionsListAboutToShow();
446     void saveCurrentSession();
447     void manageSessions();
448     void slotSessionActivated(QAction *action);
449 
450     void slotUpActivated(QAction *action);
451     void slotBackActivated(QAction *action);
452     void slotForwardActivated(QAction *action);
453     void slotHomePopupActivated(QAction *action);
454     void slotGoHistoryDelayed();
455 
456     void slotCompletionModeChanged(KCompletion::CompletionMode);
457     void slotMakeCompletion(const QString &);
458     void slotSubstringcompletion(const QString &);
459     void slotRotation(KCompletionBase::KeyBindingType);
460     void slotMatch(const QString &);
461     void slotClearHistory();
462     void slotClearComboHistory();
463 
464     void slotClipboardDataChanged();
465     void slotCheckComboSelection();
466 
467     void slotShowMenuBar();
468     void slotShowStatusBar();
469 
470     void slotOpenURL(const QUrl &);
471 
472     void slotIconsChanged();
473 
474     bool event(QEvent *) override;
475 
476     void slotMoveTabLeft();
477     void slotMoveTabRight();
478 
479     void slotAddWebSideBar(const QUrl &url, const QString &name);
480 
481     void slotUpdateFullScreen(bool set);   // do not call directly
482 
483 protected:
484     bool eventFilter(QObject *obj, QEvent *ev) override;
485 
486     /**
487     * Reimplemented for internal reasons. The API is not affected.
488     */
489     void showEvent(QShowEvent *event) override;
490 
491     bool makeViewsFollow(const QUrl &url,
492                          const KParts::OpenUrlArguments &args,
493                          const KParts::BrowserArguments &browserArgs, const QString &serviceType,
494                          KonqView *senderView);
495 
496     void applyKonqMainWindowSettings();
497 
498     void viewsChanged();
499 
500     void updateLocalPropsActions();
501 
502     void closeEvent(QCloseEvent *) override;
503 
504     bool askForTarget(const KLocalizedString &text, QUrl &url);
505 
506 private:
507 
508     enum class FullScreenState {
509         NoFullScreen,
510         OrdinaryFullScreen,
511         CompleteFullScreen
512     };
513 
514     struct FullScreenData {
515         FullScreenState previousState;
516         FullScreenState currentState;
517         bool wasMenuBarVisible;
518         bool wasStatusBarVisible;
519         bool wasSidebarVisible;
520 
521         void switchToState(FullScreenState newState);
522     };
523 
524 private Q_SLOTS:
525     void slotUndoTextChanged(const QString &newText);
526 
527     void slotIntro();
528     void slotItemsRemoved(const KFileItemList &);
529     /**
530     * Loads the url displayed currently in the lineedit of the locationbar, by
531     * emulating a enter key press event.
532     */
533     void goURL();
534 
535     void bookmarksIntoCompletion();
536 
537     void initBookmarkBar();
538 
539     void showPageSecurity();
540 
541     void toggleCompleteFullScreen(bool on);
542 
543     /**
544      * Copies the "checkerEnabledByDefault" setting from the Sonnet configuration file
545      * to Konqueror's own and emits the spellCheckConfigurationChanged signal
546      */
547     void updateSpellCheckConfiguration();
548 
549     void inspectCurrentPage();
550 
551 private:
552     void updateWindowIcon();
553 
554     QString detectNameFilter(QUrl &url);
555 
556     /**
557     * takes care of hiding the bookmarkbar and calling setChecked( false ) on the
558     * corresponding action
559     */
560     void updateBookmarkBar();
561 
562     /**
563     * Adds all children of @p group to the static completion object
564     */
565     static void addBookmarksIntoCompletion(const KBookmarkGroup &group);
566 
567     /**
568     * Returns all matches of the url-history for @p s. If there are no direct
569     * matches, it will try completing with http:// prepended, and if there's
570     * still no match, then http://www. Due to that, this is only usable for
571     * popupcompletion and not for manual or auto-completion.
572     */
573     static QStringList historyPopupCompletionItems(const QString &s = QString());
574 
575     void startAnimation();
576     void stopAnimation();
577 
578     void setUpEnabled(const QUrl &url);
579 
580     void checkDisableClearButton();
581     void initCombo();
582     void initActions();
583 
584     void popupNewTab(bool infront, bool openAfterCurrentPage);
585     void addClosedWindowToUndoList();
586     /**
587     * Tries to find a index.html (.kde.html) file in the specified directory
588     */
589     static QString findIndexFile(const QString &directory);
590 
591     void connectExtension(KParts::BrowserExtension *ext);
592     void disconnectExtension(KParts::BrowserExtension *ext);
593 
594     void plugViewModeActions();
595     void unplugViewModeActions();
596 
597     void splitCurrentView(Qt::Orientation orientation);
598 
599     QObject *lastFrame(KonqView *view);
600 
601     QLineEdit *comboEdit();
602 
603 private: // members
604     KonqUndoManager *m_pUndoManager;
605 
606     KNewFileMenu *m_pMenuNew;
607 
608     QAction *m_paPrint;
609 
610     KBookmarkActionMenu *m_pamBookmarks;
611 
612     KToolBarPopupAction *m_paUp;
613     KToolBarPopupAction *m_paBack;
614     KToolBarPopupAction *m_paForward;
615     KToolBarPopupAction *m_paHomePopup;
616     /// Action for the trash that contains closed tabs/windows
617     KToolBarPopupAction *m_paClosedItems;
618     KActionMenu *m_paSessions;
619     QAction *m_paHome;
620 
621     QAction *m_paSplitViewHor;
622     QAction *m_paSplitViewVer;
623     QAction *m_paAddTab;
624     QAction *m_paDuplicateTab;
625     QAction *m_paBreakOffTab;
626     QAction *m_paRemoveView;
627     QAction *m_paRemoveTab;
628     QAction *m_paRemoveOtherTabs;
629     QAction *m_paActivateNextTab;
630     QAction *m_paActivatePrevTab;
631 
632     KToggleAction *m_paLockView;
633     KToggleAction *m_paLinkView;
634     QAction *m_paReload;
635     QAction *m_paForceReload;
636     QAction *m_paReloadAllTabs;
637     QAction *m_paUndo;
638     QAction *m_paCut;
639     QAction *m_paCopy;
640     QAction *m_paPaste;
641     QAction *m_paStop;
642 
643     QAction *m_paCopyFiles;
644     QAction *m_paMoveFiles;
645 
646     QAction *m_paMoveTabLeft;
647     QAction *m_paMoveTabRight;
648 
649     QAction *m_paConfigureExtensions;
650     QAction *m_paConfigureSpellChecking;
651 
652     KonqAnimatedLogo *m_paAnimatedLogo;
653 
654     KBookmarkBar *m_paBookmarkBar;
655 
656 #if 0
657     KToggleAction *m_paFindFiles;
658 #endif
659 
660     KToggleAction *m_paShowMenuBar;
661     KToggleAction *m_paShowStatusBar;
662 
663     KToggleFullScreenAction *m_ptaFullScreen;
664 
665     QAction *m_paShowDeveloperTools;
666 
667     bool m_fullyConstructed: 1;
668     bool m_bLocationBarConnected: 1;
669     bool m_bURLEnterLock: 1;
670     // Set in constructor, used in slotRunFinished
671     bool m_bNeedApplyKonqMainWindowSettings: 1;
672     bool m_urlCompletionStarted: 1;
673 
674     FullScreenData m_fullScreenData;
675 
676     int m_goBuffer;
677     Qt::MouseButtons m_goMouseState;
678     Qt::KeyboardModifiers m_goKeyboardState;
679 
680     MapViews m_mapViews;
681 
682     QPointer<KonqView> m_currentView;
683 
684     KBookmarkMenu *m_pBookmarkMenu;
685     KonqExtendedBookmarkOwner *m_pBookmarksOwner;
686     KActionCollection *m_bookmarksActionCollection;
687     bool m_bookmarkBarInitialized;
688 
689     KonqViewManager *m_pViewManager;
690     KonqFrameBase *m_pChildFrame;
691 
692     // RMB on a tab: we need to store the tab number until the slots are called
693     int m_workingTab;
694 
695     // Store a number of things when opening a popup, they are needed
696     // in the slots connected to the popup's actions.
697     // TODO: a struct with new/delete to save a bit of memory?
698     QString m_popupMimeType;
699     QUrl m_popupUrl;
700     KFileItemList m_popupItems;
701     KParts::OpenUrlArguments m_popupUrlArgs;
702     KParts::BrowserArguments m_popupUrlBrowserArgs;
703 
704     KCMultiDialog *m_configureDialog;
705 
706     QLabel *m_locationLabel;
707     QPointer<KonqCombo> m_combo;
708     static KConfig *s_comboConfig;
709     KUrlCompletion *m_pURLCompletion;
710     // just a reference to KonqHistoryManager's completionObject
711     static KCompletion *s_pCompletion;
712 
713     ToggleViewGUIClient *m_toggleViewGUIClient;
714 
715     QString m_initialFrameName;
716 
717     QList<QAction *> m_openWithActions;
718     KActionMenu *m_openWithMenu;
719     KActionMenu *m_viewModeMenu;
720     QActionGroup *m_viewModesGroup;
721     QActionGroup *m_closedItemsGroup;
722     QActionGroup *m_sessionsGroup;
723 
724     static QList<KonqMainWindow *> *s_lstMainWindows;
725 
726     QUrl m_currentDir; // stores current dir for relative URLs whenever applicable
727 
728     QPointer<KonqHistoryDialog> m_historyDialog;
729 
730     /* The two variables below are used to store information about special popup
731     * windows. These windows, mostly requested through javascript window.open API,
732     * are required to have no toolbars showing. Since hiding all toolbars can lead
733     * to a malicious site attempting to fool the user by mimicing native input dialogs,
734     * (aka spoofing), Konqueror will NOT hide its location toolbar by default.
735     */
736     bool m_isPopupWithProxyWindow;
737     QPointer<KonqMainWindow> m_popupProxyWindow;
738 
739     friend class KonqBrowserInterface;
740 };
741 
742 #endif // KONQMAINWINDOW_H
743