Compare commits
18 Commits
b1449ebcf6
...
bc10f29204
Author | SHA1 | Date |
---|---|---|
Rachel Fae Fox (foxiepaws) | bc10f29204 | |
Rachel Fae Fox (foxiepaws) | 662d12b79b | |
Rachel Fae Fox (foxiepaws) | 87e3fa887e | |
Rachel Fae Fox (foxiepaws) | f3e48ade3c | |
Rachel Fae Fox (foxiepaws) | 3ef8f61c4d | |
Rachel Fae Fox (foxiepaws) | 9460490bce | |
Rachel Fae Fox (foxiepaws) | 69215761d9 | |
Rachel Fae Fox | 5e2b0ea970 | |
Rachel Fae Fox | 0fe9261d1d | |
Rachel Fae Fox | bd6041d1e2 | |
Rachel Fae Fox | 138600bf36 | |
Rachel Fae Fox | 30cd64d942 | |
Rachel Fae Fox | dfbd976ef1 | |
Rachel Fae Fox (foxiepaws) | 069f2971ce | |
Rachel Fae Fox (foxiepaws) | 55b71f449f | |
Rachel Fae Fox (foxiepaws) | 713d952cef | |
Rachel Fae Fox (foxiepaws) | a95df29d8f | |
Rachel Fae Fox (foxiepaws) | fe0a5e2096 |
|
@ -0,0 +1,24 @@
|
|||
pipeline {
|
||||
agent any
|
||||
stages {
|
||||
stage('Clean Up') {
|
||||
steps {
|
||||
sh '''cd xybrid
|
||||
make clean || true
|
||||
rm Makefile || true'''
|
||||
}
|
||||
}
|
||||
stage('qmake') {
|
||||
steps {
|
||||
sh '''cd xybrid
|
||||
qmake'''
|
||||
}
|
||||
}
|
||||
stage('Make') {
|
||||
steps {
|
||||
sh '''cd xybrid
|
||||
make -j 17'''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -101,13 +101,14 @@ namespace {
|
|||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
// for clang on freebsd (and possibly other non-apple llvm sources) it seems we need to specify more.
|
||||
// wave function list(s)
|
||||
const constexpr std::array waveFunc = {
|
||||
const constexpr std::array<double(*)(double,double,double),3> waveFunc = {
|
||||
&oscSaw,
|
||||
&oscSine,
|
||||
&oscPulse,
|
||||
};
|
||||
const std::array waveName = {
|
||||
const std::array<QString,3> waveName = {
|
||||
qs("saw"),
|
||||
qs("sine"),
|
||||
qs("pulse"),
|
||||
|
|
|
@ -22,9 +22,10 @@ using namespace Xybrid::Editing;
|
|||
|
||||
#include <QMenu>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "util/macos_urlhelper.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
|
||||
SampleListModel::SampleListModel(QObject* parent, MainWindow* window) : QAbstractItemModel (parent) {
|
||||
this->window = window;
|
||||
root = std::make_shared<DirectoryNode>();
|
||||
|
@ -223,6 +224,7 @@ bool SampleListModel::canDropMimeData(const QMimeData *data, Qt::DropAction acti
|
|||
return data->hasUrls() || data->hasFormat("xybrid-internal/x-sample-entry-move");
|
||||
}
|
||||
|
||||
|
||||
bool SampleListModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row [[maybe_unused]], int column [[maybe_unused]], const QModelIndex &parent [[maybe_unused]]) {
|
||||
if (data->hasUrls()) {
|
||||
if (action == Qt::IgnoreAction) return true; // can accept type
|
||||
|
@ -232,7 +234,16 @@ bool SampleListModel::dropMimeData(const QMimeData *data, Qt::DropAction action,
|
|||
if (!tdn->isDirectory()) tdn = tdn->parent;
|
||||
QString p = tdn->path();
|
||||
|
||||
|
||||
QList<QUrl> urls = data->urls();
|
||||
#ifdef Q_OS_MAC
|
||||
QList<QUrl> localUrls;
|
||||
foreach (const QUrl &url, urls) {
|
||||
QUrl localUrl = fromNSUrl(url);
|
||||
localUrls.append(localUrl);
|
||||
urls = localUrls;
|
||||
}
|
||||
#endif
|
||||
bool success = false;
|
||||
for (auto u : urls) {
|
||||
if (!u.isLocalFile()) continue;
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#ifdef __APPLE__
|
||||
#ifndef MACOS_URLHELPER_H
|
||||
#define MACOS_URLHELPER_H
|
||||
|
||||
#include <QUrl>
|
||||
|
||||
QUrl fromNSUrl(const QUrl &url);
|
||||
|
||||
#endif // MACOS_URLHELPER_H
|
||||
#endif
|
|
@ -0,0 +1,11 @@
|
|||
#ifdef __APPLE__
|
||||
#include "macos_urlhelper.h"
|
||||
#include <Foundation/Foundation.h>
|
||||
|
||||
QUrl fromNSUrl(const QUrl &url) {
|
||||
NSURL *nsUrl = url.toNSURL();
|
||||
NSString *path = nsUrl.path;
|
||||
QString qtString = QString::fromNSString(path);
|
||||
return QUrl::fromLocalFile(qtString);
|
||||
}
|
||||
#endif
|
|
@ -37,17 +37,25 @@ HEADERS += $$files(*.h, true) \
|
|||
FORMS += $$files(*.ui, true)
|
||||
RESOURCES += res/resources.qrc
|
||||
|
||||
unix:!macx {
|
||||
|
||||
|
||||
|
||||
freebsd-clang {
|
||||
DEFINES += WITH_BOOST
|
||||
LIBS += -lboost_math_tr1
|
||||
}
|
||||
|
||||
macx: {
|
||||
DEFINES += WITH_BOOST
|
||||
LIBS += -L/usr/local/Cellar/boost/1.70.0/lib/ -lboost_math_tr1
|
||||
LIBS += -framework OpenGL
|
||||
LIBS += -framework Foundation
|
||||
SOURCES += util/macos_urlhelper.mm
|
||||
HEADERS += util/macos_urlhelper.h
|
||||
QMAKE_CXXFLAGS += -I/usr/local/Cellar/boost/1.70.0/include/
|
||||
}
|
||||
|
||||
|
||||
# TODO: make this work.
|
||||
CONFIG (boost) {
|
||||
DEFINES += WITH_BOOST
|
||||
|
|
Loading…
Reference in New Issue