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
remotes/origin/falkon
nowrep 15 years ago
parent 4a556a4adc
commit b8fbcdbeb5
  1. 4
      src/bookmarks/bookmarksmanager.cpp
  2. 3
      src/history/webhistoryinterface.h
  3. 2
      src/network/networkmanager.cpp
  4. 1
      src/network/networkmanager.h
  5. 3
      src/plugins/plugins.cpp
  6. 2
      src/plugins/plugins.h
  7. 3
      src/tools/iconfetcher.cpp
  8. 3
      src/webview/siteinfowidget.cpp
  9. 22
      src/webview/tabwidget.cpp

@ -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);

@ -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;
};

@ -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);

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

@ -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)

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

@ -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);
}

@ -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()) {

@ -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())

Loading…
Cancel
Save