Skip to content

Commit

Permalink
WIP: Migration to Qt6
Browse files Browse the repository at this point in the history
Restore default options on QMainWindow
  • Loading branch information
glpzzz committed Jun 9, 2024
1 parent a9cf6c0 commit 2f9a152
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 54 deletions.
5 changes: 1 addition & 4 deletions ui/convertlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,10 +588,7 @@ void ConvertList::task_finished_slot(int exitcode)
? Task::FINISHED
: Task::FAILED;

if (exitcode != 0)
m_current_task->errmsg = m_converter->errorMessage();
else
m_current_task->errmsg = "";
m_current_task->errmsg = exitcode != 0 ? m_converter->errorMessage() : QString::fromLatin1("");

refresh_progressbar(m_current_task);

Expand Down
4 changes: 1 addition & 3 deletions ui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,9 +540,7 @@ void MainWindow::add_files(const QStringList &fileList)

void MainWindow::setup_widgets()
{
// list
ui->layoutListPlaceholder->addWidget(m_list);
m_list->adjustSize();
ui->centralWidget->layout()->addWidget(m_list);
m_list->setContextMenuPolicy(Qt::CustomContextMenu);

this->m_elapsedTimeLabel->clear();
Expand Down
57 changes: 10 additions & 47 deletions ui/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>990</width>
<height>450</height>
<width>450</width>
<height>250</height>
</rect>
</property>
<property name="minimumSize">
Expand All @@ -26,12 +26,6 @@
<iconset resource="../images.qrc">
<normaloff>:/app/icons/mystiq.svg</normaloff>:/app/icons/mystiq.svg</iconset>
</property>
<property name="autoFillBackground">
<bool>true</bool>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="iconSize">
<size>
<width>22</width>
Expand All @@ -53,51 +47,29 @@
<widget class="QWidget" name="centralWidget">
<layout class="QGridLayout" name="gridLayout_3">
<property name="leftMargin">
<number>1</number>
<number>0</number>
</property>
<property name="topMargin">
<number>1</number>
<number>0</number>
</property>
<property name="rightMargin">
<number>1</number>
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="0" colspan="2">
<layout class="QVBoxLayout" name="layoutListPlaceholder">
<property name="spacing">
<number>0</number>
</property>
<property name="sizeConstraint">
<enum>QLayout::SetMaximumSize</enum>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
</layout>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>990</width>
<height>29</height>
<width>450</width>
<height>23</height>
</rect>
</property>
<property name="nativeMenuBar">
Expand Down Expand Up @@ -179,22 +151,13 @@
<bool>false</bool>
</property>
<property name="allowedAreas">
<set>Qt::LeftToolBarArea</set>
</property>
<property name="iconSize">
<size>
<width>25</width>
<height>25</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonIconOnly</enum>
<set>Qt::TopToolBarArea</set>
</property>
<property name="floatable">
<bool>true</bool>
<bool>false</bool>
</property>
<attribute name="toolBarArea">
<enum>LeftToolBarArea</enum>
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak">
<bool>false</bool>
Expand Down

0 comments on commit 2f9a152

Please sign in to comment.