More minor updates (function names changed, includes added, etc)

preferencesAboutTextFull
Craig Watson 9 years ago
parent b78cc08318
commit 55dd0450ff
  1. 2
      src/domain/UBGraphicsGroupContainerItem.cpp
  2. 2
      src/frameworks/UBBase32.cpp
  3. 6
      src/frameworks/UBFileSystemUtils.cpp
  4. 1
      src/gui/UBCircleFrame.h
  5. 3
      src/gui/UBDocumentThumbnailWidget.cpp
  6. 6
      src/gui/UBThumbnailWidget.cpp
  7. 33
      src/web/browser/WBHistory.cpp

@ -297,7 +297,7 @@ QVariant UBGraphicsGroupContainerItem::itemChange(GraphicsItemChange change, con
{
QVariant newValue = Delegate()->itemChange(change, value);
foreach(QGraphicsItem *child, children())
foreach(QGraphicsItem *child, childItems())
{
UBGraphicsItem *item = dynamic_cast<UBGraphicsItem*>(child);
if (item)

@ -53,7 +53,7 @@ QByteArray UBBase32::decode(const QString& base32String)
for (i = 0, index = 0, offset = 0; i < base32String.length(); i++)
{
QChar ch = base32String.at(i);
char lookup = ch.toAscii() - '0';
char lookup = ch.toLatin1() - '0';
/* Skip chars outside the lookup table */
if (lookup < 0 || lookup >= 80)

@ -130,12 +130,12 @@ bool UBFileSystemUtils::deleteFile(const QString &path)
QString UBFileSystemUtils::defaultTempDirPath()
{
return QDesktopServices::storageLocation(QDesktopServices::TempLocation) + "/" + defaultTempDirName();
return QStandardPaths::writableLocation(QStandardPaths::TempLocation) + "/" + defaultTempDirName();
}
QString UBFileSystemUtils::createTempDir(const QString& templateString, bool autoDeleteOnExit)
{
QString appTempDir = QDesktopServices::storageLocation(QDesktopServices::TempLocation)
QString appTempDir = QStandardPaths::writableLocation(QStandardPaths::TempLocation)
+ "/" + templateString;
int index = 0;
@ -200,7 +200,7 @@ void UBFileSystemUtils::deleteAllTempDirCreatedDuringSession()
void UBFileSystemUtils::cleanupGhostTempFolders(const QString& templateString)
{
QDir dir(QDesktopServices::storageLocation(QDesktopServices::TempLocation));
QDir dir(QStandardPaths::writableLocation(QStandardPaths::TempLocation));
foreach (QFileInfo dirContent, dir.entryInfoList(QDir::Dirs
| QDir::NoDotAndDotDot | QDir::Hidden , QDir::Name))
{

@ -29,6 +29,7 @@
#define UBCIRCLEFRAME_H_
#include <QtGui>
#include <QFrame>
class UBCircleFrame : public QFrame
{

@ -190,7 +190,8 @@ void UBDocumentThumbnailWidget::dragMoveEvent(QDragMoveEvent *event)
if (!mDropCaretRectItem && selectedItems().count() < mGraphicItems.count())
{
mDropCaretRectItem = new QGraphicsRectItem(0, scene());
mDropCaretRectItem = new QGraphicsRectItem(0);
scene()->addItem(mDropCaretRectItem);
mDropCaretRectItem->setPen(QPen(Qt::darkGray));
mDropCaretRectItem->setBrush(QBrush(Qt::lightGray));
}

@ -26,6 +26,7 @@
#include <QString>
#include <QCursor>
#include <QGraphicsRectItem>
#include "UBThumbnailWidget.h"
#include "UBRubberBand.h"
@ -242,7 +243,8 @@ void UBThumbnailWidget::mousePressEvent(QMouseEvent *event)
option.initFrom(&rubberBand);
mPrevLassoRect = QRect();
mLassoRectItem = new QGraphicsRectItem(0, scene());
mLassoRectItem = new QGraphicsRectItem(0);
scene()->addItem(mLassoRectItem);
#ifdef Q_WS_MAC
// The following code must stay in synch with <Qt installation folder>\src\gui\styles\qmacstyle_mac.mm
@ -772,7 +774,7 @@ UBSceneThumbnailNavigPixmap::UBSceneThumbnailNavigPixmap(const QPixmap& pix, UBD
, bCanMoveDown(false)
{
if(0 <= UBDocumentContainer::pageFromSceneIndex(pSceneIndex)){
setAcceptsHoverEvents(true);
setAcceptHoverEvents(true);
setFlag(QGraphicsItem::ItemIsSelectable, true);
}
}

@ -411,7 +411,8 @@ WBHistoryModel::WBHistoryModel(WBHistoryManager *history, QObject *parent)
void WBHistoryModel::historyReset()
{
reset();
beginResetModel();
endResetModel();
}
void WBHistoryModel::entryAdded()
@ -751,7 +752,8 @@ QVariant WBHistoryFilterModel::headerData(int section, Qt::Orientation orientati
void WBHistoryFilterModel::sourceReset()
{
m_loaded = false;
reset();
beginResetModel();
endResetModel();
}
int WBHistoryFilterModel::rowCount(const QModelIndex &parent) const
@ -888,7 +890,8 @@ bool WBHistoryFilterModel::removeRows(int row, int count, const QModelIndex &par
this, SLOT(sourceRowsRemoved(const QModelIndex &, int, int)));
m_loaded = false;
if (oldCount - count != rowCount())
reset();
beginResetModel();
endResetModel();
return true;
}
@ -948,7 +951,7 @@ QModelIndex WBHistoryCompletionModel::index(int row, int column, const QModelInd
if (row < 0 || row >= rowCount(parent)
|| column < 0 || column >= columnCount(parent))
return QModelIndex();
return createIndex(row, column, 0);
return createIndex(row, column);
}
QModelIndex WBHistoryCompletionModel::parent(const QModelIndex &) const
@ -978,12 +981,14 @@ void WBHistoryCompletionModel::setSourceModel(QAbstractItemModel *newSourceModel
this, SLOT(sourceReset()));
}
reset();
beginResetModel();
endResetModel();
}
void WBHistoryCompletionModel::sourceReset()
{
reset();
beginResetModel();
endResetModel();
}
WBHistoryTreeModel::WBHistoryTreeModel(QAbstractItemModel *sourceModel, QObject *parent)
@ -1107,7 +1112,7 @@ QModelIndex WBHistoryTreeModel::index(int row, int column, const QModelIndex &pa
return QModelIndex();
if (!parent.isValid())
return createIndex(row, column, 0);
return createIndex(row, column);
return createIndex(row, column, parent.row() + 1);
}
@ -1116,7 +1121,7 @@ QModelIndex WBHistoryTreeModel::parent(const QModelIndex &index) const
int offset = index.internalId();
if (offset == 0 || !index.isValid())
return QModelIndex();
return createIndex(offset - 1, 0, 0);
return createIndex(offset - 1, 0);
}
bool WBHistoryTreeModel::hasChildren(const QModelIndex &parent) const
@ -1183,13 +1188,15 @@ void WBHistoryTreeModel::setSourceModel(QAbstractItemModel *newSourceModel)
this, SLOT(sourceRowsRemoved(const QModelIndex &, int, int)));
}
reset();
beginResetModel();
endResetModel();
}
void WBHistoryTreeModel::sourceReset()
{
m_sourceRowCache.clear();
reset();
beginResetModel();
endResetModel();
}
void WBHistoryTreeModel::sourceRowsInserted(const QModelIndex &parent, int start, int end)
@ -1199,7 +1206,8 @@ void WBHistoryTreeModel::sourceRowsInserted(const QModelIndex &parent, int start
if (start != 0 || start != end)
{
m_sourceRowCache.clear();
reset();
beginResetModel();
endResetModel();
return;
}
@ -1249,7 +1257,8 @@ void WBHistoryTreeModel::sourceRowsRemoved(const QModelIndex &parent, int start,
if (it == m_sourceRowCache.end())
{
m_sourceRowCache.clear();
reset();
beginResetModel();
endResetModel();
return;
}

Loading…
Cancel
Save