summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainview.cpp16
-rw-r--r--src/mainview.h6
-rw-r--r--src/networkaccessmanager.cpp5
3 files changed, 20 insertions, 7 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp
index 70ce39fc..1c1ee678 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -59,11 +59,11 @@ MainView::MainView(QWidget *parent)
, m_lineEditCompleter(0)
, m_lineEdits(new QStackedWidget(this))
, m_tabBar(new TabBar(this))
+ , m_parent(parent)
{
setTabBar(m_tabBar);
loadingGitPath = KStandardDirs::locate("appdata" , "pics/loading.gif");
- kWarning() << loadingGitPath;
connect(m_tabBar, SIGNAL(newTab()), this, SLOT(newWebView()));
connect(m_tabBar, SIGNAL(closeTab(int)), this, SLOT(closeTab(int)));
@@ -81,6 +81,20 @@ MainView::MainView(QWidget *parent)
m_recentlyClosedTabsAction->setMenu(m_recentlyClosedTabsMenu);
m_recentlyClosedTabsAction->setEnabled(false);
+// if (oneCloseButton)
+// {
+// QToolButton *closeTabButton = new QToolButton(this);
+// closeTabButton->setDefaultAction(m_closeTabAction);
+// closeTabButton->setAutoRaise(true);
+// closeTabButton->setToolButtonStyle(Qt::ToolButtonIconOnly);
+// setCornerWidget(closeTabButton, Qt::TopRightCorner);
+// }
+// else
+// {
+// m_tabBar->setTabsClosable(true);
+// connect(m_tabBar, SIGNAL(tabCloseRequested(int)), this, SLOT(closeTab(int)));
+// }
+
// --
connect(this, SIGNAL(currentChanged(int)), this, SLOT(currentChanged(int)));
}
diff --git a/src/mainview.h b/src/mainview.h
index f7e1bbb9..7ed750a6 100644
--- a/src/mainview.h
+++ b/src/mainview.h
@@ -29,6 +29,7 @@
// Forward Declarations
class WebView;
class TabBar;
+class MainWindow;
class KUrl;
class KAction;
@@ -52,7 +53,7 @@ class MainView : public KTabWidget
Q_OBJECT
public:
- MainView(QWidget *parent = 0);
+ MainView(KMainWindow *parent);
~MainView();
@@ -145,6 +146,9 @@ private:
TabBar *m_tabBar;
QString loadingGitPath;
+
+ // the MainWindow pointer
+ MainWindow *m_parent;
};
#endif
diff --git a/src/networkaccessmanager.cpp b/src/networkaccessmanager.cpp
index 3c15bcf5..26078ed6 100644
--- a/src/networkaccessmanager.cpp
+++ b/src/networkaccessmanager.cpp
@@ -64,15 +64,10 @@ NetworkAccessManager::NetworkAccessManager(QObject *parent)
loadSettings();
-#if QT_VERSION >= 0x040500
-
QNetworkDiskCache *diskCache = new QNetworkDiskCache(this);
QString location = KStandardDirs::locateLocal("cache", "", true);
diskCache->setCacheDirectory(location);
setCache(diskCache);
-
-#endif
-
}