fixed bug that made old filters without role undeletable
This commit is contained in:
parent
bcf98edb9d
commit
30ca123626
2 changed files with 17 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<manifest package="com.itsblue.flgvertretungtest" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.9.1" android:versionCode="9" android:installLocation="auto">
|
||||
<manifest package="com.itsblue.flgvertretungtest" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.9.2" android:versionCode="11" android:installLocation="auto">
|
||||
|
||||
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="fannyapp" android:icon="@drawable/icon">
|
||||
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="com.itsblue.flgvertretung.MainActivity" android:label="fannyapp" android:screenOrientation="unspecified" android:launchMode="singleTop">
|
||||
|
|
|
@ -77,6 +77,14 @@ QList<QStringList> AppSettings::readFilters() {
|
|||
filtersList.append(tmpFilterList);
|
||||
}
|
||||
|
||||
for(int i = 0; i < filtersList.length(); i++){
|
||||
QStringList filterList = filtersList[i];
|
||||
if( filterList[2] == "" ){
|
||||
filtersList.removeAt(i);
|
||||
i = i-1;
|
||||
}
|
||||
}
|
||||
|
||||
return(filtersList);
|
||||
}
|
||||
|
||||
|
@ -86,6 +94,14 @@ void AppSettings::writeFilters(QList<QStringList> list) {
|
|||
QString jsonString;
|
||||
QJsonArray filtersArray;
|
||||
|
||||
for(int i = 0; i < list.length(); i++){
|
||||
QStringList filterList = list[i];
|
||||
if( filterList[2] == "" ){
|
||||
list.removeAt(i);
|
||||
i = i-1;
|
||||
}
|
||||
}
|
||||
|
||||
foreach(QStringList filter, list){
|
||||
QJsonArray filterArray;
|
||||
|
||||
|
|
Reference in a new issue