qt5-11.patch 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. diff -Nuar a/src/convertDlg.cpp b/src/convertDlg.cpp
  2. --- a/src/convertDlg.cpp 2016-02-01 05:55:55.000000000 +0200
  3. +++ b/src/convertDlg.cpp 2018-11-14 11:16:21.000000000 +0300
  4. @@ -25,6 +25,7 @@
  5. #include <QFileDialog>
  6. #include <QMimeType>
  7. #include <QMimeDatabase>
  8. +#include <QStyle>
  9. //ImageMagick
  10. #include <Magick++.h>
  11. @@ -61,11 +62,11 @@
  12. QString writeFilter = QString("*%1|%5 (%1)\n*%2|%6 (%2)\n*%3 *%4|%7 (%3 %4)").arg(".png", ".tga", ".jpg", ".jpeg", db.mimeTypeForName("image/png").comment(), db.mimeTypeForName("image/x-tga").comment(), db.mimeTypeForName("image/jpeg").comment());
  13. ui->kurlrequester_image->setMode(KFile::File | KFile::ExistingOnly | KFile::LocalOnly);
  14. - ui->kurlrequester_image->fileDialog()->setAcceptMode(QFileDialog::AcceptOpen);
  15. - ui->kurlrequester_image->fileDialog()->setNameFilter(readFilter);
  16. + ui->kurlrequester_image->setAcceptMode(QFileDialog::AcceptOpen);
  17. + ui->kurlrequester_image->setFilter(readFilter);
  18. ui->kurlrequester_converted->setMode(KFile::File | KFile::LocalOnly);
  19. - ui->kurlrequester_converted->fileDialog()->setAcceptMode(QFileDialog::AcceptSave);
  20. - ui->kurlrequester_converted->fileDialog()->setNameFilter(writeFilter);
  21. + ui->kurlrequester_converted->setAcceptMode(QFileDialog::AcceptSave);
  22. + ui->kurlrequester_converted->setFilter(writeFilter);
  23. }
  24. ConvertDialog::~ConvertDialog()
  25. {
  26. @@ -96,11 +97,11 @@
  27. }
  28. Magick::Geometry resolution(ui->spinBox_width->value(), ui->spinBox_height->value());
  29. resolution.aspect(ui->checkBox_force->isChecked());
  30. - Magick::Image image(std::string(ui->kurlrequester_image->url().toLocalFile().toUtf8()));
  31. + Magick::Image image(ui->kurlrequester_image->url().toLocalFile().toStdString());
  32. image.zoom(resolution);
  33. image.depth(8);
  34. image.classType(Magick::DirectClass);
  35. - image.write(std::string(ui->kurlrequester_converted->url().toLocalFile().toUtf8()));
  36. + image.write(ui->kurlrequester_converted->url().toLocalFile().toStdString());
  37. if (ui->checkBox_wallpaper->isChecked()) {
  38. emit splashImageCreated(ui->kurlrequester_converted->url().toLocalFile());
  39. }
  40. diff -Nuar a/src/userDlg.cpp b/src/userDlg.cpp
  41. --- a/src/userDlg.cpp 2016-02-01 05:55:55.000000000 +0200
  42. +++ b/src/userDlg.cpp 2018-11-14 11:14:53.000000000 +0300
  43. @@ -22,6 +22,8 @@
  44. #include <KMessageBox>
  45. //Qt
  46. #include <QPushButton>
  47. +#include <QStyle>
  48. +#include <QRegExpValidator>
  49. //Ui
  50. #include "ui_userDlg.h"
  51. @@ -100,4 +102,4 @@
  52. return true;
  53. else
  54. return false;
  55. -}
  56. \ Dosya sonunda yenisatır yok.
  57. +}