mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
fix: in portable version,the default content
dir lost recursive attribute. (#1430)
* fix: allow edit the content path * fix: portable version ,add default item * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
e8f3a94541
commit
be22cb22b6
|
@ -632,6 +632,11 @@ Class load()
|
|||
Path( nl.item( x ).toElement().text(), nl.item( x ).toElement().attribute( "recursive" ) == "1" ) );
|
||||
}
|
||||
|
||||
if ( Config::isPortableVersion() && c.paths.empty() ) {
|
||||
// For portable version, hardcode some settings
|
||||
c.paths.push_back( Config::Path( Config::getPortableVersionDictionaryDir(), true ) );
|
||||
}
|
||||
|
||||
QDomNode soundDirs = root.namedItem( "sounddirs" );
|
||||
|
||||
if ( !soundDirs.isNull() ) {
|
||||
|
|
|
@ -1115,13 +1115,6 @@ Qt::ItemFlags PathsModel::flags( QModelIndex const & index ) const
|
|||
{
|
||||
Qt::ItemFlags result = QAbstractItemModel::flags( index );
|
||||
|
||||
if ( Config::isPortableVersion() ) {
|
||||
if ( index.isValid() && index.row() == 0 ) {
|
||||
result &= ~Qt::ItemIsSelectable;
|
||||
result &= ~Qt::ItemIsEnabled;
|
||||
}
|
||||
}
|
||||
|
||||
if ( index.isValid() && index.column() == 1 )
|
||||
result |= Qt::ItemIsUserCheckable;
|
||||
|
||||
|
|
Loading…
Reference in a new issue