[libcalamares] Massage size types to avoid conversion warning
This commit is contained in:
parent
6dc83fb277
commit
35990d9a6b
23
src/libcalamares/compat/Size.h
Normal file
23
src/libcalamares/compat/Size.h
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/* === This file is part of Calamares - <https://calamares.io> ===
|
||||||
|
*
|
||||||
|
* SPDX-FileCopyrightText: 2024 Adriaan de Groot <groot@kde.org>
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
*
|
||||||
|
* Calamares is Free Software: see the License-Identifier above.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#ifndef CALAMARES_COMPAT_SIZE_H
|
||||||
|
#define CALAMARES_COMPAT_SIZE_H
|
||||||
|
|
||||||
|
#include <QVariant>
|
||||||
|
|
||||||
|
namespace Calamares
|
||||||
|
{
|
||||||
|
/* Compatibility of size types (e.g. qsizetype, STL sizes, int) between Qt5 and Qt6 */
|
||||||
|
|
||||||
|
using NumberForTr = int;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -11,6 +11,7 @@
|
|||||||
#include "RequirementsChecker.h"
|
#include "RequirementsChecker.h"
|
||||||
|
|
||||||
#include "compat/Mutex.h"
|
#include "compat/Mutex.h"
|
||||||
|
#include "compat/Size.h"
|
||||||
#include "modulesystem/Module.h"
|
#include "modulesystem/Module.h"
|
||||||
#include "modulesystem/Requirement.h"
|
#include "modulesystem/Requirement.h"
|
||||||
#include "modulesystem/RequirementsModel.h"
|
#include "modulesystem/RequirementsModel.h"
|
||||||
@ -120,7 +121,7 @@ RequirementsChecker::reportProgress()
|
|||||||
{
|
{
|
||||||
cDebug() << "Remaining modules:" << remaining << Logger::DebugList( remainingNames );
|
cDebug() << "Remaining modules:" << remaining << Logger::DebugList( remainingNames );
|
||||||
unsigned int posInterval = ( m_progressTimer->interval() < 0 ) ? 1000 : uint( m_progressTimer->interval() );
|
unsigned int posInterval = ( m_progressTimer->interval() < 0 ) ? 1000 : uint( m_progressTimer->interval() );
|
||||||
QString waiting = tr( "Waiting for %n module(s)…", "@status", remaining );
|
QString waiting = tr( "Waiting for %n module(s)…", "@status", static_cast<Calamares::NumberForTr>(remaining) );
|
||||||
QString elapsed = tr( "(%n second(s))", "@status", m_progressTimeouts * posInterval / 999 );
|
QString elapsed = tr( "(%n second(s))", "@status", m_progressTimeouts * posInterval / 999 );
|
||||||
Q_EMIT requirementsProgress( waiting + QString( " " ) + elapsed );
|
Q_EMIT requirementsProgress( waiting + QString( " " ) + elapsed );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user