Skip to content

explicitly convert QStrings to QFileInfos#4293

Merged
uklotzde merged 1 commit intomixxxdj:mainfrom
Be-ing:qfileinfo_qt6
Sep 17, 2021
Merged

explicitly convert QStrings to QFileInfos#4293
uklotzde merged 1 commit intomixxxdj:mainfrom
Be-ing:qfileinfo_qt6

Conversation

@Be-ing
Copy link
Copy Markdown
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
Copy Markdown
Contributor

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

Copy link
Copy Markdown
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
Copy Markdown
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