improved Mac support

This commit is contained in:
Matt
2018-08-03 09:45:42 +10:00
parent e08b565a2b
commit 76b86ff3fd
4 changed files with 16 additions and 138 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ int main(int argc, char *argv[])
// QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
QApplication a(argc, argv);
QApplication a(argc, argv);
MainWindow w;
w.show();
+13 -1
View File
@@ -323,7 +323,15 @@ bool MainWindow::save_project() {
bool MainWindow::can_close_project() {
if (project_changed) {
int r = QMessageBox::question(this, "Unsaved Project", "This project has changed since it was last saved. Would you like to save it before closing?", QMessageBox::Yes|QMessageBox::No|QMessageBox::Cancel, QMessageBox::Yes);
QMessageBox* m = new QMessageBox(
QMessageBox::Question,
"Unsaved Project",
"This project has changed since it was last saved. Would you like to save it before closing?",
QMessageBox::Yes|QMessageBox::No|QMessageBox::Cancel,
this
);
m->setWindowModality(Qt::WindowModal);
int r = m->exec();
if (r == QMessageBox::Yes) {
return save_project();
} else if (r == QMessageBox::Cancel) {
@@ -426,6 +434,10 @@ void MainWindow::on_actionCrash_triggered()
// intentionally tries to crash the program - mostly used for debugging
Timeline* temp = NULL;
temp->snapped = true;
int* kek;
kek[5] = 69;
kek[99999] = 420;
delete temp;
}
}
+2 -1
View File
@@ -8,7 +8,7 @@ QT += core gui multimedia opengl
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = olive
TARGET = Olive
TEMPLATE = app
# The following define makes your compiler emit warnings if you use
@@ -123,6 +123,7 @@ win32 {
}
mac {
LIBS += -L/usr/local/lib -lavutil -lavformat -lavcodec -lswscale -lswresample
INCLUDEPATH = /usr/local/include
}
-135
View File
@@ -104,183 +104,48 @@
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>36</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../icons/icons.qrc">
<normaloff>:/icons/prev.png</normaloff>
<disabledoff>:/icons/prev-disabled.png</disabledoff>:/icons/prev.png</iconset>
</property>
<property name="iconSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>36</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../icons/icons.qrc">
<normaloff>:/icons/rew.png</normaloff>
<disabledoff>:/icons/rew-disabled.png</disabledoff>:/icons/rew.png</iconset>
</property>
<property name="iconSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>36</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../icons/icons.qrc">
<normaloff>:/icons/play.png</normaloff>
<disabledoff>:/icons/play-disabled.png</disabledoff>:/icons/play.png</iconset>
</property>
<property name="iconSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>36</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normalon>:/icons/ff.png</normalon>
<disabledoff>:/icons/ff-disabled.png</disabledoff>
</iconset>
</property>
<property name="iconSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_5">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>36</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../icons/icons.qrc">
<normaloff>:/icons/next.png</normaloff>
<disabledoff>:/icons/next-disabled.png</disabledoff>:/icons/next.png</iconset>
</property>
<property name="iconSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
</widget>
</item>
<item>