# vim:syntax=apparmor
# Common rules for Qt5-based applications

  abi <abi/4.0>,

  # Additional libraries

  /usr/lib{,64,/@{multiarch}}/qt5/plugins/**.so mr,
  /usr/lib{,64,/@{multiarch}}/qt5/qml/**.so mr,
  /usr/lib{,64,/@{multiarch}}/qt5/qml/**.{qmlc,jsc} mr, # Precompiled QML/JavaScript modules

  # System files

  /etc/xdg/QtProject/qtlogging.ini r,
  /usr/share/qt5/translations/*.qm r,
  /usr/lib{,64,/@{multiarch}}/qt5/plugins/** r,
  /usr/lib{,64,/@{multiarch}}/qt5/qml/** r,

  # User files

  owner @{HOME}/.config/QtProject/qtlogging.ini r,
  owner @{HOME}/.config/QtProject.conf r, # common settings for QFileDialog, etc (application might need write access)
  owner @{HOME}/.cache/qt_compose_cache_{little,big}_endian_* r, # for "platforminputcontexts" plugins


  # Include additions to the abstraction
  include if exists <abstractions/qt5.d>
