Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

explicitly convert QStrings to QFileInfos #4293

Merged
merged 1 commit into from
Sep 17, 2021

Conversation

Be-ing
Copy link
Contributor

@Be-ing Be-ing commented Sep 17, 2021

required by Qt6

../src/controllers/dlgprefcontroller.cpp: In member function ‘virtual void DlgPrefController::slotApply()’:
../src/controllers/dlgprefcontroller.cpp:522:13: error: cannot convert ‘QString’ to ‘const QFileInfo&’
  522 |             mappingPath, QDir(resourceMappingsPath(m_pConfig)));
      |             ^~~~~~~~~~~
      |             |
      |             QString
In file included from ../src/controllers/hid/legacyhidcontrollermappingfilehandler.h:3,
                 from ../src/controllers/hid/legacyhidcontrollermapping.h:3,
                 from ../src/controllers/controllermappingtablemodel.h:10,
                 from ../src/controllers/controllerinputmappingtablemodel.h:8,
                 from ../src/controllers/dlgprefcontroller.h:7,
                 from ../src/controllers/dlgprefcontroller.cpp:1:
../src/controllers/legacycontrollermappingfilehandler.h:17:82: note:   initializing argument 1 of ‘static std::shared_ptr<LegacyControllerMapping> LegacyControllerMappingFileHandler::loadMapping(const QFileInfo&, const QDir&)’
   17 |     static std::shared_ptr<LegacyControllerMapping> loadMapping(const QFileInfo& mappingFile,
      |                                                                 ~~~~~~~~~~~~~~~~~^~~~~~~~~~~
../src/controllers/dlgprefcontroller.cpp: In member function ‘void DlgPrefController::slotMappingSelected(int)’:
../src/controllers/dlgprefcontroller.cpp:584:21: error: cannot convert ‘QString’ to ‘const QFileInfo&’
  584 |                     mappingPath, QDir(resourceMappingsPath(m_pConfig)));
      |                     ^~~~~~~~~~~
      |                     |
      |                     QString
In file included from ../src/controllers/hid/legacyhidcontrollermappingfilehandler.h:3,
                 from ../src/controllers/hid/legacyhidcontrollermapping.h:3,
                 from ../src/controllers/controllermappingtablemodel.h:10,
                 from ../src/controllers/controllerinputmappingtablemodel.h:8,
                 from ../src/controllers/dlgprefcontroller.h:7,
                 from ../src/controllers/dlgprefcontroller.cpp:1:
../src/controllers/legacycontrollermappingfilehandler.h:17:82: note:   initializing argument 1 of ‘static std::shared_ptr<LegacyControllerMapping> LegacyControllerMappingFileHandler::loadMapping(const QFileInfo&, const QDir&)’
   17 |     static std::shared_ptr<LegacyControllerMapping> loadMapping(const QFileInfo& mappingFile,
      |                                                                 ~~~~~~~~~~~~~~~~~^~~~~~~~~~~

required by Qt6
../src/controllers/dlgprefcontroller.cpp: In member function ‘virtual void DlgPrefController::slotApply()’:
../src/controllers/dlgprefcontroller.cpp:522:13: error: cannot convert ‘QString’ to ‘const QFileInfo&’
  522 |             mappingPath, QDir(resourceMappingsPath(m_pConfig)));
      |             ^~~~~~~~~~~
      |             |
      |             QString
In file included from ../src/controllers/hid/legacyhidcontrollermappingfilehandler.h:3,
                 from ../src/controllers/hid/legacyhidcontrollermapping.h:3,
                 from ../src/controllers/controllermappingtablemodel.h:10,
                 from ../src/controllers/controllerinputmappingtablemodel.h:8,
                 from ../src/controllers/dlgprefcontroller.h:7,
                 from ../src/controllers/dlgprefcontroller.cpp:1:
../src/controllers/legacycontrollermappingfilehandler.h:17:82: note:   initializing argument 1 of ‘static std::shared_ptr<LegacyControllerMapping> LegacyControllerMappingFileHandler::loadMapping(const QFileInfo&, const QDir&)’
   17 |     static std::shared_ptr<LegacyControllerMapping> loadMapping(const QFileInfo& mappingFile,
      |                                                                 ~~~~~~~~~~~~~~~~~^~~~~~~~~~~
../src/controllers/dlgprefcontroller.cpp: In member function ‘void DlgPrefController::slotMappingSelected(int)’:
../src/controllers/dlgprefcontroller.cpp:584:21: error: cannot convert ‘QString’ to ‘const QFileInfo&’
  584 |                     mappingPath, QDir(resourceMappingsPath(m_pConfig)));
      |                     ^~~~~~~~~~~
      |                     |
      |                     QString
In file included from ../src/controllers/hid/legacyhidcontrollermappingfilehandler.h:3,
                 from ../src/controllers/hid/legacyhidcontrollermapping.h:3,
                 from ../src/controllers/controllermappingtablemodel.h:10,
                 from ../src/controllers/controllerinputmappingtablemodel.h:8,
                 from ../src/controllers/dlgprefcontroller.h:7,
                 from ../src/controllers/dlgprefcontroller.cpp:1:
../src/controllers/legacycontrollermappingfilehandler.h:17:82: note:   initializing argument 1 of ‘static std::shared_ptr<LegacyControllerMapping> LegacyControllerMappingFileHandler::loadMapping(const QFileInfo&, const QDir&)’
   17 |     static std::shared_ptr<LegacyControllerMapping> loadMapping(const QFileInfo& mappingFile,
      |                                                                 ~~~~~~~~~~~~~~~~~^~~~~~~~~~~
@uklotzde
Copy link
Contributor

This is not documented as I already checked and mentioned. Strange decision. But we have to live with it.

Copy link
Contributor

@uklotzde uklotzde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@uklotzde uklotzde merged commit df1e179 into mixxxdj:main Sep 17, 2021
@Be-ing Be-ing deleted the qfileinfo_qt6 branch September 17, 2021 21:05
@daschuer
Copy link
Member

The explanation can be found in this commit message:
qt/qtbase@784a290

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants