D11548: UI improvements for "Force Full Update" action of problem reporter

Anton Anikin noreply at phabricator.kde.org
Thu Mar 22 09:13:06 UTC 2018


antonanikin added inline comments.

INLINE COMMENTS

> kfunk wrote in problemreportermodel.cpp:111
> Kind of scary to have this regexp in this class here... What's the problem when .patch files are actually being updated? I guess we just get a runtime warning? If so, then I'd rather just remove this regexp here... Or find another way to detect these non-user documents more cleanly.

The main problem with `.patch` files is that the `BackgroundParser` does not emit `parseJobFinished` signal for them. Therefore `m_fullUpdateDocuments` will be not-empty at the end of parsing :(

Quick-and-dirty way to detect such filename without `QRegularExpression` may be somethig like:

  static const QString vcsDiffFilePrefix(QLatin1String("kdevelop_"));
  static const QString vcsDiffFileSuffix(QLatin1String(".patch"));
  
  auto fileName = url.fileName();
  if (fileName.size() == (vcsDiffFilePrefix.size() + vcsDiffFileSuffix.size() + 6) && 
      fileName.startsWith(vcsDiffFilePrefix) &&
      fileName.endsWith(vcsDiffFilePrefix)) {
      // our stuff ...
  }

Also I don't know when such `.patch` files are created - sometimes they are exists, sometimes - not. Do you know some some step-to-reproduce actions for force `.patch` files creation? This can help me to make some tests and find more beautiful solution.

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D11548

To: antonanikin, #kdevelop, kfunk
Cc: kfunk, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180322/4c871784/attachment.html>


More information about the KDevelop-devel mailing list