Skip to content

Commit

Permalink
Fix download progress bug, add openssl dependency on win32
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Ribelotta <[email protected]>
  • Loading branch information
martinribelotta committed Aug 31, 2016
1 parent 9b39ddb commit c1173d3
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 80 deletions.
148 changes: 69 additions & 79 deletions MainWindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -59,86 +59,23 @@
<number>8</number>
</attribute>
<widget class="QWidget" name="dockWidgetContents">
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>1</number>
</property>
<property name="topMargin">
<number>0</number>
<number>1</number>
</property>
<property name="rightMargin">
<number>0</number>
<number>1</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
<number>1</number>
</property>
<item row="0" column="0">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>808</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="3">
<widget class="QToolButton" name="toolButton">
<property name="icon">
<iconset theme="edit-clear" resource="resources.qrc">
<normaloff>:/icon-theme/icon-theme/edit-clear.png</normaloff>:/icon-theme/icon-theme/edit-clear.png</iconset>
</property>
<property name="iconSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QToolButton" name="buildStop">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset theme="process-stop" resource="resources.qrc">
<normaloff>:/icon-theme/icon-theme/process-stop.png</normaloff>:/icon-theme/icon-theme/process-stop.png</iconset>
</property>
<property name="iconSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>8</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0" colspan="4">
<item>
<widget class="QTextBrowser" name="textLog">
<property name="lineWrapMode">
<enum>QTextEdit::NoWrap</enum>
Expand All @@ -154,6 +91,63 @@
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>12</number>
</property>
<property name="leftMargin">
<number>8</number>
</property>
<item>
<widget class="QToolButton" name="buildStop">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset theme="process-stop" resource="resources.qrc">
<normaloff>:/icon-theme/icon-theme/process-stop.png</normaloff>:/icon-theme/icon-theme/process-stop.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="toolButton">
<property name="icon">
<iconset theme="edit-clear" resource="resources.qrc">
<normaloff>:/icon-theme/icon-theme/edit-clear.png</normaloff>:/icon-theme/icon-theme/edit-clear.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
Expand All @@ -167,7 +161,7 @@
<attribute name="dockWidgetArea">
<number>1</number>
</attribute>
<widget class="DocumentView" name="projectView"/>
<widget class="ProjectView" name="projectView"/>
</widget>
<widget class="QToolBar" name="debuggerToolbar">
<property name="windowTitle">
Expand Down Expand Up @@ -382,14 +376,10 @@
<container>1</container>
</customwidget>
<customwidget>
<class>DocumentView</class>
<class>ProjectView</class>
<extends>QWidget</extends>
<header>documentview.h</header>
<header>projectview.h</header>
<container>1</container>
<slots>
<signal>fileOpen(QString)</signal>
<signal>startBuild(QString)</signal>
</slots>
</customwidget>
</customwidgets>
<resources>
Expand Down
5 changes: 5 additions & 0 deletions embedded-ide.pro
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ DESTDIR = build
TARGET = embedded-ide
TEMPLATE = app

win32{
LIBS += -LC:/OpenSSL-Win32/lib -lubsec
INCLUDEPATH += C:/OpenSSL-Win32/include
}

QTSOURCEVIEW_SRC_DIR=qtsourceview/src
include(qtsourceview/src/qsvsh.pri)
#include(qgdb/qgdb.pri)
Expand Down
2 changes: 1 addition & 1 deletion filedownloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class FileDownloaderPrivate {
[entry, this] (quint64 received, quint64 bytesTotal)
{
Q_Q(FileDownloader);
int percent = static_cast<int>(received*100/bytesTotal);
int percent = bytesTotal? static_cast<int>(received*100/bytesTotal) : 0;
emit q->downloadProgress(entry.url, percent);
});
QObject::connect(reply, &QNetworkReply::finished,
Expand Down
3 changes: 3 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
#include "mainwindow.h"
#include <QApplication>
#include <QtDebug>
#include <QSslSocket>

extern void adjustPath();

int main(int argc, char *argv[])
{
QApplication a(argc, argv);
qDebug() << "Support ssl " << QSslSocket::supportsSsl();
QCoreApplication::setOrganizationName("none");
QCoreApplication::setOrganizationDomain("none.unknown.com");
QCoreApplication::setApplicationName("embedded IDE");
Expand Down

0 comments on commit c1173d3

Please sign in to comment.