src/primitives.cpp

changeset 498
791c831c8020
parent 497
c51941e590b6
child 500
cad8cdc42a64
equal deleted inserted replaced
497:c51941e590b6 498:791c831c8020
98 void PrimitiveLister::work() 98 void PrimitiveLister::work()
99 { g_activePrimLister = this; 99 { g_activePrimLister = this;
100 m_prims.clear(); 100 m_prims.clear();
101 101
102 QDir dir (LDPaths::prims()); 102 QDir dir (LDPaths::prims());
103 ulong baselen = dir.absolutePath().length(); 103 int baselen = dir.absolutePath().length();
104 ulong i = 0; 104 int i = 0;
105 List<str> fnames; 105 List<str> fnames;
106 106
107 assert (dir.exists()); 107 assert (dir.exists());
108 recursiveGetFilenames (dir, fnames); 108 recursiveGetFilenames (dir, fnames);
109 emit starting (fnames.size()); 109 emit starting (fnames.size());
153 return; 153 return;
154 154
155 PrimitiveLister* lister = new PrimitiveLister; 155 PrimitiveLister* lister = new PrimitiveLister;
156 QThread* listerThread = new QThread; 156 QThread* listerThread = new QThread;
157 lister->moveToThread (listerThread); 157 lister->moveToThread (listerThread);
158 connect (lister, SIGNAL (starting (ulong)), g_win, SLOT (primitiveLoaderStart (ulong))); 158 connect (lister, SIGNAL (starting (int)), g_win, SLOT (primitiveLoaderStart (int)));
159 connect (lister, SIGNAL (update (ulong)), g_win, SLOT (primitiveLoaderUpdate (ulong))); 159 connect (lister, SIGNAL (update (int)), g_win, SLOT (primitiveLoaderUpdate (int)));
160 connect (lister, SIGNAL (workDone()), g_win, SLOT (primitiveLoaderEnd())); 160 connect (lister, SIGNAL (workDone()), g_win, SLOT (primitiveLoaderEnd()));
161 connect (listerThread, SIGNAL (started()), lister, SLOT (work())); 161 connect (listerThread, SIGNAL (started()), lister, SLOT (work()));
162 connect (listerThread, SIGNAL (finished()), lister, SLOT (deleteLater())); 162 connect (listerThread, SIGNAL (finished()), lister, SLOT (deleteLater()));
163 listerThread->start(); 163 listerThread->start();
164 } 164 }

mercurial