Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
z52c authored Jul 12, 2018
1 parent 6590210 commit a2e2ecc
Show file tree
Hide file tree
Showing 4 changed files with 328 additions and 5 deletions.
5 changes: 3 additions & 2 deletions downloadqueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ downloadQueue::downloadQueue(QObject *parent) : QObject(parent)
connect(np,SIGNAL(finished(int,QStringList)),q,SLOT(beginToDownload(int,QStringList)));
connect(np,SIGNAL(status(QString)),this,SIGNAL(status(QString)));

doJob();

}

void downloadQueue::doJob()
Expand All @@ -31,7 +33,6 @@ void downloadQueue::doJob()
case 2://网易云歌单下载(灰掉的)
songNameType=tmp.nameType;songQuality=tmp.quality;mp3Dir=tmp.dir;np->doJob(true,tmp.url);
}
qDebug()<<QString("quality in queue:%1").arg(tmp.quality);
}

void downloadQueue::oneTaskFinished()
Expand All @@ -52,7 +53,7 @@ void downloadQueue::insertQueue(int inFlag, int inQuality, int inNameType, QStri
tmp.nameType=inNameType;
tmp.dir=inDir;
tmp.url=inUrl;
qDebug()<<QString("quality insert:%1").arg(inQuality);
db->insertDownloadQueue(inFlag,inQuality,inNameType,inDir,inUrl);
queueList.append(tmp);
if(!downloading)
doJob();
Expand Down
7 changes: 7 additions & 0 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ MainWindow::~MainWindow()
void MainWindow::init2Finished()
{
ui->pushButtonDownload->setEnabled(true);
QList<struct downloadQueueInfo> tmp;
tmp=dq->getQueue();
while(tmp.count()>0)
{
ui->textEditDownloadQueueInfo->append(tmp.at(0).url);
tmp.removeAt(0);
}
}

void MainWindow::on_pushButtonChosePath_clicked()
Expand Down
6 changes: 3 additions & 3 deletions musicDownloader.pro.user
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.6.1, 2018-07-12T21:34:47. -->
<!-- Written by QtCreator 4.6.1, 2018-07-12T22:11:33. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
Expand Down Expand Up @@ -62,7 +62,7 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.11.0 MinGW 32bit_static</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.11.0 MinGW 32bit_static</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{0c47e6e6-c7e4-4aa1-85fa-c060226e239c}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
Expand Down Expand Up @@ -292,7 +292,7 @@
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">musicDownloader.pro</value>
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">D:/QtProject/build-musicDownloader-Desktop_Qt_5_11_0_MinGW_32bit_static-Release</value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
Expand Down
Loading

0 comments on commit a2e2ecc

Please sign in to comment.