1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Another little fixes (including showing unsorted bookmarks)

Unsorted bookmarks are now properly showed at the bottom of tree in
bookmarks manager.
Removed unneeded code in siteinfowidget.cpp and tabwidget.cpp
This commit is contained in:
nowrep 2011-11-05 18:36:53 +01:00
parent 4a556a4adc
commit b8fbcdbeb5
9 changed files with 21 additions and 22 deletions

View File

@ -237,7 +237,7 @@ void BookmarksManager::refreshTable()
int id = query.value(2).toInt();
QString folder = query.value(3).toString();
QIcon icon = IconProvider::iconFromBase64(query.value(4).toByteArray());
QTreeWidgetItem* item;
QTreeWidgetItem* item = new QTreeWidgetItem();
if (folder == "bookmarksMenu")
folder = tr("Bookmarks In Menu");
if (folder == "bookmarksToolbar")
@ -247,7 +247,7 @@ void BookmarksManager::refreshTable()
QList<QTreeWidgetItem*> findParent = ui->bookmarksTree->findItems(folder, 0);
if (findParent.count() != 1)
continue;
item = new QTreeWidgetItem(findParent.at(0));
findParent.at(0)->addChild(item);
}
item->setText(0, title);

View File

@ -19,6 +19,7 @@
#define WEBHISTORYINTERFACE_H
#include <QWebHistoryInterface>
#include <QStringList>
class WebHistoryInterface : public QWebHistoryInterface
{
@ -34,7 +35,7 @@ signals:
public slots:
private:
QList<QString> m_clickedLinks;
QStringList m_clickedLinks;
};

View File

@ -173,7 +173,7 @@ void NetworkManager::authentication(QNetworkReply* reply, QAuthenticator* auth)
connect(box, SIGNAL(accepted()), dialog, SLOT(accept()));
label->setText(tr("A username and password are being requested by %1. "
"The site says: \"%2\"").arg(reply->url().toEncoded(), auth->realm()));
"The site says: \"%2\"").arg(reply->url().toEncoded(), Qt::escape(auth->realm())));
formLa->addRow(label);
formLa->addRow(userLab, user);

View File

@ -30,6 +30,7 @@
#include <QNetworkDiskCache>
#include <QSslSocket>
#include <QSslConfiguration>
#include <QTextDocument>
#include "networkmanagerproxy.h"

View File

@ -67,7 +67,8 @@ void Plugins::loadPlugins()
m_loadedPluginFileNames.append(fileName);
}
}
qDebug() << loadedPlugins.count() << "plugins loaded";
std::cout << loadedPlugins.count() << "plugins loaded" << std::endl;
}
PluginInterface* Plugins::getPlugin(QString pluginFileName)

View File

@ -24,7 +24,7 @@
#include <QDir>
#include <QTimer>
#include <QSettings>
#include <QDebug>
#include <iostream>
class PluginInterface;
class Plugins : public QObject

View File

@ -61,7 +61,8 @@ void IconFetcher::pageDownloaded()
FollowRedirectReply* newReply;
if (shortcutIconTag.isEmpty()) {
// QUrl faviconUrl = replyUrl.resolved(QUrl("favicon.ico"));
// Rather getting favicon.ico from base directory than from subfolders
//
// Rather getting favicon.ico from base directory than from subfolders
QUrl faviconUrl = QUrl(replyUrl.toString(QUrl::RemovePath | QUrl::RemoveQuery) + "/favicon.ico");
newReply = new FollowRedirectReply(faviconUrl, m_manager);
}

View File

@ -45,9 +45,6 @@ SiteInfoWidget::SiteInfoWidget(QupZilla* mainClass, QWidget* parent) :
QString scheme = url.scheme();
QSqlQuery query;
QString host = url.host();
QString host2 = host;
if (host.startsWith("www."))
host2 = url.host().remove("www.");
query.exec("SELECT sum(count) FROM history WHERE url LIKE '"+scheme+"://"+host+"%' ");
if (query.next()) {

View File

@ -97,13 +97,13 @@ private:
}
};
TabWidget::TabWidget(QupZilla* mainClass, QWidget* parent) :
QTabWidget(parent)
, p_QupZilla(mainClass)
, m_lastTabIndex(0)
, m_isClosingToLastTabIndex(false)
, m_closedTabsManager(new ClosedTabsManager(this))
, m_locationBars(new QStackedWidget())
TabWidget::TabWidget(QupZilla* mainClass, QWidget* parent)
: QTabWidget(parent)
, p_QupZilla(mainClass)
, m_lastTabIndex(0)
, m_isClosingToLastTabIndex(false)
, m_closedTabsManager(new ClosedTabsManager(this))
, m_locationBars(new QStackedWidget())
{
setObjectName("tabwidget");
m_tabBar = new TabBar(p_QupZilla, this);
@ -250,11 +250,9 @@ int TabWidget::addView(QUrl url, const QString &title, OpenUrlIn openIn, bool se
webView->animationLoading(index, true)->movie()->stop();
webView->animationLoading(index, false)->setPixmap(_iconForUrl(url).pixmap(16,16));
if (openIn == TabWidget::NewSelectedTab) {
if (openIn == TabWidget::NewSelectedTab)
setCurrentIndex(index);
p_QupZilla->locationBar()->setText(url.toEncoded());
p_QupZilla->locationBar()->setCursorPosition(0);
}
if (count() == 1 && m_hideTabBarWithOneTab)
tabBar()->setVisible(false);
else tabBar()->setVisible(true);
@ -284,7 +282,7 @@ int TabWidget::addView(QUrl url, const QString &title, OpenUrlIn openIn, bool se
void TabWidget::setTabText(int index, const QString& text)
{
QString newtext = text;
newtext.remove("&"); // Avoid Alt+? shortcuts
newtext.remove("&"); // Avoid Alt+letter shortcuts
if (WebTab* webTab = qobject_cast<WebTab*>(p_QupZilla->tabWidget()->widget(index)) ) {
if (webTab->isPinned())