ronantakizawa/codereview-bench huggingface dataset:
Repository: xbmc/xbmc
File: xbmc/interfaces/AnnouncementManager.cpp (C++)

Code before:
    item.SetProperty(LOOKUP_PROPERTY, false);

    objItem["title"] = tag.GetTitle();
    if (objItem["title"].empty())
      objItem["title"] = item.GetLabel();

    if (tag.GetTrackNumber() > 0)
      objItem["track"] = tag.GetTrackNumber();
    if (!tag.GetAlbum().empty())
      objItem["album"] = tag.GetAlbum();
    if (!tag.GetArtist().empty())
      objItem["artist"] = tag.GetArtist();
  }
  else
  {
    objItem["id"] = id;
  }
}

CVariant CreateDataObjectFromItem(const CFileItem& item, const CVariant& data)
{
  CVariant object = data.isNull() || data.isObject() ? data : CVariant::VariantTypeObject;

  if (item.HasPVRChannelInfoTag())
  {
    auto copyPlayerId = data.isMember("player") && data["player"].isMember("playerid");
    CopyPVRTagInfoToObject(*item.GetPVRChannelInfoTag(), copyPlayerId, object);
  }
  else if (item.HasVideoInfoTag() && !item.HasPVRRecordingInfoTag())
  {
    CopyVideoTagInfoToObject(item, object);
  }
  else if (item.HasMusicInfoTag())
  {
    CopyMusicTagInfoToObject(item, object);
  }
  else if (VIDEO::IsVideo(item))
  {
    // video item but has no video info tag.
    object["item"]["type"] = "movie";
    object["item"]["title"] = item.GetLabel();
  }
  else if (item.HasPictureInfoTag())
  {
    object["item"]["type"] = "picture";
    object["item"]["file"] = item.GetPath();
  }
  else
    object["item"]["type"] = "unknown";

  return object;

Review comment (suggestion):
Really? `auto` for a bool? Does not even safe typing some letters but decreases readability. Please use `const bool` here.

Code after:
  {
    //! @todo Can be removed once this is properly handled when starting playback of a file
    item.SetProperty(LOOKUP_PROPERTY, false);

    objItem["title"] = tag.GetTitle();
    if (objItem["title"].empty())
      objItem["title"] = item.GetLabel();

    if (tag.GetTrackNumber() > 0)
      objItem["track"] = tag.GetTrackNumber();
    if (!tag.GetAlbum().empty())
      objItem["album"] = tag.GetAlbum();
    if (!tag.GetArtist().empty())
      objItem["artist"] = tag.GetArtist();
  }
  else
  {
    objItem["id"] = id;
  }
}

CVariant CreateDataObjectFromItem(CFileItem& item, const CVariant& data)
{
  CVariant object;
  if (data.isNull() || data.isObject())
    object = data;
  else
    object = CVariant::VariantTypeObject;

  if (item.HasPVRChannelInfoTag())
  {
    const bool copyPlayerId = data.isMember("player") && data["player"].isMember("playerid");
    CopyPVRTagInfoToObject(*item.GetPVRChannelInfoTag(), copyPlayerId, object);
  }
  else if (item.HasVideoInfoTag() && !item.HasPVRRecordingInfoTag())
  {
    CopyVideoTagInfoToObject(item, object);
  }
  else if (item.HasMusicInfoTag())
  {
    CopyMusicTagInfoToObject(item, object);
  }
  else if (VIDEO::IsVideo(item))
  {
    // video item but has no video info tag.
    object["item"]["type"] = "movie";
    object["item"]["title"] = item.GetLabel();
  }
  else if (item.HasPictureInfoTag())
  {
    object["item"]["type"] = "picture";
Repository: xbmc/xbmc
File: xbmc/interfaces/AnnouncementManager.cpp (C++)

Code before:

  auto& objItem = object["item"];
  int id = tag.GetDatabaseId();

  //! @todo Can be removed once this is properly handled when starting playback of a file
  if (id <= 0 && !item.GetPath().empty() && item.GetProperty(LOOKUP_PROPERTY).asBoolean(true))
  {
    CVideoDatabase videodatabase;
    if (videodatabase.Open())
    {
      std::string videoInfoTagPath = tag.m_strFileNameAndPath;
      std::string path;
      if (StringUtils::StartsWith(videoInfoTagPath, "removable://"))
        path = videoInfoTagPath;
      else
        path = item.GetPath();
      if (videodatabase.LoadVideoInfo(path, tag, VideoDbDetailsNone))
        id = tag.GetDatabaseId();

      videodatabase.Close();
    }
    else
    {
      CLog::Log(LOGWARNING, LOGANNOUNCE,
                "{} - Unable to open video database. Can not load video tag for announcement!",
                __FUNCTION__);
    }
  }

  if (!tag.m_type.empty())
  {
    objItem["type"] = tag.m_type;
  }
  else
  {
    std::string type;
    CVideoDatabase::VideoContentTypeToString(item.GetVideoContentType(), type);
    objItem["type"] = type;
  }

  if (id <= 0)
  {
    //! @todo Can be removed once this is properly handled when starting playback of a file
    item.SetProperty(LOOKUP_PROPERTY, false);

    std::string title = tag.m_strTitle;
    if (title.empty())
      title = item.GetLabel();
    objItem["title"] = title;

    using enum VideoDbContentType;

Review comment (suggestion):
Instead of using `__FUNCTION__`, use `CLog::LogFC` - The F takes care to log method signature, the C stands for the log component, which is `LOGANNOUNCE` here.

Code after:

  auto& objItem = object["item"];
  int id = tag.GetDatabaseId();

  //! @todo Can be removed once this is properly handled when starting playback of a file
  if (id <= 0 && !item.GetPath().empty() && item.GetProperty(LOOKUP_PROPERTY).asBoolean(true))
  {
    CVideoDatabase videodatabase;
    if (videodatabase.Open())
    {
      std::string videoInfoTagPath = tag.m_strFileNameAndPath;
      std::string path;
      if (StringUtils::StartsWith(videoInfoTagPath, "removable://"))
        path = videoInfoTagPath;
      else
        path = item.GetPath();
      if (videodatabase.LoadVideoInfo(path, tag, VideoDbDetailsNone))
        id = tag.GetDatabaseId();

      videodatabase.Close();
    }
    else
    {
      CLog::LogFC(LOGWARNING, LOGANNOUNCE,
                  "Unable to open video database. Can not load video tag for announcement!");
    }
  }

  if (!tag.m_type.empty())
  {
    objItem["type"] = tag.m_type;
  }
  else
  {
    std::string type;
    CVideoDatabase::VideoContentTypeToString(item.GetVideoContentType(), type);
    objItem["type"] = type;
  }

  if (id <= 0)
  {
    //! @todo Can be removed once this is properly handled when starting playback of a file
    item.SetProperty(LOOKUP_PROPERTY, false);

    std::string title = tag.m_strTitle;
    if (title.empty())
      title = item.GetLabel();
    objItem["title"] = title;

    using enum VideoDbContentType;
    switch (item.GetVideoContentType())
Repository: xbmc/xbmc
File: xbmc/filesystem/DirectoryCache.cpp (C++)

Code before:
{
  m_cacheType = cacheType;
  m_lastAccess = 0;
  m_Items->SetIgnoreURLOptions(true);
  m_Items->SetFastLookup(true);
}

CDirectoryCache::CDir::~CDir() = default;

void CDirectoryCache::CDir::SetLastAccess(unsigned int &accessCounter)
{
  m_lastAccess = accessCounter++;
}

CDirectoryCache::CDirectoryCache(void)
{
  m_accessCounter = 0;
#ifdef _DEBUG
  m_cacheHits = 0;
  m_cacheMisses = 0;
#endif
}

CDirectoryCache::~CDirectoryCache(void) = default;

bool CDirectoryCache::GetDirectory(const CURL& urlPath, CFileItemList& items, bool retrieveAll)
{
  std::unique_lock lock(m_cs);

  // Get rid of any URL options, else the compare may be wrong
  std::string storedPath = urlPath.GetWithoutOptions();
  URIUtils::RemoveSlashAtEnd(storedPath);

  auto i = m_cache.find(storedPath);
  if (i != m_cache.end())
  {
    CDir& dir = i->second;
    if (dir.m_cacheType == CacheType::ALWAYS || (dir.m_cacheType == CacheType::ONCE && retrieveAll))
    {
      items.Copy(*dir.m_Items);
      dir.SetLastAccess(m_accessCounter);
#ifdef _DEBUG
      m_cacheHits+=items.Size();
#endif
      return true;
    }
  }
  return false;
}

void CDirectoryCache::SetDirectory(const CURL& urlPath,

Review comment (suggestion):
type prefixing is discouraged https://github.com/xbmc/xbmc/blob/master/docs/CODE_GUIDELINES.md#88-variables. Would path be ambiguous? The same applies to many other places in the PR.

Code after:
{
  m_cacheType = cacheType;
  m_lastAccess = 0;
  m_Items->SetIgnoreURLOptions(true);
  m_Items->SetFastLookup(true);
}

CDirectoryCache::CDir::~CDir() = default;

void CDirectoryCache::CDir::SetLastAccess(unsigned int &accessCounter)
{
  m_lastAccess = accessCounter++;
}

CDirectoryCache::CDirectoryCache(void)
{
  m_accessCounter = 0;
#ifdef _DEBUG
  m_cacheHits = 0;
  m_cacheMisses = 0;
#endif
}

CDirectoryCache::~CDirectoryCache(void) = default;

bool CDirectoryCache::GetDirectory(const CURL& url, CFileItemList& items, bool retrieveAll)
{
  std::unique_lock lock(m_cs);

  // Get rid of any URL options, else the compare may be wrong
  std::string storedPath = url.GetWithoutOptions();
  URIUtils::RemoveSlashAtEnd(storedPath);

  auto i = m_cache.find(storedPath);
  if (i != m_cache.end())
  {
    CDir& dir = i->second;
    if (dir.m_cacheType == CacheType::ALWAYS || (dir.m_cacheType == CacheType::ONCE && retrieveAll))
    {
      items.Copy(*dir.m_Items);
      dir.SetLastAccess(m_accessCounter);
#ifdef _DEBUG
      m_cacheHits+=items.Size();
#endif
      return true;
    }
  }
  return false;
}

void CDirectoryCache::SetDirectory(const CURL& url, const CFileItemList& items, CacheType cacheType)
Repository: xbmc/xbmc
File: xbmc/music/Song.h (C/C++)

Code before:
#include <map>
#include <string>
#include <vector>

class CVariant;

/*!
 \ingroup music
 \brief Class to store and read album information from CMusicDatabase
 \sa CSong, CMusicDatabase
 */

class CGenre
{
public:
  int idGenre;
  std::string strGenre;
};

class CFileItem;

// Struct to store chapter information from mp3 files (could be used for m4b or mka files too)
struct chapterDetails
{
  std::string name;
  unsigned int startTime{0};
  unsigned int endTime{0};
};

using chapterMarks = std::map<int, chapterDetails>;

/*!
 \ingroup music
 \brief Class to store and read song information from CMusicDatabase
 \sa CAlbum, CMusicDatabase
 */
class CSong final : public ISerializable
{
public:
  CSong() ;
  explicit CSong(CFileItem& item);
  void Clear() ;
  void MergeScrapedSong(const CSong& source, bool override);
  void Serialize(CVariant& value) const override;

  bool operator<(const CSong &song) const
  {
    if (strFileName < song.strFileName) return true;
    if (strFileName > song.strFileName) return false;
    if (iTrack < song.iTrack) return true;
    return false;

Review comment (suggestion):
Can you include units? Either:

```c++
unsigned int startTimeMs{0};
```

or

```c++
unsigned int startTime{0}; // Milliseconds
```

I think the first will make the code more clear in other areas.

You can also use C++ time types.

Code after:
#include <chrono>
#include <map>
#include <string>
#include <vector>

class CVariant;

/*!
 \ingroup music
 \brief Class to store and read album information from CMusicDatabase
 \sa CSong, CMusicDatabase
 */

class CGenre
{
public:
  int idGenre;
  std::string strGenre;
};

class CFileItem;

// Struct to store chapter information from mp3 files (could be used for m4b or mka files too)
struct ChapterDetails
{
  std::string name;
  std::chrono::milliseconds startTimeMs{0}; // All chapter timings are in milliseconds
  std::chrono::milliseconds endTimeMs{0};
};

using ChapterMarks = std::map<int, ChapterDetails>;

/*!
 \ingroup music
 \brief Class to store and read song information from CMusicDatabase
 \sa CAlbum, CMusicDatabase
 */
class CSong final : public ISerializable
{
public:
  CSong() ;
  explicit CSong(CFileItem& item);
  void Clear() ;
  void MergeScrapedSong(const CSong& source, bool override);
  void Serialize(CVariant& value) const override;

  bool operator<(const CSong &song) const
  {
    if (strFileName < song.strFileName) return true;
    if (strFileName > song.strFileName) return false;
    if (iTrack < song.iTrack) return true;
Repository: xbmc/xbmc
File: xbmc/music/tags/MusicInfoTag.h (C/C++)

Code before:
  CDateTime m_dateAdded;
  CDateTime m_dateUpdated;
  bool m_bCompilation;
  int m_iDuration;
  int m_iTrack;     // consists of the disk number in the high 16 bits, the track number in the low 16bits
  int m_iDbId;
  MediaType m_type; ///< item type "music", "song", "album", "artist"
  bool m_bLoaded;
  float m_Rating;
  int m_Userrating;
  int m_Votes;
  int m_listeners;
  int m_iTimesPlayed;
  int m_iAlbumId;
  int m_iDiscTotal;
  bool m_bBoxset;
  int m_iBPM;
  CAlbum::ReleaseType m_albumReleaseType;
  std::string m_strReleaseStatus;
  int m_samplerate;
  int m_channels;
  int m_bitrate;
  std::string m_stationName;
  std::string m_stationArt; // Used to fetch thumb URL for Shoutcasts
  std::string m_songVideoURL; // link to a video for a song
  chapterMarks m_chapters; // Ch No., name, start time, end time

  EmbeddedArtInfo m_coverArt; ///< art information

  ReplayGain m_replayGain; ///< ReplayGain information
};
}


Review comment (suggestion):
I suggest to name the member `m_chapterMarks` to reflect  its purpose a bit better.

Code after:
  CDateTime m_dateUpdated;
  bool m_bCompilation;
  int m_iDuration;
  int m_iTrack;     // consists of the disk number in the high 16 bits, the track number in the low 16bits
  int m_iDbId;
  MediaType m_type; ///< item type "music", "song", "album", "artist"
  bool m_bLoaded;
  float m_Rating;
  int m_Userrating;
  int m_Votes;
  int m_listeners;
  int m_iTimesPlayed;
  int m_iAlbumId;
  int m_iDiscTotal;
  bool m_bBoxset;
  int m_iBPM;
  CAlbum::ReleaseType m_albumReleaseType;
  std::string m_strReleaseStatus;
  int m_samplerate;
  int m_channels;
  int m_bitrate;
  std::string m_stationName;
  std::string m_stationArt; // Used to fetch thumb URL for Shoutcasts
  std::string m_songVideoURL; // link to a video for a song
  ChapterMarks m_chapters; // Ch No., name, start time, end time

  EmbeddedArtInfo m_coverArt; ///< art information

  ReplayGain m_replayGain; ///< ReplayGain information
};
}
Repository: xbmc/xbmc
File: xbmc/music/tags/MusicInfoTag.cpp (C++)

Code before:
  m_albumReleaseType = releaseType;
}

void CMusicInfoTag::SetType(MediaType_view mediaType)
{
  m_type = mediaType;
}

// This is the Musicbrainz release status tag. See https://musicbrainz.org/doc/Release#Status

void CMusicInfoTag::SetAlbumReleaseStatus(std::string_view ReleaseStatus)
{
  m_strReleaseStatus = ReleaseStatus;
}

void CMusicInfoTag::SetStationArt(std::string_view strStationArt)
{
  m_stationArt = strStationArt;
}

void CMusicInfoTag::SetSongVideoURL(std::string_view songVideoURL)
{
  m_songVideoURL = songVideoURL;
}

void CMusicInfoTag::SetChapterMarks(ChapterMarks& chapters)
{
  m_chapters = chapters;
}

void CMusicInfoTag::SetArtist(const CArtist& artist)
{
  SetArtist(artist.strArtist);
  SetArtistSort(artist.strSortName);
  SetAlbumArtist(artist.strArtist);
  SetAlbumArtistSort(artist.strSortName);
  SetMusicBrainzArtistID({ artist.strMusicBrainzArtistID });
  SetMusicBrainzAlbumArtistID({ artist.strMusicBrainzArtistID });
  SetGenre(artist.genre);
  SetMood(StringUtils::Join(artist.moods, CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_musicItemSeparator));
  SetDateAdded(artist.dateAdded);
  SetDateUpdated(artist.dateUpdated);
  SetDateNew(artist.dateNew);
  SetDatabaseId(artist.idArtist, MediaTypeArtist);

  SetLoaded();
}

void CMusicInfoTag::SetAlbum(const CAlbum& album)
{
  Clear();

Review comment (suggestion):
I agree with copilots comment:
```suggestion
void CMusicInfoTag::SetChapterMarks(const ChapterMarks& chapters)
```

Code after:
  m_albumReleaseType = releaseType;
}

void CMusicInfoTag::SetType(MediaType_view mediaType)
{
  m_type = mediaType;
}

// This is the Musicbrainz release status tag. See https://musicbrainz.org/doc/Release#Status

void CMusicInfoTag::SetAlbumReleaseStatus(std::string_view ReleaseStatus)
{
  m_strReleaseStatus = ReleaseStatus;
}

void CMusicInfoTag::SetStationArt(std::string_view strStationArt)
{
  m_stationArt = strStationArt;
}

void CMusicInfoTag::SetSongVideoURL(std::string_view songVideoURL)
{
  m_songVideoURL = songVideoURL;
}

void CMusicInfoTag::SetChapterMarks(const ChapterMarks& chapters)
{
  m_chapters = chapters;
}

void CMusicInfoTag::SetArtist(const CArtist& artist)
{
  SetArtist(artist.strArtist);
  SetArtistSort(artist.strSortName);
  SetAlbumArtist(artist.strArtist);
  SetAlbumArtistSort(artist.strSortName);
  SetMusicBrainzArtistID({ artist.strMusicBrainzArtistID });
  SetMusicBrainzAlbumArtistID({ artist.strMusicBrainzArtistID });
  SetGenre(artist.genre);
  SetMood(StringUtils::Join(artist.moods, CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_musicItemSeparator));
  SetDateAdded(artist.dateAdded);
  SetDateUpdated(artist.dateUpdated);
  SetDateNew(artist.dateNew);
  SetDatabaseId(artist.idArtist, MediaTypeArtist);

  SetLoaded();
}

void CMusicInfoTag::SetAlbum(const CAlbum& album)
{
  Clear();
Repository: xbmc/xbmc
File: xbmc/video/guilib/VideoActionProcessorBase.h (C/C++)

Code before:
 *  See LICENSES/README.md for more information.
 */

#pragma once

#include "video/guilib/VideoAction.h"

#include <memory>

class CFileItem;

namespace KODI::VIDEO::GUILIB
{
class CVideoActionProcessorBase
{
public:
  explicit CVideoActionProcessorBase(const std::shared_ptr<CFileItem>& item) : m_item(item) {}
  virtual ~CVideoActionProcessorBase() = default;

  bool ProcessDefaultAction();
  bool ProcessAction(Action action);

  bool UserCancelled() const { return m_userCancelled; }
  void SetUserCancelled(bool set) { m_userCancelled = set; }

  std::shared_ptr<CFileItem> GetItem() const { return m_item; }

protected:
  virtual Action GetDefaultAction() = 0;
  virtual bool Process(Action action) = 0;

private:
  CVideoActionProcessorBase() = delete;

  std::shared_ptr<CFileItem> m_item;
  bool m_userCancelled{false};
};
} // namespace KODI::VIDEO::GUILIB


Review comment (suggestion):
I think for const correctness it should be this:
```suggestion
  std::shared_ptr<CFileItem> GetItem() { return m_item; }
  std::shared_ptr<const CFileItem> GetItem() const { return m_item; }
```
This won't compile because of stuff in VideoPlayActionProcessor.cpp which is IMO the correct behavior, e.g. an "active" function like `SetResumeData()` can not be `const`.

Code after:
 *  See LICENSES/README.md for more information.
 */

#pragma once

#include "video/guilib/VideoAction.h"

#include <memory>

class CFileItem;

namespace KODI::VIDEO::GUILIB
{
class CVideoActionProcessorBase
{
public:
  explicit CVideoActionProcessorBase(const std::shared_ptr<CFileItem>& item) : m_item(item) {}
  virtual ~CVideoActionProcessorBase() = default;

  bool ProcessDefaultAction();
  bool ProcessAction(Action action);

  bool GetUserCancelled() const { return m_userCancelled; }
  void SetUserCancelled(bool set) { m_userCancelled = set; }

  std::shared_ptr<CFileItem> GetItem() { return m_item; }
  std::shared_ptr<const CFileItem> GetItem() const { return m_item; }

protected:
  virtual Action GetDefaultAction() = 0;
  virtual bool Process(Action action) = 0;

private:
  CVideoActionProcessorBase() = delete;

  std::shared_ptr<CFileItem> m_item;
  bool m_userCancelled{false};
};
} // namespace KODI::VIDEO::GUILIB
Repository: xbmc/xbmc
File: xbmc/utils/ProgressJob.h (C/C++)

Code before:

  /*!
   \brief Sets the progress of the progress bar to the given value.

   \param[in] currentStep Current step being processed
   \param[in] totalSteps Total steps to be processed
  */
  void SetProgress(int currentStep, int totalSteps) const;

  /*!
   \brief Marks the progress as finished by setting it to 100%.
   */
  void MarkFinished();

  /*!
   \brief Checks if the progress dialog has been cancelled.
   */
  bool IsCancelled() const;

private:
  bool m_modal = false;
  bool m_autoClose = true;
  bool m_updateProgress = true;
  bool m_updateInformation = true;
  CGUIDialogProgressBarHandle* m_progress = nullptr;
  CGUIDialogProgress* m_progressDialog = nullptr;
};


Review comment (refactor):
Alright, and now we can remove init from the different ctors, right?

https://github.com/xbmc/xbmc/blob/master/xbmc/utils/ProgressJob.cpp#L21-L22
https://github.com/xbmc/xbmc/blob/master/xbmc/utils/ProgressJob.cpp#L27

Icing on the cake would be to remove this as well:
https://github.com/xbmc/xbmc/blob/master/xbmc/utils/ProgressJob.cpp#L27

Code after:

  /*!
   \brief Sets the progress of the progress bar to the given value.

   \param[in] currentStep Current step being processed
   \param[in] totalSteps Total steps to be processed
  */
  void SetProgress(int currentStep, int totalSteps) const;

  /*!
   \brief Marks the progress as finished by setting it to 100%.
   */
  void MarkFinished();

  /*!
   \brief Checks if the progress dialog has been cancelled.
   */
  bool IsCancelled() const;

private:
  bool m_modal{false};
  bool m_autoClose{true};
  bool m_updateProgress{true};
  bool m_updateInformation{true};
  CGUIDialogProgressBarHandle* m_progress{nullptr};
  CGUIDialogProgress* m_progressDialog{nullptr};
};
Repository: xbmc/xbmc
File: xbmc/utils/ProgressJob.h (C/C++)

Code before:

  /*!
   \brief Sets the progress of the progress bar to the given value.

   \param[in] currentStep Current step being processed
   \param[in] totalSteps Total steps to be processed
  */
  void SetProgress(int currentStep, int totalSteps) const;

  /*!
   \brief Marks the progress as finished by setting it to 100%.
   */
  void MarkFinished();

  /*!
   \brief Checks if the progress dialog has been cancelled.
   */
  bool IsCancelled() const;

private:
  bool m_modal = false;
  bool m_autoClose = true;
  bool m_updateProgress = true;
  bool m_updateInformation = true;
  CGUIDialogProgressBarHandle* m_progress = nullptr;
  CGUIDialogProgress* m_progressDialog = nullptr;
};


Review comment (bug):
Also, our style guide changed since the above lines were written, and we decided it's better follow it for new code over code consistency, so can you do:

```c++
  CGUIDialogProgressBarHandle* m_progress{nullptr};
```

Sorry for such a nit. Thanks!

Code after:

  /*!
   \brief Sets the progress of the progress bar to the given value.

   \param[in] currentStep Current step being processed
   \param[in] totalSteps Total steps to be processed
  */
  void SetProgress(int currentStep, int totalSteps) const;

  /*!
   \brief Marks the progress as finished by setting it to 100%.
   */
  void MarkFinished();

  /*!
   \brief Checks if the progress dialog has been cancelled.
   */
  bool IsCancelled() const;

private:
  bool m_modal{false};
  bool m_autoClose{true};
  bool m_updateProgress{true};
  bool m_updateInformation{true};
  CGUIDialogProgressBarHandle* m_progress{nullptr};
  CGUIDialogProgress* m_progressDialog{nullptr};
};