Adding upstream version 0.13.1.
Signed-off-by: Alf Gaida <agaida@siduction.org>
This commit is contained in:
parent
ca7bd7b1c8
commit
0f49120b23
10
CHANGELOG
10
CHANGELOG
@ -1,7 +1,15 @@
|
||||
|
||||
libfm-qt-0.13.0 / 2018-05-21
|
||||
libfm-qt-0.13.1 / 2018-06-02
|
||||
============================
|
||||
|
||||
* Bump patch version to 1
|
||||
* It's supposedly fixed in Qt-5.11.1
|
||||
* Disconnect old source model
|
||||
|
||||
0.13.0 / 2018-05-21
|
||||
===================
|
||||
|
||||
* Release 0.13.0: Update changelog
|
||||
* Bumped minor version to 13
|
||||
* Fixed shortcut detection
|
||||
* Delete CachedFolderModel immediately on unreffing it
|
||||
|
@ -5,7 +5,7 @@ set(LIBFM_QT_LIBRARY_NAME "fm-qt" CACHE STRING "fm-qt")
|
||||
|
||||
set(LIBFM_QT_VERSION_MAJOR 0)
|
||||
set(LIBFM_QT_VERSION_MINOR 13)
|
||||
set(LIBFM_QT_VERSION_PATCH 0)
|
||||
set(LIBFM_QT_VERSION_PATCH 1)
|
||||
set(LIBFM_QT_VERSION ${LIBFM_QT_VERSION_MAJOR}.${LIBFM_QT_VERSION_MINOR}.${LIBFM_QT_VERSION_PATCH})
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
||||
|
@ -52,17 +52,23 @@ ProxyFolderModel::~ProxyFolderModel() {
|
||||
void ProxyFolderModel::setSourceModel(QAbstractItemModel* model) {
|
||||
if(model == sourceModel()) // avoid setting the same model twice
|
||||
return;
|
||||
FolderModel* oldSrcModel = static_cast<FolderModel*>(sourceModel());
|
||||
#if (QT_VERSION == QT_VERSION_CHECK(5,11,0))
|
||||
// workaround for Qt-5.11 bug https://bugreports.qt.io/browse/QTBUG-68581
|
||||
if(oldSrcModel) {
|
||||
disconnect(oldSrcModel, SIGNAL(destroyed()), this, SLOT(_q_sourceModelDestroyed()));
|
||||
}
|
||||
#endif
|
||||
if(model) {
|
||||
// we only support Fm::FolderModel
|
||||
Q_ASSERT(model->inherits("Fm::FolderModel"));
|
||||
|
||||
if(showThumbnails_ && thumbnailSize_ != 0) { // if we're showing thumbnails
|
||||
FolderModel* oldSrcModel = static_cast<FolderModel*>(sourceModel());
|
||||
FolderModel* newSrcModel = static_cast<FolderModel*>(model);
|
||||
if(oldSrcModel) { // we need to release cached thumbnails for the old source model
|
||||
oldSrcModel->releaseThumbnails(thumbnailSize_);
|
||||
disconnect(oldSrcModel, SIGNAL(thumbnailLoaded(QModelIndex, int)));
|
||||
}
|
||||
FolderModel* newSrcModel = static_cast<FolderModel*>(model);
|
||||
if(newSrcModel) { // tell the new source model that we want thumbnails of this size
|
||||
newSrcModel->cacheThumbnails(thumbnailSize_);
|
||||
connect(newSrcModel, &FolderModel::thumbnailLoaded, this, &ProxyFolderModel::onThumbnailLoaded);
|
||||
|
Loading…
x
Reference in New Issue
Block a user