mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-25 23:00:21 +01:00
2018-08-07 Fred Gleason <fredg@paravelsystems.com>
* Removed the 'pam_rd' plug-in. * Removed rdchunk(1). * Upgraded Qt3 to Qt4.
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
## Makefile.am
|
||||
##
|
||||
## MAkefile.am for rivendell/utils/rddbmgr
|
||||
##
|
||||
## (C) Copyright 2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
@@ -19,8 +17,8 @@
|
||||
##
|
||||
## Use automake to process this into a Makefile.in
|
||||
|
||||
AM_CPPFLAGS = -Wall -DPREFIX=\"$(prefix)\" -DQTDIR=\"@QT_DIR@\" @QT_CXXFLAGS@ -I$(top_srcdir)/lib
|
||||
LIBS = @QT_LIBS@ -L$(top_srcdir)/lib
|
||||
AM_CPPFLAGS = -Wall -DPREFIX=\"$(prefix)\" -I$(top_srcdir)/lib @QT4_CFLAGS@ -DQT3_SUPPORT -I/usr/include/Qt3Support
|
||||
LIBS = -L$(top_srcdir)/lib
|
||||
MOC = @QT_MOC@
|
||||
|
||||
# The dependency for qt's Meta Object Compiler (moc)
|
||||
@@ -38,7 +36,7 @@ dist_rddbmgr_SOURCES = check.cpp\
|
||||
schemamap.cpp\
|
||||
updateschema.cpp
|
||||
|
||||
rddbmgr_LDADD = @LIB_RDLIBS@ @LIBVORBIS@
|
||||
rddbmgr_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ -lQt3Support
|
||||
|
||||
CLEANFILES = *~\
|
||||
*.exe\
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <qdir.h>
|
||||
//Added by qt3to4:
|
||||
#include <QSqlQuery>
|
||||
|
||||
#include <dbversion.h>
|
||||
#include <rdcart.h>
|
||||
@@ -141,7 +143,7 @@ void MainObject::RelinkAudio(const QString &srcdir) const
|
||||
|
||||
QDir dir(srcdir);
|
||||
QStringList files=dir.entryList(QDir::Files|QDir::Readable|QDir::Hidden);
|
||||
for(unsigned i=0;i<files.size();i++) {
|
||||
for(int i=0;i<files.size();i++) {
|
||||
QString filename=dir.path()+"/"+files[i];
|
||||
QString hash=RDSha1Hash(filename);
|
||||
QString firstdest;
|
||||
@@ -596,7 +598,7 @@ void MainObject::CheckOrphanedAudio() const
|
||||
{
|
||||
QDir dir(db_config->audioRoot());
|
||||
QStringList list=dir.entryList("??????_???.wav",QDir::Files);
|
||||
for(unsigned i=0;i<list.size();i++) {
|
||||
for(int i=0;i<list.size();i++) {
|
||||
bool ok=false;
|
||||
list[i].left(6).toUInt(&ok);
|
||||
if(ok) {
|
||||
|
||||
@@ -2689,7 +2689,7 @@ bool MainObject::InsertRDAirplayHotkeys(const QString &station_name,
|
||||
labels.push_back(QObject::tr("Aux Log 1"));
|
||||
labels.push_back(QObject::tr("Aux Log 2"));
|
||||
|
||||
for(unsigned i=0;i<labels.size();i++) {
|
||||
for(int i=0;i<labels.size();i++) {
|
||||
sql=QString("insert into RDHOTKEYS set ")+
|
||||
"STATION_NAME=\""+RDEscapeString(station_name)+"\","+
|
||||
"MODULE_NAME=\"airplay\","+
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#include <rddb.h>
|
||||
|
||||
#include "rddbmgr.h"
|
||||
//Added by qt3to4:
|
||||
#include <QSqlQuery>
|
||||
|
||||
bool MainObject::Modify(QString *err_msg,int set_schema) const
|
||||
{
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <qapplication.h>
|
||||
#include <qfileinfo.h>
|
||||
#include <qsqldatabase.h>
|
||||
#include <qsqlerror.h>
|
||||
#include <qstringlist.h>
|
||||
|
||||
#include <dbversion.h>
|
||||
@@ -282,19 +283,14 @@ MainObject::MainObject(QObject *parent)
|
||||
//
|
||||
// Open Database
|
||||
//
|
||||
QSqlDatabase *db=QSqlDatabase::addDatabase(db_mysql_driver);
|
||||
if(!db) {
|
||||
fprintf(stderr,"rddbmgr: unable to connect to database server\n");
|
||||
exit(1);
|
||||
}
|
||||
db->setDatabaseName(db_mysql_database);
|
||||
db->setUserName(db_mysql_loginname);
|
||||
db->setPassword(db_mysql_password);
|
||||
db->setHostName(db_mysql_hostname);
|
||||
if(!db->open()) {
|
||||
QSqlDatabase db=QSqlDatabase::addDatabase(db_mysql_driver);
|
||||
db.setDatabaseName(db_mysql_database);
|
||||
db.setUserName(db_mysql_loginname);
|
||||
db.setPassword(db_mysql_password);
|
||||
db.setHostName(db_mysql_hostname);
|
||||
if(!db.open()) {
|
||||
fprintf(stderr,"rddbmgr: unable to open database [%s]\n",
|
||||
(const char *)db->lastError().text());
|
||||
db->removeDatabase(db_mysql_database);
|
||||
(const char *)db.lastError().text());
|
||||
exit(1);
|
||||
}
|
||||
db_table_create_postfix=
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#define RDDBMGR_H
|
||||
|
||||
#include <qobject.h>
|
||||
//Added by qt3to4:
|
||||
#include <QSqlQuery>
|
||||
|
||||
#include <rdconfig.h>
|
||||
#include <rdstation.h>
|
||||
|
||||
Reference in New Issue
Block a user