# Namespace KCModuleLoader

Module | kutils
Namespace | KCModuleLoader

Loads a KControl Module.

KCModuleLoader tries in several ways to locate and load a KCModule. If loading fails a zero pointer is returned. \n It is very unlikely KCModuleLoader is what you want and KCModuleProxy suits your needs.

Author Matthias Hoelzer-Kluepfel <mhk@kde.org> Author Frans Englich <frans.englich@telia.com> Internal

### enums

- ErrorReporting { None, Inline, Dialog, Both }

enum details

### methods

- loadModule (module, report, parent, args)

  returns KCModule

  Argument | Type | Default
  --- | --- | ---
  module | KCModuleInfo |
  report | KCModuleLoader.ErrorReporting |
  parent | QWidget | 0
  args | QStringList | QStringList()

  Loads a KCModule. If loading fails a zero pointer is returned.

  module - what module to load

  report - see ErrorReporting

  Returns a pointer to the loaded KCModule

- loadModule (module, report, parent, args)

  returns KCModule

  Argument | Type | Default
  --- | --- | ---
  module | QString |
  report | KCModuleLoader.ErrorReporting |
  parent | QWidget | 0
  args | QStringList | QStringList()

  Loads a KCModule. If loading fails a zero pointer is returned.

  module - what module to load

  report - see ErrorReporting

  Returns a pointer to the loaded KCModule

- reportError (report, text, details, parent)

  returns KCModule

  Argument | Type | Default
  --- | --- | ---
  report | KCModuleLoader.ErrorReporting |
  text | QString |
  details | QString |
  parent | QWidget |

  Returns a KCModule containing the messages report and text.

  report - the type of error reporting, see ErrorReporting

  text - the main message

  details - any additional details

  Internal

- showLastLoaderError (parent)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  parent | QWidget |

  Display a message box explaining an error occurred and possible reasons to why.

  Deprecated Use a constructor with ErrorReporting set to Dialog to show a message box like this function did.

- unloadModule (mod)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  mod | KCModuleInfo |

  Unloads the module's library

  mod - What module to unload for

### enums - detail

- ErrorReporting { None, Inline, Dialog, Both }

  no error reporting is done

  | None | - 0 | - | no error reporting is done
  | Inline | - 1 | - |
  | Dialog | - 2 | - |
  | Both | - 3 | - |