Small QT5 fixes

Updated resetModels and fixed LUA lib name/path.
pull/110/head
Alexell 2017-08-09 00:52:55 +03:00 committed by Hleb Valoshka
parent 6b5e8f49cf
commit e49dcc692e
5 changed files with 11 additions and 7 deletions

View File

@ -551,14 +551,14 @@ win32 {
windows/inc/libz \
windows/inc/libpng \
windows/inc/libjpeg \
windows/inc/lua-5.1 \
windows/inc/lua \
windows/inc/spice
LIBS += -Lwindows/lib/x86 \
-lzlib \
-llibpng \
-llibjpeg \
-lintl \
-llua5.1 \
-llua51 \
-lcspice \
-lvfw32
@ -581,7 +581,7 @@ unix {
CONFIG += link_pkgconfig
LUALIST = lua5.1 lua
LUALIST = lua51 lua
for(libpc, LUALIST):system(pkg-config --exists $${libpc}):LUAPC = $${libpc}
isEmpty (LUAPC) {error("No shared Lua library found!")}

View File

@ -412,8 +412,9 @@ void StarTableModel::populate(const UniversalCoord& _observerPos,
// Clear out the results of the previous populate() call
if (stars.size() != 0)
{
beginResetModel();
stars.clear();
reset();
endResetModel();
}
if (filteredStars.empty())

View File

@ -337,8 +337,9 @@ void DSOTableModel::populate(const UniversalCoord& _observerPos,
// Clear out the results of the previous populate() call
if (dsos.size() != 0)
{
beginResetModel();
dsos.clear();
reset();
endResetModel();
}
if (filteredDSOs.empty())

View File

@ -515,8 +515,9 @@ void EventTableModel::sort(int column, Qt::SortOrder order)
void EventTableModel::setEclipses(const vector<EclipseRecord>& _eclipses)
{
beginResetModel();
eclipses = _eclipses;
reset();
endResetModel();
}

View File

@ -142,7 +142,8 @@ void SolarSystemTreeModel::buildModel(Star* star, bool _groupByClass)
rootItem->children[0] = createTreeItem(Selection(star), rootItem, 0);
}
reset();
beginResetModel();
endResetModel();
}