Changeset 4693fa6
- Timestamp:
- 01/20/10 22:02:30 (13 years ago)
- Branches:
- master, qt5
- Children:
- 8fe9bd2
- Parents:
- 926f106
- Location:
- src
- Files:
-
- 1 added
- 1 deleted
- 11 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
src/gui/mainwindow.cpp
r926f106 r4693fa6 7 7 #include <schedulexmlparser.h> 8 8 9 #include < activity.h>9 #include <track.h> 10 10 #include <eventmodel.h> 11 11 #include <delegate.h> … … 40 40 statusBar()->showMessage(tr("Ready")); 41 41 42 //update activitymap43 Activity::updateActivityMap();42 //update track map 43 Track::updateTrackMap(); 44 44 45 45 connect(dayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateDayView(const QDate &))); 46 connect( activityDayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateActivitiesDayView(const QDate &)));47 connect(favouriteDayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateFavourites DayView(const QDate &)));46 connect(trackDayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateTracksView(const QDate &))); 47 connect(favouriteDayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateFavouritesView(const QDate &))); 48 48 49 49 // DAY EVENTS View … … 64 64 65 65 //ACTIVITIES View 66 actTreeView->setHeaderHidden(true);67 actTreeView->setRootIsDecorated(false);68 actTreeView->setIndentation(0);69 actTreeView->setAnimated(true);70 actTreeView->setModel(new EventModel());71 actTreeView->setItemDelegate(new Delegate(actTreeView));66 trackTreeView->setHeaderHidden(true); 67 trackTreeView->setRootIsDecorated(false); 68 trackTreeView->setIndentation(0); 69 trackTreeView->setAnimated(true); 70 trackTreeView->setModel(new EventModel()); 71 trackTreeView->setItemDelegate(new Delegate(trackTreeView)); 72 72 73 73 // DAY EVENTS View … … 83 83 connect(dayTreeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &))); 84 84 connect(favTreeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &))); 85 connect( actTreeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &)));85 connect(trackTreeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &))); 86 86 connect(searchTreeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &))); 87 87 // request for map to be displayed 88 88 connect(dayTreeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &))); 89 89 connect(favTreeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &))); 90 connect( actTreeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &)));90 connect(trackTreeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &))); 91 91 connect(searchTreeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &))); 92 92 // event search button clicked … … 103 103 { 104 104 dayNavigator->hide(); // hide DayNavigatorWidget 105 activityDayNavigator->hide();105 trackDayNavigator->hide(); 106 106 } 107 107 else … … 110 110 QDate aEndDate = Conference::getById(confId).end(); 111 111 dayNavigator->setDates(aStartDate, aEndDate); 112 activityDayNavigator->setDates(aStartDate, aEndDate);112 trackDayNavigator->setDates(aStartDate, aEndDate); 113 113 favouriteDayNavigator->setDates(aStartDate, aEndDate); 114 114 } … … 162 162 QDate aEndDate = Conference::getById(confId).end(); 163 163 dayNavigator->setDates(aStartDate, aEndDate); 164 activityDayNavigator->setDates(aStartDate, aEndDate);165 } 166 //update activitymap167 Activity::updateActivityMap();164 trackDayNavigator->setDates(aStartDate, aEndDate); 165 } 166 //update track map 167 Track::updateTrackMap(); 168 168 } 169 169 … … 207 207 } 208 208 break; 209 case 2: //index 2 of tabWidget: activitiesTab210 { 211 static_cast<EventModel*>( actTreeView->model())->loadEventsByActivities(Conference::getById(confId).start(), confId);212 actTreeView->reset();213 activityDayNavigator->show();209 case 2: //index 2 of tabWidget: trackTab 210 { 211 static_cast<EventModel*>(trackTreeView->model())->loadEventsByTrack(Conference::getById(confId).start(), confId); 212 trackTreeView->reset(); 213 trackDayNavigator->show(); 214 214 } 215 215 break; … … 221 221 } 222 222 223 void MainWindow::update ActivitiesDayView(const QDate &aDate)224 { 225 static_cast<EventModel*>( actTreeView->model())->loadEventsByActivities(aDate, confId);226 actTreeView->reset();227 activityDayNavigator->show();228 } 229 230 void MainWindow::updateFavourites DayView(const QDate &aDate)223 void MainWindow::updateTracksView(const QDate &aDate) 224 { 225 static_cast<EventModel*>(trackTreeView->model())->loadEventsByTrack(aDate, confId); 226 trackTreeView->reset(); 227 trackDayNavigator->show(); 228 } 229 230 void MainWindow::updateFavouritesView(const QDate &aDate) 231 231 { 232 232 static_cast<EventModel*>(favTreeView->model())->loadFavEvents(aDate,confId); -
src/gui/mainwindow.h
r926f106 r4693fa6 23 23 void updateDayView(const QDate &aDate); 24 24 void updateTab(const int n); 25 void update ActivitiesDayView(const QDate &aDate);26 void updateFavourites DayView(const QDate &aDate);25 void updateTracksView(const QDate &aDate); 26 void updateFavouritesView(const QDate &aDate); 27 27 void itemClicked(const QModelIndex &aIndex); 28 28 void displayMap(const QModelIndex &aIndex); -
src/gui/mainwindow.ui
r926f106 r4693fa6 6 6 <x>0</x> 7 7 <y>0</y> 8 <width> 531</width>9 <height> 373</height>8 <width>609</width> 9 <height>431</height> 10 10 </rect> 11 11 </property> … … 69 69 <widget class="QWidget" name="activitiesTab" > 70 70 <attribute name="title" > 71 <string> Activities</string>71 <string>Tracks</string> 72 72 </attribute> 73 73 <layout class="QGridLayout" name="gridLayout_4" > … … 75 75 <layout class="QVBoxLayout" name="activitiesVerticalLayout" > 76 76 <item> 77 <widget class="DayNavigatorWidget" native="1" name=" activityDayNavigator" />78 </item> 79 <item> 80 <widget class="TreeView" name=" actTreeView" >77 <widget class="DayNavigatorWidget" native="1" name="trackDayNavigator" /> 78 </item> 79 <item> 80 <widget class="TreeView" name="trackTreeView" > 81 81 <property name="maximumSize" > 82 82 <size> … … 91 91 </layout> 92 92 </widget> 93 <widget class="QWidget" name="searchTab" >94 <attribute name="title" >93 <widget class="QWidget" name="searchTab" > 94 <attribute name="title" > 95 95 <string>Search</string> 96 96 </attribute> 97 <layout class="QVBoxLayout" name="verticalLayout_3" >98 99 <layout class="QFormLayout" name="formLayout">100 <property name="fieldGrowthPolicy">101 102 103 <item row="0" column="0">104 <widget class="QCheckBox" name="searchTitle">105 <property name="text">106 107 108 109 110 <item row="0" column="1">111 <layout class="QHBoxLayout" name="horizontalLayout">112 113 <widget class="QLineEdit" name="searchEdit">114 <property name="enabled">115 116 117 <property name="toolTip">118 119 120 121 122 123 <widget class="QPushButton" name="searchButton">124 <property name="text">125 126 127 <property name="checkable">128 129 130 <property name="autoDefault">131 132 133 <property name="default">134 135 136 <property name="flat">137 138 139 140 141 142 143 <item row="1" column="0">144 <widget class="QCheckBox" name="searchAbstract">145 <property name="text">146 147 148 149 150 151 152 153 <widget class="DayNavigatorWidget" name="searchDayNavigator" native="true">154 <property name="maximumSize">155 156 157 158 159 160 161 162 163 <widget class="TreeView" name="searchTreeView">164 <property name="maximumSize">165 166 167 168 169 170 171 172 173 </widget> 174 <widget class="QWidget" name="mapTab" >175 <attribute name="title" >97 <layout class="QVBoxLayout" name="verticalLayout_3" > 98 <item> 99 <layout class="QFormLayout" name="formLayout" > 100 <property name="fieldGrowthPolicy" > 101 <enum>QFormLayout::AllNonFixedFieldsGrow</enum> 102 </property> 103 <item row="0" column="0" > 104 <widget class="QCheckBox" name="searchTitle" > 105 <property name="text" > 106 <string>Title</string> 107 </property> 108 </widget> 109 </item> 110 <item row="0" column="1" > 111 <layout class="QHBoxLayout" name="horizontalLayout" > 112 <item> 113 <widget class="QLineEdit" name="searchEdit" > 114 <property name="enabled" > 115 <bool>true</bool> 116 </property> 117 <property name="toolTip" > 118 <string>type a keyword to search</string> 119 </property> 120 </widget> 121 </item> 122 <item> 123 <widget class="QPushButton" name="searchButton" > 124 <property name="text" > 125 <string>Search</string> 126 </property> 127 <property name="checkable" > 128 <bool>false</bool> 129 </property> 130 <property name="autoDefault" > 131 <bool>false</bool> 132 </property> 133 <property name="default" > 134 <bool>true</bool> 135 </property> 136 <property name="flat" > 137 <bool>false</bool> 138 </property> 139 </widget> 140 </item> 141 </layout> 142 </item> 143 <item row="1" column="0" > 144 <widget class="QCheckBox" name="searchAbstract" > 145 <property name="text" > 146 <string>Abstract</string> 147 </property> 148 </widget> 149 </item> 150 </layout> 151 </item> 152 <item> 153 <widget class="DayNavigatorWidget" native="1" name="searchDayNavigator" > 154 <property name="maximumSize" > 155 <size> 156 <width>16777215</width> 157 <height>16777215</height> 158 </size> 159 </property> 160 </widget> 161 </item> 162 <item> 163 <widget class="TreeView" name="searchTreeView" > 164 <property name="maximumSize" > 165 <size> 166 <width>16777215</width> 167 <height>16777215</height> 168 </size> 169 </property> 170 </widget> 171 </item> 172 </layout> 173 </widget> 174 <widget class="QWidget" name="mapTab" > 175 <attribute name="title" > 176 176 <string>Map</string> 177 177 </attribute> … … 186 186 <x>0</x> 187 187 <y>0</y> 188 <width> 531</width>188 <width>609</width> 189 189 <height>22</height> 190 190 </rect> -
src/mvc/delegate.cpp
r926f106 r4693fa6 1 1 #include "delegate.h" 2 2 #include "eventmodel.h" 3 #include < activity.h>3 #include <track.h> 4 4 5 5 #include <QDebug> … … 63 63 QFontMetrics fmBigB(fontBigB); 64 64 65 int spacer = (fmSmall.boundingRect("999").width() < SPACER) ? SPACER : fmSmall.boundingRect("999").width();65 //int spacer = (fmSmall.boundingRect("999").width() < SPACER) ? SPACER : fmSmall.boundingRect("999").width(); 66 66 67 67 if(isLast(index)) … … 165 165 // track 166 166 titlePointF.setY(titlePointF.y()+fmSmall.height()-fmSmall.descent()); 167 painter->drawText(titlePointF," Activity(s): " + Activity::getActivityName(event->activityId()));167 painter->drawText(titlePointF,"Track: " + Track::getTrackName(event->trackId())); 168 168 } 169 169 else // doesn't have parent - time-groups' elements (top items) -
src/mvc/event.cpp
r926f106 r4693fa6 8 8 int const Event::sTable1ColCount = 9; // see 'toRecord()' for more details 9 9 int const Event::sTable2ColCount = 5; // see 'toRecord()' for more details 10 const QString Event::XID_ACTIVITY = "xid_activity";11 const QString Event::START = "start";12 13 14 10 15 11 QSqlRecord const Event::sColumns = Event::toRecord(QList<QSqlField>() … … 19 15 << QSqlField("start", QVariant::DateTime) 20 16 << QSqlField("duration", QVariant::Int) 21 << QSqlField("xid_ activity", QVariant::Int)17 << QSqlField("xid_track", QVariant::Int) 22 18 << QSqlField("type", QVariant::String) 23 19 << QSqlField("language", QVariant::String) -
src/mvc/event.h
r926f106 r4693fa6 24 24 static const int sTable1ColCount; 25 25 static const int sTable2ColCount; 26 static const QString XID_ACTIVITY;27 static const QString START;28 26 public: 29 27 static Event getById(int id, int conferenceId); … … 34 32 int id() const { return value("id").toInt(); } 35 33 int conferenceId() const { return value("xid_conference").toInt(); } 36 QDateTime start() const { return value( START).toDateTime(); }34 QDateTime start() const { return value("start").toDateTime(); } 37 35 int duration() const { return value("duration").toInt(); } 38 int activityId() const { return value(XID_ACTIVITY).toInt(); }36 int trackId() const { return value("xid_track").toInt(); } 39 37 QString type() const { return value("type").toString(); } 40 38 QString language() const { return value("language").toString(); } … … 55 53 void setId(int id) { setValue("id", id); } 56 54 void setConferenceId(int conferenceId) { setValue("xid_conference", conferenceId); } 57 void setStart(const QDateTime & start) { setValue( START, start); }55 void setStart(const QDateTime & start) { setValue("start", start); } 58 56 void setDuration(int duration) { setValue("duration", duration); } 59 void set ActivityId(int activityId) { setValue(XID_ACTIVITY, activityId); }57 void setTrackId(int trackId) { setValue("xid_track", trackId); } 60 58 void setType(const QString & type) { setValue("type", type); } 61 59 void setLanguage(const QString & language) { setValue("language", language); } -
src/mvc/eventmodel.cpp
r926f106 r4693fa6 1 1 #include "eventmodel.h" 2 2 #include <conference.h> 3 #include <activity.h> 4 5 const QString EventModel::COMMA_SEPARATOR = ", "; 3 #include <track.h> 6 4 7 5 EventModel::EventModel() … … 46 44 } 47 45 48 void EventModel::create ActivityGroups() {46 void EventModel::createTrackGroups() { 49 47 mGroups.clear(); 50 48 mParents.clear(); … … 53 51 return; 54 52 } 55 int activityId = mEvents.first().activityId();56 57 mGroups << EventModel::Group( Activity::getActivityName(activityId), 0);58 int next ActivityId = activityId;53 int trackId = mEvents.first().trackId(); 54 55 mGroups << EventModel::Group(Track::getTrackName(trackId), 0); 56 int nextTrackId = trackId; 59 57 60 58 for (int i=0; i<mEvents.count(); i++) 61 59 { 62 activityId = mEvents.at(i).activityId();63 if (next ActivityId != activityId)60 trackId = mEvents.at(i).trackId(); 61 if (nextTrackId != trackId) 64 62 { 65 63 mGroups.last().mChildCount = i - mGroups.last().mFirstEventIndex; 66 mGroups << EventModel::Group( Activity::getActivityName(activityId), i);67 next ActivityId = activityId;64 mGroups << EventModel::Group(Track::getTrackName(trackId), i); 65 nextTrackId = trackId; 68 66 } 69 67 // add parent-child relation … … 168 166 { 169 167 qDebug() << "Loading Conference Data: [" << Conference::getById(aConferenceId).title() << "] " << aDate; 170 mEvents = Event::getByDate(QDate(aDate.year(), aDate.month(), aDate.day()), aConferenceId, Event::START);168 mEvents = Event::getByDate(QDate(aDate.year(), aDate.month(), aDate.day()), aConferenceId, "start"); 171 169 } 172 170 createTimeGroups(); … … 185 183 } 186 184 187 void EventModel::loadEventsBy Activities(const QDate &aDate, int aConferenceId)185 void EventModel::loadEventsByTrack(const QDate &aDate, int aConferenceId) 188 186 { 189 187 clearModel(); 190 188 if(Conference::getAll().count()) 191 189 { 192 qDebug() << "Loading Conference Data (by Activities): [" << Conference::getById(aConferenceId).title() << "] " << aDate;193 mEvents = Event::getByDate(QDate(aDate.year(), aDate.month(), aDate.day()), aConferenceId, Event::XID_ACTIVITY + COMMA_SEPARATOR + Event::START);194 } 195 create ActivityGroups();190 qDebug() << "Loading Conference Data (by Track): [" << Conference::getById(aConferenceId).title() << "] " << aDate; 191 mEvents = Event::getByDate(QDate(aDate.year(), aDate.month(), aDate.day()), aConferenceId, "xid_track, start"); 192 } 193 createTrackGroups(); 196 194 } 197 195 -
src/mvc/eventmodel.h
r926f106 r4693fa6 19 19 void loadEvents(const QDate &aDate, int aConferenceId); // loads Events from the DB 20 20 void loadFavEvents(const QDate &aDate, int aConferenceId); // loads Favourite events from the DB 21 void loadEventsBy Activities(const QDate &aDate, int aConferenceId); // loads Events grouped by Activitiesfrom the DB21 void loadEventsByTrack(const QDate &aDate, int aConferenceId); // loads Events grouped by Track from the DB 22 22 // a method to force 'EventModel' emit signal 'dataChanged()' 23 23 // a 'view', eg. 'TreeView' listens for this signal and redraws changed items(indexes) … … 42 42 private: 43 43 void createTimeGroups(); 44 void create ActivityGroups();44 void createTrackGroups(); 45 45 void clearModel(); 46 46 -
src/mvc/mvc.pro
r926f106 r4693fa6 19 19 } 20 20 21 HEADERS += activity.h \ 22 event.h \ 21 HEADERS += event.h \ 23 22 conference.h \ 23 track.h \ 24 24 delegate.h \ 25 25 eventmodel.h \ 26 26 treeview.h 27 27 28 SOURCES += activity.cpp \ 29 event.cpp \ 28 SOURCES += event.cpp \ 30 29 conference.cpp \ 30 track.cpp \ 31 31 delegate.cpp \ 32 32 eventmodel.cpp \ -
src/mvc/track.h
r926f106 r4693fa6 1 1 /* 2 * activity.h2 * track.h 3 3 * 4 4 * Created on: Dec 27, 2009 … … 6 6 */ 7 7 8 #ifndef ACTIVITY_H_9 #define ACTIVITY_H_8 #ifndef TRACK_H 9 #define TRACK_H 10 10 11 11 #include <ormrecord.h> 12 12 13 class Activity : public OrmRecord<Activity>13 class Track : public OrmRecord<Track> 14 14 { 15 15 public: … … 18 18 static const int sTableColCount; 19 19 public: 20 static QMap<int, Activity> mIdToActivity;20 static QMap<int, Track> mIdToTrack; 21 21 public: 22 static QList< Activity> getAll();22 static QList<Track> getAll(); 23 23 int id() const { return value("id").toInt(); } 24 24 void setId(int id) { setValue("id", id); } … … 26 26 void setName(const QString & type) { setValue("name", type); } 27 27 public: 28 static void update ActivityMap();29 static QString get ActivityName(int id);28 static void updateTrackMap(); 29 static QString getTrackName(int id); 30 30 }; 31 31 32 #endif /* ACTIVITY_H_ */ 32 #endif /* TRACK_H */ 33 -
src/sql/sqlengine.cpp
r926f106 r4693fa6 87 87 if (db.isValid() && db.isOpen()) 88 88 { 89 // track /activityhas to be handled as the first, since it is necessary to get90 // track ID from the ACTIVITY table, or to create new ACTIVITYrecord89 // track has to be handled as the first, since it is necessary to get 90 // track ID from the TRACK table, or to create new TRACK record 91 91 // and get the ID from newly created record 92 QString queryExist = QString("SELECT id FROM activityWHERE name='%1'").arg(aEvent["track"]);92 QString queryExist = QString("SELECT id FROM track WHERE name='%1'").arg(aEvent["track"]); 93 93 QSqlQuery resultExist(queryExist,db); 94 // now we have to check whether ACTIVITY record with 'name' exists or not, 95 // - if it doesn't exist yet, then we have to add that record to 'ACTIVITY' table 96 // and assign autoincremented 'id' to aActivity 97 // - if it exists, then we need to get its 'id' and assign it to aRoom 94 // now we have to check whether TRACK record with 'name' exists or not, 95 // - if it doesn't exist yet, then we have to add that record to 'TRACK' table 96 // - if it exists, then we need to get its 'id' 98 97 int actId = -1; 99 if(resultExist.next()) // ACTIVITYrecord with 'name' already exists: we need to get its 'id'98 if(resultExist.next()) // TRACK record with 'name' already exists: we need to get its 'id' 100 99 { 101 100 actId = resultExist.value(0).toInt(); 102 101 } 103 else // ACTIVITYrecord doesn't exist yet, need to create it102 else // TRACK record doesn't exist yet, need to create it 104 103 { 105 104 QString values = QString("'%1'").arg(aEvent["track"]); 106 QString query = QString("INSERT INTO activity(name) VALUES (%1)").arg(values);105 QString query = QString("INSERT INTO track (name) VALUES (%1)").arg(values); 107 106 QSqlQuery result (query, db); 108 107 actId = result.lastInsertId().toInt(); // 'id' is assigned automatically … … 123 122 .arg("0"); 124 123 125 QString query = QString("INSERT INTO EVENT (xid_conference, id, start, duration, xid_ activity, type, language, favourite, alarm) VALUES (%1)").arg(values);124 QString query = QString("INSERT INTO EVENT (xid_conference, id, start, duration, xid_track, type, language, favourite, alarm) VALUES (%1)").arg(values); 126 125 QSqlQuery result (query, db); 127 126 //LOG_AUTOTEST(query); … … 233 232 timeslot_duration INTEGER)"); 234 233 235 query.exec("CREATE TABLE ACTIVITY( \234 query.exec("CREATE TABLE TRACK ( \ 236 235 id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL , \ 237 236 name VARCHAR NOT NULL )"); … … 251 250 start INTEGER NOT NULL , \ 252 251 duration INTEGER NOT NULL , \ 253 xid_ activity INTEGER NOT NULL REFERENCES ACTIVITY(id), \252 xid_track INTEGER NOT NULL REFERENCES TRACK(id), \ 254 253 type VARCHAR, \ 255 254 language VARCHAR, \ … … 258 257 PRIMARY KEY (xid_conference,id), \ 259 258 FOREIGN KEY(xid_conference) REFERENCES CONFERENCE(id) \ 260 FOREIGN KEY(xid_ activity) REFERENCES ACTIVITY(id))");259 FOREIGN KEY(xid_track) REFERENCES TRACK(id))"); 261 260 262 261 #ifdef MAEMO -
src/test/mvc/eventtest.cpp
r926f106 r4693fa6 22 22 QCOMPARE(event.id(), 500); 23 23 QCOMPARE(event.start(), QDateTime(QDate(2009, 2, 7), QTime(11, 30, 0), Qt::UTC)); 24 QCOMPARE(event. activityId(), 123);24 QCOMPARE(event.trackId(), 123); 25 25 26 26 // !!! TODO: typeId and languageId … … 43 43 event.setStart(QDateTime::fromString("Sat Feb 7 11:30:00 2009")); 44 44 event.setDuration(30); 45 event.set ActivityId(40);45 event.setTrackId(40); 46 46 event.setType(QString("type")); 47 47 event.setLanguage(QString("language")); … … 51 51 QCOMPARE(event.start(), QDateTime::fromString("Sat Feb 7 11:30:00 2009")); 52 52 QCOMPARE(event.duration(), 30); 53 QCOMPARE(event. activityId(), 40);53 QCOMPARE(event.trackId(), 40); 54 54 QCOMPARE(event.type(), QString("type")); 55 55 QCOMPARE(event.language(), QString("language")); … … 71 71 void EventTest::columnsForSelect() 72 72 { 73 QCOMPARE(Event::columnsForSelect(), QString("id,xid_conference,start,duration,xid_ activity,type,language"));73 QCOMPARE(Event::columnsForSelect(), QString("id,xid_conference,start,duration,xid_track,type,language")); 74 74 QCOMPARE(Event::columnsForSelect("t0"), 75 QString("t0.id,t0.xid_conference,t0.start,t0.duration,t0.xid_ activity,t0.type,t0.language"));75 QString("t0.id,t0.xid_conference,t0.start,t0.duration,t0.xid_track,t0.type,t0.language")); 76 76 } 77 77 78 78 void EventTest::selectQuery() 79 79 { 80 QCOMPARE(Event::selectQuery(), QString("SELECT id,xid_conference,start,duration,xid_ activity,type,language FROM event "));80 QCOMPARE(Event::selectQuery(), QString("SELECT id,xid_conference,start,duration,xid_track,type,language FROM event ")); 81 81 }
Note: See TracChangeset
for help on using the changeset viewer.