Fix building.
This commit is contained in:
parent
cd176bfc14
commit
a4f2eefacd
|
@ -34,6 +34,13 @@
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
||||||
#include "../vtools/dialogs/dialogtoolbox.h"
|
#include "../vtools/dialogs/dialogtoolbox.h"
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
#include "../vmisc/vtextcodec.h"
|
||||||
|
#else
|
||||||
|
#include <QTextCodec>
|
||||||
|
using VTextCodec = QTextCodec;
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QShowEvent>
|
#include <QShowEvent>
|
||||||
|
|
||||||
|
@ -548,3 +555,9 @@ template <class T> void DialogKnownMeasurementsCSVColumns::SaveColum(QComboBox *
|
||||||
ShowImportPreview();
|
ShowImportPreview();
|
||||||
CheckStatus();
|
CheckStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogKnownMeasurementsCSVColumns::SetCodec(VTextCodec *codec)
|
||||||
|
{
|
||||||
|
m_codec = codec;
|
||||||
|
}
|
||||||
|
|
|
@ -32,10 +32,7 @@
|
||||||
|
|
||||||
class QxtCsvModel;
|
class QxtCsvModel;
|
||||||
class QComboBox;
|
class QComboBox;
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
class VTextCodec;
|
class VTextCodec;
|
||||||
#endif
|
|
||||||
|
|
||||||
enum class KnownMeasurementsColumns : qint8
|
enum class KnownMeasurementsColumns : qint8
|
||||||
{
|
{
|
||||||
|
@ -129,10 +126,4 @@ inline void DialogKnownMeasurementsCSVColumns::SetSeparator(const QChar &separat
|
||||||
m_separator = separator;
|
m_separator = separator;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
inline void DialogKnownMeasurementsCSVColumns::SetCodec(VTextCodec *codec)
|
|
||||||
{
|
|
||||||
m_codec = codec;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // DIALOGKNOWNMEASUREMENTSCSVCOLUMNS_H
|
#endif // DIALOGKNOWNMEASUREMENTSCSVCOLUMNS_H
|
||||||
|
|
|
@ -26,14 +26,21 @@
|
||||||
**
|
**
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
#include "dialogmeasurementscsvcolumns.h"
|
#include "dialogmeasurementscsvcolumns.h"
|
||||||
|
#include "../vmisc/qxtcsvmodel.h"
|
||||||
#include "ui_dialogmeasurementscsvcolumns.h"
|
#include "ui_dialogmeasurementscsvcolumns.h"
|
||||||
|
|
||||||
#include "../vmisc/qxtcsvmodel.h"
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
||||||
#include "../vmisc/backport/qoverload.h"
|
#include "../vmisc/backport/qoverload.h"
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
||||||
#include "../vtools/dialogs/dialogtoolbox.h"
|
#include "../vtools/dialogs/dialogtoolbox.h"
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
#include "../vmisc/vtextcodec.h"
|
||||||
|
#else
|
||||||
|
#include <QTextCodec>
|
||||||
|
using VTextCodec = QTextCodec;
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QShowEvent>
|
#include <QShowEvent>
|
||||||
|
|
||||||
|
@ -897,3 +904,9 @@ template <class T> void DialogMeasurementsCSVColumns::SaveColum(QComboBox *contr
|
||||||
ShowImportPreview();
|
ShowImportPreview();
|
||||||
CheckStatus();
|
CheckStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogMeasurementsCSVColumns::SetCodec(VTextCodec *codec)
|
||||||
|
{
|
||||||
|
m_codec = codec;
|
||||||
|
}
|
||||||
|
|
|
@ -33,21 +33,18 @@
|
||||||
#include "../vformat/vdimensions.h"
|
#include "../vformat/vdimensions.h"
|
||||||
|
|
||||||
class QxtCsvModel;
|
class QxtCsvModel;
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
class VTextCodec;
|
class VTextCodec;
|
||||||
#endif
|
|
||||||
|
|
||||||
enum class IndividualMeasurementsColumns: qint8
|
enum class IndividualMeasurementsColumns : qint8
|
||||||
{
|
{
|
||||||
Name = 0,
|
Name = 0,
|
||||||
Value = 1,
|
Value = 1,
|
||||||
FullName = 2, // optional
|
FullName = 2, // optional
|
||||||
Description = 3, // optional
|
Description = 3, // optional
|
||||||
LAST_DO_NOT_USE = 4
|
LAST_DO_NOT_USE = 4
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class MultisizeMeasurementsColumns: qint8
|
enum class MultisizeMeasurementsColumns : qint8
|
||||||
{
|
{
|
||||||
Name = 0,
|
Name = 0,
|
||||||
BaseValue = 1,
|
BaseValue = 1,
|
||||||
|
@ -59,8 +56,8 @@ enum class MultisizeMeasurementsColumns: qint8
|
||||||
LAST_DO_NOT_USE = 7
|
LAST_DO_NOT_USE = 7
|
||||||
};
|
};
|
||||||
|
|
||||||
|
namespace Ui
|
||||||
namespace Ui {
|
{
|
||||||
class DialogMeasurementsCSVColumns;
|
class DialogMeasurementsCSVColumns;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +78,7 @@ public:
|
||||||
void SetCodec(VTextCodec *codec);
|
void SetCodec(VTextCodec *codec);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void changeEvent(QEvent* event) override;
|
void changeEvent(QEvent *event) override;
|
||||||
void showEvent(QShowEvent *event) override;
|
void showEvent(QShowEvent *event) override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
@ -117,8 +114,7 @@ private:
|
||||||
void ShowInputPreview();
|
void ShowInputPreview();
|
||||||
void ShowImportPreview();
|
void ShowImportPreview();
|
||||||
|
|
||||||
template <class T>
|
template <class T> void HackWidget(T **widget);
|
||||||
void HackWidget(T **widget);
|
|
||||||
void HackColumnControls();
|
void HackColumnControls();
|
||||||
|
|
||||||
void RetranslateLabels();
|
void RetranslateLabels();
|
||||||
|
@ -127,11 +123,9 @@ private:
|
||||||
|
|
||||||
void CheckStatus();
|
void CheckStatus();
|
||||||
|
|
||||||
template <class T>
|
template <class T> auto ColumnValid(T column) const -> bool;
|
||||||
auto ColumnValid(T column) const -> bool;
|
|
||||||
|
|
||||||
template <class T>
|
template <class T> void SaveColum(QComboBox *control, T column);
|
||||||
void SaveColum(QComboBox *control, T column);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -152,10 +146,4 @@ inline void DialogMeasurementsCSVColumns::SetSeparator(const QChar &separator)
|
||||||
m_separator = separator;
|
m_separator = separator;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
inline void DialogMeasurementsCSVColumns::SetCodec(VTextCodec *codec)
|
|
||||||
{
|
|
||||||
m_codec = codec;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // DIALOGMEASUREMENTSCSVCOLUMNS_H
|
#endif // DIALOGMEASUREMENTSCSVCOLUMNS_H
|
||||||
|
|
|
@ -1465,7 +1465,7 @@ void TKMMainWindow::SaveImageTitle()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MAC)
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void TMainWindow::OpenAt(QAction *where)
|
void TKMainWindow::OpenAt(QAction *where)
|
||||||
{
|
{
|
||||||
const QString path = m_curFile.left(m_curFile.indexOf(where->text())) + where->text();
|
const QString path = m_curFile.left(m_curFile.indexOf(where->text())) + where->text();
|
||||||
if (path == m_curFile)
|
if (path == m_curFile)
|
||||||
|
|
|
@ -3,11 +3,6 @@ TRANSLATIONS_PATH = $${PWD}/../../share/translations
|
||||||
# Add to this variable all translation files that you want install with program.
|
# Add to this variable all translation files that you want install with program.
|
||||||
# For generation *.qm file first you need create *.ts.
|
# For generation *.qm file first you need create *.ts.
|
||||||
# See section TRANSLATIONS in file ../../share/translations/translations.pro.
|
# See section TRANSLATIONS in file ../../share/translations/translations.pro.
|
||||||
# See section TRANSLATIONS in file ../../share/translations/measurements.pro.
|
|
||||||
|
|
||||||
PMSYSTEMS += \
|
|
||||||
p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21 p22 p23 p24 p25 p26 p27 p28 p29 p30 \
|
|
||||||
p31 p32 p33 p34 p35 p36 p37 p38 p39 p40 p41 p42 p43 p44 p45 p46 p47 p48 p49 p50 p51 p52 p53 p54 p998
|
|
||||||
|
|
||||||
# An example of using LOCALES="de_DE nl_NL"
|
# An example of using LOCALES="de_DE nl_NL"
|
||||||
isEmpty(LOCALES){
|
isEmpty(LOCALES){
|
||||||
|
@ -38,12 +33,6 @@ for(lang, LANGUAGES) {
|
||||||
INSTALL_TRANSLATIONS += $${TRANSLATIONS_PATH}/valentina_$${lang}.qm
|
INSTALL_TRANSLATIONS += $${TRANSLATIONS_PATH}/valentina_$${lang}.qm
|
||||||
}
|
}
|
||||||
|
|
||||||
for(lang, LANGUAGES) {
|
|
||||||
for(sys, PMSYSTEMS) {
|
|
||||||
INSTALL_TRANSLATIONS += $${TRANSLATIONS_PATH}/measurements_$${sys}_$${lang}.qm
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Some systems use special name for lrelease. For example opensuse 13.2 has lrelease-qt5.
|
# Some systems use special name for lrelease. For example opensuse 13.2 has lrelease-qt5.
|
||||||
isEmpty(LRELEASE){
|
isEmpty(LRELEASE){
|
||||||
win32{
|
win32{
|
||||||
|
|
|
@ -73,7 +73,7 @@ using namespace bpstd::literals::chrono_literals;
|
||||||
#include "vscenestylesheet.h"
|
#include "vscenestylesheet.h"
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 4, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(6, 4, 0)
|
||||||
#include "../vmisc/compatibility.h"
|
#include "../compatibility.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using namespace Qt::Literals::StringLiterals;
|
using namespace Qt::Literals::StringLiterals;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user