Commit 6395f650 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Fix build with Qt5

parent 286b5668
......@@ -27,7 +27,7 @@
#include "Types.h"
#include <QApplication>
#include <QDesktopServices>
#include <QStandardPaths>
#include <QDir>
#include <QProcess>
#include <QSettings>
......@@ -41,8 +41,8 @@
EffectsEngine::EffectsEngine()
{
m_cache = new QSettings( QDesktopServices::storageLocation(
QDesktopServices::CacheLocation ) + "/effects",
m_cache = new QSettings( QStandardPaths::writableLocation(
QStandardPaths::CacheLocation ) + "/effects",
QSettings::IniFormat, this );
//Create the names entry. A bit ugly but faster (I guess...) afterward.
m_names.push_back( QStringList() );
......
......@@ -29,6 +29,8 @@
#include <QMouseEvent>
#include <QStandardItem>
#include <QVBoxLayout>
#include <QMimeData>
#include <QDrag>
#include <QtDebug>
......
......@@ -79,7 +79,7 @@ ImportController::ImportController(QWidget *parent) :
m_ui->treeView->setCurrentIndex( m_filesModel->index( m_currentlyWatchedDir ) );
m_ui->treeView->setExpanded( m_ui->treeView->currentIndex() , true );
m_ui->treeView->header()->setStretchLastSection( false );
m_ui->treeView->header()->setResizeMode( QHeaderView::ResizeToContents );
m_ui->treeView->header()->setSectionResizeMode( QHeaderView::ResizeToContents );
m_ui->treeView->setColumnHidden( 1, true );
m_ui->treeView->setColumnHidden( 2, true );
m_ui->treeView->setColumnHidden( 3, true );
......
......@@ -35,6 +35,8 @@
#include <QMenu>
#include <QMessageBox>
#include <QTime>
#include <QMimeData>
#include <QDrag>
MediaCellView::MediaCellView( Clip* clip, QWidget *parent ) :
QWidget( parent ),
......@@ -213,7 +215,7 @@ MediaCellView::mouseMoveEvent( QMouseEvent* event )
return;
QMimeData* mimeData = new QMimeData;
mimeData->setData( "vlmc/uuid", m_clip->fullId().toAscii() );
mimeData->setData( "vlmc/uuid", m_clip->fullId().toLatin1() );
QDrag* drag = new QDrag( this );
drag->setMimeData( mimeData );
const Media* parent = m_clip->getMedia();
......
......@@ -32,6 +32,7 @@
#include <QDebug>
#include <QUrl>
#include <QMimeData>
MediaLibrary::MediaLibrary(QWidget *parent) : QWidget(parent),
m_ui( new Ui::MediaLibrary() )
......
......@@ -26,7 +26,7 @@
LCDTimecode::LCDTimecode( QWidget* parent )
: QLCDNumber( parent )
{
setNumDigits( 11 );
setDigitCount( 11 );
setTime( 0, 0, 0, 0 );
}
......
......@@ -178,7 +178,7 @@ Timeline::save( QXmlStreamWriter &project ) const
{
project.writeStartElement( "linkedTo" );
project.writeStartElement( "item" );
project.writeAttribute( "uuid", item->groupItem()->uuid() );
project.writeAttribute( "uuid", item->groupItem()->uuid().toString() );
project.writeEndElement();
project.writeEndElement();
}
......
......@@ -48,6 +48,7 @@
#include <QMouseEvent>
#include <QScrollBar>
#include <QWheelEvent>
#include <QMimeData>
#include <QtDebug>
......
......@@ -23,7 +23,7 @@
#ifndef TRACKCONTROLS_H
#define TRACKCONTROLS_H
#include <QtGui/QWidget>
#include <QWidget>
class GraphicsTrack;
......
......@@ -114,8 +114,7 @@ Library::mediaLoaded( const Media* media )
disconnect( media, SIGNAL( metaDataComputed( const Media* ) ),
this, SLOT( mediaLoaded( const Media* ) ) );
}
m_nbMediaToLoad.fetchAndAddAcquire( -1 );
if ( m_nbMediaToLoad == 0 )
if (m_nbMediaToLoad.fetchAndAddAcquire( -1 ) == 1)
emit projectLoaded();
}
......
......@@ -238,7 +238,7 @@ Clip::save( QXmlStreamWriter &project )
}
else
{
project.writeAttribute( "parent", m_parent->uuid() );
project.writeAttribute( "parent", m_parent->uuid().toString() );
project.writeAttribute( "begin", QString::number( m_begin ) );
project.writeAttribute( "end", QString::number( m_end ) );
}
......@@ -262,7 +262,7 @@ Clip::fullId() const
while ( c->isRootClip() == false )
{
c = c->getParent();
id = c->uuid() + '/' + id;
id = c->uuid().toString() + '/' + id;
}
return id;
}
......
......@@ -101,7 +101,7 @@ WorkflowRenderer::setupRenderer( quint32 width, quint32 height, double fps )
//Clean any previous render.
sprintf( videoString, "width=%i:height=%i:dar=%s:fps=%f/1:cookie=0:codec=%s:cat=2:caching=0",
width, height, m_aspectRatio.toAscii().constData(), fps, "RV32" );
width, height, m_aspectRatio.toLatin1().constData(), fps, "RV32" );
sprintf( audioParameters, "cookie=1:cat=1:codec=f32l:samplerate=%u:channels=%u:caching=0",
m_rate, m_nbChannels );
strcpy( inputSlave, ":input-slave=imem://" );
......
......@@ -67,7 +67,7 @@ void
YouTubeUploader::uploadInit()
{
/* Random 10 digit boundary string, as per protocol */
m_boundary = QString( QString::number( qrand(), 10 ).toAscii() );
m_boundary = QString( QString::number( qrand(), 10 ).toLatin1() );
QString privateToken = "";
......
......@@ -32,6 +32,7 @@
#include <QObject>
#include <QUuid>
#include <QXmlStreamWriter>
#include <QAtomicInt>
class Clip;
class Effect;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment