author | harlekin <harlekin> | 2004-05-29 17:11:23 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2004-05-29 17:11:23 (UTC) |
commit | f568ff9c68bdc61cbc4482f9b2c6e1096cecaae0 (patch) (unidiff) | |
tree | 656b1216596c578ba672c2c0d25782d24110406a | |
parent | e163b479be800d0b388cf52d046adfc83f5cc1d8 (diff) | |
download | opie-f568ff9c68bdc61cbc4482f9b2c6e1096cecaae0.zip opie-f568ff9c68bdc61cbc4482f9b2c6e1096cecaae0.tar.gz opie-f568ff9c68bdc61cbc4482f9b2c6e1096cecaae0.tar.bz2 |
fix path handling
-rw-r--r-- | libopie2/opiecore/opluginloader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libopie2/opiecore/opluginloader.cpp b/libopie2/opiecore/opluginloader.cpp index c2dc239..3d286e5 100644 --- a/libopie2/opiecore/opluginloader.cpp +++ b/libopie2/opiecore/opluginloader.cpp | |||
@@ -213,25 +213,25 @@ int OPluginItem::position()const{ | |||
213 | * @param name | 213 | * @param name |
214 | */ | 214 | */ |
215 | void OPluginItem::setName( const QString& name ) { | 215 | void OPluginItem::setName( const QString& name ) { |
216 | m_name = name; | 216 | m_name = name; |
217 | } | 217 | } |
218 | 218 | ||
219 | /** | 219 | /** |
220 | * \brief set the path of a plugin | 220 | * \brief set the path of a plugin |
221 | * Set the path of Plugin Item. The path must be absolute. | 221 | * Set the path of Plugin Item. The path must be absolute. |
222 | * @param name The path of the plugin | 222 | * @param name The path of the plugin |
223 | */ | 223 | */ |
224 | void OPluginItem::setPath( const QString& name ) { | 224 | void OPluginItem::setPath( const QString& name ) { |
225 | m_name = name; | 225 | m_path = name; |
226 | } | 226 | } |
227 | 227 | ||
228 | /** | 228 | /** |
229 | * \brief enable or disable the to load attribute | 229 | * \brief enable or disable the to load attribute |
230 | * Set the Enabled attribute. Such changes won't be saved. If you want to save it | 230 | * Set the Enabled attribute. Such changes won't be saved. If you want to save it |
231 | * use a OPluginManager to configure your plugins manually or Opie::Ui::OPluginConfig | 231 | * use a OPluginManager to configure your plugins manually or Opie::Ui::OPluginConfig |
232 | * for a graphical frontend. | 232 | * for a graphical frontend. |
233 | * | 233 | * |
234 | * @param enabled Enable or Disable the Enabled Attribute | 234 | * @param enabled Enable or Disable the Enabled Attribute |
235 | */ | 235 | */ |
236 | void OPluginItem::setEnabled( bool enabled ) { | 236 | void OPluginItem::setEnabled( bool enabled ) { |
237 | m_enabled = enabled; | 237 | m_enabled = enabled; |
@@ -814,25 +814,25 @@ void OPluginManager::load() { | |||
814 | * now would return your saved changes. | 814 | * now would return your saved changes. |
815 | */ | 815 | */ |
816 | void OPluginManager::save() { | 816 | void OPluginManager::save() { |
817 | QMap<QString, QStringList> excluded; // map for path to excluded name | 817 | QMap<QString, QStringList> excluded; // map for path to excluded name |
818 | QMap<QString, QStringList> positions; // if positions matter contains splitted up by dirs | 818 | QMap<QString, QStringList> positions; // if positions matter contains splitted up by dirs |
819 | bool sorted = m_loader ? m_loader->isSorted() : m_isSorted; | 819 | bool sorted = m_loader ? m_loader->isSorted() : m_isSorted; |
820 | 820 | ||
821 | /* | 821 | /* |
822 | * We will create some maps for the groups to include positions a | 822 | * We will create some maps for the groups to include positions a |
823 | */ | 823 | */ |
824 | for ( OPluginItem::List::Iterator it = m_plugins.begin(); it != m_plugins.end(); ++it ) { | 824 | for ( OPluginItem::List::Iterator it = m_plugins.begin(); it != m_plugins.end(); ++it ) { |
825 | OPluginItem item = *it; | 825 | OPluginItem item = *it; |
826 | QString path = QFileInfo( item.path() ).filePath(); | 826 | QString path = QFileInfo( item.path() ).dirPath(true); |
827 | if ( sorted ) { | 827 | if ( sorted ) { |
828 | positions[path].append( item.name() ); | 828 | positions[path].append( item.name() ); |
829 | positions[path].append( QString::number( item.position() ) ); | 829 | positions[path].append( QString::number( item.position() ) ); |
830 | } | 830 | } |
831 | 831 | ||
832 | if ( !item.isEnabled() ) | 832 | if ( !item.isEnabled() ) |
833 | excluded[path].append( item.name() ); | 833 | excluded[path].append( item.name() ); |
834 | } | 834 | } |
835 | 835 | ||
836 | /* | 836 | /* |
837 | * The code below wouldn't work because we can't delete groups/keys from the config | 837 | * The code below wouldn't work because we can't delete groups/keys from the config |
838 | * ### for ODP make Config right! | 838 | * ### for ODP make Config right! |