Skip to content

Commit

Permalink
eliminate compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
DSCaskey committed Nov 18, 2024
1 parent b30abb6 commit cde05e5
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 26 deletions.
4 changes: 0 additions & 4 deletions src/app/seamly2d/dialogs/pieces_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,6 @@ void PiecesWidget::cellDoubleClicked(int row, int column)
void PiecesWidget::fillTable(const QHash<quint32, VPiece> *pieces)
{
ui->tableWidget->blockSignals(true);

const int selectedRow = ui->tableWidget->currentRow();
ui->tableWidget->clearContents();
ui->tableWidget->setColumnCount(5);
ui->tableWidget->setRowCount(pieces->size());
Expand Down Expand Up @@ -425,9 +423,7 @@ void PiecesWidget::fillTable(const QHash<quint32, VPiece> *pieces)
ui->tableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::Fixed);
ui->tableWidget->resizeColumnsToContents();
ui->tableWidget->resizeRowsToContents();
//ui->tableWidget->setCurrentCell(selectedRow, 0);
ui->tableWidget->setSortingEnabled(true);
//ui->tableWidget->clearSelection();
ui->tableWidget->blockSignals(false);
}

Expand Down
9 changes: 4 additions & 5 deletions src/app/seamly2d/dialogs/welcome_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ SeamlyWelcomeDialog::SeamlyWelcomeDialog(QWidget *parent)
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);

//-------------------- Units setup
initUnits(MeasurementsType::Individual);
initUnits();

//-------------------- Decimal separator setup
ui->separator_CheckBox->setText(tr("User locale") + QString(" (%1)").arg(QLocale().decimalPoint()));
Expand Down Expand Up @@ -112,7 +112,7 @@ void SeamlyWelcomeDialog::apply()

//---------------------------------------------------------------------------------------------------------------------
// @brief changeEvent handle event changes
// @param type event type
//---------------------------------------------------------------------------------------------------------------------
void SeamlyWelcomeDialog::changeEvent(QEvent *event)
{
if (event->type() == QEvent::LanguageChange)
Expand All @@ -135,11 +135,10 @@ void SeamlyWelcomeDialog::seperatorChanged()
ui->separator_CheckBox->setText(tr("User locale") + QString(" (%1)").arg(seperator));
}


//---------------------------------------------------------------------------------------------------------------------
// @brief initUnits initinailize the units combobox
// @param type measurment type
void SeamlyWelcomeDialog::initUnits(const MeasurementsType &type)
//---------------------------------------------------------------------------------------------------------------------
void SeamlyWelcomeDialog::initUnits()
{
ui->units_ComboBox->addItem(tr("Centimeters"), unitCM);
ui->units_ComboBox->addItem(tr("Millimeters"), unitMM);
Expand Down
2 changes: 1 addition & 1 deletion src/app/seamly2d/dialogs/welcome_dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class SeamlyWelcomeDialog : public QDialog
bool m_selectionSoundChanged;
VSettings *settings;

void initUnits(const MeasurementsType &type);
void initUnits();
};

#endif // WELCOME_DIALOG_H
4 changes: 0 additions & 4 deletions src/app/seamly2d/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,6 @@ class LayoutToolBox;
class QToolButton;
class QDoubleSpinBox;
class QFontComboBox;

class DraftImage;
class ImageItem;

class MouseCoordinates;
class PenToolBar;

Expand Down
6 changes: 3 additions & 3 deletions src/app/seamlyme/dialogs/me_welcome_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ SeamlyMeWelcomeDialog::SeamlyMeWelcomeDialog(QWidget *parent)
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);

//-------------------- Units setup
initUnits(MeasurementsType::Individual);
initUnits();

//-------------------- Decimal separator setup
ui->separator_CheckBox->setText(tr("User locale") + QString(" (%1)").arg(QLocale().decimalPoint()));
Expand Down Expand Up @@ -119,8 +119,8 @@ void SeamlyMeWelcomeDialog::seperatorChanged()

//---------------------------------------------------------------------------------------------------------------------
// @brief initUnits initinailize the units combobox
// @param type measurment type
void SeamlyMeWelcomeDialog::initUnits(const MeasurementsType &type)
//---------------------------------------------------------------------------------------------------------------------
void SeamlyMeWelcomeDialog::initUnits()
{
ui->units_ComboBox->addItem(tr("Centimeters"), unitCM);
ui->units_ComboBox->addItem(tr("Millimeters"), unitMM);
Expand Down
2 changes: 1 addition & 1 deletion src/app/seamlyme/dialogs/me_welcome_dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class SeamlyMeWelcomeDialog : public QDialog
bool m_langChanged;
VSeamlyMeSettings *settings;

void initUnits(const MeasurementsType &type);
void initUnits();
};

#endif // ME_WELCOME_DIALOG_H
3 changes: 0 additions & 3 deletions src/libs/tools/tools.pro
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ OBJECTS_DIR = obj
# Directory for files created uic
UI_DIR = uic

# Set using ccache. Function enable_ccache() defined in common.pri.
$$enable_ccache()

INCLUDEPATH += $$PWD/../vpatterndb

include(warnings.pri)
Expand Down
2 changes: 0 additions & 2 deletions src/libs/vmisc/share/resources/icon.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@
<file>icon/160x64/properties.png</file>
<file>icon/160x64/seam_allowance.png</file>
<file>icon/32x32/color_picker.png</file>
<file>icon/32x32/lock_off.png</file>
<file>icon/32x32/lock_on.png</file>
<file>icon/32x32/checkmark.png</file>
<file>icon/32x32/[email protected]</file>
<file>icon/64x64/rotation.png</file>
Expand Down
3 changes: 0 additions & 3 deletions src/libs/vtools/tools/pattern_piece_tool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1044,9 +1044,6 @@ QVariant PatternPieceTool::itemChange(QGraphicsItem::GraphicsItemChange change,
if (VMainGraphicsView *view = qobject_cast<VMainGraphicsView *>(viewList.at(0)))
{
const qreal scale = sceneScale(scene());
const int xmargin = 50;
const int ymargin = 50;

const QRectF viewRect = VMainGraphicsView::SceneVisibleArea(view);
const QRectF itemRect = mapToScene(boundingRect()|childrenBoundingRect()).boundingRect();

Expand Down

0 comments on commit cde05e5

Please sign in to comment.